* Added js variable wgOldId which shows the oldid when viewing an old revision
authorLeon Weber <leon@users.mediawiki.org>
Sun, 3 Dec 2006 12:35:50 +0000 (12:35 +0000)
committerLeon Weber <leon@users.mediawiki.org>
Sun, 3 Dec 2006 12:35:50 +0000 (12:35 +0000)
RELEASE-NOTES
includes/Skin.php
includes/SkinTemplate.php

index 32301c5..dd17146 100644 (file)
@@ -247,6 +247,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   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
+* Added js variable wgOldId which shows the oldid when viewing an old revision
 
 == Languages updated ==
 
index ad05dc3..ab695df 100644 (file)
@@ -285,6 +285,7 @@ class Skin extends Linker {
                        var wgTitle = "' . Xml::escapeJsString( $data['titletext'] ) . '";
                        var wgArticleId = ' . (int)$data['articleid'] . ';
                        var wgCurRevisionId = ' . ( int ) $data['currevisionid'] . ';
+                       var wgOldid = ' . ( int ) $data['oldid'] . ';
                        var wgIsArticle = ' . ( $data['isarticle'] ? 'true' : 'false' ) . ';
                
                        var wgUserName = ' . ( $data['username'] == NULL ? 'null' : ( '"' . Xml::escapeJsString( $data['username'] ) . '"' ) ) . ';
index 47ac5e4..675a1a8 100644 (file)
@@ -204,6 +204,14 @@ class SkinTemplate extends Skin {
                $tpl->set( 'titletext', $this->mTitle->getText() );
                $tpl->set( 'articleid', $this->mTitle->getArticleId() );
                $tpl->set( 'currevisionid', $wgArticle->getLatest() );
+
+               if( $oldid ) {
+                       $tpl->set( 'oldid', $oldid );
+               } else
+               {
+                       $tpl->set( 'oldid', 0 );
+               }
+
                $tpl->set( 'isarticle', $wgOut->isArticle() );
 
                $tpl->setRef( "thispage", $this->thispage );