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

[livejournal] r18243: 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-09 07:37:20 UTC (rev 18242)
+++ trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm	2011-02-09 08:37:26 UTC (rev 18243)
@@ -35,12 +35,20 @@
     my $confirm = undef;
     if ($maint_list eq 'confirm') {
         $confirm = 'confirm';
-        my $m_list = LJ::load_rel_user($c->userid, 'A');
-        $maint_list = join ',', map { $_->{user} } values %{LJ::load_userids(@$m_list)};
+        $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');
+        $maint_list = join ',', map { $_->{user} } values %{LJ::load_userids(@$m_list)};
+    }
+
+    return $self->error("Community has not have maintainers")
+        unless $maint_list;
+
     my @maintainers = split /,/, $maint_list;
 
     return $self->error("Election poll exists already")

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