From 3995e5a5b3789cd23b19bbebba75f27dce915fa6 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sun, 23 Mar 2008 13:16:48 +0000 Subject: [PATCH] (bug 13482) Disabled search types handled properly --- RELEASE-NOTES | 1 + includes/api/ApiQuerySearch.php | 3 +++ 2 files changed, 4 insertions(+) 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; -- 2.20.1