Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / etc / upgrade / 3.8.4 / content
index be5a6bf..ac490d3 100644 (file)
@@ -1,10 +1,12 @@
+use strict;
+use warnings;
 
-@Final = (
+
+our @Final = (
     sub {
-        $RT::Logger->debug("Going to correct arguments of NotifyGroup actions if you have any");
-        use strict;
+        RT->Logger->debug("Going to correct arguments of NotifyGroup actions if you have any");
 
-        my $actions = RT::ScripActions->new( $RT::SystemUser );
+        my $actions = RT::ScripActions->new( RT->SystemUser );
         $actions->Limit(
             FIELD => 'ExecModule',
             VALUE => 'NotifyGroup',
@@ -21,9 +23,9 @@
                 my $obj;
                 next unless $r->{'Type'};
                 if( lc $r->{'Type'} eq 'user' ) {
-                    $obj = RT::User->new( $RT::SystemUser );
+                    $obj = RT::User->new( RT->SystemUser );
                 } elsif ( lc $r->{'Type'} eq 'group' ) {
-                    $obj = RT::Group->new( $RT::SystemUser );
+                    $obj = RT::Group->new( RT->SystemUser );
                 } else {
                     next;
                 }
             if ( my $struct = eval { Storable::thaw( $argument ) } ) {
                 $new = $converter->( $struct );
             } else {
-                $new = join /, /, grep length, split /[^0-9]+/, $argument;
+                $new = join ", ", grep length, split /[^0-9]+/, $argument;
             }
             next if $new eq $argument;
 
             my ($status, $msg) = $action->__Set( Field => 'Argument', Value => $new );
-            $RT::Logger->warning( "Couldn't change argument value of the action: $msg" )
+            RT->Logger->warning( "Couldn't change argument value of the action: $msg" )
                 unless $status;
         }
     },