*/
class MediaWiki {
/**
- * @todo Fold $output, etc, into this
* @var IContextSource
*/
private $context;
*/
private $config;
- /**
- * @param null|WebRequest $x
- * @return WebRequest
- */
- public function request( WebRequest $x = null ) {
- $old = $this->context->getRequest();
- if ( $x ) {
- $this->context->setRequest( $x );
- }
- return $old;
- }
-
- /**
- * @param null|OutputPage $x
- * @return OutputPage
- */
- public function output( OutputPage $x = null ) {
- $old = $this->context->getOutput();
- if ( $x ) {
- $this->context->setOutput( $x );
- }
- return $old;
- }
-
/**
* @param IContextSource|null $context
*/
$this->context->setTitle( $title );
$wgTitle = $title;
- $dispatcher = new AjaxDispatcher();
- $dispatcher->performAction();
+ $dispatcher = new AjaxDispatcher( $this->config );
+ $dispatcher->performAction( $this->context->getUser() );
wfProfileOut( __METHOD__ );
return;
}
$query = array( 'title' => 'Special:RunJobs',
'tasks' => 'jobs', 'maxjobs' => $n, 'sigexpiry' => time() + 5 );
- $query['signature'] = SpecialRunJobs::getQuerySignature( $query );
+ $query['signature'] = SpecialRunJobs::getQuerySignature(
+ $query, $this->config->get( 'SecretKey' ) );
$errno = $errstr = null;
$info = wfParseUrl( $this->config->get( 'Server' ) );