summaryrefslogtreecommitdiff
path: root/maintenance/runJobs.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/runJobs.php')
-rw-r--r--maintenance/runJobs.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index 4539be05..799092e1 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -1,6 +1,6 @@
<?php
-$optionsWithArgs = array( 'maxjobs' );
+$optionsWithArgs = array( 'maxjobs', 'type' );
$wgUseNormalUser = true;
require_once( 'commandLine.inc' );
require_once( "$IP/includes/JobQueue.php" );
@@ -20,15 +20,15 @@ $wgTitle = Title::newFromText( 'RunJobs.php' );
$dbw = wfGetDB( DB_MASTER );
$n = 0;
-$conds = array();
+$conds = '';
if ($type !== false)
- $conds = array('job_cmd' => $type);
+ $conds = "job_cmd = " . $dbw->addQuotes($type);
while ( $dbw->selectField( 'job', 'count(*)', $conds, 'runJobs.php' ) ) {
$offset=0;
for (;;) {
$job = ($type == false) ?
- Job::pop($offset, $type)
+ Job::pop($offset)
: Job::pop_type($type);
if ($job == false)