Don't manually quote stuff
[lhc/web/wiklou.git] / maintenance / runJobs.php
index 9c1ad29..946ee2b 100644 (file)
@@ -60,11 +60,11 @@ class RunJobs extends Maintenance {
                $wgTitle = Title::newFromText( 'RunJobs.php' );
                $dbw = wfGetDB( DB_MASTER );
                $n = 0;
-               $conds = '';
+
                if ( $type === false ) {
                        $conds = Job::defaultQueueConditions( );
                } else {
-                       $conds = "job_cmd = " . $dbw->addQuotes( $type );
+                       $conds = array( 'job_cmd' => $type );
                }
 
                while ( $dbw->selectField( 'job', 'job_id', $conds, 'runJobs.php' ) ) {