use encodeURIComponent() instead of escape() in ajax.js
[lhc/web/wiklou.git] / maintenance / runJobs.php
1 <?php
2
3 require_once( 'commandLine.inc' );
4 require_once( "$IP/includes/JobQueue.php" );
5 require_once( "$IP/includes/FakeTitle.php" );
6
7 // Trigger errors on inappropriate use of $wgTitle
8 $wgTitle = new FakeTitle;
9
10 $dbw =& wfGetDB( DB_MASTER );
11 while ( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) ) {
12 while ( false != ($job = Job::pop()) ) {
13 wfWaitForSlaves( 5 );
14 print $job->id . " " . $job->toString() . "\n";
15 if ( !$job->run() ) {
16 print "Error: {$job->error}\n";
17 }
18 }
19 }
20 ?>