Remove $wgColorErrors. Apparently unused at least since r17991 at 2006-11-29
[lhc/web/wiklou.git] / includes / SpecialPage.php
index 1cfbc18..78fb06f 100644 (file)
@@ -120,8 +120,8 @@ class SpecialPage {
                'CreateAccount'             => array( 'SpecialRedirectToSpecial', 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ),
 
                # Users and rights
-               'Blockip'                   => array( 'SpecialPage', 'Blockip', 'block' ),
-               'Ipblocklist'               => array( 'SpecialPage', 'Ipblocklist' ),
+               'Blockip'                   => 'IPBlockForm',
+               'Ipblocklist'               => 'IPUnblockForm',
                'Unblock'                   => array( 'SpecialRedirectToSpecial', 'Unblock', 'Ipblocklist', false, array( 'uselang', 'ip', 'id' ), array( 'action' => 'unblock' ) ),
                'Resetpass'                 => 'SpecialResetpass',
                'DeletedContributions'      => 'DeletedContributionsPage',
@@ -129,12 +129,14 @@ class SpecialPage {
                'Contributions'             => 'SpecialContributions',
                'Listgrouprights'           => 'SpecialListGroupRights',
                'Listusers'                 => array( 'SpecialPage', 'Listusers' ),
+               'Listadmins'                => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ),
+               'Listbots'                  => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ),
                'Activeusers'               => 'SpecialActiveUsers',
                'Userrights'                => 'UserrightsPage',
 
                # Recent changes and logs
                'Newimages'                 => array( 'IncludableSpecialPage', 'Newimages' ),
-               'Log'                       => array( 'SpecialPage', 'Log' ),
+               'Log'                       => 'SpecialLog',
                'Watchlist'                 => array( 'SpecialPage', 'Watchlist' ),
                'Newpages'                  => 'SpecialNewpages',
                'Recentchanges'             => 'SpecialRecentchanges',
@@ -143,7 +145,7 @@ class SpecialPage {
 
                # Media reports and uploads
                'Listfiles'                 => array( 'SpecialPage', 'Listfiles' ),
-               'Filepath'                  => array( 'SpecialPage', 'Filepath' ),
+               'Filepath'                  => 'SpecialFilepath',
                'MIMEsearch'                => array( 'SpecialPage', 'MIMEsearch' ),
                'FileDuplicateSearch'       => array( 'SpecialPage', 'FileDuplicateSearch' ),
                'Upload'                    => 'SpecialUpload',
@@ -181,18 +183,16 @@ class SpecialPage {
 
                # Unlisted / redirects
                'Blankpage'                 => 'SpecialBlankpage',
-               'Blockme'                   => array( 'UnlistedSpecialPage', 'Blockme' ),
+               'Blockme'                   => 'SpecialBlockme',
                'Emailuser'                 => 'SpecialEmailUser',
-               'Listadmins'                => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ),
-               'Listbots'                  => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ),
                'Movepage'                  => array( 'UnlistedSpecialPage', 'Movepage' ),
-               'Mycontributions'           => array( 'SpecialMycontributions' ),
-               'Mypage'                    => array( 'SpecialMypage' ),
-               'Mytalk'                    => array( 'SpecialMytalk' ),
+               'Mycontributions'           => 'SpecialMycontributions',
+               'Mypage'                    => 'SpecialMypage',
+               'Mytalk'                    => 'SpecialMytalk',
                'Revisiondelete'            => 'SpecialRevisionDelete',
                'RevisionMove'              => 'SpecialRevisionMove',
-               'Specialpages'              => array( 'UnlistedSpecialPage', 'Specialpages' ),
-               'Userlogout'                => array( 'UnlistedSpecialPage', 'Userlogout' ),
+               'Specialpages'              => 'SpecialSpecialpages',
+               'Userlogout'                => 'SpecialUserlogout',
        );
 
        static public $mAliases;
@@ -207,6 +207,7 @@ class SpecialPage {
        static function initList() {
                global $wgSpecialPages;
                global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
+               global $wgEnableSelenium;
 
                if ( self::$mListInitialised ) {
                        return;
@@ -229,6 +230,10 @@ class SpecialPage {
                        self::$mList['Invalidateemail'] = 'EmailInvalidation';
                }
 
+               if ( $wgEnableSelenium ) {
+                       self::$mList['Selenium'] = 'SpecialSelenium';
+               }
+
                # Add extension special pages
                self::$mList = array_merge( self::$mList, $wgSpecialPages );
 
@@ -303,8 +308,10 @@ class SpecialPage {
         * an associative record to $wgSpecialPages. This avoids autoloading SpecialPage.
         *
         * @param $page SpecialPage
+        * Deprecated in 1.7, warnings in 1.17, might be removed in 1.20
         */
        static function addPage( &$page ) {
+               wfDeprecated( __METHOD__ );
                if ( !self::$mListInitialised ) {
                        self::initList();
                }
@@ -619,15 +626,17 @@ class SpecialPage {
                        $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?" );
+                                       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 ( !$found ) {
+                               wfWarn( "Did not find alias for special page '$name'." . 
+                                       "Perhaps no aliases are defined for it?" );
+                       }
                }
                if ( $subpage !== false && !is_null( $subpage ) ) {
                        $name = "$name/$subpage";
@@ -906,7 +915,7 @@ Perhaps no page aliases are defined for it?" );
 class UnlistedSpecialPage extends SpecialPage
 {
        function UnlistedSpecialPage( $name, $restriction = '', $function = false, $file = 'default' ) {
-               SpecialPage::SpecialPage( $name, $restriction, false, $function, $file );
+               parent::SpecialPage( $name, $restriction, false, $function, $file );
        }
 }
 
@@ -917,7 +926,7 @@ class UnlistedSpecialPage extends SpecialPage
 class IncludableSpecialPage extends SpecialPage
 {
        function IncludableSpecialPage( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) {
-               SpecialPage::SpecialPage( $name, $restriction, $listed, $function, $file, true );
+               parent::SpecialPage( $name, $restriction, $listed, $function, $file, true );
        }
 }