(bug 6873) When viewing old revisions, add link to diff to current version.
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 16 Nov 2006 05:44:59 +0000 (05:44 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 16 Nov 2006 05:44:59 +0000 (05:44 +0000)
RELEASE-NOTES
includes/Article.php
languages/messages/MessagesEn.php

index 5d67f47..34d3616 100644 (file)
@@ -184,6 +184,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7811) Allow preview of edit summaries.
 * (bug 6839) Wikibits.js minor changes to make JS-lint happier.
 * (bug 7932) Make sure that edit toolbar clears floats so it appears correctly.
+* (bug 6873) When viewing old revisions, add link to diff to current version.
 
 
 == Languages updated ==
index 1b1022a..39e2c4b 100644 (file)
@@ -2283,6 +2283,9 @@ class Article {
                $lnk = $current
                        ? wfMsg( 'currentrevisionlink' )
                        : $lnk = $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'currentrevisionlink' ) );
+               $curdiff = $current
+                       ? wfMsg( 'diff' )
+                       : $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'diff' ), 'diff=cur&oldid='.$oldid );
                $prev = $this->mTitle->getPreviousRevisionID( $oldid ) ;
                $prevlink = $prev
                        ? $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'previousrevision' ), 'direction=prev&oldid='.$oldid )
@@ -2300,7 +2303,7 @@ class Article {
                $userlinks = $sk->userLink( $revision->getUser(), $revision->getUserText() )
                                                . $sk->userToolLinks( $revision->getUser(), $revision->getUserText() );
                
-               $r = wfMsg( 'old-revision-navigation', $td, $lnk, $prevlink, $nextlink, $userlinks, $prevdiff, $nextdiff );
+               $r = wfMsg( 'old-revision-navigation', $td, $lnk, $prevlink, $nextlink, $userlinks, $prevdiff, $nextdiff, $curdiff );
                $wgOut->setSubtitle( $r );
        }
 
index 96c3771..ff9c24e 100644 (file)
@@ -998,7 +998,7 @@ Please check the URL you used to access this page.",
 'loadhist'             => 'Loading page history',
 'currentrev'   => 'Current revision',
 'revisionasof'          => 'Revision as of $1',
-'old-revision-navigation' => 'Revision as of $1; $5<br />($6) $3 | $2 | $4 ($7)',
+'old-revision-navigation' => 'Revision as of $1; $5<br />($6) $3 | $2 ($8) | $4 ($7)',
 'previousrevision'     => '←Older revision',
 'nextrevision'         => 'Newer revision→',
 'currentrevisionlink'   => 'Current revision',