From: Tim Starling Date: Sun, 1 Jan 2006 22:07:14 +0000 (+0000) Subject: $wgOut->setRevisionId() was missing from one branch out of 4, causing an incorrect... X-Git-Tag: 1.6.0~816 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=400b9ac75260da13e4893d92ad214fd99f340385;p=lhc%2Fweb%2Fwiklou.git $wgOut->setRevisionId() was missing from one branch out of 4, causing an incorrect edit link when editing an old revision which is a redirect. Moved the call outside the if structure. --- diff --git a/includes/Article.php b/includes/Article.php index ae767c5d85..63b7f5aa55 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -833,13 +833,13 @@ class Article { * trigger when the parser cache is used. */ wfRunHooks( 'ArticleViewHeader', array( &$this ) ) ; + $wgOut->setRevisionId( $this->getRevIdFetched() ); # wrap user css and user js in pre and don't parse # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found if ( $this->mTitle->getNamespace() == NS_USER && preg_match('/\\/[\\w]+\\.(css|js)$/', $this->mTitle->getDBkey()) ) { - $wgOut->setRevisionId( $this->getRevIdFetched() ); $wgOut->addWikiText( wfMsg('clearyourcache')); $wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); } else if ( $rt = Title::newFromRedirect( $text ) ) { @@ -860,7 +860,6 @@ class Article { $wgOut->addParserOutputNoText( $parseout ); } else if ( $pcache ) { # Display content and save to parser cache - $wgOut->setRevisionId( $this->getRevIdFetched() ); $wgOut->addPrimaryWikiText( $text, $this ); } else { # Display content, don't attempt to save to parser cache @@ -869,7 +868,6 @@ class Article { if( !$this->isCurrent() ) { $oldEditSectionSetting = $wgOut->mParserOptions->setEditSection( false ); } - $wgOut->setRevisionId( $this->getRevIdFetched() ); $wgOut->addWikiText( $text ); if( !$this->isCurrent() ) {