Move rewRevisionFromEditComplete call down till after page rows set
[lhc/web/wiklou.git] / includes / SpecialPage.php
index 2e331c5..7cb791a 100644 (file)
  * SpecialPage::$mList. To remove a core static special page at runtime, use
  * a SpecialPage_initList hook.
  *
- * @addtogroup SpecialPage
+ * @file
+ * @ingroup SpecialPage
+ * @defgroup SpecialPage SpecialPage
  */
 
 /**
  * Parent special page class, also static functions for handling the special
  * page list.
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class SpecialPage
 {
@@ -162,97 +164,6 @@ class SpecialPage
 
        static public $mAliases;
        static public $mListInitialised = false;
-       /**
-        * List of special pages, followed by what subtitle they should go under
-        * at Special:SpecialPages
-        */
-       static public $mGroupsList = array(
-               'DoubleRedirects'           => 'maintenance',
-               'BrokenRedirects'           => 'maintenance',
-               'Lonelypages'               => 'maintenance',
-               'Uncategorizedpages'        => 'maintenance',
-               'Uncategorizedcategories'   => 'maintenance',
-               'Uncategorizedimages'       => 'maintenance',
-               'Uncategorizedtemplates'    => 'maintenance',
-               'Unusedcategories'          => 'maintenance',
-               'Unusedimages'              => 'maintenance',
-               'Protectedpages'            => 'maintenance',
-               'Protectedtitles'           => 'maintenance',
-               'Unusedtemplates'           => 'maintenance',
-               'Withoutinterwiki'          => 'maintenance',
-               'Longpages'                 => 'maintenance',
-
-               'Userlogin'                 => 'login',
-               'Userlogout'                => 'login',
-               'CreateAccount'             => 'login',
-
-               'Recentchanges'             => 'changes',
-               'Recentchangeslinked'       => 'changes',
-               'Watchlist'                 => 'changes',
-               'Newimages'                 => 'changes',
-               'Newpages'                  => 'changes',
-               'Log'                       => 'changes',
-
-               'Upload'                    => 'media',
-               'Imagelist'                 => 'media',
-               'MIMEsearch'                => 'media',
-               'FileDuplicateSearch'       => 'media',
-               'Filepath'                  => 'media',
-
-               'Listusers'                 => 'users',
-               'Listgrouprights'           => 'users',
-               'Ipblocklist'               => 'users',
-               'Contributions'             => 'users',
-               'Emailuser'                 => 'users',
-               'Listadmins'                => 'users',
-               'Listbots'                  => 'users',
-
-               'Wantedpages'               => 'needy',
-               'Wantedcategories'          => 'needy',
-               'Shortpages'                => 'needy',
-               'Ancientpages'              => 'needy',
-               'Deadendpages'              => 'needy',
-
-               'Mostlinked'                => 'highuse',
-               'Mostlinkedcategories'      => 'highuse',
-               'Mostlinkedtemplates'       => 'highuse',
-               'Mostcategories'            => 'highuse',
-               'Mostimages'                => 'highuse',
-               'Mostrevisions'             => 'highuse',
-
-               'Userrights'                => 'permissions',
-               'Blockip'                   => 'permissions',
-
-               'Statistics'                => 'other',
-               'Fewestrevisions'           => 'other',
-               'Randompage'                => 'other',
-               'Disambiguations'           => 'other',
-               'Specialpages'              => 'other',
-               'Blockme'                   => 'other',
-               'Movepage'                  => 'other',
-               'MergeHistory'              => 'other',
-               'Lockdb'                    => 'other',
-               'Unlockdb'                  => 'other',
-               'Version'                   => 'other',
-               'Whatlinkshere'             => 'other',
-               'Booksources'               => 'other',
-               'Revisiondelete'            => 'other',
-               'Export'                    => 'other',
-               'Categories'                => 'other',
-               'Undelete'                  => 'other',
-               'Import'                    => 'other',
-               'Unwatchedpages'            => 'other',
-               'Randomredirect'            => 'other',
-               'Allpages'                  => 'other',
-               'Allmessages'               => 'other',
-               'Prefixindex'               => 'other',
-               'Listredirects'             => 'other',
-               'Preferences'               => 'other',
-               'Resetpass'                 => 'other',
-               'Mypage'                    => 'other',
-               'Mytalk'                    => 'other',
-               'Mycontributions'           => 'other',
-       );
 
        /**#@-*/
 
@@ -370,11 +281,9 @@ class SpecialPage
         * @static
         */
        static function setGroup( $page, $group ) {
-               if ( !self::$mListInitialised ) {
-                       self::initList();
-               }
+               global $wgSpecialPageGroups;
                $name = is_object($page) ? $page->mName : $page;
-               self::$mGroupsList[$name] = $group;
+               $wgSpecialPageGroups[$name] = $group;
        }
 
        /**
@@ -384,11 +293,9 @@ class SpecialPage
         * @static
         */
        static function getGroup( &$page ) {
-               if ( !self::$mListInitialised ) {
-                       self::initList();
-               }
-               $group = isset(self::$mGroupsList[$page->mName]) ?
-                       self::$mGroupsList[$page->mName] : 'other';
+               global $wgSpecialPageGroups;
+               $group = isset($wgSpecialPageGroups[$page->mName]) ?
+                       $wgSpecialPageGroups[$page->mName] : 'other';
                return $group;
        }
 
@@ -814,7 +721,7 @@ class SpecialPage
                $msg = $wgContLang->lc( $this->name() ) . '-summary';
                $out = wfMsgNoTrans( $msg );
                if ( ! wfEmptyMsg( $msg, $out ) and  $out !== '' and ! $this->including() ) {
-                       $wgOut->addWikiText( $out );
+                       $wgOut->addWikiMsg( $msg );
                }
 
        }
@@ -870,7 +777,7 @@ class SpecialPage
 
 /**
  * Shortcut to construct a special page which is unlisted by default
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class UnlistedSpecialPage extends SpecialPage
 {
@@ -881,7 +788,7 @@ class UnlistedSpecialPage extends SpecialPage
 
 /**
  * Shortcut to construct an includable special  page
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class IncludableSpecialPage extends SpecialPage
 {
@@ -892,7 +799,7 @@ class IncludableSpecialPage extends SpecialPage
 
 /**
  * Shortcut to construct a special page alias.
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class SpecialRedirectToSpecial extends UnlistedSpecialPage {
        var $redirName, $redirSubpage;
@@ -922,7 +829,7 @@ class SpecialRedirectToSpecial extends UnlistedSpecialPage {
 
 /**
  * Shortcut to construct a special page pointing to current user user's page.
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class SpecialMypage extends UnlistedSpecialPage {
        function __construct() {
@@ -942,7 +849,7 @@ class SpecialMypage extends UnlistedSpecialPage {
 
 /**
  * Shortcut to construct a special page pointing to current user talk page.
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class SpecialMytalk extends UnlistedSpecialPage {
        function __construct() {
@@ -962,7 +869,7 @@ class SpecialMytalk extends UnlistedSpecialPage {
 
 /**
  * Shortcut to construct a special page pointing to current user contributions.
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class SpecialMycontributions extends UnlistedSpecialPage {
        function __construct() {