Closed (fixed)
Project:
FriendList
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2008 at 11:08 UTC
Updated:
21 Apr 2009 at 18:17 UTC
Adding an added friend or remove a removed friend should not be possible. It is especially when using the popupsapi module.
I Quickly fixed the code and could be patched.
In frienlist_ui.module around line 170:
// Check that the user is allowed the requested operation.
$allowed = friendlist_api_relation_allowed_op($op, $user, $account, $rtid);
if (!$allowed) {
// Start patching code by stalski/zuuperman
$message = '';
switch($op) {
case 'delete':
$message = t('You and '.$account->name.' are not '.$rt->name_p.' yet.');
break;
case 'add':
$message = t('You and '.$account->name.' are already '.$rt->name_p.'.');
break;
default:
$message = drupal_access_denied();
}
return $message;
}
For me this works as the name friend, fan or follower (as relation types) get the correct message.
Comments
Comment #1
mariusooms commentedHi, this fix is temporary as the popups should really be made to refresh the relation status. Feel free to use this code, but I don't think this should be included in to the code. Best to wait until this issue, http://drupal.org/node/314767, gets fixed.
Regards,
Marius
Comment #2
matt2000 commentedFixed via http://drupal.org/node/314767