http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90026

Revision: 90026
Author:   demon
Date:     2011-06-14 01:56:55 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
* Remove @static from the last few places it's left in core. Please don't use 
this silly annotation anymore, that's what the static keyword is for.
* Enforce protected on SpecialAllPages::getNamespaceKeyAndText(), it's not 
@private like the comment implies
* Drop User::getMaxID(), nothing uses it

Modified Paths:
--------------
    trunk/phase3/includes/User.php
    trunk/phase3/includes/specials/SpecialAllpages.php
    trunk/phase3/tests/parser/parserTest.inc
    trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php

Modified: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php      2011-06-14 01:38:26 UTC (rev 90025)
+++ trunk/phase3/includes/User.php      2011-06-14 01:56:55 UTC (rev 90026)
@@ -2864,22 +2864,6 @@
        }
 
        /**
-        * Get the maximum valid user ID.
-        * @return Integer: User ID
-        * @static
-        */
-       function getMaxID() {
-               static $res; // cache
-
-               if ( isset( $res ) ) {
-                       return $res;
-               } else {
-                       $dbr = wfGetDB( DB_SLAVE );
-                       return $res = $dbr->selectField( 'user', 
'max(user_id)', false, __METHOD__ );
-               }
-       }
-
-       /**
         * Determine whether the user is a newbie. Newbies are either
         * anonymous IPs, or the most recently created accounts.
         * @return Bool

Modified: trunk/phase3/includes/specials/SpecialAllpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialAllpages.php  2011-06-14 01:38:26 UTC 
(rev 90025)
+++ trunk/phase3/includes/specials/SpecialAllpages.php  2011-06-14 01:56:55 UTC 
(rev 90026)
@@ -468,10 +468,8 @@
         * @param $ns Integer: the namespace of the article
         * @param $text String: the name of the article
         * @return array( int namespace, string dbkey, string pagename ) or 
NULL on error
-        * @static (sort of)
-        * @access private
         */
-       function getNamespaceKeyAndText($ns, $text) {
+       protected function getNamespaceKeyAndText($ns, $text) {
                if ( $text == '' )
                        return array( $ns, '', '' ); # shortcut for common case
 

Modified: trunk/phase3/tests/parser/parserTest.inc
===================================================================
--- trunk/phase3/tests/parser/parserTest.inc    2011-06-14 01:38:26 UTC (rev 
90025)
+++ trunk/phase3/tests/parser/parserTest.inc    2011-06-14 01:56:55 UTC (rev 
90026)
@@ -1205,7 +1205,6 @@
         *
         * @param $text String: the text to tidy
         * @return String
-        * @static
         */
        private function tidy( $text ) {
                global $wgUseTidy;

Modified: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php        
2011-06-14 01:38:26 UTC (rev 90025)
+++ trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php        
2011-06-14 01:56:55 UTC (rev 90026)
@@ -668,7 +668,6 @@
         *
         * @param $text String: the text to tidy
         * @return String
-        * @static
         */
        protected function tidy( $text ) {
                global $wgUseTidy;


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

Reply via email to