From 1885f888fea6d2dd804302bd8cafe20b68b26d69 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 8 Jan 2008 00:20:30 +0000 Subject: [PATCH] - web: if user A is ignoring user B, don't accept a friend request from B to A - boinc_cmd: --help fix svn path=/trunk/boinc/; revision=14486 --- checkin_notes | 10 ++++++++++ html/user/friend.php | 9 +++++++++ lib/boinc_cmd.C | 1 - 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index d8f539d312..b0dfea7640 100644 --- a/checkin_notes +++ b/checkin_notes @@ -168,3 +168,13 @@ David Jan 7 2007 manage_user.php inc/ util_ops.inc + +David Jan 7 2007 + - web: if user A is ignoring user B, + don't accept a friend request from B to A + - boinc_cmd: --help fix + + html/user + friend.php + lib/ + boinc_cmd.C diff --git a/html/user/friend.php b/html/user/friend.php index c5d1281e83..387083aa44 100644 --- a/html/user/friend.php +++ b/html/user/friend.php @@ -29,6 +29,13 @@ function check_pending($user, $destuser) { } } +function check_ignoring($srcuser, $destuser) { + BoincForumPrefs::lookup($destuser); + if (is_ignoring($destuser, $srcuser)) { + error_page("$destuser->name is not accepting friendship requests from you"); + } +} + // user has clicked "add to friends". Ask them if they really mean it. // function handle_add($user) { @@ -40,6 +47,7 @@ function handle_add($user) { if (!$destuser) error_page("No such user"); check_pending($user, $destuser); + check_ignoring($user, $destuser); page_head("Add friend"); echo " @@ -68,6 +76,7 @@ function handle_add_confirm($user) { if (!$destuser) error_page("No such user"); check_pending($user, $destuser); + check_ignoring($user, $destuser); $msg = post_str('message', true); if ($msg) $msg = strip_tags(process_user_text($msg)); diff --git a/lib/boinc_cmd.C b/lib/boinc_cmd.C index 05620a8851..e2fed4ace4 100644 --- a/lib/boinc_cmd.C +++ b/lib/boinc_cmd.C @@ -96,7 +96,6 @@ Commands:\n\ --quit\n\ --read_cc_config\n\ --set_debts URL1 std1 ltd1 [URL2 std2 ltd2 ...]\n\ - --acct_mgr_rpc URL name password communicate with current account manager\n\ --get_project_config URL\n\ --get_project_config_poll\n\ --network_available\n\