Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106888


Change subject: Rename RedirectSpecialPage subclasses
......................................................................

Rename RedirectSpecialPage subclasses

Renaming for the sake of sanity, consistency and grammar:
* RedirectSpecialArticle   → RedirectSpecialPageToPage
* SpecialRedirectToSpecial → RedirectSpecialPageToSpecial

Also renamed a hook:
* RedirectSpecialArticleRedirectParams → RedirectSpecialPageToPageRedirectParams

All changes are backwards-compatible: old class and hook names are
just deprecated (using newly introduced mechanisms: see I1d3fb04a and
I8fd29e97) and continue to work.

Bug: 58215
Change-Id: I31ddd5f79f71390fd13caf61410e5214a280bcff
---
M docs/hooks.txt
M includes/AutoLoader.php
M includes/specialpage/RedirectSpecialPage.php
M includes/specials/SpecialCreateAccount.php
M includes/specials/SpecialListusers.php
M includes/specials/SpecialMyRedirectPages.php
6 files changed, 18 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/106888/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index bbe1680..aa9f614 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1983,7 +1983,7 @@
 'RecentChange_save': Called at the end of RecentChange::save().
 $recentChange: RecentChange object
 
-'RedirectSpecialArticleRedirectParams': Lets you alter the set of parameter
+'RedirectSpecialPageToPageRedirectParams': Lets you alter the set of parameter
 names such as "oldid" that are preserved when using redirecting special pages
 such as Special:MyPage and Special:MyTalk.
 &$redirectParams: An array of parameters preserved by redirecting special 
pages.
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 0e56b7c..c04b204 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -176,8 +176,10 @@
        'RawMessage' => 'includes/Message.php',
        'RdfMetaData' => 'includes/Metadata.php',
        'ReadOnlyError' => 'includes/Exception.php',
-       'RedirectSpecialArticle' => 
'includes/specialpage/RedirectSpecialPage.php',
+       'RedirectSpecialArticle' => 'alias:RedirectSpecialPageToPage?v=1.23',
        'RedirectSpecialPage' => 'includes/specialpage/RedirectSpecialPage.php',
+       'RedirectSpecialPageToPage' => 
'includes/specialpage/RedirectSpecialPage.php',
+       'RedirectSpecialPageToSpecial' => 
'includes/specialpage/RedirectSpecialPage.php',
        'ReverseChronologicalPager' => 'includes/Pager.php',
        'RevisionItem' => 'includes/RevisionList.php',
        'RevisionItemBase' => 'includes/RevisionList.php',
@@ -201,7 +203,7 @@
        'SpecialAllMyUploads' => 'includes/specials/SpecialMyRedirectPages.php',
        'SpecialPage' => 'includes/specialpage/SpecialPage.php',
        'SpecialPageFactory' => 'includes/SpecialPageFactory.php',
-       'SpecialRedirectToSpecial' => 
'includes/specialpage/RedirectSpecialPage.php',
+       'SpecialRedirectToSpecial' => 
'alias:RedirectSpecialPageToSpecial?v=1.23',
        'SquidPurgeClient' => 'includes/SquidPurgeClient.php',
        'SquidPurgeClientPool' => 'includes/SquidPurgeClient.php',
        'StatCounter' => 'includes/StatCounter.php',
diff --git a/includes/specialpage/RedirectSpecialPage.php 
b/includes/specialpage/RedirectSpecialPage.php
index eb8557a..4272494 100644
--- a/includes/specialpage/RedirectSpecialPage.php
+++ b/includes/specialpage/RedirectSpecialPage.php
@@ -90,7 +90,7 @@
 /**
  * @ingroup SpecialPage
  */
-abstract class SpecialRedirectToSpecial extends RedirectSpecialPage {
+abstract class RedirectSpecialPageToSpecial extends RedirectSpecialPage {
        // @todo FIXME: Visibility must be declared
        var $redirName, $redirSubpage;
 
@@ -164,16 +164,16 @@
  *
  * @par Hook extension:
  * Extensions can add to the redirect parameters list by using the hook
- * RedirectSpecialArticleRedirectParams
+ * RedirectSpecialPageToPageRedirectParams
  *
  * This hook allows extensions which add GET parameters like FlaggedRevs to
  * retain those parameters when redirecting using special pages.
  *
  * @par Hook extension example:
  * @code
- *     $wgHooks['RedirectSpecialArticleRedirectParams'][] =
- *             'MyExtensionHooks::onRedirectSpecialArticleRedirectParams';
- *     public static function onRedirectSpecialArticleRedirectParams( 
&$redirectParams ) {
+ *     $wgHooks['RedirectSpecialPageToPageRedirectParams'][] =
+ *             'MyExtensionHooks::onRedirectSpecialPageToPageRedirectParams';
+ *     public static function onRedirectSpecialPageToPageRedirectParams( 
&$redirectParams ) {
  *             $redirectParams[] = 'stable';
  *             return true;
  *     }
@@ -181,7 +181,7 @@
  *
  * @ingroup SpecialPage
  */
-abstract class RedirectSpecialArticle extends RedirectSpecialPage {
+abstract class RedirectSpecialPageToPage extends RedirectSpecialPage {
        function __construct( $name ) {
                parent::__construct( $name );
                $redirectParams = array(
@@ -200,7 +200,8 @@
                        'ctype', 'maxage', 'smaxage',
                );
 
-               wfRunHooks( "RedirectSpecialArticleRedirectParams", array( 
&$redirectParams ) );
+               wfRunHooks( "RedirectSpecialArticleRedirectParams", array( 
&$redirectParams ), '1.23' );
+               wfRunHooks( "RedirectSpecialPageToPageRedirectParams", array( 
&$redirectParams ) );
                $this->mAllowedRedirectParams = $redirectParams;
        }
 }
diff --git a/includes/specials/SpecialCreateAccount.php 
b/includes/specials/SpecialCreateAccount.php
index 63d4ec9..1b14fae 100644
--- a/includes/specials/SpecialCreateAccount.php
+++ b/includes/specials/SpecialCreateAccount.php
@@ -28,7 +28,7 @@
  * @ingroup SpecialPage
  */
 
-class SpecialCreateAccount extends SpecialRedirectToSpecial {
+class SpecialCreateAccount extends RedirectSpecialPageToSpecial {
        function __construct() {
                parent::__construct( 'CreateAccount', 'Userlogin', 'signup', 
array( 'returnto', 'returntoquery', 'uselang' ) );
        }
diff --git a/includes/specials/SpecialListusers.php 
b/includes/specials/SpecialListusers.php
index f69e177..f740a15 100644
--- a/includes/specials/SpecialListusers.php
+++ b/includes/specials/SpecialListusers.php
@@ -409,7 +409,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialListAdmins extends SpecialRedirectToSpecial {
+class SpecialListAdmins extends RedirectSpecialPageToSpecial {
        function __construct() {
                parent::__construct( 'Listadmins', 'Listusers', 'sysop' );
        }
@@ -420,7 +420,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialListBots extends SpecialRedirectToSpecial {
+class SpecialListBots extends RedirectSpecialPageToSpecial {
        function __construct() {
                parent::__construct( 'Listbots', 'Listusers', 'bot' );
        }
diff --git a/includes/specials/SpecialMyRedirectPages.php 
b/includes/specials/SpecialMyRedirectPages.php
index 41119f9..61b609d 100644
--- a/includes/specials/SpecialMyRedirectPages.php
+++ b/includes/specials/SpecialMyRedirectPages.php
@@ -29,7 +29,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialMypage extends RedirectSpecialArticle {
+class SpecialMypage extends RedirectSpecialPageToPage {
        function __construct() {
                parent::__construct( 'Mypage' );
        }
@@ -48,7 +48,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialMytalk extends RedirectSpecialArticle {
+class SpecialMytalk extends RedirectSpecialPageToPage {
        function __construct() {
                parent::__construct( 'Mytalk' );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/106888
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31ddd5f79f71390fd13caf61410e5214a280bcff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to