Subs-Members.php, member removal code:
Code: [Select]
Profile-Modify.php, buddy removal code:
Code: [Select]
Btoh seem alright to me... And I can't think of another place, that could remove buddies.
Problem is, live627 has this string in the member table for buddy list: ',xxx' (where x is the only buddy he has. Don't remember the number, don't wanna know..!!)
Where does the extra comma come from..?
John, do you remember removing a buddy from your list? Or adding someone to the list that's not in your current list..?
This causes any visit to your PM area, to trigger an error in the log, which is really odd. (Well, it's due to getContactList, but you know what I mean.)
I could do a 'quick fix' by forcing an array_filter() on $users at loadMemberData time, but to me it's a cop-out, and I'd instead like to ensure this doesn't happen any longer, eh...
PS: this won't last, anyway... Once I'm done with contact lists, all buddy code will be removed, so... It's just for my peace of mind, I guess..!!!
while ($row = wesql::fetch_assoc($request))
wesql::query('
UPDATE {db_prefix}members
SET
pm_ignore_list = {string:pm_ignore_list},
buddy_list = {string:buddy_list}
WHERE id_member = {int:id_member}',
array(
'id_member' => $row['id_member'],
'pm_ignore_list' => implode(',', array_diff(explode(',', $row['pm_ignore_list']), $users)),
'buddy_list' => implode(',', array_diff(explode(',', $row['buddy_list']), $users)),
)
);
wesql::free_result($request);Profile-Modify.php, buddy removal code:
foreach ($buddiesArray as $key => $buddy)
if ($buddy == (int) $_GET['remove'])
unset($buddiesArray[$key]);
// Make the changes.
$user_profile[$memID]['buddy_list'] = implode(',', $buddiesArray);
updateMemberData($memID, array('buddy_list' => $user_profile[$memID]['buddy_list']));Btoh seem alright to me... And I can't think of another place, that could remove buddies.
Problem is, live627 has this string in the member table for buddy list: ',xxx' (where x is the only buddy he has. Don't remember the number, don't wanna know..!!)
Where does the extra comma come from..?
John, do you remember removing a buddy from your list? Or adding someone to the list that's not in your current list..?
This causes any visit to your PM area, to trigger an error in the log, which is really odd. (Well, it's due to getContactList, but you know what I mean.)
I could do a 'quick fix' by forcing an array_filter() on $users at loadMemberData time, but to me it's a cop-out, and I'd instead like to ensure this doesn't happen any longer, eh...
PS: this won't last, anyway... Once I'm done with contact lists, all buddy code will be removed, so... It's just for my peace of mind, I guess..!!!
This topic was marked solved by its starter, on June 28th, 2013, 09:07 PM



