2heoh (2heoh) wrote in changelog,
2heoh
2heoh
changelog

[livejournal] r20791: LJM-1948: m.livejournal.com Polls: vote ...

Committer: slobin
LJM-1948: m.livejournal.com Polls: vote and view results

M Poll.pm
U   trunk/cgi-bin/LJ/Poll.pm
Modified: trunk/cgi-bin/LJ/Poll.pm
===================================================================
--- trunk/cgi-bin/LJ/Poll.pm	2011-12-16 07:50:25 UTC (rev 20790)
+++ trunk/cgi-bin/LJ/Poll.pm	2011-12-16 07:50:32 UTC (rev 20791)
@@ -931,8 +931,6 @@
     my $aggr_users;
 
     if (ref $self->{results} eq 'HASH') { # if poll is new and have aggregated results
-        $self->{results}{counts} = {};
-        $self->{results}{users} = {};
         return;
     } elsif (not $self->{results}) { # not loaded
         my $sth = $self->journal->prepare("SELECT what, value FROM pollresultaggregated2 WHERE pollid=? AND journalid=?");
@@ -1619,7 +1617,7 @@
 
     $self->load_aggregated_results
         unless ref $self->{results} && $self->{results}{counts};
-   
+  
     my $results  = $qid ? $self->{results}{counts}{$qid} : $self->{results}{counts};
 
     return $results ? %$results : ();

Tags: 2heoh, livejournal, pm, slobin
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