Add wgRevisionId variable to ResourceLoader
authorparent5446 <tylerromeo@gmail.com>
Mon, 26 Aug 2013 18:52:23 +0000 (14:52 -0400)
committerTyler Anthony Romeo <tylerromeo@gmail.com>
Tue, 24 Sep 2013 23:34:42 +0000 (19:34 -0400)
mw.config provides wgCurRevisionId, which has the latest
revision number. This adds wgRevisionId, which indicates
the revision number currently being viewed. This is useful
when looking at old revisions.

Bug: 51594
Change-Id: Ie0d00f3a9a8af8533ab28204b5bb483a0092c710

includes/OutputPage.php

index 83a7d3f..a020def 100644 (file)
@@ -3022,6 +3022,7 @@ $templates
                        'wgPageName' => $title->getPrefixedDBkey(),
                        'wgTitle' => $title->getText(),
                        'wgCurRevisionId' => $latestRevID,
+                       'wgRevisionId' => (int)$this->getRevisionId(),
                        'wgArticleId' => $pageID,
                        'wgIsArticle' => $this->isArticle(),
                        'wgIsRedirect' => $title->isRedirect(),