r16289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16288‎ | r16289 | r16290 >
Date:19:19, 30 August 2006
Author:robchurch
Status:old
Tags:
Comment:
* Fix formatting of titles on Special:Undelete
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUndelete.php
@@ -479,14 +479,10 @@
480480 $undelete =& Title::makeTitle( NS_SPECIAL, 'Undelete' );
481481 $wgOut->addHTML( "<ul>\n" );
482482 while( $row = $result->fetchObject() ) {
483 - $n = ($row->ar_namespace ?
484 - ($wgContLang->getNsText( $row->ar_namespace ) . ":") : "").
485 - $row->ar_title;
486 - $link = $sk->makeKnownLinkObj( $undelete,
487 - htmlspecialchars( $n ), "target=" . urlencode( $n ) );
488 - $revisions = htmlspecialchars( wfMsg( "undeleterevisions",
489 - $wgLang->formatNum( $row->count ) ) );
490 - $wgOut->addHTML( "<li>$link ($revisions)</li>\n" );
 483+ $title = Title::makeTitleSafe( $row->ar_namespace, $row->ar_title );
 484+ $link = $sk->makeKnownLinkObj( $undelete, htmlspecialchars( $title->getPrefixedText() ), 'target=' . $title->getPartialUrl() );
 485+ $revs = wfMsgHtml( 'undeleterevisions', $wgLang->formatNum( $row->count ) );
 486+ $wgOut->addHtml( "<li>{$link} ({$revs})</li>\n" );
491487 }
492488 $result->free();
493489 $wgOut->addHTML( "</ul>\n" );
Index: trunk/phase3/RELEASE-NOTES
@@ -171,6 +171,7 @@
172172 of disambiguation templates.
173173 * [[Special:Disambiguations]] now shows pages in NS:0 that link to any pages that embed
174174 any of the templates listed at [[MediaWiki:Disambiguationspage]].
 175+* Fix formatting of titles on Special:Undelete
175176
176177 == Languages updated ==
177178