sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r13089: LJSUP-14729: Logging of "promo" cmds to ...

Committer: vtroitsky
LJSUP-14729: Logging of "promo" cmds to statushistory is broken
U   trunk/cgi-bin/LJ/Console/Command/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Console/Command/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/SelfPromo.pm	2013-01-09 09:15:39 UTC (rev 13088)
+++ trunk/cgi-bin/LJ/Console/Command/SelfPromo.pm	2013-01-09 14:20:26 UTC (rev 13089)
@@ -111,10 +111,10 @@
     my $promo_class = 'all'; # [ PROMO_SELF(), PROMO_COMMERCIAL(), PROMO_NOTIFICATIONS() ];
     my $country = PROMO_REGION_DEFAULT();
     
-    my ($norefund, $reason) = 0;
+    my ($norefund, $reason) = (0, '');
 
     if (@args_remainder) {
-        my ($arg) = @args_remainder;
+        my $arg = $args_remainder[0];
 
         if ($arg =~ /^(selfpromo|commercial|notifications|journals)/) {
             $promo_class = $1;
@@ -134,7 +134,7 @@
             $arg = $args_remainder[0];
         }
 
-        $reason = join ' ', @args_remainder if @args_remainder;
+        $reason = join(' ', @args_remainder) if @args_remainder;
     }
 
     unless ( $reason ) {
@@ -202,7 +202,7 @@
                 }
             }
 
-            $object->ban_for_promos($reason, $admin, @promo_classes);
+            $object->ban_for_promos($admin, $reason, @promo_classes);
             $self->info( $object->name . " banned successfully from $promo_class promo" . ($promo_class eq 'all' ? 's' : '') . '.' );
             return 1;
         }
@@ -223,7 +223,7 @@
                 }
             }
 
-            $object->ban_for_promos($reason, $admin, @promo_classes);
+            $object->ban_for_promos($admin, $reason, @promo_classes);
             $self->info( $object->name . " banned successfully from $promo_class promo" . ($promo_class eq 'all' ? 's' : '') . '.' );
             return 1;
         }
@@ -231,7 +231,7 @@
     }
 
     if ( $cmd eq 'unban' ) {
-        $object->unban_for_promos($reason, $admin, @promo_classes);
+        $object->unban_for_promos($admin, $reason, @promo_classes);
         $self->info( $object->name . " unbanned successfully from $promo_class promo" . ($promo_class eq 'all' ? 's' : '') . '.' );
         return 1;
     }

Tags: ljcom, pm, sunnyman, vtroitsky
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments