* page list.
* @ingroup SpecialPage
*/
-class SpecialPage
-{
+class SpecialPage {
/**#@+
* @access private
*/
'Contributions' => 'SpecialContributions',
'Listgrouprights' => 'SpecialListGroupRights',
'Listusers' => array( 'SpecialPage', 'Listusers' ),
- 'Activeusers' => array( 'SpecialPage', 'Activeusers' ),
+ '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' ),
$found = false;
foreach ( $aliases as $n => $values ) {
if ( strcasecmp( $name, $n ) === 0 ) {
- wfWarn( "Found $n for $name with casefix" );
+ 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 name for special page $name" );
+ 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 );
}