(bug 13482) Disabled search types handled properly
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 23 Mar 2008 13:16:48 +0000 (13:16 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 23 Mar 2008 13:16:48 +0000 (13:16 +0000)
RELEASE-NOTES
includes/api/ApiQuerySearch.php

index bd4e8e7..f5700ce 100644 (file)
@@ -150,6 +150,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13442) Missing pages in prop=langlinks and prop=extlinks are now 
   handled properly.
 * (bug 13444) Add description to list=watchlist
+* (bug 13482) Disabled search types handled properly
 
 === Languages updated in 1.13 ===
 
index b2a10b5..a014b57 100644 (file)
@@ -65,6 +65,9 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                        $matches = $search->searchText( $query );
                else
                        $matches = $search->searchTitle( $query );
+               if (is_null($matches))
+                       $this->dieUsage("{$params['what']} search is disabled", 
+                                       "search-{$params['what']}-disabled");
 
                $data = array ();
                $count = 0;