diff options
author | David Lawrence <dkl@mozilla.com> | 2014-08-06 22:24:22 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-08-06 22:24:22 +0200 |
commit | c57791dc825c0393c27b3ca3656d69f7253b86b7 (patch) | |
tree | 39cb8fea106e56c0b8c6778dd9bf0a2162429c3e /Bugzilla/WebService | |
parent | c0dd51d4d3f83015d77db8a6cc2958aa6fccc09c (diff) | |
download | bugzilla-c57791dc825c0393c27b3ca3656d69f7253b86b7.tar.gz bugzilla-c57791dc825c0393c27b3ca3656d69f7253b86b7.tar.xz |
Bug 1049830: Bug.search with count_only = 1 does not work for JSONRPC and REST but does work for XMLRPC
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 5ce098e74..405f04b0f 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -596,7 +596,14 @@ sub search { my ($data) = $search->data; # BMO if the caller only wants the count, that's all we need to return - return $data if $params->{count_only}; + if ($params->{count_only}) { + if (Bugzilla->usage_mode == USAGE_MODE_XMLRPC) { + return $data; + } + else { + return { bug_count => $data }; + } + } if (!scalar @$data) { return { bugs => [] }; |