r51083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51082‎ | r51083 | r51084 >
Date:19:07, 27 May 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* (bug 18943) Handle invalid titles gracefully at Special:Mostlinked
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostlinked.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMostlinked.php
@@ -75,6 +75,9 @@
7676 function formatResult( $skin, $result ) {
7777 global $wgLang;
7878 $title = Title::makeTitleSafe( $result->namespace, $result->title );
 79+ if ( !$title ) {
 80+ return '<!-- ' . htmlspecialchars( "Invalid title: [[$title]]" ) . ' -->';
 81+ }
7982 $link = $skin->link( $title );
8083 $wlh = $this->makeWlhLink( $title,
8184 wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
Index: trunk/phase3/RELEASE-NOTES
@@ -162,6 +162,7 @@
163163 and user can upload
164164 * Don't say "You need to log in to upload/move", because it's possible that
165165 uploading/moving is disabled for registered users as well (e.g. only sysops)
 166+* (bug 18943) Handle invalid titles gracefully at Special:Mostlinked
166167
167168 == API changes in 1.16 ==
168169

Status & tagging log