(bug 23426) The {{REVISIONMONTH}} variable is now zero-padded and added new variable...
authorMatěj Grabovský <mgrabovsky@users.mediawiki.org>
Tue, 11 May 2010 16:24:14 +0000 (16:24 +0000)
committerMatěj Grabovský <mgrabovsky@users.mediawiki.org>
Tue, 11 May 2010 16:24:14 +0000 (16:24 +0000)
RELEASE-NOTES
includes/MagicWord.php
includes/parser/Parser.php
languages/messages/MessagesEn.php

index a308a82..b1fc9c2 100644 (file)
@@ -160,6 +160,8 @@ in a negative namespace (which is invalid).
 * (bug 23422) mp3 files can now be moved
 * (bug 23448) MediaWiki:Summary-preview is now displayed instead of
   MediaWiki:Subject-preview when previewing summary
+* (bug 23426) The {{REVISIONMONTH}} variable is now zero-padded and added new
+  variable {{REVISIONMONTH1}} when unpadded version is needed.
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent
index d741832..d05bf19 100644 (file)
@@ -79,6 +79,7 @@ class MagicWord {
                'revisionday',
                'revisionday2',
                'revisionmonth',
+               'revisionmonth1',
                'revisionyear',
                'revisiontimestamp',
                'revisionuser',
index 7032b86..9b920ae 100644 (file)
@@ -2528,6 +2528,13 @@ class Parser {
                                # *after* a revision ID has been assigned. This is for null edits.
                                $this->mOutput->setFlag( 'vary-revision' );
                                wfDebug( __METHOD__ . ": {{REVISIONMONTH}} used, setting vary-revision...\n" );
+                               $value = substr( $this->getRevisionTimestamp(), 4, 2 );
+                               break;
+                       case 'revisionmonth1':
+                               # Let the edit saving system know we should parse the page
+                               # *after* a revision ID has been assigned. This is for null edits.
+                               $this->mOutput->setFlag( 'vary-revision' );
+                               wfDebug( __METHOD__ . ": {{REVISIONMONTH1}} used, setting vary-revision...\n" );
                                $value = intval( substr( $this->getRevisionTimestamp(), 4, 2 ) );
                                break;
                        case 'revisionyear':
index 7126615..63e3c4e 100644 (file)
@@ -311,6 +311,7 @@ $magicWords = array(
        'revisionday'            => array( 1,    'REVISIONDAY'            ),
        'revisionday2'           => array( 1,    'REVISIONDAY2'           ),
        'revisionmonth'          => array( 1,    'REVISIONMONTH'          ),
+       'revisionmonth1'         => array( 1,    'REVISIONMONTH1'         ),
        'revisionyear'           => array( 1,    'REVISIONYEAR'           ),
        'revisiontimestamp'      => array( 1,    'REVISIONTIMESTAMP'      ),
        'revisionuser'           => array( 1,    'REVISIONUSER'           ),