Committer: akanashin
LJSUP-12951: Console comands for promo notificationsU 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;