[Rt-commit] r4513 - in rtir/branches/1.9-EXPERIMENTAL: lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Thu Feb 9 09:13:57 EST 2006


Author: ruz
Date: Thu Feb  9 09:13:57 2006
New Revision: 4513

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

Log:
 r684 at cubic-pc:  cubic | 2006-02-09 17:16:24 +0300
  r678 at cubic-pc:  cubic | 2006-02-09 17:08:28 +0300
  * it's harder now to run "keys %RT::ConfigHash", because we should
    use function calls.
 


Modified: rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR.pm	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR.pm	Thu Feb  9 09:13:57 2006
@@ -54,7 +54,7 @@
 sub BusinessHours {
 
     my $bizhours = new Business::Hours;
-    if (RT->Config->Get('BusinessHours')) {
+    if ( RT->Config->Get('BusinessHours') ) {
         $bizhours->business_hours( RT->Config->Get('BusinessHours') );
     }
 
@@ -78,16 +78,17 @@
     my $SLAObj = $class->new();
 
     my $bh = RT::IR::BusinessHours();
-    $SLAObj->SetInHoursDefault(RT->Config->Get('_RTIR_SLA_inhours_default'));
-    $SLAObj->SetOutOfHoursDefault(RT->Config->Get('_RTIR_SLA_outofhours_default'));
+    $SLAObj->SetInHoursDefault( RT->Config->Get('_RTIR_SLA_inhours_default') );
+    $SLAObj->SetOutOfHoursDefault( RT->Config->Get('_RTIR_SLA_outofhours_default') );
 
     $SLAObj->SetBusinessHours($bh);
 
-    foreach my $key (keys %RT->Config->Get('SLA')) {
-        if (RT->Config->Get('SLA')->{$key} =~ /^\d+$/) {
-            $SLAObj->Add($key, ( BusinessMinutes =>  RT->Config->Get('SLA')->{$key} ));
+    my $SLA = RT->Config->Get('SLA');
+    foreach my $key( keys %$SLA ) {
+        if ( $SLA->{ $key } =~ /^\d+$/ ) {
+            $SLAObj->Add( $key, ( BusinessMinutes => $SLA->{ $key } ) );
         } else {
-            $SLAObj->Add($key, %{RT->Config->Get('SLA')->{$key}} );
+            $SLAObj->Add( $key, %{ $SLA->{ $key } } );
         }
     }
 


More information about the Rt-commit mailing list