[Rt-commit] r10277 - in rtir/branches/2.3-EXPERIMENTAL: .

sartak at bestpractical.com sartak at bestpractical.com
Wed Jan 9 16:20:10 EST 2008


Author: sartak
Date: Wed Jan  9 16:20:06 2008
New Revision: 10277

Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/lib/RT/IR.pm

Log:
 r50004 at onn:  sartak | 2008-01-09 16:19:29 -0500
 Be consistent about $ConstituencyCache vs %ConstituencyCache


Modified: rtir/branches/2.3-EXPERIMENTAL/lib/RT/IR.pm
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/lib/RT/IR.pm	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/lib/RT/IR.pm	Wed Jan  9 16:20:06 2008
@@ -380,7 +380,7 @@
     # flush constituency cache on update of the custom field value for a ticket
     wrap 'RT::Record::_AddCustomFieldValue', pre => sub {
         return unless UNIVERSAL::isa($_[0] => 'RT::Ticket');
-        $RT::IR::ConstituencyCache->{$_[0]->id}  = undef;
+        $RT::IR::ConstituencyCache{$_[0]->id}  = undef;
     };
 
     require RT::Ticket;
@@ -397,17 +397,17 @@
             return;
         }
         if ( UNIVERSAL::isa( $self, 'RT::Ticket' ) ) {
-            if (not defined $RT::IR::ConstituencyCache->{ $self->id }) {
+            if (not defined $RT::IR::ConstituencyCache{ $self->id }) {
                 my $systicket = RT::Ticket->new($RT::SystemUser);
                 $systicket->Load( $self->id );
-                $RT::IR::ConstituencyCache->{ $self->id } =
+                $RT::IR::ConstituencyCache{ $self->id } =
                     $systicket->FirstCustomFieldValue('_RTIR_Constituency')
                     || '_none';
             }
-            return if ( $RT::IR::ConstituencyCache->{ $self->id } eq '_none' );
+            return if ( $RT::IR::ConstituencyCache{ $self->id } eq '_none' );
             if ( not $self->{_constituency_queue} ) {
                 my $new_queue = RT::Queue->new( $RT::SystemUser);
-                $new_queue->LoadByCols( Name => $queue->Name . " - " . $RT::IR::ConstituencyCache->{ $self->id } );
+                $new_queue->LoadByCols( Name => $queue->Name . " - " . $RT::IR::ConstituencyCache{ $self->id } );
                 return unless ( $new_queue->id );
                 $self->{_constituency_queue} = $new_queue;
             }
@@ -468,11 +468,11 @@
         my $attr  = shift;
 
         if ( ( my $id = $queue->{'_for_ticket'} ) ) {
-            my $const = $RT::IR::ConstituencyCache->{$id};
+            my $const = $RT::IR::ConstituencyCache{$id};
             unless ($const) {
                 my $ticket = RT::Ticket->new($RT::SystemUser);
                 $ticket->Load($id);
-                $const = $RT::IR::ConstituencyCache->{$ticket->id}  = $ticket->FirstCustomFieldValue('_RTIR_Constituency') || '_none';
+                $const = $RT::IR::ConstituencyCache{$ticket->id}  = $ticket->FirstCustomFieldValue('_RTIR_Constituency') || '_none';
             }
             if ($const) {
                 my $new_queue = RT::Queue->new($RT::SystemUser);


More information about the Rt-commit mailing list