summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-12-31 17:00:50 +0100
committerjocuri%softhome.net <>2004-12-31 17:00:50 +0100
commit28055c618d39d62ea81e33c3d30cde91eb7117b7 (patch)
treee0394bdf422efd920e17314e4b9b8476eea3d609 /Bugzilla
parent7f51d13817aecceac6e9a79155af37fc7614b683 (diff)
downloadbugzilla-28055c618d39d62ea81e33c3d30cde91eb7117b7.tar.gz
bugzilla-28055c618d39d62ea81e33c3d30cde91eb7117b7.tar.xz
Patch for bug 275788: Provide a line of code that defines legal query formats for other scripts to use; patch by Colin S. Ogilvie <colin.ogilvie@gmail.com>, r=vladd, a=justdave.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index aaa2a12b9..85f661e30 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -32,6 +32,8 @@ use strict;
use vars qw($userid);
package Bugzilla::Search;
+use base qw(Exporter);
+@Bugzilla::Search::EXPORT = qw(IsValidQueryType);
use Bugzilla::Config;
use Bugzilla::Error;
@@ -1436,4 +1438,13 @@ sub ValidateGroupName {
return $ret;
}
+# Validate that the query type is one we can deal with
+sub IsValidQueryType
+{
+ my ($queryType) = @_;
+ if (grep { $_ eq $queryType } qw(specific advanced)) {
+ return 1;
+ }
+ return 0;
+}
1;