Committer: gprochaev
revertedU 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 10:20:29 UTC (rev 18261) +++ trunk/cgi-bin/LJ/Console/Command/CommunityPoll.pm 2011-02-10 10:43:30 UTC (rev 18262) @@ -48,23 +48,20 @@ return $self->error("Community has not have maintainers") unless $maint_list; - my @got_maintainers = split /,/, $maint_list; + my @maintainers = split /,/, $maint_list; return $self->error("Election poll exists already") if ($c->prop("election_poll_id") && $confirm ne 'confirm'); ## Check for maintainers alive - my @maintainers = map { + @maintainers = map { my $u = LJ::load_user($_); $u; } grep { my $u = LJ::load_user($_); $u && $u->is_visible && !$u->is_expunged && $u->can_manage($c) ? 1 : 0; - } @got_maintainers; + } @maintainers; - return $self->error("Can't create poll. At least one user is not maintainer of community $comm_name") - unless @maintainers == @got_maintainers; - return $self->error("Can't create poll. No maintainers given or they are not maintainers.") unless @maintainers;