jenkins-bot has submitted this change and it was merged.

Change subject: Remove m prefixes from private variables
......................................................................


Remove m prefixes from private variables

Also tweak a few incorrect comments while we're here

Change-Id: I0ef58fe68c60179c53ca6abca069b7b478bf6946
---
M docs/hooks.txt
M includes/SpecialPageFactory.php
2 files changed, 22 insertions(+), 23 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 30b9b72..0c815f5 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2248,7 +2248,7 @@
   name/URL parameters. Each key maps to an associative array with a 'msg'
   (message key) and a 'default' value.
 
-'SpecialPage_initList': Called when setting up SpecialPage::$mList, use this
+'SpecialPage_initList': Called when setting up SpecialPageFactory::$list, use 
this
 hook to remove a core special page.
 $list: list (array) of core special pages
 
diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php
index 1ede0c1..179f7f5 100644
--- a/includes/SpecialPageFactory.php
+++ b/includes/SpecialPageFactory.php
@@ -37,7 +37,7 @@
  * and bails out if not.
  *
  * To add a core special page, use the similar static list in
- * SpecialPage::$mList. To remove a core static special page at runtime, use
+ * SpecialPageFactory::$list. To remove a core static special page at runtime, 
use
  * a SpecialPage_initList hook.
  *
  * @ingroup SpecialPage
@@ -48,7 +48,7 @@
        /**
         * List of special page names to the subclass of SpecialPage which 
handles them.
         */
-       private static $mList = array(
+       private static $list = array(
                // Maintenance Reports
                'BrokenRedirects'           => 'BrokenRedirectsPage',
                'Deadendpages'              => 'DeadendpagesPage',
@@ -169,11 +169,10 @@
                'Userlogout'                => 'SpecialUserlogout',
        );
 
-       private static $mAliases;
+       private static $aliases;
 
        /**
-        * Initialise the special page list
-        * This must be called before accessing SpecialPage::$mList
+        * Get the special page list
         *
         * @return array
         */
@@ -182,43 +181,43 @@
                global $wgDisableCounters, $wgDisableInternalSearch, 
$wgEmailAuthentication;
                global $wgEnableEmail, $wgEnableJavaScriptTest;
 
-               if ( !is_object( self::$mList ) ) {
+               if ( !is_object( self::$list ) ) {
                        wfProfileIn( __METHOD__ );
 
                        if ( !$wgDisableCounters ) {
-                               self::$mList['Popularpages'] = 
'PopularpagesPage';
+                               self::$list['Popularpages'] = 
'PopularpagesPage';
                        }
 
                        if ( !$wgDisableInternalSearch ) {
-                               self::$mList['Search'] = 'SpecialSearch';
+                               self::$list['Search'] = 'SpecialSearch';
                        }
 
                        if ( $wgEmailAuthentication ) {
-                               self::$mList['Confirmemail'] = 
'EmailConfirmation';
-                               self::$mList['Invalidateemail'] = 
'EmailInvalidation';
+                               self::$list['Confirmemail'] = 
'EmailConfirmation';
+                               self::$list['Invalidateemail'] = 
'EmailInvalidation';
                        }
 
                        if ( $wgEnableEmail ) {
-                               self::$mList['ChangeEmail'] = 
'SpecialChangeEmail';
+                               self::$list['ChangeEmail'] = 
'SpecialChangeEmail';
                        }
 
                        if ( $wgEnableJavaScriptTest ) {
-                               self::$mList['JavaScriptTest'] = 
'SpecialJavaScriptTest';
+                               self::$list['JavaScriptTest'] = 
'SpecialJavaScriptTest';
                        }
 
                        // Add extension special pages
-                       self::$mList = array_merge( self::$mList, 
$wgSpecialPages );
+                       self::$list = array_merge( self::$list, $wgSpecialPages 
);
 
                        // Run hooks
                        // This hook can be used to remove undesired built-in 
special pages
-                       wfRunHooks( 'SpecialPage_initList', array( 
&self::$mList ) );
+                       wfRunHooks( 'SpecialPage_initList', array( &self::$list 
) );
 
                        // Cast to object: func()[$key] doesn't work, but 
func()->$key does
-                       settype( self::$mList, 'object' );
+                       settype( self::$list, 'object' );
 
                        wfProfileOut( __METHOD__ );
                }
-               return self::$mList;
+               return self::$list;
        }
 
        /**
@@ -230,28 +229,28 @@
         * @return Object
         */
        static function getAliasList() {
-               if ( !is_object( self::$mAliases ) ) {
+               if ( !is_object( self::$aliases ) ) {
                        global $wgContLang;
                        $aliases = $wgContLang->getSpecialPageAliases();
 
                        // Objects are passed by reference by default, need to 
create a copy
                        $missingPages = clone self::getList();
 
-                       self::$mAliases = array();
+                       self::$aliases = array();
                        foreach ( $aliases as $realName => $aliasList ) {
                                foreach ( $aliasList as $alias ) {
-                                       self::$mAliases[$wgContLang->caseFold( 
$alias )] = $realName;
+                                       self::$aliases[$wgContLang->caseFold( 
$alias )] = $realName;
                                }
                                unset( $missingPages->$realName );
                        }
                        foreach ( $missingPages as $name => $stuff ) {
-                               self::$mAliases[$wgContLang->caseFold( $name )] 
= $name;
+                               self::$aliases[$wgContLang->caseFold( $name )] 
= $name;
                        }
 
                        // Cast to object: func()[$key] doesn't work, but 
func()->$key does
-                       self::$mAliases = (object)self::$mAliases;
+                       self::$aliases = (object)self::$aliases;
                }
-               return self::$mAliases;
+               return self::$aliases;
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ef58fe68c60179c53ca6abca069b7b478bf6946
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to