X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMediaWiki.php;h=545a46f63c48c912be4388b4a3c41fc7154895a1;hb=49230edd04a1b8260b7823c10d4bee63e71bd10c;hp=281080cd0025984069ce92b1b9b84889cb80a8af;hpb=7eddc5caaaa92108836c8191b16520f862af94ce;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 281080cd00..545a46f63c 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -27,7 +27,6 @@ */ class MediaWiki { /** - * @todo Fold $output, etc, into this * @var IContextSource */ private $context; @@ -37,30 +36,6 @@ class MediaWiki { */ 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 */ @@ -521,8 +496,8 @@ class MediaWiki { $this->context->setTitle( $title ); $wgTitle = $title; - $dispatcher = new AjaxDispatcher(); - $dispatcher->performAction(); + $dispatcher = new AjaxDispatcher( $this->config ); + $dispatcher->performAction( $this->context->getUser() ); wfProfileOut( __METHOD__ ); return; } @@ -585,7 +560,7 @@ class MediaWiki { wfProfileIn( 'main-try-filecache' ); if ( HTMLFileCache::useFileCache( $this->context ) ) { // Try low-level file cache hit - $cache = HTMLFileCache::newFromTitle( $title, $action ); + $cache = new HTMLFileCache( $title, $action ); if ( $cache->isCacheGood( /* Assume up to date */ ) ) { // Check incoming headers to see if client has this cached $timestamp = $cache->cacheTimestamp(); @@ -682,7 +657,8 @@ class MediaWiki { $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' ) );