summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-18 17:24:17 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-18 17:24:17 +0200
commit898a95843f1fcb1982c409adaeb0d9b8f6f23a32 (patch)
tree88626521663c1b22e266eeb8adfe8425e7a402d4 /Bugzilla/WebService
parent7b756e036dfdf54368d5e7e18dd1cefd53724c12 (diff)
downloadbugzilla-898a95843f1fcb1982c409adaeb0d9b8f6f23a32.tar.gz
bugzilla-898a95843f1fcb1982c409adaeb0d9b8f6f23a32.tar.xz
Bug 916979 - Bug.search ignores the "limit" parameter
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 8344a2eba..0d78dbb28 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -507,19 +507,19 @@ sub search {
}
my %match_params = %{ $params };
- delete $params->{include_fields};
- delete $params->{exclude_fields};
+ delete $match_params{include_fields};
+ delete $match_params{exclude_fields};
# If no other parameters have been passed other than limit and offset
# then we throw error if system is configured to do so.
- if (!grep(!/^(limit|offset)$/i, keys %$params)
+ if (!grep(!/^(limit|offset)$/, keys %match_params)
&& !Bugzilla->params->{search_allow_no_criteria})
{
ThrowUserError('buglist_parameters_required');
}
- $options{order_columns} = [ split(/\s*,\s*/, delete $params->{order}) ] if $params->{order};
- $options{params} = $params;
+ $options{order_columns} = [ split(/\s*,\s*/, delete $match_params{order}) ] if $match_params{order};
+ $options{params} = \%match_params;
my $search = new Bugzilla::Search(%options);
my ($data) = $search->data;
@@ -532,7 +532,7 @@ sub search {
my @bug_ids = map { $_->[0] } @$data;
my $bug_objects = Bugzilla::Bug->new_from_list(\@bug_ids);
- my @bugs = map { $self->_bug_to_hash($_, \%match_params) } @$bug_objects;
+ my @bugs = map { $self->_bug_to_hash($_, $params) } @$bug_objects;
return { bugs => \@bugs };
}