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

[livejournal] r16123: LJSV-878: there are no more "disabled" s...

Committer: ailyin
LJSV-878: there are no more "disabled" subs

U   trunk/cgi-bin/LJ/Subscription.pm
Modified: trunk/cgi-bin/LJ/Subscription.pm
===================================================================
--- trunk/cgi-bin/LJ/Subscription.pm	2010-01-25 07:24:56 UTC (rev 16122)
+++ trunk/cgi-bin/LJ/Subscription.pm	2010-01-25 07:26:03 UTC (rev 16123)
@@ -78,7 +78,7 @@
 }
 
 sub pending { 0 }
-sub default_selected { $_[0]->active && $_[0]->enabled }
+sub default_selected { $_[0]->active }
 
 sub has_cached_subscriptions {
     my ($class, $u) = @_;
@@ -171,7 +171,7 @@
     if ($class->has_cached_subscriptions($u)) {
         @subs = $u->subscriptions;
 
-        @subs = grep { $_->active && $_->enabled } @subs if $require_active;
+        @subs = grep { $_->active } @subs if $require_active;
 
         # filter subs on each parameter
         @subs = grep { $_->journalid == $journalid } @subs if defined $journalid;
@@ -194,7 +194,7 @@
         @subs = map { $class->new_from_row($_) }
             @{ $class->query_user_subscriptions($u, %filters) };
 
-        @subs = grep { $_->active && $_->enabled } @subs if $require_active;
+        @subs = grep { $_->active } @subs if $require_active;
     }
 
     return @subs;
@@ -275,7 +275,7 @@
     return if $u->is_expunged;
 
     my @subs = $class->find($u);
-    @subs = grep { !($_->active && $_->enabled) } @subs;
+    @subs = grep { !($_->active) } @subs;
     my $count = scalar @subs;
     if ($count > 0 && !$dryrun) {
         $_->delete foreach (@subs);

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