X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupSpam.php;h=038b28ce761cc15c4c973cdc4485504eab0bf192;hb=fb942b85b8f716acfe7c8c541275090f15b54a44;hp=fc3cc5b8df094a21e33106d0e1bd12ed789eea74;hpb=5120937028f768749d058aa91dde82a96de0af1c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index fc3cc5b8df..038b28ce76 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -47,7 +47,7 @@ class CleanupSpam extends Maintenance { $username = wfMessage( 'spambot_username' )->text(); $wgUser = User::newSystemUser( $username ); if ( !$wgUser ) { - $this->error( "Invalid username specified in 'spambot_username' message: $username", true ); + $this->fatalError( "Invalid username specified in 'spambot_username' message: $username" ); } // Hack: Grant bot rights so we don't flood RecentChanges $wgUser->addGroup( 'bot' ); @@ -55,7 +55,7 @@ class CleanupSpam extends Maintenance { $spec = $this->getArg(); $like = LinkFilter::makeLikeArray( $spec ); if ( !$like ) { - $this->error( "Not a valid hostname specification: $spec", true ); + $this->fatalError( "Not a valid hostname specification: $spec" ); } if ( $this->hasOption( 'all' ) ) { @@ -156,5 +156,5 @@ class CleanupSpam extends Maintenance { } } -$maintClass = "CleanupSpam"; +$maintClass = CleanupSpam::class; require_once RUN_MAINTENANCE_IF_MAIN;