* page list.
* @ingroup SpecialPage
*/
-class SpecialPage
-{
+class SpecialPage {
/**#@+
* @access private
*/
'Listredirects' => array( 'SpecialPage', 'Listredirects' ),
# Login/create account
- 'Userlogin' => array( 'SpecialPage', 'Userlogin' ),
- 'CreateAccount' => array( 'SpecialRedirectToSpecial', 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ),
+ 'Userlogin' => 'SpecialUserLogin',
+ 'CreateAccount' => 'SpecialCreateAccount',
# Users and rights
'Blockip' => array( 'SpecialPage', 'Blockip', 'block' ),
'Preferences' => 'SpecialPreferences',
'Contributions' => 'SpecialContributions',
'Listgrouprights' => 'SpecialListGroupRights',
- 'Listusers' => array( 'SpecialPage', 'Listusers' ),
+ 'Listusers' => array( 'SpecialPage', 'Listusers' ),
+ 'Activeusers' => 'SpecialActiveUsers',
'Userrights' => 'UserrightsPage',
# Recent changes and logs
'Filepath' => array( 'SpecialPage', 'Filepath' ),
'MIMEsearch' => array( 'SpecialPage', 'MIMEsearch' ),
'FileDuplicateSearch' => array( 'SpecialPage', 'FileDuplicateSearch' ),
- 'Upload' => array( 'SpecialPage', 'Upload' ),
+ 'Upload' => 'UploadForm',
# Wiki data and tools
'Statistics' => 'SpecialStatistics',
- 'Allmessages' => array( 'SpecialPage', 'Allmessages' ),
+ 'Allmessages' => 'SpecialAllmessages',
'Version' => 'SpecialVersion',
'Lockdb' => array( 'SpecialPage', 'Lockdb', 'siteadmin' ),
'Unlockdb' => array( 'SpecialPage', 'Unlockdb', 'siteadmin' ),
'Undelete' => array( 'SpecialPage', 'Undelete', 'deletedhistory' ),
'Whatlinkshere' => 'SpecialWhatlinkshere',
'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ),
- 'Createpage' => 'SpecialCreatePage',
# Other
'Booksources' => 'SpecialBookSources',
# Unlisted / redirects
- 'Blankpage' => array( 'UnlistedSpecialPage', 'Blankpage' ),
+ 'Blankpage' => 'SpecialBlankpage',
'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ),
'Emailuser' => array( 'UnlistedSpecialPage', 'Emailuser' ),
'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ),
$aliases = $wgContLang->getSpecialPageAliases();
if ( isset( $aliases[$name][0] ) ) {
$name = $aliases[$name][0];
+ } else {
+ // Try harder in case someone misspelled the correct casing
+ $found = false;
+ foreach ( $aliases as $n => $values ) {
+ if ( strcasecmp( $name, $n ) === 0 ) {
+ wfWarn( "Found alias defined for $n when searching for special page aliases
+for $name. Case mismatch?" );
+ $name = $values[0];
+ $found = true;
+ break;
+ }
+ }
+ if ( !$found ) wfWarn( "Did not find alias for special page '$name'.
+Perhaps no page aliases are defined for it?" );
}
if ( $subpage !== false && !is_null( $subpage ) ) {
$name = "$name/$subpage";
* Accessor and mutator
*/
function name( $x = NULL ) { return wfSetVar( $this->mName, $x ); }
- function restrictions( $x = NULL) { return wfSetVar( $this->mRestrictions, $x ); }
+ function restrictions( $x = NULL) {
+ # Use the one below this
+ wfDeprecated( __METHOD__ );
+ return wfSetVar( $this->mRestriction, $x );
+ }
+ function restriction( $x = NULL) { return wfSetVar( $this->mRestriction, $x ); }
function listed( $x = NULL) { return wfSetVar( $this->mListed, $x ); }
function func( $x = NULL) { return wfSetVar( $this->mFunction, $x ); }
function file( $x = NULL) { return wfSetVar( $this->mFile, $x ); }
/**
* Get a self-referential title object
*/
- function getTitle( $subpage = false) {
+ function getTitle( $subpage = false ) {
return self::getTitleFor( $this->mName, $subpage );
}