Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3243
7958.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 9:25 PM
2014-11-21 21:25:06 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
7958.diff
View Options
Index: includes/Article.php
===================================================================
--- includes/Article.php (revision 21814)
+++ includes/Article.php (working copy)
@@ -721,6 +721,9 @@
wfRunHooks( 'ArticleViewHeader', array( &$this ) );
if ( $pcache ) {
if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
+ // Ensure that UI elements requiring revision ID have
+ // the correct version information.
+ $wgOut->setRevisionId( $this->mLatest );
$outputDone = true;
}
}
Index: includes/SkinTemplate.php
===================================================================
--- includes/SkinTemplate.php (revision 21814)
+++ includes/SkinTemplate.php (working copy)
@@ -822,7 +822,6 @@
global $wgEnableUploads, $wgUploadNavigationUrl;
$action = $wgRequest->getText( 'action' );
- $oldid = $wgRequest->getVal( 'oldid' );
$nav_urls = array();
$nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
@@ -852,21 +851,16 @@
);
// Also add a "permalink" while we're at it
- if ( (int)$oldid ) {
+ if ( $this->mRevisionId ) {
$nav_urls['permalink'] = array(
'text' => wfMsg( 'permalink' ),
- 'href' => ''
+ 'href' => $wgTitle->getLocalURL( "oldid=$this->mRevisionId" )
);
- } else {
- $revid = $wgArticle ? $wgArticle->getLatest() : 0;
- if ( !( $revid == 0 ) )
- $nav_urls['permalink'] = array(
- 'text' => wfMsg( 'permalink' ),
- 'href' => $wgTitle->getLocalURL( "oldid=$revid" )
- );
}
-
- wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$oldid, &$revid ) );
+
+ // Copy in case this undocumented, shady hook tries to mess with internals
+ $revid = $this->mRevisionId;
+ wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$revid, &$revid ) );
}
if( $this->mTitle->getNamespace() != NS_SPECIAL ) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2812
Default Alt Text
7958.diff (1 KB)
Attached To
Mode
T9958: Special:cite of older version of an article should use old version id
Attached
Detach File
Event Timeline
Log In to Comment