Allow community maintainers to track all comments in their community.

        Patch by afuna. 

diffs (122 lines):

diff -r fd928884ff2f -r 0a9db33f00cb htdocs/manage/subscriptions/comments.bml
--- a/htdocs/manage/subscriptions/comments.bml  Mon Oct 26 03:06:40 2009 +0000
+++ b/htdocs/manage/subscriptions/comments.bml  Mon Oct 26 03:17:46 2009 +0000
@@ -70,6 +70,15 @@ body<=
                                                   flags   => 
LJ::Subscription::TRACKING,
                                                   ) unless $can_watch;
 
+    # only administrators of a community should be given the option to track 
all comments on another journal
+    push @pending,
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "JournalNewComment",
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       ) if $journal->is_community && 
LJ::can_manage_other( $remote, $journal );
+
     my $categories = [
                       {
                           'Comments' => [
diff -r fd928884ff2f -r 0a9db33f00cb htdocs/manage/subscriptions/entry.bml
--- a/htdocs/manage/subscriptions/entry.bml     Mon Oct 26 03:06:40 2009 +0000
+++ b/htdocs/manage/subscriptions/entry.bml     Mon Oct 26 03:17:46 2009 +0000
@@ -45,21 +45,32 @@ body<=
                                                    default_selected => 1,
                                                    flags   => 
LJ::Subscription::TRACKING,
                                                    ),
-                    LJ::Subscription::Pending->new(
-                                                   $remote,
-                                                   event   => 
"JournalNewEntry",
-                                                   arg1    => '?',
-                                                   journal => $journal,
-                                                   flags   => 
LJ::Subscription::TRACKING,
-                                                   ),
-                    LJ::Subscription::Pending->new(
-                                                   $remote,
-                                                   event   => 
"JournalNewEntry",
-                                                   journal => $journal,
-                                                   flags   => 
LJ::Subscription::TRACKING,
-                                                   ),
                     ],
                 }];
+
+    # only administrators of a community should be given the option to track 
all comments on another journal
+    push @{...@$categories[0]->{Track}},
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "JournalNewComment",
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       ) if $journal->is_community && 
LJ::can_manage_other( $remote, $journal );
+
+    push @{...@$categories[0]->{Track}},
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "JournalNewEntry",
+                                       arg1    => '?',
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       ),
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "JournalNewEntry",
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       );
 
     $body .= LJ::subscribe_interface($remote,
                                      journal      => $journal,
diff -r fd928884ff2f -r 0a9db33f00cb htdocs/manage/subscriptions/user.bml
--- a/htdocs/manage/subscriptions/user.bml      Mon Oct 26 03:06:40 2009 +0000
+++ b/htdocs/manage/subscriptions/user.bml      Mon Oct 26 03:17:46 2009 +0000
@@ -42,19 +42,6 @@ body<=
                                                                      journal 
=> $journal,
                                                                      flags   
=> LJ::Subscription::TRACKING,
                                                                      ),
-                                      LJ::Subscription::Pending->new(
-                                                                     $remote,
-                                                                     event    
=> "NewUserpic",
-                                                                     journal  
=> $journal,
-                                                                     flags    
=> LJ::Subscription::TRACKING,
-                                                                     disabled 
=> ! $remote->can_track_new_userpic,
-                                                                     ),
-                                      LJ::Subscription::Pending->new(
-                                                                     $remote,
-                                                                     event   
=> "Birthday",
-                                                                     journal 
=> $journal,
-                                                                     flags   
=> LJ::Subscription::TRACKING,
-                                                                     ),
                                       ]
                                   },
                       ];
@@ -68,6 +55,30 @@ body<=
                                                                       flags   
=> LJ::Subscription::TRACKING,
                                                                       );
     }
+
+    # only administrators of a community should be given the option to track 
all comments on another journal
+    push @{...@$categories[0]->{""}},
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "JournalNewComment",
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       ) if $journal->is_community && 
LJ::can_manage_other( $remote, $journal );
+    
+    push @{...@$categories[0]->{""}},
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event    => "NewUserpic",
+                                       journal  => $journal,
+                                       flags    => LJ::Subscription::TRACKING,
+                                       disabled => ! 
$remote->get_cap('track_user_newuserpic'),
+                                       ),
+        LJ::Subscription::Pending->new(
+                                       $remote,
+                                       event   => "Birthday",
+                                       journal => $journal,
+                                       flags   => LJ::Subscription::TRACKING,
+                                       );
 
     return LJ::subscribe_interface(
                                    $remote,
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to