Merge "Move ChangesFeed to includes/changes/ folder"
[lhc/web/wiklou.git] / includes / media / MediaHandler.php
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.