r82096 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82095‎ | r82096 | r82097 >
Date:00:32, 14 February 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 25675) Fix search suggestions for Special: pages with spaces

Patch by Umherirrender on https://bugzilla.wikimedia.org/show_bug.cgi?id=25675 - normalizes spaces to underscores for our direct alias list comparison.

The current English names mostly use CamelCase, but this is visible with eg German localization, where ExpandTemplates extension has [[Spezial:Vorlagen expandieren]].
Modified paths:
  • /trunk/phase3/includes/PrefixSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PrefixSearch.php
@@ -78,6 +78,9 @@
7979 protected static function specialSearch( $search, $limit ) {
8080 global $wgContLang;
8181
 82+ # normalize searchKey, so aliases with spaces can be found - bug 25675
 83+ $search = str_replace( ' ', '_', $search );
 84+
8285 $searchKey = $wgContLang->caseFold( $search );
8386
8487 // Unlike SpecialPage itself, we want the canonical forms of both

Follow-up revisions

RevisionCommit summaryAuthorDate
r821511.17wmf1: MFT r78964, r79086, r79087, r79091, r82004, r82025, r82048, r82070,...catrope22:55, 14 February 2011
r85151MFT: r82000, r82004, r82020, r82025, r82038, r82039, r82048, r82070, r82081, ...demon20:39, 1 April 2011

Status & tagging log