(bug 13471) Added NUMBERINGROUP magic word. Patch by Soxred93
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 28 Aug 2008 00:04:57 +0000 (00:04 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 28 Aug 2008 00:04:57 +0000 (00:04 +0000)
CREDITS
RELEASE-NOTES
includes/MagicWord.php
includes/parser/CoreParserFunctions.php
languages/messages/MessagesEn.php

diff --git a/CREDITS b/CREDITS
index b4a28da..64a2dc8 100644 (file)
--- 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
index db74d67..a41e0f8 100644 (file)
@@ -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 ===
 
index cabd394..594b2f4 100644 (file)
@@ -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(
index 14c75d0..3a991d5 100644 (file)
@@ -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-
index 81d8908..b2ce5a1 100644 (file)
@@ -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__'     ),
 );