diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-01 17:37:27 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-01 17:37:27 +0200 |
commit | 8a39b183f623f7af85f7b647b0adbf0125d8e6af (patch) | |
tree | f8c5383517631843583248779de5a7e493cf634e /Bugzilla/Search | |
parent | 6d7c379c3f735109dd7012fa1375a06f9fbad343 (diff) | |
download | bugzilla-8a39b183f623f7af85f7b647b0adbf0125d8e6af.tar.gz bugzilla-8a39b183f623f7af85f7b647b0adbf0125d8e6af.tar.xz |
Bug 919852 - Add ability to perform quicksearch using Bug.search
r/a=glob
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r-- | Bugzilla/Search/Quicksearch.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index c07c8ba03..690fcec1c 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -290,7 +290,7 @@ sub _bug_numbers_only { # Allow separation by comma or whitespace. $searchstring =~ s/[,\s]+/,/g; - if ($searchstring !~ /,/) { + if ($searchstring !~ /,/ && !i_am_webservice()) { # Single bug number; shortcut to show_bug.cgi. print $cgi->redirect( -uri => correct_urlbase() . "show_bug.cgi?id=$searchstring"); @@ -311,8 +311,9 @@ sub _handle_alias { # We use this direct SQL because we want quicksearch to be VERY fast. my $bug_id = Bugzilla->dbh->selectrow_array( q{SELECT bug_id FROM bugs WHERE alias = ?}, undef, $alias); - # If the user cannot see the bug, do not resolve its alias. - if ($bug_id && Bugzilla->user->can_see_bug($bug_id)) { + # If the user cannot see the bug or if we are using a webservice, + # do not resolve its alias. + if ($bug_id && Bugzilla->user->can_see_bug($bug_id) && !i_am_webservice()) { $alias = url_quote($alias); print Bugzilla->cgi->redirect( -uri => correct_urlbase() . "show_bug.cgi?id=$alias"); |