* Fix formatting of titles on Special:Undelete
authorRob Church <robchurch@users.mediawiki.org>
Wed, 30 Aug 2006 19:19:48 +0000 (19:19 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 30 Aug 2006 19:19:48 +0000 (19:19 +0000)
RELEASE-NOTES
includes/SpecialUndelete.php

index 5e770e3..c79926c 100644 (file)
@@ -171,6 +171,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   of disambiguation templates.
 * [[Special:Disambiguations]] now shows pages in NS:0 that link to any pages that embed
   any of the templates listed at [[MediaWiki:Disambiguationspage]].
+* Fix formatting of titles on Special:Undelete
 
 == Languages updated ==
 
index e01e36d..d94c5a5 100644 (file)
@@ -479,14 +479,10 @@ class UndeleteForm {
                $undelete =& Title::makeTitle( NS_SPECIAL, 'Undelete' );
                $wgOut->addHTML( "<ul>\n" );
                while( $row = $result->fetchObject() ) {
-                       $n = ($row->ar_namespace ?
-                               ($wgContLang->getNsText( $row->ar_namespace ) . ":") : "").
-                               $row->ar_title;
-                       $link = $sk->makeKnownLinkObj( $undelete,
-                               htmlspecialchars( $n ), "target=" . urlencode( $n ) );
-                       $revisions = htmlspecialchars( wfMsg( "undeleterevisions",
-                               $wgLang->formatNum( $row->count ) ) );
-                       $wgOut->addHTML( "<li>$link ($revisions)</li>\n" );
+                       $title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title );
+                       $link = $sk->makeKnownLinkObj( $undelete, htmlspecialchars( $title->getPrefixedText() ), 'target=' . $title->getPartialUrl() );
+                       $revs = wfMsgHtml( 'undeleterevisions', $wgLang->formatNum( $row->count ) );
+                       $wgOut->addHtml( "<li>{$link} ({$revs})</li>\n" );
                }
                $result->free();
                $wgOut->addHTML( "</ul>\n" );