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

[livejournal] r20755: 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-12 07:34:22 UTC (rev 20754)
+++ trunk/cgi-bin/LJ/Poll.pm	2011-12-12 07:34:36 UTC (rev 20755)
@@ -12,7 +12,7 @@
 sub _memcache_stored_props          {
     # first element of props is a VERSION
     # next - allowed object properties
-    return qw/ 2
+    return qw/ 3
                ditemid itemid
                pollid journalid posterid whovote whoview name status questions props
                results
@@ -926,7 +926,6 @@
 
 sub load_aggregated_results {
     my $self = shift;
-
     my %aggr_results;
     my $aggr_users;
 
@@ -950,12 +949,11 @@
         }
     }
 
-    if (scalar keys %aggr_results) {
+    #if (scalar keys %aggr_results) {
         $self->{results} = { counts => \%aggr_results, users => $aggr_users};
-    } else {
-        $self->{results} = 'no'; # we tryed - there are no aggregated results in DB => save negative status to prevent new attempts
-    }
-
+    #} else {
+    #    $self->{results} = 'no'; # we tryed - there are no aggregated results in DB => save negative status to prevent new attempts
+    #}
     # store poll data with loaded results
     $self->_store_to_memcache;
     $LJ::REQ_CACHE_POLL{ $self->id } = $self;
@@ -1617,7 +1615,6 @@
     my $self = shift;
     my $qid  = shift;
 
-
     $self->load_aggregated_results
         unless ref $self->{results};
 
@@ -1626,6 +1623,7 @@
 
 sub aggr_users {
     my $self = shift;
+
     my $qid  = shift;
 
     $self->load_aggregated_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