[dw-free] category headers on manage/subscriptions/* no printed
[commit: http://hg.dwscoalition.org/dw-free/rev/7ecfb426864e]
http://bugs.dwscoalition.org/show_bug.cgi?id=2674
Fix invalid header strings on certain subscription management pages.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2674
Fix invalid header strings on certain subscription management pages.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/en.dat
- htdocs/manage/subscriptions/entry.bml
- htdocs/manage/subscriptions/user.bml
-------------------------------------------------------------------------------- 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?> --------------------------------------------------------------------------------
no subject
[missing string subscribe_interface.category.comments]
I don't know if that means reopening this bug or filing a new one.
no subject