From ab62c6ca6edd1838cab445f1313b0c409d1a52d0 Mon Sep 17 00:00:00 2001 From: "bzrmirror%bugzilla.org" Date: Thu, 14 Aug 2014 06:30:45 +0000 Subject: [PATCH] Bug 1048712: comment tagging suggestions always returns a single result r=sgreen,a=glob git-svn-id: svn://10.0.0.236/trunk@265496 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/.gitrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index b3b108dac6b..06994d3a7fe 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -9106 \ No newline at end of file +9107 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/.gitrev b/mozilla/webtools/bugzilla/.gitrev index 0081233636a..4f6e723da0b 100644 --- a/mozilla/webtools/bugzilla/.gitrev +++ b/mozilla/webtools/bugzilla/.gitrev @@ -1 +1 @@ -8cb02d65aa87806f8ed5e17347cbd355334ec295 \ No newline at end of file +ee4df197cd7c53a553370b520f9be6d0adc08205 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm b/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm index 334be105792..e5a4a739704 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/WebService/Bug.pm @@ -1146,7 +1146,11 @@ sub search_comment_tags { my $query = $params->{query}; $query // ThrowCodeError('param_required', { param => 'query' }); - my $limit = detaint_natural($params->{limit}) || 7; + my $limit = $params->{limit} || 7; + detaint_natural($limit) + || ThrowCodeError('param_must_be_numeric', { param => 'limit', + function => 'Bug.search_comment_tags' }); + my $tags = Bugzilla::Comment::TagWeights->match({ WHERE => {