From: Bryan Tong Minh Date: Sun, 23 Mar 2008 13:16:48 +0000 (+0000) Subject: (bug 13482) Disabled search types handled properly X-Git-Tag: 1.31.0-rc.0~48868 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=3995e5a5b3789cd23b19bbebba75f27dce915fa6;p=lhc%2Fweb%2Fwiklou.git (bug 13482) Disabled search types handled properly --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bd4e8e7ce2..f5700ce002 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index b2a10b5adc..a014b57c57 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -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;