holyandrew� (holyandrew) wrote in changelog,
holyandrew�
holyandrew
changelog

[ljcom] r12286: LJSUP-12951: Console comands for promo n...

Committer: akanashin
LJSUP-12951: Console comands for promo notifications
U   trunk/cgi-bin/LJ/Console/Command/NotificationPromo.pm
Modified: trunk/cgi-bin/LJ/Console/Command/NotificationPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/NotificationPromo.pm	2012-07-13 10:55:32 UTC (rev 12285)
+++ trunk/cgi-bin/LJ/Console/Command/NotificationPromo.pm	2012-07-13 11:37:32 UTC (rev 12286)
@@ -22,8 +22,8 @@
         'cmd' => 'The command to run, one of "cancel", "ban", or "unban"',
 
         'object' =>
-            'For "cancel", "ban" and "unban", either the entry URL or ' .
-            'the username to cancel promotion or to ban or unban.',
+            'For "cancel", "ban" and "unban", either the entry URL' .
+            'to cancel promotion or to ban or unban.',
 
         'region' =>
             'For "cancel" only, an optional flag that specifies ' .
@@ -99,6 +99,8 @@
         }
     }
 
+    return $self->error("No entry") unless $object->type eq PROMO_OBJECT_TYPE_ENTRY();
+
     my $country = PROMO_REGION_DEFAULT();
 
     my ($norefund, $reason) = 0;

Tags: akanashin, holyandrew, ljcom, pm
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