X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupSpam.php;h=4e47cfba57a88043e6edd40bcf88506e3609bd8f;hb=9a05e34a1072228fe2ad4068115b07295b02b77e;hp=2f3f01347ca30b085f7fca7a28a64782efa3676d;hpb=e3bd13db0c285f312e31bb1b7271af4628cca80c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index 2f3f01347c..4e47cfba57 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -64,7 +64,7 @@ class CleanupSpam extends Maintenance { $this->output( "Finding spam on " . count( $wgLocalDatabases ) . " wikis\n" ); $found = false; foreach ( $wgLocalDatabases as $wikiID ) { - $dbr = $this->getDB( DB_SLAVE, [], $wikiID ); + $dbr = $this->getDB( DB_REPLICA, [], $wikiID ); $count = $dbr->selectField( 'externallinks', 'COUNT(*)', [ 'el_index' . $dbr->buildLike( $like ) ], __METHOD__ ); @@ -83,7 +83,7 @@ class CleanupSpam extends Maintenance { } else { // Clean up spam on this wiki - $dbr = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $res = $dbr->select( 'externallinks', [ 'DISTINCT el_from' ], [ 'el_index' . $dbr->buildLike( $like ) ], __METHOD__ ); $count = $dbr->numRows( $res );