Use addDescription() instead of accessing mDescription directly
[lhc/web/wiklou.git] / maintenance / cleanupWatchlist.php
index eb7d7b1..d8c682b 100644 (file)
@@ -46,7 +46,7 @@ class WatchlistCleanup extends TableCleanup {
 
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Script to remove broken, unparseable titles in the Watchlist";
+               $this->addDescription( 'Script to remove broken, unparseable titles in the Watchlist' );
                $this->addOption( 'fix', 'Actually remove entries; without will only report.' );
        }
 
@@ -77,7 +77,7 @@ class WatchlistCleanup extends TableCleanup {
 
        private function removeWatch( $row ) {
                if ( !$this->dryrun && $this->hasOption( 'fix' ) ) {
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->delete(
                                'watchlist', array(
                                'wl_user' => $row->wl_user,