Fix logic so that /network respects the account capabilities.
Patch by afuna.
diffs (42 lines):
diff -r fe603fcafd7b -r 745fb9b0008b cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl Wed Jun 24 15:44:15 2009 +0000
+++ b/cgi-bin/weblib.pl Wed Jun 24 15:53:37 2009 +0000
@@ -2541,7 +2541,7 @@ sub control_strip
$links{'track_user'} = "<a
href='$LJ::SITEROOT/manage/subscriptions/user.bml?journal=$journal->{user}'>$BML::ML{'web.controlstrip.links.trackuser'}</a>";
if ($journal->is_syndicated || $journal->is_news) {
$links{'add_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}&action=subscribe'>$BML::ML{'web.controlstrip.links.addfeed'}</a>";
- $links{'remove_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}'>$BML::ML{'web.controlstrip.links.removefeed'}</a>";
+ $links{'remove_friend'} = "<a
href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}&action=remove'>$BML::ML{'web.controlstrip.links.removefeed'}</a>";
}
if ($journal->is_community) {
$links{'join_community'} = "<a
href='$LJ::SITEROOT/community/join.bml?comm=$journal->{user}'>$BML::ML{'web.controlstrip.links.joincomm'}</a>"
diff -r fe603fcafd7b -r 745fb9b0008b htdocs/manage/circle/add.bml
--- a/htdocs/manage/circle/add.bml Wed Jun 24 15:44:15 2009 +0000
+++ b/htdocs/manage/circle/add.bml Wed Jun 24 15:53:37 2009 +0000
@@ -7,7 +7,7 @@
my $head = \$_[1]->{'head'};
my $action = $GET{action};
- $action = '' unless $action eq 'access' || $action eq 'subscribe';
+ $action = '' unless $action eq 'access' || $action eq 'subscribe' ||
$action eq 'remove';
my $remote = LJ::get_remote();
my $user = $POST{'user'} || $GET{'user'};
@@ -167,7 +167,7 @@
$body .= LJ::html_check({
name => "add_trust",
id => "add_trust",
- selected => $trusted || $action eq 'access' ? 1 : 0,
+ selected => ( $trusted && $action ne 'remove' ) || $action eq
'access' ? 1 : 0,
label => $ML{'.add.trust'},
}) . "<br />";
}
@@ -176,7 +176,7 @@
$body .= LJ::html_check({
name => "add_watch",
id => "add_watch",
- selected => $watched || $action eq 'subscribe' ? 1 : 0,
+ selected => ( $watched && $action ne 'remove' ) || $action eq
'subscribe' ? 1 : 0,
label => $ML{'.add.watch'},
});
}
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog