Merge "Re add wpScrolltop id in EditPage"
[lhc/web/wiklou.git] / maintenance / deleteSelfExternals.php
index a397663..ed15fd1 100644 (file)
@@ -32,14 +32,14 @@ require_once __DIR__ . '/Maintenance.php';
 class DeleteSelfExternals extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = 'Delete self-references to $wgServer from externallinks';
+               $this->addDescription( 'Delete self-references to $wgServer from externallinks' );
                $this->mBatchSize = 1000;
        }
 
        public function execute() {
                global $wgServer;
                $this->output( "Deleting self externals from $wgServer\n" );
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                while ( 1 ) {
                        wfWaitForSlaves();
                        $this->commitTransaction( $db, __METHOD__ );