From: Roan Kattouw Date: Thu, 28 Aug 2008 00:04:57 +0000 (+0000) Subject: (bug 13471) Added NUMBERINGROUP magic word. Patch by Soxred93 X-Git-Tag: 1.31.0-rc.0~45606 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=406dbbb47e6b26fbb791f00175166ba8c1dccfaa;p=lhc%2Fweb%2Fwiklou.git (bug 13471) Added NUMBERINGROUP magic word. Patch by Soxred93 --- diff --git a/CREDITS b/CREDITS index b4a28daa49..64a2dc8990 100644 --- a/CREDITS +++ b/CREDITS @@ -42,6 +42,7 @@ following names for their contribution to the product. * Max Semenik * Mormegil * RememberTheDot +* Soxred93 == Translators == * Anders Wegge Jakobsen diff --git a/RELEASE-NOTES b/RELEASE-NOTES index db74d670a0..a41e0f88ee 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -99,6 +99,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Backend upload code has been removed from SpecialUpload.php. This may cause backwards incompatibility with upload extensions. * BMP images are now displayed as PNG +* (bug 13471) Added NUMBERINGROUP magic word === Bug fixes in 1.14 === diff --git a/includes/MagicWord.php b/includes/MagicWord.php index cabd394299..594b2f443d 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -107,6 +107,7 @@ class MagicWord { 'pagesincategory', 'index', 'noindex', + 'numberingroup', ); /* Array of caching hints for ParserCache */ @@ -145,6 +146,7 @@ class MagicWord { 'localtimestamp' => 3600, 'pagesinnamespace' => 3600, 'numberofadmins' => 3600, + 'numberingroup' => 3600, ); static public $mDoubleUnderscoreIDs = array( diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 14c75d07be..3a991d5d57 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -33,6 +33,7 @@ class CoreParserFunctions { $parser->setFunctionHook( 'numberofarticles', array( __CLASS__, 'numberofarticles' ), SFH_NO_HASH ); $parser->setFunctionHook( 'numberoffiles', array( __CLASS__, 'numberoffiles' ), SFH_NO_HASH ); $parser->setFunctionHook( 'numberofadmins', array( __CLASS__, 'numberofadmins' ), SFH_NO_HASH ); + $parser->setFunctionHook( 'numberingroup', array( __CLASS__, 'numberingroup' ), SFH_NO_HASH ); $parser->setFunctionHook( 'numberofedits', array( __CLASS__, 'numberofedits' ), SFH_NO_HASH ); $parser->setFunctionHook( 'language', array( __CLASS__, 'language' ), SFH_NO_HASH ); $parser->setFunctionHook( 'padleft', array( __CLASS__, 'padleft' ), SFH_NO_HASH ); @@ -224,6 +225,9 @@ class CoreParserFunctions { static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) { return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw ); } + static function numberingroup( $parser, $name = '', $raw = null) { + return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw ); + } /** * Return the number of pages in the given category, or 0 if it's nonexis- diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 81d890809b..b2ce5a1031 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -342,6 +342,7 @@ $magicWords = array( 'pagesize' => array( 1, 'PAGESIZE' ), 'index' => array( 1, '__INDEX__' ), 'noindex' => array( 1, '__NOINDEX__' ), + 'numberingroup' => array( 1, 'NUMBERINGROUP', 'NUMINGROUP' ), 'staticredirect' => array( 1, '__STATICREDIRECT__' ), );