From ec3c2f8f84e4c606bb0fde3dd60a41ddc77968ab Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 14 Mar 2011 10:03:07 +0000 Subject: [PATCH] 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. --- includes/PrefixSearch.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); } -- 2.20.1