) {
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();
- }
}
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;
}
}
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.
}
$this->mwGlobals = array();
RequestContext::resetMain();
+ MediaHandler::resetCache();
$phpErrorLevel = intval( ini_get( 'error_reporting' ) );