Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r16208: LJSV-934 (after ESN refactor part 1, Pol...

Committer: ailyin
LJSV-934 (after ESN refactor part 1, PollVote subscriptions do not get picked up properly):

- fix PollVote "available_for_user" logic
- pick up things from the old DB schema correctly

U   trunk/cgi-bin/LJ/Event/PollVote.pm
U   trunk/htdocs/manage/settings/index.bml
Modified: trunk/cgi-bin/LJ/Event/PollVote.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/PollVote.pm	2010-02-05 06:53:39 UTC (rev 16207)
+++ trunk/cgi-bin/LJ/Event/PollVote.pm	2010-02-05 07:24:25 UTC (rev 16208)
@@ -169,7 +169,7 @@
 sub available_for_user  {
     my ($self, $u) = @_;
 
-    return 0 if $self->arg1 || $self->userid;
+    return 0 if $self->arg1 && ($self->arg1 != $u->id);
 
     return $u->get_cap("track_pollvotes") ? 1 : 0;
 }
@@ -177,7 +177,7 @@
 sub is_subscription_visible_to  {
     my ($self, $u) = @_;
 
-    return $self->arg1 ? 0 : 1;
+    return 1;
 }
 
 sub is_tracking { 0 }

Modified: trunk/htdocs/manage/settings/index.bml
===================================================================
--- trunk/htdocs/manage/settings/index.bml	2010-02-05 06:53:39 UTC (rev 16207)
+++ trunk/htdocs/manage/settings/index.bml	2010-02-05 07:24:25 UTC (rev 16208)
@@ -334,7 +334,7 @@
                 'JournalNewComment-u',
                 'CommunityEntryReply',
                 'CommentReply',
-                'PollVote',
+                'PollVote-u',
                 'Befriended-u',
                 'Defriended-u',
                 'UserMessageRecvd-u',

Tags: andy, bml, livejournal, pm
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