'SearchGetNearMatchBefore': Perform exact-title-matches in "go" searches before the normal operations
$allSearchTerms : Array of the search terms in all content languages
-$titleResult : Outparam; the value to return. A Title object or null.
+&$titleResult : Outparam; the value to return. A Title object or null.
'SearchGetNearMatch': An extra chance for exact-title-matches in "go" searches if nothing was found
$term : Search term string
'SearchGetNearMatchComplete': A chance to modify exact-title-matches in "go" searches
$term : Search term string
-$title : Current Title object that is being returned (null if none found).
+&$title : Current Title object that is being returned (null if none found).
'SearchEngineReplacePrefixesComplete': Run after SearchEngine::replacePrefixes().
$searchEngine : The SearchEngine object. Users of this hooks will be interested
public static function getNearMatch( $searchterm ) {
$title = self::getNearMatchInternal( $searchterm );
- wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, $title ) );
+ wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, &$title ) );
return $title;
}
$allSearchTerms = array_merge($allSearchTerms,$wgContLang->convertLinkToAllVariants($searchterm));
}
- if( !wfRunHooks( 'SearchGetNearMatchBefore', array( $allSearchTerms, $titleResult ) ) ) {
+ if( !wfRunHooks( 'SearchGetNearMatchBefore', array( $allSearchTerms, &$titleResult ) ) ) {
return $titleResult;
}