r24951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24950‎ | r24951 | r24952 >
Date:14:35, 20 August 2007
Author:robchurch
Status:old
Tags:
Comment:
As r24950, but for FileDeleteForm
Modified paths:
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileDeleteForm.php
@@ -132,8 +132,8 @@
133133 "{$message}-old",
134134 'parse',
135135 $this->title->getText(),
136 - $wgLang->date( $this->getTimestamp() ),
137 - $wgLang->time( $this->getTimestamp() ),
 136+ $wgLang->date( $this->getTimestamp(), true ),
 137+ $wgLang->time( $this->getTimestamp(), true ),
138138 $wgServer . $this->file->getArchiveUrl( $this->oldimage )
139139 );
140140 } else {
@@ -196,7 +196,12 @@
197197 * @return string
198198 */
199199 private function getTimestamp() {
200 - return substr( $this->oldimage, 0, 14 );
 200+ static $timestamp = false;
 201+ if( $timestamp === false ) {
 202+ $file = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
 203+ $timestamp = $file->getTimestamp();
 204+ }
 205+ return $timestamp;
201206 }
202207
203208 }
\ No newline at end of file
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1506,13 +1506,13 @@
15071507 'filedelete' => 'Delete $1',
15081508 'filedelete-legend' => 'Delete file',
15091509 'filedelete-intro' => "You are deleting '''[[Media:$1|$1]]'''.",
1510 -'filedelete-intro-old' => "<span class=\"plainlinks\">You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $2, $3].</span>",
 1510+'filedelete-intro-old' => "<span class=\"plainlinks\">You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $3, $2].</span>",
15111511 'filedelete-comment' => 'Comment:',
15121512 'filedelete-submit' => 'Delete',
15131513 'filedelete-success' => "'''$1''' has been deleted.",
1514 -'filedelete-success-old' => "<span class=\"plainlinks\">The version of '''[[Media:$1|$1]]''' as of $2, $3 has been deleted.</span>",
 1514+'filedelete-success-old' => "<span class=\"plainlinks\">The version of '''[[Media:$1|$1]]''' as of $3, $2 has been deleted.</span>",
15151515 'filedelete-nofile' => "'''$1''' does not exist on this site.",
1516 -'filedelete-nofile-old' => "There is no version of '''$1''' dated $2, $3.",
 1516+'filedelete-nofile-old' => "There is no version of '''$1''' dated $3, $2.",
15171517 'filedelete-iscurrent' => 'You are attempting to delete the most recent version of this file. Please revert to an older version first.',
15181518
15191519 # MIME search

Follow-up revisions

RevisionCommit summaryAuthorDate
r25016Merged revisions 24866-25015 via svnmerge from...david23:06, 21 August 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r24950* Fix FileRevertForm::getTimestamp() - stupid assumption about archive names :)...robchurch14:32, 20 August 2007

Status & tagging log