Merge "(bug 44219) Avoid fatal errors when a revision doesn't exist in action=info"
[lhc/web/wiklou.git] / maintenance / cleanupSpam.php
index bbe0609..a41423a 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
 /**
  * Maintenance script to cleanup all spam from a given hostname.
@@ -44,7 +44,7 @@ class CleanupSpam extends Maintenance {
                $username = wfMessage( 'spambot_username' )->text();
                $wgUser = User::newFromName( $username );
                if ( !$wgUser ) {
-                       $this->error( "Invalid username", true );
+                       $this->error( "Invalid username specified in 'spambot_username' message: $username", true );
                }
                // Create the user if necessary
                if ( !$wgUser->getId() ) {