[Rt-commit] [svn] r1402 - rtir/branches/1.1/html/RTIR/Elements
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Thu Sep 2 17:52:53 EDT 2004
Author: leira
Date: Thu Sep 2 17:52:52 2004
New Revision: 1402
Modified:
rtir/branches/1.1/html/RTIR/Elements/NewQuery
Log:
Take an argument for states, if you don't want the default.
Only put parens around the state field if there are more than one.
Modified: rtir/branches/1.1/html/RTIR/Elements/NewQuery
==============================================================================
--- rtir/branches/1.1/html/RTIR/Elements/NewQuery (original)
+++ rtir/branches/1.1/html/RTIR/Elements/NewQuery Thu Sep 2 17:52:52 2004
@@ -1,5 +1,7 @@
<%INIT>
-my ($Type, @states) = $m->comp("/RTIR/Elements/Type", Queue => $Queue);
+my ($Type, @basestates) = $m->comp("/RTIR/Elements/Type", Queue => $Queue);
+
+ at states = @basestates if !$states[0];
my $Query;
if ($states[0]) {
@@ -9,7 +11,7 @@
}
}
-$Query = "( $Query )" if $Query;
+$Query = "( $Query )" if $Query && (scalar @states) > 1;
return $Query;
@@ -17,4 +19,5 @@
<%ARGS>
$Queue => undef
+ at states => undef
</%ARGS>
More information about the Rt-commit
mailing list