[Rt-commit] r5025 - in rt/branches/3.5-TESTING: .

trs at bestpractical.com trs at bestpractical.com
Wed Apr 12 19:27:16 EDT 2006


Author: trs
Date: Wed Apr 12 19:27:16 2006
New Revision: 5025

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Elements/SelectQueue

Log:
 r9767 at wintermute:  tom | 2006-04-12 19:26:09 -0400
 Cache in the session instead of the mason cache


Modified: rt/branches/3.5-TESTING/html/Elements/SelectQueue
==============================================================================
--- rt/branches/3.5-TESTING/html/Elements/SelectQueue	(original)
+++ rt/branches/3.5-TESTING/html/Elements/SelectQueue	Wed Apr 12 19:27:16 2006
@@ -53,7 +53,7 @@
 %     if ($ShowNullOption) {
   <option value="">-</option>
 %     }
-%     for my $queue (@{$cache{$cache_key}}) {
+%     for my $queue (@{$session{$cache_key}}) {
   <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <% ($queue->{Id} eq $Default ? 'selected="selected"' : '') |n %>>
     <%$queue->{Name}%>
 %             if ($Verbose and $queue->{Description}) {
@@ -63,9 +63,6 @@
 %     }
 </select>
 % }
-<%once>
-my %cache;
-</%once>
 <%args>
 $CheckQueueRight => 'CreateTicket'
 $ShowNullOption => 1
@@ -81,13 +78,13 @@
                 . $session{'CurrentUser'}->Id
                 . "---$CheckQueueRight---$ShowAllQueues";
 
-if (not defined $cache{$cache_key} and not $Lite) {
+if (not defined $session{$cache_key} and not $Lite) {
     my $q = new RT::Queues($session{'CurrentUser'});
     $q->UnLimit;
     
     while (my $queue = $q->Next) {
         if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
-            push @{$cache{$cache_key}}, {
+            push @{$session{$cache_key}}, {
                 Id          => $queue->Id,
                 Name        => $queue->Name,
                 Description => $queue->Description,


More information about the Rt-commit mailing list