Merge "Language: s/error_log/wfWarn/"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 281080c..9213c02 100644 (file)
@@ -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;
                }
@@ -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' ) );