From: Nick Jenkins Date: Mon, 4 Dec 2006 23:29:15 +0000 (+0000) Subject: Reverting oldid parts of r18156 and r18150, as should not be taking 'oldid' out of... X-Git-Tag: 1.31.0-rc.0~54989 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=64bf1c829f1bf9c77448f223162c1f44a725c36c;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9401459155..03cab3e65c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -247,7 +247,6 @@ 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 * (bug 8141) Cleanup of Parser::doTableStuff, patch by AzaTht * (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit instead of hardcoding to 1000 diff --git a/includes/Skin.php b/includes/Skin.php index 45e8f2803d..28945a785d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -285,7 +285,6 @@ 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'] ) . '"' ) ) . '; @@ -300,7 +299,7 @@ class Skin extends Linker { function getHeadScripts() { global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion; global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang; - global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle, $wgRequest; + global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle; $ns = $wgTitle->getNamespace(); $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText(); @@ -318,7 +317,6 @@ class Skin extends Linker { 'titletext' => $wgTitle->getText(), 'articleid' => $wgTitle->getArticleId(), 'currevisionid' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0, - 'oldid' => $wgRequest->getVal( 'oldid' ), 'isarticle' => $wgOut->isArticle(), 'username' => $wgUser->isAnon() ? NULL : $wgUser->getName(), 'userlang' => $wgLang->getCode(), diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 0249e7d9ac..ab0e4b1b72 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -204,7 +204,6 @@ class SkinTemplate extends Skin { $tpl->set( 'titletext', $this->mTitle->getText() ); $tpl->set( 'articleid', $this->mTitle->getArticleId() ); $tpl->set( 'currevisionid', isset( $wgArticle ) ? $wgArticle->getLatest() : 0 ); - $tpl->set( 'oldid', $oldid ? $oldid : 0 ); $tpl->set( 'isarticle', $wgOut->isArticle() );