summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-18 17:08:32 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-18 17:08:32 +0200
commit2799e118d748aa32aa496c6614ba369dbd169520 (patch)
treeb5d700400dab5625acea6186f35feffd6269dd26 /Bugzilla
parent4ab99774da63f0d3573d7b56887937cdbbe0a2ff (diff)
downloadbugzilla-2799e118d748aa32aa496c6614ba369dbd169520.tar.gz
bugzilla-2799e118d748aa32aa496c6614ba369dbd169520.tar.xz
Bug 916979 - Bug.search ignores the "limit" parameter
a/r=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm4
-rw-r--r--Bugzilla/WebService/Bug.pm12
2 files changed, 6 insertions, 10 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 302b58595..ba941788b 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -270,10 +270,6 @@ use constant FIELD_MAP => {
summary => 'short_desc',
url => 'bug_file_loc',
whiteboard => 'status_whiteboard',
-
- # These are special values for the WebService Bug.search method.
- limit => 'LIMIT',
- offset => 'OFFSET',
};
use constant REQUIRED_FIELD_MAP => {
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index fd8ea8fef..14d56713c 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -493,19 +493,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;
@@ -518,7 +518,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 };
}