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

[livejournal] r18471: LJSUP-7871. Remove of the community owne...

Committer: gprochaev
LJSUP-7871. Remove of the community owner when you create a new election

U   trunk/cgi-bin/communitylib.pl
Modified: trunk/cgi-bin/communitylib.pl
===================================================================
--- trunk/cgi-bin/communitylib.pl	2011-03-03 13:46:18 UTC (rev 18470)
+++ trunk/cgi-bin/communitylib.pl	2011-03-04 03:55:06 UTC (rev 18471)
@@ -79,6 +79,12 @@
         }
     }
 
+    ## We need to remove all previous owners from community because election poll is started.
+    my $s_maints = LJ::load_rel_user($comm_id, 'S');
+    foreach my $user_id (@$s_maints) {
+        LJ::clear_rel($comm_id, $user_id, 'S');
+    }
+
     ## All are ok. Emailing to all maintainers about election.
     my $subject = LJ::Lang::ml('poll.election.email.subject');
     $$textref .= "Sending emails to all maintainers for community " . $comm->user . "\n";

Tags: livejournal, pl, 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