Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / MediaWiki.php
index da4af2f..87468bd 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
         */
@@ -146,7 +121,7 @@ class MediaWiki {
         * @return Title
         */
        public function getTitle() {
-               if ( $this->context->getTitle() === null ) {
+               if ( !$this->context->hasTitle() ) {
                        $this->context->setTitle( $this->parseTitle() );
                }
                return $this->context->getTitle();
@@ -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' ) );