From ff2ef8285a250979393e79dda7a9a460665950b9 Mon Sep 17 00:00:00 2001 From: Danny B Date: Wed, 21 Dec 2011 23:19:24 +0000 Subject: [PATCH] * (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id [patch by Waldir] --- RELEASE-NOTES-1.19 | 1 + includes/MagicWord.php | 1 + includes/parser/Parser.php | 2 ++ languages/messages/MessagesEn.php | 1 + 4 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index f5acada657..20626e65b0 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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. diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 563d3a5621..57cf4af7e1 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -67,6 +67,7 @@ class MagicWord { 'numberoffiles', 'numberofedits', 'articlepath', + 'pageid', 'sitename', 'server', 'servername', diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 3c3d59d4f4..94ceaedebc 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2817,6 +2817,8 @@ class Parser { break; case 'articlepath': return $wgArticlePath; + case 'pageid': + return $this->getTitle()->getArticleId(); case 'sitename': return $wgSitename; case 'server': diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d285e341d0..27d6047c30 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' ), -- 2.20.1