New cap, turned on for premium paid and seed communities.

        Patch by ninetydegrees. 

diffs (110 lines):

diff -r 75f310215036 -r 1ef62983473f cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm        Fri Dec 17 02:17:18 2010 +0800
+++ b/cgi-bin/LJ/User.pm        Fri Dec 17 15:06:28 2010 +0800
@@ -2070,11 +2070,16 @@ sub can_show_onlinestatus {
     return 0;
 }
 
+# The option to track all comments is available to:
+# -- community admins for any community they manage
+# -- all users if community's seed or premium paid
+# -- members only if community's paid
 sub can_track_all_community_comments {
     my ( $remote, $journal ) = @_;
-    return 1 if LJ::isu( $journal ) && $journal->is_community
-                && ( $remote->can_manage_other( $journal )
-                     || $journal->is_paid && $remote->member_of( $journal ) );
+     return 1 if LJ::isu( $journal ) && $journal->is_community
+                 && ( $remote->can_manage_other( $journal )
+                    || $journal->get_cap( 'track_all_comments' )
+                    || $journal->is_paid && $remote->member_of( $journal ) );
 }
 
 sub can_track_defriending {
diff -r 75f310215036 -r 1ef62983473f etc/config.pl
--- a/etc/config.pl     Fri Dec 17 02:17:18 2010 +0800
+++ b/etc/config.pl     Fri Dec 17 15:06:28 2010 +0800
@@ -293,6 +293,7 @@
             'rateallowed-commcreate' => 3,
             'staff_headicon' => 0,
             thread_expander => 0,
+            'track_all_comments' => 0,
             'xpost_accounts' => 0,
             );
 
@@ -348,6 +349,7 @@
             'textmessaging' => 0,
             thread_expander => 0,            
             'tools_recent_comments_display' => 10,            
+            'track_all_comments' => 0,
             'track_defriended' => 0,
             'track_pollvotes' => 0,
             'track_thread' => 0,
@@ -404,6 +406,7 @@
             'textmessaging' => 1,
             thread_expander => 1,            
             'tools_recent_comments_display' => 100,
+            'track_all_comments' => 0,
             'track_defriended' => 1,
             'track_pollvotes' => 1,
             'track_thread' => 1,
@@ -458,6 +461,7 @@
             'textmessaging' => 1,
             thread_expander => 1,            
             'tools_recent_comments_display' => 150,
+            'track_all_comments' => 1,
             'track_defriended' => 1,
             'track_pollvotes' => 1,
             'track_thread' => 1,
@@ -519,6 +523,7 @@
             'textmessaging' => 1,
             thread_expander => 1,            
             'tools_recent_comments_display' => 150,
+            'track_all_comments' => 1,
             'track_defriended' => 1,
             'track_pollvotes' => 1,
             'track_thread' => 1,
@@ -571,6 +576,7 @@
             'textmessaging' => 1,
             thread_expander => 1,            
             'tools_recent_comments_display' => 150,
+            'track_all_comments' => 1,
             'track_defriended' => 1,
             'track_pollvotes' => 1,
             'track_thread' => 1,
diff -r 75f310215036 -r 1ef62983473f htdocs/manage/subscriptions/comments.bml
--- a/htdocs/manage/subscriptions/comments.bml  Fri Dec 17 02:17:18 2010 +0800
+++ b/htdocs/manage/subscriptions/comments.bml  Fri Dec 17 15:06:28 2010 +0800
@@ -83,8 +83,6 @@ body<=
                                                   flags   => 
LJ::Subscription::TRACKING,
                                                   );
 
-    # only administrators of a community and members of a paid community 
-    # should be given the option to track all comments on another journal
     push @pending,
         LJ::Subscription::Pending->new(
                                        $remote,
diff -r 75f310215036 -r 1ef62983473f htdocs/manage/subscriptions/entry.bml
--- a/htdocs/manage/subscriptions/entry.bml     Fri Dec 17 02:17:18 2010 +0800
+++ b/htdocs/manage/subscriptions/entry.bml     Fri Dec 17 15:06:28 2010 +0800
@@ -74,8 +74,6 @@ body<=
             }
         ];
 
-    # only administrators of a community and members of a paid community 
-    # should be given the option to track all comments on another journal
     push @{ @$categories[0]->{$cat_title} },
         LJ::Subscription::Pending->new( $remote,
             event   => "JournalNewComment",
diff -r 75f310215036 -r 1ef62983473f htdocs/manage/subscriptions/user.bml
--- a/htdocs/manage/subscriptions/user.bml      Fri Dec 17 02:17:18 2010 +0800
+++ b/htdocs/manage/subscriptions/user.bml      Fri Dec 17 15:06:28 2010 +0800
@@ -67,8 +67,6 @@ body<=
             flags   => LJ::Subscription::TRACKING,
         ) unless LJ::User->is_protected_username( $journal->user );
 
-    # only administrators of a community and members of a paid community 
-    # should be given the option to track all comments on another journal
     push @{ @$categories[0]->{$cat_title} },
         LJ::Subscription::Pending->new( $remote,
             event   => "JournalNewComment",
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to