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

[livejournal] r16137: LJSV-878 (ESN refactoring, part 1): ensu...

Committer: ailyin
LJSV-878 (ESN refactoring, part 1): ensure that the set only contains
subs of the same user

U   trunk/cgi-bin/LJ/Subscription/GroupSet.pm
Modified: trunk/cgi-bin/LJ/Subscription/GroupSet.pm
===================================================================
--- trunk/cgi-bin/LJ/Subscription/GroupSet.pm	2010-01-25 12:47:53 UTC (rev 16136)
+++ trunk/cgi-bin/LJ/Subscription/GroupSet.pm	2010-01-26 05:06:41 UTC (rev 16137)
@@ -160,6 +160,8 @@
 sub insert_sub {
     my ($self, $sub) = @_;
 
+    $sub->{'userid'} = $self->userid;
+
     my $groupobj = $self->find_or_insert_group($sub->group);
     $groupobj->insert_sub($sub);
 }
@@ -167,6 +169,8 @@
 sub find_sub {
     my ($self, $sub) = @_;
 
+    $sub->{'userid'} = $self->userid;
+
     my $groupobj = $self->find_group($sub->group) or return undef;
     return $groupobj->find_sub($sub);
 }
@@ -174,6 +178,8 @@
 sub find_or_insert_sub {
     my ($self, $sub) = @_;
 
+    $sub->{'userid'} = $self->userid;
+
     my $groupobj = $self->find_or_insert_group($sub->group);
     return $groupobj->find_or_insert_sub($sub);
 }

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