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

[livejournal] r18371: LJSUP-8012. Setting owner manually throu...

Committer: gprochaev
LJSUP-8012. Setting owner manually through set_owner does not unlock maintainer list.

U   trunk/cgi-bin/LJ/Console/Command/SetOwner.pm
Modified: trunk/cgi-bin/LJ/Console/Command/SetOwner.pm
===================================================================
--- trunk/cgi-bin/LJ/Console/Command/SetOwner.pm	2011-02-21 10:15:32 UTC (rev 18370)
+++ trunk/cgi-bin/LJ/Console/Command/SetOwner.pm	2011-02-22 04:26:38 UTC (rev 18371)
@@ -49,6 +49,16 @@
 
     $c->log_event('set_owner', { actiontarget => $u->{userid}, remote => $remote });
 
+    ## Close election poll if exist and open
+    my $poll_id = $c->prop("election_poll_id");
+    if ($poll_id) {
+        my $poll = LJ::Poll->new ($poll_id);
+        if ($poll && !$poll->is_closed) {
+            $self->print("Election poll with ID: $poll_id closed.");
+            $poll->close_poll;
+        }
+    }
+
     LJ::statushistory_add($c, $remote, 'set_owner', "Console set owner and new maintainer as ".$u->{user});
     LJ::set_rel($c->{userid}, $u->{userid}, 'S');
     ## Set a new supermaintainer as maintainer too.

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