Fix invalid header strings on certain subscription management pages.
Patch by kareila.
diffs (228 lines):
diff -r ac80dea7d38e -r 7ecfb426864e bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Thu Jun 10 07:14:33 2010 -0500
+++ b/bin/upgrading/en.dat Thu Jun 10 07:24:36 2010 -0500
@@ -3507,6 +3507,10 @@ subscribe_interface.category.notices=Not
subscribe_interface.category.subscription-tracking=Subscription Tracking
+subscribe_interface.category.track-entry=Track This Entry
+
+subscribe_interface.category.track-user=Track This User
+
subscribe_interface.inbox=Inbox
subscribe_interface.manage=Manage settings
diff -r ac80dea7d38e -r 7ecfb426864e htdocs/manage/subscriptions/entry.bml
--- a/htdocs/manage/subscriptions/entry.bml Thu Jun 10 07:14:33 2010 -0500
+++ b/htdocs/manage/subscriptions/entry.bml Thu Jun 10 07:24:36 2010 -0500
@@ -49,51 +49,51 @@ body<=
return LJ::error_list("Invalid entry") unless $entry && $entry->valid;
return LJ::error_list("You are not authorized to subscribe to this
entry.") unless $entry->visible_to($remote);
- my $categories = [{
- 'Track' => [
- LJ::Subscription::Pending->new(
- $remote,
- event =>
"JournalNewComment",
- arg1 => $ditemid,
- journal => $journal,
- default_selected => 1,
- flags =>
LJ::Subscription::TRACKING,
- ),
- ],
- }];
+ my $cat_title = 'Track Entry';
+ my $categories =
+ [
+ { $cat_title =>
+ [
+ LJ::Subscription::Pending->new( $remote,
+ event => "JournalNewComment",
+ arg1 => $ditemid,
+ journal => $journal,
+ default_selected => 1,
+ 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 @{...@$categories[0]->{Track}},
- LJ::Subscription::Pending->new(
- $remote,
- event => "JournalNewComment",
- journal => $journal,
- flags => LJ::Subscription::TRACKING,
- ) if
$remote->can_track_all_community_comments ( $journal );
+ push @{ @$categories[0]->{$cat_title} },
+ LJ::Subscription::Pending->new( $remote,
+ event => "JournalNewComment",
+ journal => $journal,
+ flags => LJ::Subscription::TRACKING,
+ ) if $remote->can_track_all_community_comments( $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,
- );
+ push @{ @$categories[0]->{$cat_title} },
+ 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,
- categories => $categories,
- ret_url => $entry->url,
- default_selected_notifications =>
['LJ::NotificationMethod::Email'],
- post_to_settings_page => 1,
- );
+ $body .= LJ::subscribe_interface( $remote,
+ journal => $journal,
+ categories => $categories,
+ ret_url => $entry->url,
+ default_selected_notifications =>
['LJ::NotificationMethod::Email'],
+ post_to_settings_page => 1,
+ );
return $body;
}
diff -r ac80dea7d38e -r 7ecfb426864e htdocs/manage/subscriptions/user.bml
--- a/htdocs/manage/subscriptions/user.bml Thu Jun 10 07:14:33 2010 -0500
+++ b/htdocs/manage/subscriptions/user.bml Thu Jun 10 07:24:36 2010 -0500
@@ -40,67 +40,60 @@ body<=
return BML::redirect("$LJ::SITEROOT/manage/subscriptions/") if
LJ::u_equals($remote, $journal);
# what classes to display on this page
- my $categories = [
- {
- "" => [
- 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,
- ),
- ]
- },
- ];
+ my $cat_title = 'Track User';
+ my $categories =
+ [
+ { $cat_title =>
+ [
+ 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,
+ ),
+ ]
+ },
+ ];
-
- unless (LJ::User->is_protected_username($journal->user)) {
- push @{...@$categories[0]->{""}}, LJ::Subscription::Pending->new(
- $remote,
- event
=> "UserExpunged",
- journal
=> $journal,
- flags
=> LJ::Subscription::TRACKING,
- );
- }
+ push @{ @$categories[0]->{$cat_title} },
+ LJ::Subscription::Pending->new( $remote,
+ event => "UserExpunged",
+ journal => $journal,
+ 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]->{""}},
- LJ::Subscription::Pending->new(
- $remote,
- event => "JournalNewComment",
- journal => $journal,
- flags => LJ::Subscription::TRACKING,
- ) if
$remote->can_track_all_community_comments ( $journal );
+ push @{ @$categories[0]->{$cat_title} },
+ LJ::Subscription::Pending->new( $remote,
+ event => "JournalNewComment",
+ journal => $journal,
+ flags => LJ::Subscription::TRACKING,
+ ) if $remote->can_track_all_community_comments( $journal );
- push @{...@$categories[0]->{""}},
- 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,
- );
+ push @{ @$categories[0]->{$cat_title} },
+ 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,
+ );
- return LJ::subscribe_interface(
- $remote,
- categories => $categories,
- journal => $journal,
- post_to_settings_page => 1,
- );
+ return LJ::subscribe_interface( $remote,
+ categories => $categories,
+ journal => $journal,
+ post_to_settings_page => 1,
+ );
}
_code?>
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog