Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: Nao on June 3rd, 2013, 09:17 AM
-
Subs-Members.php, member removal code:
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..!!!
-
No tag? Booo...
Where does the extra comma come from..?
Buggy code that's not in Wedge.John, do you remember removing a buddy from your list?
No. +1, -0Or adding someone to the list that's not in your current list..?
Hmm... contacts and buddies are different? You lost me here...I could do a 'quick fix' by ...
Don't. This error isn't on account of Wedge.
Way back when this site was a sub-Noisen, I added a friend.
Noisen uses Ultimate Profile..
That mod has a ghosting problem, which results in a comma prefixed to the db field.
-
Way back when this site was a sub-Noisen, I added a friend.
Noisen uses Ultimate Profile..
That mod has a ghosting problem, which results in a comma prefixed to the db field.
BTW, thanks for figuring that out... ;)