r40116 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40115‎ | r40116 | r40117 >
Date:00:04, 28 August 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 13471) Added NUMBERINGROUP magic word. Patch by Soxred93
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -42,6 +42,7 @@
4343 * Max Semenik
4444 * Mormegil
4545 * RememberTheDot
 46+* Soxred93
4647
4748 == Translators ==
4849 * Anders Wegge Jakobsen
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -33,6 +33,7 @@
3434 $parser->setFunctionHook( 'numberofarticles', array( __CLASS__, 'numberofarticles' ), SFH_NO_HASH );
3535 $parser->setFunctionHook( 'numberoffiles', array( __CLASS__, 'numberoffiles' ), SFH_NO_HASH );
3636 $parser->setFunctionHook( 'numberofadmins', array( __CLASS__, 'numberofadmins' ), SFH_NO_HASH );
 37+ $parser->setFunctionHook( 'numberingroup', array( __CLASS__, 'numberingroup' ), SFH_NO_HASH );
3738 $parser->setFunctionHook( 'numberofedits', array( __CLASS__, 'numberofedits' ), SFH_NO_HASH );
3839 $parser->setFunctionHook( 'language', array( __CLASS__, 'language' ), SFH_NO_HASH );
3940 $parser->setFunctionHook( 'padleft', array( __CLASS__, 'padleft' ), SFH_NO_HASH );
@@ -224,6 +225,9 @@
225226 static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) {
226227 return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw );
227228 }
 229+ static function numberingroup( $parser, $name = '', $raw = null) {
 230+ return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw );
 231+ }
228232
229233 /**
230234 * Return the number of pages in the given category, or 0 if it's nonexis-
Index: trunk/phase3/includes/MagicWord.php
@@ -107,6 +107,7 @@
108108 'pagesincategory',
109109 'index',
110110 'noindex',
 111+ 'numberingroup',
111112 );
112113
113114 /* Array of caching hints for ParserCache */
@@ -145,6 +146,7 @@
146147 'localtimestamp' => 3600,
147148 'pagesinnamespace' => 3600,
148149 'numberofadmins' => 3600,
 150+ 'numberingroup' => 3600,
149151 );
150152
151153 static public $mDoubleUnderscoreIDs = array(
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -342,6 +342,7 @@
343343 'pagesize' => array( 1, 'PAGESIZE' ),
344344 'index' => array( 1, '__INDEX__' ),
345345 'noindex' => array( 1, '__NOINDEX__' ),
 346+ 'numberingroup' => array( 1, 'NUMBERINGROUP', 'NUMINGROUP' ),
346347 'staticredirect' => array( 1, '__STATICREDIRECT__' ),
347348 );
348349
Index: trunk/phase3/RELEASE-NOTES
@@ -99,6 +99,7 @@
100100 * Backend upload code has been removed from SpecialUpload.php. This may cause
101101 backwards incompatibility with upload extensions.
102102 * BMP images are now displayed as PNG
 103+* (bug 13471) Added NUMBERINGROUP magic word
103104
104105 === Bug fixes in 1.14 ===
105106

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38136Deprecate SiteStats::admins() in favor of SiteStats::numberingroup('sysop'). ...demon15:49, 28 July 2008