$search = $title->getText();
if ( $ns[0] == NS_MAIN ) {
$ns = $namespaces; // no explicit prefix, use default namespaces
- wfRunHooks( 'PrefixSearchExtractNamespace', array( &$ns, &$search ) );
+ Hooks::run( 'PrefixSearchExtractNamespace', array( &$ns, &$search ) );
}
return $this->searchBackend( $ns, $search, $limit, $offset );
}
$namespaces = array( $title->getNamespace() );
$search = '';
} else {
- wfRunHooks( 'PrefixSearchExtractNamespace', array( &$namespaces, &$search ) );
+ Hooks::run( 'PrefixSearchExtractNamespace', array( &$namespaces, &$search ) );
}
return $this->searchBackend( $namespaces, $search, $limit, $offset );
* @return array
*/
public function searchWithVariants( $search, $limit, array $namespaces, $offset = 0 ) {
- wfProfileIn( __METHOD__ );
$searches = $this->search( $search, $limit, $namespaces, $offset );
// if the content language has variants, try to retrieve fallback results
}
}
}
- wfProfileOut( __METHOD__ );
return $searches;
}
}
}
$srchres = array();
- if ( wfRunHooks( 'PrefixSearchBackend', array( $namespaces, $search, $limit, &$srchres, $offset ) ) ) {
+ if ( Hooks::run(
+ 'PrefixSearchBackend',
+ array( $namespaces, $search, $limit, &$srchres, $offset )
+ ) ) {
return $this->titles( $this->defaultSearchBackend( $namespaces, $search, $limit, $offset ) );
}
return $this->strings( $this->handleResultFromHook( $srchres, $namespaces, $search, $limit ) );