From: parent5446 Date: Mon, 26 Aug 2013 18:52:23 +0000 (-0400) Subject: Add wgRevisionId variable to ResourceLoader X-Git-Tag: 1.31.0-rc.0~18682^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=7fa7b71eb3a5dd24e75865162e4c06a4a6012524;p=lhc%2Fweb%2Fwiklou.git Add wgRevisionId variable to ResourceLoader 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 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 83a7d3f77a..a020def3e8 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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(),