global $wgPageLanguageUseDB;
if ( !is_array( self::$list ) ) {
- wfProfileIn( __METHOD__ );
self::$list = self::$coreList;
// Run hooks
// This hook can be used to remove undesired built-in special pages
- wfRunHooks( 'SpecialPage_initList', array( &self::$list ) );
+ Hooks::run( 'SpecialPage_initList', array( &self::$list ) );
- wfProfileOut( __METHOD__ );
}
return self::$list;
// @deprecated, officially since 1.18, unofficially since forever
wfDeprecated( "Array syntax for \$wgSpecialPages is deprecated ($className), " .
"define a subclass of SpecialPage instead.", '1.18' );
- $page = MWFunction::newObj( $className, $rec );
+ $page = ObjectFactory::getObjectFromSpec( array(
+ 'class' => $className,
+ 'args' => $rec,
+ 'closure_expansion' => false,
+ ) );
} elseif ( $rec instanceof SpecialPage ) {
$page = $rec; //XXX: we should deep clone here
} else {
* @return bool
*/
public static function executePath( Title &$title, IContextSource &$context, $including = false ) {
- wfProfileIn( __METHOD__ );
// @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
}
$context->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' );
- wfProfileOut( __METHOD__ );
return false;
}
$title = $page->getPageTitle( $par );
$url = $title->getFullURL( $query );
$context->getOutput()->redirect( $url );
- wfProfileOut( __METHOD__ );
return $title;
} else {
$context->setTitle( $page->getPageTitle( $par ) );
}
} elseif ( !$page->isIncludable() ) {
- wfProfileOut( __METHOD__ );
return false;
}
$page->including( $including );
// Execute special page
- $profName = 'Special:' . $page->getName();
- wfProfileIn( $profName );
$page->run( $par );
- wfProfileOut( $profName );
- wfProfileOut( __METHOD__ );
return true;
}