SpecialSearchResults hook now passes results by reference, so they can be changed...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 5 Jun 2008 18:13:16 +0000 (18:13 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 5 Jun 2008 18:13:16 +0000 (18:13 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/SpecialSearch.php

index 898af8c..4cf6ee4 100644 (file)
@@ -145,6 +145,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   edits in the last $wgActiveUserDays days.
 * (bug 13702) Add Special:MissingFiles to list places where an image link is 
   used but no such file exists.
+* SpecialSearchResults hook now passes results by reference, so they can be
+  changed by extensions.
 
 === Bug fixes in 1.13 ===
 
index 3d60990..51f52ca 100644 (file)
@@ -1091,8 +1091,8 @@ $title: title object generated from the text entred by the user
 
 'SpecialSearchResults': called before search result display when there are matches
 $term: string of search term
-$titleMatches: empty or SearchResultSet object
-$textMatches: empty or SearchResultSet object
+&$titleMatches: empty or SearchResultSet object
+&$textMatches: empty or SearchResultSet object
 
 'SpecialSearchNoResults': called before search result display when there are no matches
 $term: string of search term
index d68ff9a..0a483af 100644 (file)
@@ -225,7 +225,7 @@ class SpecialSearch {
                                        array( 'search' => $term ) ),
                                        ($num < $this->limit) );
                        $wgOut->addHTML( "<p class='mw-search-pager-top'>{$prevnext}</p>\n" );
-                       wfRunHooks( 'SpecialSearchResults', array( $term, $titleMatches, $textMatches ) );
+                       wfRunHooks( 'SpecialSearchResults', array( $term, &$titleMatches, &$textMatches ) );
                } else {
                        wfRunHooks( 'SpecialSearchNoResults', array( $term ) );
                }