Revert r21745, r21744, as they don't work properly.

Seems to be taking the raw 'oldid' URL parameter, which is not necessarily the revision ID number being viewed. For instance when paging through versions, the 'oldid' parameter may reference the starting point for a directional page (with 'dir=prev' or 'dir=next' parameter). Also missing the revision number for current-revision views, losing the permalink ability. This should be using the revision number actually being viewed, which should already be known at the output/skin level for permalink etc.
This commit is contained in:
Brion Vibber 2007-05-01 17:40:30 +00:00
parent c3df856a82
commit ba49232be3

View file

@ -40,11 +40,11 @@ function wfSpecialCite() {
}
}
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, $oldid, $revid ) {
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
if ( $skintemplate->mTitle->getNamespace() === NS_MAIN && $revid !== 0 )
$nav_urls['cite'] = array(
'text' => wfMsg( 'cite_article_link' ),
'href' => $skintemplate->makeSpecialUrl( 'Cite', "page=" . wfUrlencode( "{$skintemplate->thispage}" ) . "&id=" . intval( $oldid ) )
'href' => $skintemplate->makeSpecialUrl( 'Cite', "page=" . wfUrlencode( "{$skintemplate->thispage}" ) . "&id=$revid" )
);
return true;