(bug 10832) Include user information when viewing a deleted revision
authorRob Church <robchurch@users.mediawiki.org>
Thu, 9 Aug 2007 20:00:07 +0000 (20:00 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 9 Aug 2007 20:00:07 +0000 (20:00 +0000)
RELEASE-NOTES
includes/SpecialUndelete.php
languages/messages/MessagesEn.php

index da66caa..53011cc 100644 (file)
@@ -169,6 +169,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 10826) Added link trail with Cyrillic characters for Mongolian language
 * (bug 10859) Introduce 'UserGetImplicitGroups' hook; see docs/hooks.txt for
   more information
+* (bug 10832) Include user information when viewing a deleted revision
 
 == Bugfixes since 1.10 ==
 
index fca464c..4a5bb13 100644 (file)
@@ -604,17 +604,24 @@ class UndeleteForm {
                $archive = new PageArchive( $this->mTargetObj );
                $rev = $archive->getRevision( $timestamp );
                
-               $wgOut->setPageTitle( wfMsg( 'undeletepage' ) );
-               $link = $skin->makeKnownLinkObj( $self, htmlspecialchars( $this->mTargetObj->getPrefixedText() ),
-                                       'target=' . $this->mTargetObj->getPrefixedUrl() );
-               $wgOut->addHtml( '<p>' . wfMsgHtml( 'undelete-revision', $link,
-                       htmlspecialchars( $wgLang->timeAndDate( $timestamp ) ) ) . '</p>' ); 
-               
                if( !$rev ) {
-                       $wgOut->addWikiText( wfMsg( 'undeleterevision-missing' ) );
+                       $wgOut->addWikiTexT( wfMsg( 'undeleterevision-missing' ) );
                        return;
                }
                
+               $wgOut->setPageTitle( wfMsg( 'undeletepage' ) );
+               
+               $link = $skin->makeKnownLinkObj(
+                       $self,
+                       htmlspecialchars( $this->mTargetObj->getPrefixedText() ),
+                       'target=' . $this->mTargetObj->getPrefixedUrl()
+               );
+               $time = htmlspecialchars( $wgLang->timeAndDate( $timestamp ) );
+               $user = $skin->userLink( $rev->getUser(), $rev->getUserText() )
+                       . $skin->userToolLinks( $rev->getUser(), $rev->getUserText() );
+                       
+               $wgOut->addHtml( '<p>' . wfMsgHtml( 'undelete-revision', $link, $time, $user ) . '</p>' );
+               
                wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj, $rev ) );
                
                if( $this->mPreview ) {
index fa603e4..af9a512 100644 (file)
@@ -1895,7 +1895,7 @@ that you don't have permission to view will not be restored.",
 '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.',
-'undelete-revision'        => 'Deleted revision of $1 from $2:',
+'undelete-revision' => 'Deleted revision of $1 (as of $2) by $3:',
 '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',