summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-06-27 01:35:56 +0200
committerlpsolit%gmail.com <>2007-06-27 01:35:56 +0200
commitf32106f83ffc2dda1420123744881f0e740aa715 (patch)
treefad10fadb4cb4bea8fe05432bd092cdc5828a58d /buglist.cgi
parent8699690c76360c62e748f5557831243322655bfd (diff)
downloadbugzilla-f32106f83ffc2dda1420123744881f0e740aa715.tar.gz
bugzilla-f32106f83ffc2dda1420123744881f0e740aa715.tar.xz
Bug 385910: Add parameter to allow "find a specific bug" to accept an empty search - Patch by Brad Johnson <fk7q01p02@sneakemail.com> r/a=LpSolit
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi9
1 files changed, 6 insertions, 3 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 6c7f9a451..0f5c55691 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -74,9 +74,12 @@ if (defined($searchstring)) {
# as if this had been a normal query from the beginning.
}
-# Reject empty searches from the simple search form, including
-# words being a single or several consecutive whitespaces only.
-if (defined($cgi->param('content')) && $cgi->param('content') =~ /^\s*$/) {
+# If configured to not allow empty words, reject empty searches from the
+# simple search form, including words being a single or several consecutive
+# whitespaces only.
+if (!Bugzilla->params->{'quicksearch_allow_empty_words'}
+ && defined($cgi->param('content')) && $cgi->param('content') =~ /^\s*$/)
+{
ThrowUserError("buglist_parameters_required");
}