r107006 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107005‎ | r107006 | r107007 >
Date:23:19, 21 December 2011
Author:danny_b
Status:reverted (Comments)
Tags:
Comment:
* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id [patch by Waldir]
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -108,6 +108,7 @@
109109 * (bug 32512) Include 'associated namespace' checkbox on Special:Contributions
110110 * Added $wgSend404Code, true by default, which can be set to false to send a
111111 200 status code instead of 404 for nonexistent articles.
 112+* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
112113
113114 === Bug fixes in 1.19 ===
114115 * $wgUploadNavigationUrl should be used for file redlinks if.
Index: trunk/phase3/includes/parser/Parser.php
@@ -2817,6 +2817,8 @@
28182818 break;
28192819 case 'articlepath':
28202820 return $wgArticlePath;
 2821+ case 'pageid':
 2822+ return $this->getTitle()->getArticleId();
28212823 case 'sitename':
28222824 return $wgSitename;
28232825 case 'server':
Index: trunk/phase3/includes/MagicWord.php
@@ -67,6 +67,7 @@
6868 'numberoffiles',
6969 'numberofedits',
7070 'articlepath',
 71+ 'pageid',
7172 'sitename',
7273 'server',
7374 'servername',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -287,6 +287,7 @@
288288 'localurl' => array( 0, 'LOCALURL:' ),
289289 'localurle' => array( 0, 'LOCALURLE:' ),
290290 'articlepath' => array( 0, 'ARTICLEPATH' ),
 291+ 'pageid' => array( 0, 'PAGEID' ),
291292 'server' => array( 0, 'SERVER' ),
292293 'servername' => array( 0, 'SERVERNAME' ),
293294 'scriptpath' => array( 0, 'SCRIPTPATH' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r108002revert r107006...hashar09:08, 4 January 2012

Comments

#Comment by Platonides (talk | contribs)   23:47, 22 December 2011

Have you tested it with pages not existing yet? (previews/creations)

This seems overly simplistic.

Please provide phpunit tests of those cases.

#Comment by Brion VIBBER (talk | contribs)   22:22, 3 January 2012

Fails on creation: initial save shows '0' on load.

#Comment by Hashar (talk | contribs)   09:08, 4 January 2012

reverting since that does not work. Please fix the above issues and reapply after 1.19 branching.

Status & tagging log