dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
(bug 13482) Disabled search types handled properly
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQuerySearch.php
diff --git
a/includes/api/ApiQuerySearch.php
b/includes/api/ApiQuerySearch.php
index
b2a10b5
..
a014b57
100644
(file)
--- 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;