Merge "Avoid calling awful DatabaseBase::strictIPs() method"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 19 Sep 2016 19:02:04 +0000 (19:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 19 Sep 2016 19:02:04 +0000 (19:02 +0000)
includes/changes/RecentChange.php
includes/db/DatabaseMssql.php

index 590fd37..ac5824b 100644 (file)
@@ -297,7 +297,8 @@ class RecentChange {
                }
 
                # 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'] );
                }
 
index be5fac9..2c6db10 100644 (file)
@@ -50,7 +50,7 @@ class DatabaseMssql extends DatabaseBase {
                return false;
        }
 
-       public function strictIPs() {
+       public function realTimestamps() {
                return false;
        }