Merge "Move ChangesFeed to includes/changes/ folder"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 16 Jul 2014 00:49:09 +0000 (00:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 16 Jul 2014 00:49:09 +0000 (00:49 +0000)
includes/exception/UserNotLoggedIn.php
includes/media/MediaHandler.php
tests/phpunit/MediaWikiTestCase.php

index f7a56b5..9d89009 100644 (file)
@@ -62,20 +62,4 @@ class UserNotLoggedIn extends ErrorPageError {
        ) {
                parent::__construct( $titleMsg, $reasonMsg, $params );
        }
-
-       /**
-        * Redirect to Special:Userlogin
-        */
-       public function report() {
-               $context = RequestContext::getMain();
-
-               $output = $context->getOutput();
-               $output->redirect( SpecialPage::getTitleFor( 'Userlogin' )->getFullURL( array(
-                       // Return to this page when the user logs in
-                       'returnto' => $context->getTitle()->getText(),
-                       'returntoquery' => wfArrayToCgi( $context->getRequest()->getValues() )
-               ) ) );
-
-               $output->output();
-       }
 }
index c4aab7b..2612685 100644 (file)
@@ -56,6 +56,7 @@ abstract class MediaHandler {
                if ( !isset( self::$handlers[$class] ) ) {
                        self::$handlers[$class] = new $class;
                        if ( !self::$handlers[$class]->isEnabled() ) {
+                               wfDebug( __METHOD__ . ": $class is not enabled\n" );
                                self::$handlers[$class] = false;
                        }
                }
@@ -63,6 +64,13 @@ abstract class MediaHandler {
                return self::$handlers[$class];
        }
 
+       /**
+        * Resets all static caches
+        */
+       public static function resetCache() {
+               self::$handlers = array();
+       }
+
        /**
         * Get an associative array mapping magic word IDs to parameter names.
         * Will be used by the parser to identify parameters.
index c9184e8..3015895 100644 (file)
@@ -246,6 +246,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
                $this->mwGlobals = array();
                RequestContext::resetMain();
+               MediaHandler::resetCache();
 
                $phpErrorLevel = intval( ini_get( 'error_reporting' ) );