r51305 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51304‎ | r51305 | r51306 >
Date:20:45, 1 June 2009
Author:purodha
Status:ok (Comments)
Tags:
Comment:
Message 'revisionasof' - date and time separated as of request by user "Der Umherirrende" at
http://translatewiki.net/w/i.php?title=Support&oldid=1243738#split_date_and_time
Modified paths:
  • /trunk/phase3/includes/FeedUtils.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -840,6 +840,8 @@
841841
842842 // Set assorted variables
843843 $timestamp = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true );
 844+ $dateofrev = $wgLang->date( $this->mNewRev->getTimestamp(), true );
 845+ $timeofrev = $wgLang->time( $this->mNewRev->getTimestamp(), true );
844846 $this->mNewPage = $this->mNewRev->getTitle();
845847 if( $this->mNewRev->isCurrent() ) {
846848 $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid );
@@ -851,7 +853,7 @@
852854 } else {
853855 $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid );
854856 $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit&oldid=' . $this->mNewid );
855 - $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $timestamp ) );
 857+ $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $timestamp, $dateofrev, $timeofrev ) );
856858
857859 $this->mNewtitle = "<a href='$newLink'>{$this->mPagetitle}</a>";
858860 $this->mNewtitle .= " (<a href='$newEdit'>" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . "</a>)";
@@ -886,9 +888,11 @@
887889 $this->mOldPage = $this->mOldRev->getTitle();
888890
889891 $t = $wgLang->timeanddate( $this->mOldRev->getTimestamp(), true );
 892+ $dateofrev = $wgLang->date( $this->mOldRev->getTimestamp(), true );
 893+ $timeofrev = $wgLang->time( $this->mOldRev->getTimestamp(), true );
890894 $oldLink = $this->mOldPage->escapeLocalUrl( 'oldid=' . $this->mOldid );
891895 $oldEdit = $this->mOldPage->escapeLocalUrl( 'action=edit&oldid=' . $this->mOldid );
892 - $this->mOldPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t ) );
 896+ $this->mOldPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t, $dateofrev, $timeofrev ) );
893897
894898 $this->mOldtitle = "<a href='$oldLink'>{$this->mOldPagetitle}</a>"
895899 . " (<a href='$oldEdit'>" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . "</a>)";
Index: trunk/phase3/includes/FeedUtils.php
@@ -76,7 +76,9 @@
7777 wfProfileIn( __FUNCTION__."-dodiff" );
7878
7979 #$diffText = $de->getDiff( wfMsg( 'revisionasof',
80 - # $wgContLang->timeanddate( $timestamp ) ),
 80+ # $wgContLang->timeanddate( $timestamp ),
 81+ # $wgContLang->date( $timestamp ),
 82+ # $wgContLang->time( $timestamp ) ),
8183 # wfMsg( 'currentrev' ) );
8284
8385 // Don't bother generating the diff if we won't be able to show it
@@ -85,7 +87,9 @@
8688 $diffText = $de->getDiff(
8789 wfMsg( 'previousrevision' ), // hack
8890 wfMsg( 'revisionasof',
89 - $wgContLang->timeanddate( $timestamp ) ) );
 91+ $wgContLang->timeanddate( $timestamp ),
 92+ $wgContLang->date( $timestamp ),
 93+ $wgContLang->time( $timestamp ) ) );
9094 }
9195
9296 if ( ( strlen( $diffText ) > $wgFeedDiffCutoff ) || ( $wgFeedDiffCutoff <= 0 ) ) {
@@ -152,4 +156,4 @@
153157 return $text;
154158 }
155159
156 -}
\ No newline at end of file
 160+}
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -869,7 +869,9 @@
870870 $targetPage,
871871 wfMsgHtml(
872872 'revisionasof',
873 - htmlspecialchars( $wgLang->timeanddate( $rev->getTimestamp(), true ) )
 873+ htmlspecialchars( $wgLang->timeanddate( $rev->getTimestamp(), true ),
 874+ htmlspecialchars( $wgLang->date( $rev->getTimestamp(), true ),
 875+ htmlspecialchars( $wgLang->time( $rev->getTimestamp(), true ) )
874876 ),
875877 array(),
876878 $targetQuery
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -710,7 +710,7 @@
711711 'viewpagelogs' => 'Link displayed in history of pages',
712712 'currentrev' => '{{Identical|Current revision}}',
713713 'currentrev-asof' => 'The text appears at the right side when comparing 2 different edits of the same page. For example: [http://translatewiki.net/w/i.php?title=FreeCol%3AIntegerAboveZero%2Fca&diff=788645&oldid=788644]',
714 -'revisionasof' => "Used on a difference page when comparing different versions of a page or when viewing an non-current version of a page. \$1 is the date/time at which the revision was created. Example: \"''Revision as of 14:44, 24 January 2008''\".",
 714+'revisionasof' => "Used on a difference page when comparing different versions of a page or when viewing an non-current version of a page. \$1 is the date/time at which the revision was created. Example: \"''Revision as of 14:44, 24 January 2008''\". \$2 is the date at which the revision was created. \$3 is the time at which the revision was created.",
715715 'revision-info' => 'Appears just below the page title when an old version of the page is being viewed.
716716
717717 * $1 indicates the time of that revision and

Follow-up revisions

RevisionCommit summaryAuthorDate
r51376Fix syntax errors in r51305.siebrand19:53, 2 June 2009

Comments

#Comment by Siebrand (talk | contribs)   19:56, 2 June 2009

Fixed syntax errors in r51305.

#Comment by Siebrand (talk | contribs)   19:57, 2 June 2009

Oops: Fixed syntax errors in r51376

Status & tagging log