if ( $ns[0] == NS_MAIN ) {
$ns = $namespaces; // no explicit prefix, use default namespaces
}
- return $this->searchBackend(
- $ns, $title->getText(), $limit );
+ return $this->searchBackend( $ns, $title->getText(), $limit );
}
// Is this a namespace prefix?
if ( $subpageSearch !== null ) {
// Try matching the full search string as a page name
$specialTitle = Title::makeTitleSafe( NS_SPECIAL, $searchKey );
+ if ( !$specialTitle ) {
+ return array();
+ }
$special = SpecialPageFactory::getPage( $specialTitle->getText() );
if ( $special ) {
$subpages = $special->prefixSearchSubpages( $subpageSearch, $limit );
// Unlike SpecialPage itself, we want the canonical forms of both
// canonical and alias title forms...
$keys = array();
- foreach ( SpecialPageFactory::getList() as $page => $class ) {
+ foreach ( SpecialPageFactory::getNames() as $page ) {
$keys[$wgContLang->caseFold( $page )] = $page;
}
foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
- if ( !array_key_exists( $page, SpecialPageFactory::getList() ) ) {# bug 20885
+ if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# bug 20885
continue;
}