Change-Id: I97177572fc025c5ab4361146253d7df9c487c291
if ( !isset( self::$handlers[$class] ) ) {
self::$handlers[$class] = new $class;
if ( !self::$handlers[$class]->isEnabled() ) {
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;
}
}
self::$handlers[$class] = false;
}
}
return self::$handlers[$class];
}
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.
/**
* Get an associative array mapping magic word IDs to parameter names.
* Will be used by the parser to identify parameters.
}
$this->mwGlobals = array();
RequestContext::resetMain();
}
$this->mwGlobals = array();
RequestContext::resetMain();
+ MediaHandler::resetCache();
$phpErrorLevel = intval( ini_get( 'error_reporting' ) );
$phpErrorLevel = intval( ini_get( 'error_reporting' ) );