r18149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18148‎ | r18149 | r18150 >
Date:11:44, 3 December 2006
Author:leon
Status:old
Tags:
Comment:
* Added js variable wgCurRevisionId to the output
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -203,8 +203,9 @@
204204 $tpl->set( 'titleprefixeddbkey', $this->mTitle->getPrefixedDBKey() );
205205 $tpl->set( 'titletext', $this->mTitle->getText() );
206206 $tpl->set( 'articleid', $this->mTitle->getArticleId() );
 207+ $tpl->set( 'currevisionid', $wgArticle->getLatest() );
207208 $tpl->set( 'isarticle', $wgOut->isArticle() );
208 -
 209+
209210 $tpl->setRef( "thispage", $this->thispage );
210211 $subpagestr = $this->subPageSubtitle();
211212 $tpl->set(
Index: trunk/phase3/includes/Skin.php
@@ -278,20 +278,21 @@
279279 var wgArticlePath = "' . Xml::escapeJsString( $data['articlepath'] ) . '";
280280 var wgScriptPath = "' . Xml::escapeJsString( $data['scriptpath'] ) . '";
281281 var wgServer = "' . Xml::escapeJsString( $data['serverurl'] ) . '";
282 -
 282+
283283 var wgCanonicalNamespace = "' . Xml::escapeJsString( $data['nscanonical'] ) . '";
284284 var wgNamespaceNumber = ' . (int)$data['nsnumber'] . ';
285285 var wgPageName = "' . Xml::escapeJsString( $data['titleprefixeddbkey'] ) . '";
286286 var wgTitle = "' . Xml::escapeJsString( $data['titletext'] ) . '";
287287 var wgArticleId = ' . (int)$data['articleid'] . ';
 288+ var wgCurRevisionId = ' . ( int ) $data['currevisionid'] . ';
288289 var wgIsArticle = ' . ( $data['isarticle'] ? 'true' : 'false' ) . ';
289 -
 290+
290291 var wgUserName = ' . ( $data['username'] == NULL ? 'null' : ( '"' . Xml::escapeJsString( $data['username'] ) . '"' ) ) . ';
291292 var wgUserLanguage = "' . Xml::escapeJsString( $data['userlang'] ) . '";
292293 var wgContentLanguage = "' . Xml::escapeJsString( $data['lang'] ) . '";
293294 </script>
294295 ';
295 -
 296+
296297 return $r;
297298 }
298299
Index: trunk/phase3/RELEASE-NOTES
@@ -246,6 +246,7 @@
247247 * New special page Special:NewbieContributions, with a (deprecated)
248248 redirect from Special:Contributions/newbies for backwards compatibility
249249 * (bug 7671) Observe canonical media namespace prefix in Linker::formatComment
 250+* Added js variable wgCurRevisionId to the output
250251
251252 == Languages updated ==
252253

Follow-up revisions

RevisionCommit summaryAuthorDate
r18152Fixed the error of r18149. Apologies.leon14:13, 3 December 2006