From 4f932824801f8f435703ad41c7ced7e2fc6e5d13 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 14 Jan 2007 20:29:18 +0000 Subject: [PATCH] (bug 7842) Link back to deleted revision list from deleted revision preview --- RELEASE-NOTES | 2 +- includes/SpecialUndelete.php | 14 ++++++++------ languages/messages/MessagesEn.php | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 491b8962f4..c884b9588e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,7 +66,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Made Linker::userToolLinks() show the contribs link red when the user has zero edits * Use browser default for printing size, don't force to 11pt * (bug 8632) Fix regression in page protection null edit update - +* (bug 7842) Link back to deleted revision list from deleted revision preview == Languages updated == diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index 3cdda7889f..a156b97966 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -513,15 +513,19 @@ class UndeleteForm { /* private */ function showRevision( $timestamp ) { global $wgLang, $wgUser, $wgOut; + $self = SpecialPage::getTitleFor( 'Undelete' ); + $skin = $wgUser->getSkin(); if(!preg_match("/[0-9]{14}/",$timestamp)) return 0; $archive = new PageArchive( $this->mTargetObj ); $rev = $archive->getRevision( $timestamp ); - $wgOut->setPagetitle( wfMsg( "undeletepage" ) ); - $wgOut->addWikiText( "(" . wfMsg( "undeleterevision", - $wgLang->timeAndDate( $timestamp ) ) . ")\n" ); + $wgOut->setPageTitle( wfMsg( 'undeletepage' ) ); + $link = $skin->makeKnownLinkObj( $self, htmlspecialchars( $this->mTargetObj->getPrefixedText() ), + 'target=' . $this->mTargetObj->getPrefixedUrl() ); + $wgOut->addHtml( '

' . wfMsgHtml( 'undelete-revision', $link, + htmlspecialchars( $wgLang->timeAndDate( $timestamp ) ) ) . '

' ); if( !$rev ) { $wgOut->addWikiText( wfMsg( 'undeleterevision-missing' ) ); @@ -534,9 +538,7 @@ class UndeleteForm { $wgOut->addHtml( "
\n" ); $wgOut->addWikiTextTitle( $rev->getText(), $archive->title, false ); } - - $self = SpecialPage::getTitleFor( "Undelete" ); - + $wgOut->addHtml( wfElement( 'textarea', array( 'readonly' => true, diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 26ca3c0dcb..ad090e6297 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1775,7 +1775,7 @@ will not be automatically replaced.', 'undeletehistorynoadmin' => 'This article has been deleted. The reason for deletion is shown in the summary below, along with details of the users who had edited this page before deletion. The actual text of these deleted revisions is only available to administrators.', -'undeleterevision' => "Deleted revision as of $1", +'undelete-revision' => 'Deleted revision of $1 from $2:', 'undeleterevision-missing' => "Invalid or missing revision. You may have a bad link, or the revision may have been restored or removed from the archive.", 'undeletebtn' => 'Restore', -- 2.20.1