From: Leon Weber Date: Sun, 3 Dec 2006 11:44:23 +0000 (+0000) Subject: * Added js variable wgCurRevisionId to the output X-Git-Tag: 1.31.0-rc.0~55000 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=66055b27a7e0b997d50897300936f64b0a4641b8;p=lhc%2Fweb%2Fwiklou.git * Added js variable wgCurRevisionId to the output --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1b3dde8aec..32301c546e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -246,6 +246,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * New special page Special:NewbieContributions, with a (deprecated) redirect from Special:Contributions/newbies for backwards compatibility * (bug 7671) Observe canonical media namespace prefix in Linker::formatComment +* Added js variable wgCurRevisionId to the output == Languages updated == diff --git a/includes/Skin.php b/includes/Skin.php index 3e59e5e5cd..ad05dc375a 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -278,20 +278,21 @@ class Skin extends Linker { var wgArticlePath = "' . Xml::escapeJsString( $data['articlepath'] ) . '"; var wgScriptPath = "' . Xml::escapeJsString( $data['scriptpath'] ) . '"; var wgServer = "' . Xml::escapeJsString( $data['serverurl'] ) . '"; - + var wgCanonicalNamespace = "' . Xml::escapeJsString( $data['nscanonical'] ) . '"; var wgNamespaceNumber = ' . (int)$data['nsnumber'] . '; var wgPageName = "' . Xml::escapeJsString( $data['titleprefixeddbkey'] ) . '"; var wgTitle = "' . Xml::escapeJsString( $data['titletext'] ) . '"; var wgArticleId = ' . (int)$data['articleid'] . '; + var wgCurRevisionId = ' . ( int ) $data['currevisionid'] . '; var wgIsArticle = ' . ( $data['isarticle'] ? 'true' : 'false' ) . '; - + var wgUserName = ' . ( $data['username'] == NULL ? 'null' : ( '"' . Xml::escapeJsString( $data['username'] ) . '"' ) ) . '; var wgUserLanguage = "' . Xml::escapeJsString( $data['userlang'] ) . '"; var wgContentLanguage = "' . Xml::escapeJsString( $data['lang'] ) . '"; '; - + return $r; } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 7fe61fd549..47ac5e4c71 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -203,8 +203,9 @@ class SkinTemplate extends Skin { $tpl->set( 'titleprefixeddbkey', $this->mTitle->getPrefixedDBKey() ); $tpl->set( 'titletext', $this->mTitle->getText() ); $tpl->set( 'articleid', $this->mTitle->getArticleId() ); + $tpl->set( 'currevisionid', $wgArticle->getLatest() ); $tpl->set( 'isarticle', $wgOut->isArticle() ); - + $tpl->setRef( "thispage", $this->thispage ); $subpagestr = $this->subPageSubtitle(); $tpl->set(