wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18249: LJSUP-7871. Add function for manually fo...

Committer: gprochaev
LJSUP-7871. Add function for manually forcing a community owner poll

U   trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm
Modified: trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm	2011-02-10 03:12:45 UTC (rev 18248)
+++ trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm	2011-02-10 03:25:06 UTC (rev 18249)
@@ -26,20 +26,19 @@
     return $self->error("This command takes at least one argument. Consult the reference.")
         if scalar(@args) < 1;
 
+    ## Removing 'confirm' from args
+    my $confirm = 0;
+    @args = grep {
+        $confirm = 'confirm' if $_ eq 'confirm';
+        $_ ne 'confirm' ? 1 : 0;
+    } @args;
+
     my $comm_name = shift @args;
     my $c = LJ::load_user($comm_name);
     return $self->error("Community must be undeleted")
         if $c->is_expunged;
 
     my $maint_list = shift @args;
-    my $confirm = undef;
-    if ($maint_list eq 'confirm') {
-        $confirm = 'confirm';
-        $maint_list = undef;
-    } else {
-        $confirm = shift @args;
-    }
-
     ## If we not got maint_list
     unless ($maint_list) {
         my $m_list = LJ::load_rel_user($c->userid, 'A');

Tags: livejournal, pm, wisest-owl
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