Remove deprecated $wgSpecialPageGroups
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 25 Jun 2015 16:40:18 +0000 (18:40 +0200)
committerKunal Mehta <legoktm@gmail.com>
Sat, 27 Jun 2015 02:19:17 +0000 (19:19 -0700)
$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Remove also SpecialPageFactory::setGroup because it no long can set $wgSpecialPageGroups.
Also remove SpecialPageFactory::getGroup along with its setter.

All replaces in extensions can be found under:
https://gerrit.wikimedia.org/r/#/q/status:open+branch:master+topic:wgSpecialPageGroups,n,z
https://gerrit.wikimedia.org/r/#/q/status:merged+branch:master+topic:wgSpecialPageGroups,n,z

Change-Id: I1aa8f98bf326b2e54d7403efbb9f002a106cefc5

RELEASE-NOTES-1.26
includes/DefaultSettings.php
includes/specialpage/SpecialPage.php
includes/specialpage/SpecialPageFactory.php
maintenance/convertExtensionToRegistration.php

index dc36d00..518a233 100644 (file)
@@ -117,6 +117,9 @@ changes to languages because of Bugzilla reports.
   instead of many optional positional arguments. Calling the constructor the old
   way will issue a deprecation warning.
 * The jquery.mwExtension module was deprecated.
+* $wgSpecialPageGroups was removed (deprecated in 1.21).
+* SpecialPageFactory::setGroup was removed (deprecated in 1.21).
+* SpecialPageFactory::getGroup was removed (deprecated in 1.21).
 
 == Compatibility ==
 
index c0fd345..6f2f5b9 100644 (file)
@@ -6969,14 +6969,6 @@ $wgAllowSpecialInclusion = true;
  */
 $wgDisableQueryPageUpdate = false;
 
-/**
- * List of special pages, followed by what subtitle they should go under
- * at Special:SpecialPages
- *
- * @deprecated since 1.21 Override SpecialPage::getGroupName instead
- */
-$wgSpecialPageGroups = array();
-
 /**
  * On Special:Unusedimages, consider images "used", if they are put
  * into a category. Default (false) is not to count those as used.
index a7a43b0..eb18b8f 100644 (file)
@@ -662,7 +662,6 @@ class SpecialPage {
         */
        public function getFinalGroupName() {
                $name = $this->getName();
-               $specialPageGroups = $this->getConfig()->get( 'SpecialPageGroups' );
 
                // Allow overbidding the group from the wiki side
                $msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage();
@@ -671,18 +670,6 @@ class SpecialPage {
                } else {
                        // Than use the group from this object
                        $group = $this->getGroupName();
-
-                       // Group '-' is used as default to have the chance to determine,
-                       // if the special pages overrides this method,
-                       // if not overridden, $wgSpecialPageGroups is checked for b/c
-                       if ( $group === '-' && isset( $specialPageGroups[$name] ) ) {
-                               $group = $specialPageGroups[$name];
-                       }
-               }
-
-               // never give '-' back, change to 'other'
-               if ( $group === '-' ) {
-                       $group = 'other';
                }
 
                return $group;
@@ -697,8 +684,6 @@ class SpecialPage {
         * @since 1.21
         */
        protected function getGroupName() {
-               // '-' used here to determine, if this group is overridden or has a hardcoded 'other'
-               // Needed for b/c in getFinalGroupName
-               return '-';
+               return 'other';
        }
 }
index 3786b36..055e588 100644 (file)
@@ -347,34 +347,6 @@ class SpecialPageFactory {
                return array( $name, $par );
        }
 
-       /**
-        * Add a page to a certain display group for Special:SpecialPages
-        *
-        * @param SpecialPage|string $page
-        * @param string $group
-        * @deprecated since 1.21 Override SpecialPage::getGroupName
-        */
-       public static function setGroup( $page, $group ) {
-               wfDeprecated( __METHOD__, '1.21' );
-
-               global $wgSpecialPageGroups;
-               $name = is_object( $page ) ? $page->getName() : $page;
-               $wgSpecialPageGroups[$name] = $group;
-       }
-
-       /**
-        * Get the group that the special page belongs in on Special:SpecialPage
-        *
-        * @param SpecialPage $page
-        * @return string
-        * @deprecated since 1.21 Use SpecialPage::getFinalGroupName
-        */
-       public static function getGroup( &$page ) {
-               wfDeprecated( __METHOD__, '1.21' );
-
-               return $page->getFinalGroupName();
-       }
-
        /**
         * Check if a given name exist as a special page or as a special page alias
         *
index b7fe80b..3e86d8a 100644 (file)
@@ -31,7 +31,7 @@ class ConvertExtensionToRegistration extends Maintenance {
         * @var array
         */
        protected $noLongerSupportedGlobals = array(
-               'SpecialPageGroups' => 'deprecated',
+               'SpecialPageGroups' => 'deprecated', // Deprecated 1.21, removed in 1.26
        );
 
        /**