From: Brion Vibber Date: Sun, 18 Jun 2006 22:53:35 +0000 (+0000) Subject: * (bug 6304) Show timestamp for current revision in diff pages X-Git-Tag: 1.31.0-rc.0~56742 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=6f2a8eb6409187ec9d4943d49ff38c24c5c7c9ad;p=lhc%2Fweb%2Fwiklou.git * (bug 6304) Show timestamp for current revision in diff pages * Vertically align current version with old version header in diff display --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 31ab0e048b..9b07f0c04f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -522,6 +522,8 @@ Some default configuration options have changed: * Workaround possible bug in Firefox nightlies by properly removing the Content-Encoding header instead of sending explicit 'identity' value in StreamFile +* (bug 6304) Show timestamp for current revision in diff pages +* Vertically align current version with old version header in diff display == Compatibility == diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 490a889b6e..741b7199ce 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -169,7 +169,7 @@ CONTROL; $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousdiff' ), 'diff=prev&oldid='.$this->mOldid, '', '', 'id="differences-prevlink"' ); if ( $this->mNewRev->isCurrent() ) { - $nextlink = ''; + $nextlink = ' '; } else { $nextlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextdiff' ), 'diff=next&oldid='.$this->mNewid, '', '', 'id="differences-nextlink"' ); @@ -486,20 +486,24 @@ CONTROL; } // Set assorted variables + $timestamp = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true ); + $this->mNewPage = $this->mNewRev->getTitle(); if( $this->mNewRev->isCurrent() ) { - $this->mNewPage = $this->mTitle; $newLink = $this->mNewPage->escapeLocalUrl(); $this->mPagetitle = htmlspecialchars( wfMsg( 'currentrev' ) ); $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit' ); + + $this->mNewtitle = "{$this->mPagetitle} ($timestamp)" + . " (" . htmlspecialchars( wfMsg( 'editold' ) ) . ")"; + } else { - $this->mNewPage = $this->mNewRev->getTitle(); $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid ); $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit&oldid=' . $this->mNewid ); - $t = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true ); - $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t ) ); + $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $timestamp ) ); + + $this->mNewtitle = "{$this->mPagetitle}" + . " (" . htmlspecialchars( wfMsg( 'editold' ) ) . ")"; } - $this->mNewtitle = "{$this->mPagetitle}" - . " (" . htmlspecialchars( wfMsg( 'editold' ) ) . ")"; // Load the old revision object $this->mOldRev = false;