Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / includes / specialpage / SpecialPageFactory.php
index daabded..4433ddb 100644 (file)
@@ -96,6 +96,7 @@ class SpecialPageFactory {
                'Block' => 'SpecialBlock',
                'Unblock' => 'SpecialUnblock',
                'BlockList' => 'SpecialBlockList',
+               'AutoblockList' => 'SpecialAutoblockList',
                'ChangePassword' => 'SpecialChangePassword',
                'BotPasswords' => 'SpecialBotPasswords',
                'PasswordReset' => 'SpecialPasswordReset',
@@ -144,6 +145,7 @@ class SpecialPageFactory {
                'RandomInCategory' => 'SpecialRandomInCategory',
                'Randomredirect' => 'SpecialRandomredirect',
                'Randomrootpage' => 'SpecialRandomrootpage',
+               'GoToInterwiki' => 'SpecialGoToInterwiki',
 
                // High use pages
                'Mostlinkedcategories' => 'MostlinkedCategoriesPage',
@@ -184,6 +186,7 @@ class SpecialPageFactory {
                'Revisiondelete' => 'SpecialRevisionDelete',
                'RunJobs' => 'SpecialRunJobs',
                'Specialpages' => 'SpecialSpecialpages',
+               'PageData' => 'SpecialPageData'
        ];
 
        private static $list;
@@ -231,7 +234,6 @@ class SpecialPageFactory {
                global $wgPageLanguageUseDB, $wgContentHandlerUseDB;
 
                if ( !is_array( self::$list ) ) {
-
                        self::$list = self::$coreList;
 
                        if ( !$wgDisableInternalSearch ) {
@@ -346,7 +348,7 @@ class SpecialPageFactory {
                        return [ null, null ];
                }
 
-               if ( !isset( $bits[1] ) ) { // bug 2087
+               if ( !isset( $bits[1] ) ) { // T4087
                        $par = null;
                } else {
                        $par = $bits[1];
@@ -456,7 +458,7 @@ class SpecialPageFactory {
                $pages = [];
                foreach ( self::getPageList() as $name => $rec ) {
                        $page = self::getPage( $name );
-                       if ( $page->isListed() && !$page->isRestricted() ) {
+                       if ( $page && $page->isListed() && !$page->isRestricted() ) {
                                $pages[$name] = $page;
                        }
                }
@@ -479,8 +481,8 @@ class SpecialPageFactory {
                }
                foreach ( self::getPageList() as $name => $rec ) {
                        $page = self::getPage( $name );
-                       if (
-                               $page->isListed()
+                       if ( $page
+                               && $page->isListed()
                                && $page->isRestricted()
                                && $page->userCanExecute( $user )
                        ) {
@@ -499,12 +501,12 @@ class SpecialPageFactory {
         * Returns a title object if the page is redirected, false if there was no such special
         * page, and true if it was successful.
         *
-        * @param Title $title
-        * @param IContextSource $context
+        * @param Title &$title
+        * @param IContextSource &$context
         * @param bool $including Bool output is being captured for use in {{special:whatever}}
         * @param LinkRenderer|null $linkRenderer (since 1.28)
         *
-        * @return bool
+        * @return bool|Title
         */
        public static function executePath( Title &$title, IContextSource &$context, $including = false,
                LinkRenderer $linkRenderer = null
@@ -512,7 +514,7 @@ class SpecialPageFactory {
                // @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];