// Authentication
'Userlogin' => 'SpecialUserLogin',
- 'Userlogout' => 'SpecialUserlogoutPreAuthManager',
- 'CreateAccount' => 'SpecialCreateAccountPreAuthManager',
+ 'Userlogout' => 'SpecialUserLogout',
+ 'CreateAccount' => 'SpecialCreateAccount',
'LinkAccounts' => 'SpecialLinkAccounts',
'UnlinkAccounts' => 'SpecialUnlinkAccounts',
'ChangeCredentials' => 'SpecialChangeCredentials',
'Block' => 'SpecialBlock',
'Unblock' => 'SpecialUnblock',
'BlockList' => 'SpecialBlockList',
- 'ChangePassword' => 'SpecialChangePasswordPreAuthManager',
+ 'ChangePassword' => 'SpecialChangePassword',
'BotPasswords' => 'SpecialBotPasswords',
- 'PasswordReset' => 'SpecialPasswordResetPreAuthManager',
+ 'PasswordReset' => 'SpecialPasswordReset',
'DeletedContributions' => 'DeletedContributionsPage',
'Preferences' => 'SpecialPreferences',
'ResetTokens' => 'SpecialResetTokens',
private static $list;
private static $aliases;
- private static $pageObjectCache = [];
/**
* Reset the internal list of special pages. Useful when changing $wgSpecialPages after
public static function resetList() {
self::$list = null;
self::$aliases = null;
- self::$pageObjectCache = [];
}
/**
global $wgDisableInternalSearch, $wgEmailAuthentication;
global $wgEnableEmail, $wgEnableJavaScriptTest;
global $wgPageLanguageUseDB, $wgContentHandlerUseDB;
- global $wgDisableAuthManager;
if ( !is_array( self::$list ) ) {
}
if ( $wgEnableEmail ) {
- self::$list['ChangeEmail'] = 'SpecialChangeEmailPreAuthManager';
+ self::$list['ChangeEmail'] = 'SpecialChangeEmail';
}
if ( $wgEnableJavaScriptTest ) {
self::$list['ChangeContentModel'] = 'SpecialChangeContentModel';
}
- // horrible hack to allow selection between old and new classes via a feature flag - T110756
- // will be removed once AuthManager is stable
- if ( !$wgDisableAuthManager ) {
- self::$list = array_map( function ( $class ) {
- return preg_replace( '/PreAuthManager$/', '', $class );
- }, self::$list );
- self::$list['Userlogout'] = 'SpecialUserLogout'; // case matters
- } else {
- self::$list['Userlogin'] = 'LoginForm';
- self::$list = array_diff_key( self::$list, array_fill_keys( [
- 'LinkAccounts', 'UnlinkAccounts', 'ChangeCredentials', 'RemoveCredentials',
- ], true ) );
- }
-
// Add extension special pages
self::$list = array_merge( self::$list, $wgSpecialPages );
return [ null, null ];
}
- if ( !isset( $bits[1] ) ) { // bug 2087
+ if ( !isset( $bits[1] ) ) { // T4087
$par = null;
} else {
$par = $bits[1];
public static function getPage( $name ) {
list( $realName, /*...*/ ) = self::resolveAlias( $name );
- if ( isset( self::$pageObjectCache[$realName] ) ) {
- return self::$pageObjectCache[$realName];
- }
-
$specialPageList = self::getPageList();
if ( isset( $specialPageList[$realName] ) ) {
$page = null;
}
- self::$pageObjectCache[$realName] = $page;
if ( $page instanceof SpecialPage ) {
return $page;
} else {
// @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
$name = $bits[0];
- if ( !isset( $bits[1] ) ) { // bug 2087
+ if ( !isset( $bits[1] ) ) { // T4087
$par = null;
} else {
$par = $bits[1];