Output more MW version info in update.php
[lhc/web/wiklou.git] / maintenance / cleanupPreferences.php
index a52ce17..bed3956 100644 (file)
@@ -34,7 +34,9 @@ require_once __DIR__ . '/Maintenance.php';
 class CleanupPreferences extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = 'Clean up hidden preferences, removed preferences, and normalizes values';
+               $this->addDescription(
+                       'Clean up hidden preferences, removed preferences, and normalizes values'
+               );
                $this->setBatchSize( 50 );
                $this->addOption( 'dry-run', 'Print debug info instead of actually deleting' );
                $this->addOption( 'hidden', 'Drop hidden preferences ($wgHiddenPrefs)' );
@@ -60,7 +62,6 @@ class CleanupPreferences extends Maintenance {
                global $wgHiddenPrefs, $wgDefaultUserOptions;
 
                $dbw = $this->getDB( DB_MASTER );
-               $didWork = false;
                $hidden = $this->hasOption( 'hidden' );
                $unknown = $this->hasOption( 'unknown' );
                $bogus = $this->hasOption( 'bogus' );
@@ -100,9 +101,6 @@ class CleanupPreferences extends Maintenance {
                }
        }
 
-       /**
-        *
-        */
        private function deleteByWhere( $dbw, $startMessage, $where ) {
                $this->output( $startMessage . "...\n" );
                $total = 0;