[Rt-commit] [svn] r1443 - in rt/branches/3.3-TESTING: .
html/Elements
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Wed Sep 8 01:23:31 EDT 2004
Author: jesse
Date: Wed Sep 8 01:23:31 2004
New Revision: 1443
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/html/Elements/Quicksearch
Log:
r10177 at tinbook: jesse | 2004-09-07T23:05:53.208347Z
Updated the Quicksearch element to use slightly cleaner code.
BEHAVIOR CHANGE: Only queues for which the current user has "ShowTicket" are listed in the queue list.
Modified: rt/branches/3.3-TESTING/html/Elements/Quicksearch
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/Quicksearch (original)
+++ rt/branches/3.3-TESTING/html/Elements/Quicksearch Wed Sep 8 01:23:31 2004
@@ -55,19 +55,16 @@
<%PERL>
my $i;
while (my $queue = $Queues->Next) {
+ next unless ($queue->CurrentUserHasRight('ShowTicket'));
+
my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'";
my $open_q = "Queue = '".$queue->Name."' AND Status = 'open'";
my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR Status = 'new')";
-
- $Tickets->ClearRestrictions;
- $Tickets->LimitStatus(VALUE => "open");
- $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');
+ $Tickets->FromSQL($open_q);
my $open = $Tickets->Count();
- $Tickets->ClearRestrictions;
- $Tickets->LimitStatus(VALUE => "new");
- $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');
+ $Tickets->FromSQL($new_q);
my $new = $Tickets->Count();
More information about the Rt-commit
mailing list