if ( wfReadOnly() ) {
header( "HTTP/1.0 423 Locked" );
print 'Wiki is in read-only mode';
+
return;
} elseif ( !$this->getRequest()->wasPosted() ) {
header( "HTTP/1.0 400 Bad Request" );
print 'Request must be POSTed';
+
return;
}
if ( count( $missing ) ) {
header( "HTTP/1.0 400 Bad Request" );
print 'Missing parameters: ' . implode( ', ', array_keys( $missing ) );
+
return;
}
} else {
$result = 0;
for ( $i = 0; $i < strlen( $cSig ); $i++ ) {
- $result |= ord( $cSig{$i} ) ^ ord( $rSig{$i} );
+ $result |= ord( $cSig[$i] ) ^ ord( $rSig[$i] );
}
$verified = ( $result == 0 );
}
if ( !$verified || $params['sigexpiry'] < time() ) {
header( "HTTP/1.0 400 Bad Request" );
print 'Invalid or stale signature provided';
+
return;
}
*
* @note: also called from Wiki.php
*
- * @param integer $maxJobs Maximum number of jobs to run
+ * @param int $maxJobs Maximum number of jobs to run
* @return void
*/
public static function executeJobs( $maxJobs ) {
$job = $group->pop( JobQueueGroup::TYPE_DEFAULT, JobQueueGroup::USE_CACHE );
if ( $job ) {
$output = $job->toString() . "\n";
- $t = - microtime( true );
+ $t = -microtime( true );
wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
$success = $job->run();
wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
}
} while ( --$n && $job );
} catch ( MWException $e ) {
+ MWExceptionHandler::rollbackMasterChangesAndLog( $e );
// We don't want exceptions thrown during job execution to
// be reported to the user since the output is already sent.
// Instead we just log them.