From: Platonides Date: Wed, 27 Jan 2010 11:52:35 +0000 (+0000) Subject: Apply r61570 (Follow-up r61150: Do not pass objects as references in new hooks). X-Git-Tag: 1.31.0-rc.0~38082 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=86814a51cc712f021260568b912e274cf459384e;p=lhc%2Fweb%2Fwiklou.git Apply r61570 (Follow-up r61150: Do not pass objects as references in new hooks). This time in the correct place. --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 156feb9bc9..0691bc3b14 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1289,7 +1289,7 @@ $text : Current text being indexed '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 @@ -1297,7 +1297,7 @@ $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 diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index f4ca700d5d..6ce20fd9e9 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -77,7 +77,7 @@ class SearchEngine { public static function getNearMatch( $searchterm ) { $title = self::getNearMatchInternal( $searchterm ); - wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, &$title ) ); + wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, $title ) ); return $title; } @@ -93,7 +93,7 @@ class SearchEngine { $allSearchTerms = array_merge($allSearchTerms,$wgContLang->convertLinkToAllVariants($searchterm)); } - if( !wfRunHooks( 'SearchGetNearMatchBefore', array( $allSearchTerms, &$titleResult ) ) ) { + if( !wfRunHooks( 'SearchGetNearMatchBefore', array( $allSearchTerms, $titleResult ) ) ) { return $titleResult; }