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.
This commit is contained in:
parent
a38fd53df2
commit
ec3c2f8f84
1 changed files with 5 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue