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

[livejournal] r18121: LJSUP-7780. Election is not finished

Committer: gprochaev
LJSUP-7780. Election is not finished

U   trunk/cgi-bin/LJ/Poll.pm
Modified: trunk/cgi-bin/LJ/Poll.pm
===================================================================
--- trunk/cgi-bin/LJ/Poll.pm	2011-01-27 04:57:45 UTC (rev 18120)
+++ trunk/cgi-bin/LJ/Poll.pm	2011-01-27 06:18:43 UTC (rev 18121)
@@ -809,12 +809,12 @@
     my $create = LJ::TimeUtil->mysqldate_to_time($self->prop('createdate'));
     my $delta = time - $create;
     ## Check for selected winner in a 3-week-end day
-    if (($delta % (21 * 86400) < 86400) && !$max_votes_for) {
+    if (($delta % (21 * 86400) < 86400) && $delta > 86400 && !$max_votes_for) {
         return 0;
     }
     
     ## Not all maintainers have voted and poll was prolonged
-    if ((@items != $cnt) && ($delta % (21 * 86400) > 86400)) {
+    if ((@items != $cnt) && ($delta < 86400 || ($delta % (21 * 86400) > 86400))) {
         return 0;
     }
 

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