Revert broken rewrite of login forms:
[lhc/web/wiklou.git] / includes / SpecialPage.php
index f3495cb..dbf0974 100644 (file)
@@ -27,8 +27,7 @@
  * page list.
  * @ingroup SpecialPage
  */
-class SpecialPage
-{
+class SpecialPage {
        /**#@+
         * @access private
         */
@@ -125,7 +124,7 @@ class SpecialPage
                'Contributions'             => 'SpecialContributions',  
                'Listgrouprights'           => 'SpecialListGroupRights',
                'Listusers'                 => array( 'SpecialPage', 'Listusers' ),
-               'Activeusers'               => array( 'SpecialPage', 'Activeusers' ),
+               'Activeusers'               => 'SpecialActiveUsers',
                'Userrights'                => 'UserrightsPage',
 
                # Recent changes and logs
@@ -142,11 +141,11 @@ class SpecialPage
                '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' ),
@@ -603,13 +602,15 @@ class SpecialPage
                        $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";
@@ -702,7 +703,12 @@ class SpecialPage
          * 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 ); }
@@ -822,7 +828,7 @@ class SpecialPage
        /**
         * Get a self-referential title object
         */
-       function getTitle( $subpage = false) {
+       function getTitle( $subpage = false ) {
                return self::getTitleFor( $this->mName, $subpage );
        }