Merge "New hook for filters on Special:Contributions form"
[lhc/web/wiklou.git] / maintenance / runBatchedQuery.php
index 76340cd..2feae02 100644 (file)
@@ -33,8 +33,9 @@ require_once __DIR__ . '/Maintenance.php';
 class BatchedQueryRunner extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Run a query repeatedly until it affects 0 rows, and wait for slaves in between.\n" .
-                               "NOTE: You need to set a LIMIT clause yourself.";
+               $this->addDescription(
+                       "Run a query repeatedly until it affects 0 rows, and wait for slaves in between.\n" .
+                               "NOTE: You need to set a LIMIT clause yourself." );
        }
 
        public function execute() {
@@ -44,7 +45,7 @@ class BatchedQueryRunner extends Maintenance {
 
                $query = $this->getArg();
                $n = 1;
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                do {
                        $this->output( "Batch $n: " );
                        $n++;