From: Chad Horohoe Date: Tue, 14 Jun 2011 01:56:55 +0000 (+0000) Subject: * Remove @static from the last few places it's left in core. Please don't use this... X-Git-Tag: 1.31.0-rc.0~29544 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=c954cb7a4c42124937d53a4017b59035edb0d202;p=lhc%2Fweb%2Fwiklou.git * 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 --- diff --git a/includes/User.php b/includes/User.php index f4bf1eb6eb..81c7728331 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2863,22 +2863,6 @@ class User { return $title->getTalkPage(); } - /** - * 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. diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index ec049ac55a..85a7c7c3d3 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -468,10 +468,8 @@ class SpecialAllpages extends IncludableSpecialPage { * @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 diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 3eae817f78..6e940ae0d6 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -1205,7 +1205,6 @@ class ParserTest { * * @param $text String: the text to tidy * @return String - * @static */ private function tidy( $text ) { global $wgUseTidy; diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 2ac38e4968..70e8d7753a 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -668,7 +668,6 @@ class NewParserTest extends MediaWikiTestCase { * * @param $text String: the text to tidy * @return String - * @static */ protected function tidy( $text ) { global $wgUseTidy;