$title : Page title
$text : Current text being indexed
+'SearchGetNearMatch': An extra chance for exact-title-matches in "go" searches
+$term : Search term string
+&$title : Outparam; set to $title object and return false for a match
+
'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views
$text: Text being shown
$title: Title of the custom script/stylesheet page
if($wgContLang->hasVariants()){
$allSearchTerms = array_merge($allSearchTerms,$wgContLang->convertLinkToAllVariants($searchterm));
}
-
+
foreach($allSearchTerms as $term){
# Exact match? No need to look further.
return $title;
}
}
+
+ // Give hooks a chance at better match variants
+ $title = null;
+ if( !wfRunHooks( 'SearchGetNearMatch', array( $term, &$title ) ) ) {
+ return $title;
+ }
}
$title = Title::newFromText( $searchterm );