diff options
Diffstat (limited to 'maintenance/cleanupSpam.php')
-rw-r--r-- | maintenance/cleanupSpam.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index 65d6bc4d..534e160d 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -12,7 +12,6 @@ function cleanupArticle( $id, $domain ) { print $title->getPrefixedDBkey() . " ..."; $rev = Revision::newFromTitle( $title ); - $reverted = false; $revId = $rev->getId(); $currentRevId = $revId; $regex = LinkFilter::makeRegex( $domain ); @@ -32,7 +31,7 @@ function cleanupArticle( $id, $domain ) { // This happens e.g. when a link comes from a template rather than the page itself print "False match\n"; } else { - $dbw =& wfGetDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER ); $dbw->immediateBegin(); if ( !$rev ) { // Didn't find a non-spammy revision, blank the page @@ -75,11 +74,11 @@ if ( !$like ) { exit(1); } -$dbr =& wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_SLAVE ); -if ( $options['all'] ) { +if ( isset($options['all']) ) { // Clean up spam on all wikis - $dbr =& wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); print "Finding spam on " . count($wgLocalDatabases) . " wikis\n"; $found = false; foreach ( $wgLocalDatabases as $db ) { |