[Rt-commit] r5107 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Tue Apr 25 09:29:05 EDT 2006


Author: ruz
Date: Tue Apr 25 09:29:03 2006
New Revision: 5107

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectQueue

Log:
 r2404 at cubic-pc (orig r5025):  trs | 2006-04-13 03:27:16 +0400
  r9767 at wintermute:  tom | 2006-04-12 19:26:09 -0400
  Cache in the session instead of the mason cache
 


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectQueue
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectQueue	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectQueue	Tue Apr 25 09:29:03 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