jenkins-bot has submitted this change and it was merged.

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: Id8a0174266bcd988c85943507f1edb3518fe087e
---
M includes/changes/RecentChange.php
M includes/db/DatabaseMssql.php
2 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index 590fd37..ac5824b 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -297,7 +297,8 @@
                }
 
                # If our database is strict about IP addresses, use NULL 
instead of an empty string
-               if ( $dbw->strictIPs() && $this->mAttribs['rc_ip'] == '' ) {
+               $strictIPs = in_array( $dbw->getType(), [ 'oracle', 'postgres' 
] ); // legacy
+               if ( $strictIPs && $this->mAttribs['rc_ip'] == '' ) {
                        unset( $this->mAttribs['rc_ip'] );
                }
 
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 339174e..f2e6a67 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -50,7 +50,7 @@
                return false;
        }
 
-       public function strictIPs() {
+       public function realTimestamps() {
                return false;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8a0174266bcd988c85943507f1edb3518fe087e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Skizzerz <skizz...@skizzerz.net>
Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to