From: Roan Kattouw Date: Mon, 14 Mar 2011 10:03:07 +0000 (+0000) Subject: Revert r67661 (change Title::makeTitle(NS_SPECIAL, $foo) to SpecialPage::getTitleFor... X-Git-Tag: 1.31.0-rc.0~31433 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=ec3c2f8f84e4c606bb0fde3dd60a41ddc77968ab;p=lhc%2Fweb%2Fwiklou.git Revert r67661 (change Title::makeTitle(NS_SPECIAL, $foo) to SpecialPage::getTitleFor($foo)), caused bug 27671 (search suggestions no longer list canonical names for special pages). Went with makeTitleSafe() instead of makeTitle() just in case weird things make their way into the special page aliases. --- diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 89ce84e082..236e437099 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -107,7 +107,11 @@ class PrefixSearch { foreach( $keys as $pageKey => $page ) { if( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) { wfSuppressWarnings(); - $srchres[] = SpecialPage::getTitleFor( $page )->getPrefixedText(); + // bug 27671: Don't use SpecialPage::getTitleFor() here because it + // localizes its input leading to searches for e.g. Special:All + // returning Spezial:MediaWiki-Systemnachrichten and returning + // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de' + $srchres[] = Title::makeTitleSafe( NS_SPECIAL, $page )->getPrefixedText(); wfRestoreWarnings(); }