Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311369

Change subject: Avoid calling awful DatabaseBase::strictIPs() method
......................................................................

Avoid calling awful DatabaseBase::strictIPs() method

That method should be removed since it encourages incompatibility

Change-Id: I8c2dd6525e271d9fe7405963b67906505a90ea01
---
M InterwikiIntegrationRecentChange.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InterwikiIntegration 
refs/changes/69/311369/1

diff --git a/InterwikiIntegrationRecentChange.php 
b/InterwikiIntegrationRecentChange.php
index 32dc494..96fe5f1 100755
--- a/InterwikiIntegrationRecentChange.php
+++ b/InterwikiIntegrationRecentChange.php
@@ -149,7 +149,8 @@
                }
 
                # If our database is strict about IP addresses, use NULL 
instead of an empty string
-               if( $dbw->strictIPs() and $this->mAttribs['integration_rc_ip'] 
== '' ) {
+               $strictIPs = in_array( $dbw->getType(), [ 'oracle', 'postgres' 
] ); // legacy
+               if ( $strictIPs and $this->mAttribs['integration_rc_ip'] == '' 
) {
                        unset( $this->mAttribs['integration_rc_ip'] );
                }
 
@@ -710,4 +711,4 @@
                }
                return 
InterwikiIntegrationChangesList::showCharacterDifference( $old, $new );
        }
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/311369
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c2dd6525e271d9fe7405963b67906505a90ea01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InterwikiIntegration
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to