From 28055c618d39d62ea81e33c3d30cde91eb7117b7 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Fri, 31 Dec 2004 16:00:50 +0000 Subject: Patch for bug 275788: Provide a line of code that defines legal query formats for other scripts to use; patch by Colin S. Ogilvie , r=vladd, a=justdave. --- Bugzilla/Search.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Bugzilla/Search.pm') 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; -- cgit v1.2.3-24-g4f1b