* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id [patch by Waldir]
authorDanny B <danny_b@users.mediawiki.org>
Wed, 21 Dec 2011 23:19:24 +0000 (23:19 +0000)
committerDanny B <danny_b@users.mediawiki.org>
Wed, 21 Dec 2011 23:19:24 +0000 (23:19 +0000)
RELEASE-NOTES-1.19
includes/MagicWord.php
includes/parser/Parser.php
languages/messages/MessagesEn.php

index f5acada..20626e6 100644 (file)
@@ -108,6 +108,7 @@ production.
 * (bug 32512) Include 'associated namespace' checkbox on Special:Contributions
 * Added $wgSend404Code, true by default, which can be set to false to send a 
   200 status code instead of 404 for nonexistent articles.
+* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if.
index 563d3a5..57cf4af 100644 (file)
@@ -67,6 +67,7 @@ class MagicWord {
                'numberoffiles',
                'numberofedits',
                'articlepath',
+               'pageid',
                'sitename',
                'server',
                'servername',
index 3c3d59d..94ceaed 100644 (file)
@@ -2817,6 +2817,8 @@ class Parser {
                                break;
                        case 'articlepath':
                                return $wgArticlePath;
+                       case 'pageid':
+                               return $this->getTitle()->getArticleId();
                        case 'sitename':
                                return $wgSitename;
                        case 'server':
index d285e34..27d6047 100644 (file)
@@ -287,6 +287,7 @@ $magicWords = array(
        'localurl'               => array( 0,    'LOCALURL:'              ),
        'localurle'              => array( 0,    'LOCALURLE:'             ),
        'articlepath'            => array( 0,    'ARTICLEPATH'            ),
+       'pageid'                 => array( 0,    'PAGEID'                 ),
        'server'                 => array( 0,    'SERVER'                 ),
        'servername'             => array( 0,    'SERVERNAME'             ),
        'scriptpath'             => array( 0,    'SCRIPTPATH'             ),