X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrunBatchedQuery.php;h=2feae02ecacba4de4e42190b48c7ed8573c87e74;hb=17395ea3d473219259b87de1770c5d3d08961444;hp=76340cdb3281bc00048946d197883218eaec05c5;hpb=83a1cf573f7439e45d292a072472ac49212c9ffb;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php index 76340cdb32..2feae02eca 100644 --- a/maintenance/runBatchedQuery.php +++ b/maintenance/runBatchedQuery.php @@ -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++;