From: Brion Vibber Date: Mon, 14 Feb 2011 00:32:13 +0000 (+0000) Subject: * (bug 25675) Fix search suggestions for Special: pages with spaces X-Git-Tag: 1.31.0-rc.0~31999 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=03fa2561b642730784f7690bd2b183d6eb08e794;p=lhc%2Fweb%2Fwiklou.git * (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]]. --- diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index b85193544b..89ce84e082 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -78,6 +78,9 @@ class PrefixSearch { protected static function specialSearch( $search, $limit ) { global $wgContLang; + # normalize searchKey, so aliases with spaces can be found - bug 25675 + $search = str_replace( ' ', '_', $search ); + $searchKey = $wgContLang->caseFold( $search ); // Unlike SpecialPage itself, we want the canonical forms of both