r18164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18163‎ | r18164 | r18165 >
Date:23:29, 4 December 2006
Author:nickj
Status:old
Tags:
Comment:
Reverting oldid parts of r18156 and r18150, as should not be taking 'oldid' out of $wgRequest as it is going to be frequently incorrect, and can contain bogus integer data.
E.g. outputs the wrong value here: http://en.wikipedia.org/w/index.php?title=Calcitriol&direction=next&oldid=71374766
and outputs a negative value here: http://en.wikipedia.org/w/index.php?title=Calcitriol&direction=next&oldid=-71374766
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
@@ -204,7 +204,6 @@
205205 $tpl->set( 'titletext', $this->mTitle->getText() );
206206 $tpl->set( 'articleid', $this->mTitle->getArticleId() );
207207 $tpl->set( 'currevisionid', isset( $wgArticle ) ? $wgArticle->getLatest() : 0 );
208 - $tpl->set( 'oldid', $oldid ? $oldid : 0 );
209208
210209 $tpl->set( 'isarticle', $wgOut->isArticle() );
211210
Index: trunk/phase3/includes/Skin.php
@@ -285,7 +285,6 @@
286286 var wgTitle = "' . Xml::escapeJsString( $data['titletext'] ) . '";
287287 var wgArticleId = ' . (int)$data['articleid'] . ';
288288 var wgCurRevisionId = ' . ( int ) $data['currevisionid'] . ';
289 - var wgOldid = ' . ( int ) $data['oldid'] . ';
290289 var wgIsArticle = ' . ( $data['isarticle'] ? 'true' : 'false' ) . ';
291290
292291 var wgUserName = ' . ( $data['username'] == NULL ? 'null' : ( '"' . Xml::escapeJsString( $data['username'] ) . '"' ) ) . ';
@@ -300,7 +299,7 @@
301300 function getHeadScripts() {
302301 global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion;
303302 global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
304 - global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle, $wgRequest;
 303+ global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle;
305304
306305 $ns = $wgTitle->getNamespace();
307306 $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText();
@@ -318,7 +317,6 @@
319318 'titletext' => $wgTitle->getText(),
320319 'articleid' => $wgTitle->getArticleId(),
321320 'currevisionid' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0,
322 - 'oldid' => $wgRequest->getVal( 'oldid' ),
323321 'isarticle' => $wgOut->isArticle(),
324322 'username' => $wgUser->isAnon() ? NULL : $wgUser->getName(),
325323 'userlang' => $wgLang->getCode(),
Index: trunk/phase3/RELEASE-NOTES
@@ -247,7 +247,6 @@
248248 redirect from Special:Contributions/newbies for backwards compatibility
249249 * (bug 7671) Observe canonical media namespace prefix in Linker::formatComment
250250 * Added js variable wgCurRevisionId to the output
251 -* Added js variable wgOldId which shows the oldid when viewing an old revision
252251 * (bug 8141) Cleanup of Parser::doTableStuff, patch by AzaTht
253252 * (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit
254253 instead of hardcoding to 1000

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r18150* Added js variable wgOldId which shows the oldid when viewing an old revisionleon12:35, 3 December 2006
r18156E_STRICT minor tweaks:...nickj11:28, 4 December 2006