mirror of
https://github.com/moparisthebest/moparscape.org-smf
synced 2024-11-25 02:02:19 -05:00
Fix small bug with award mod when no ids were loaded
This commit is contained in:
parent
7237788bb6
commit
737fa75941
@ -1014,22 +1014,24 @@ function loadMemberData($users, $is_name = false, $set = 'normal')
|
|||||||
$smcFunc['db_free_result']($request);
|
$smcFunc['db_free_result']($request);
|
||||||
|
|
||||||
// xxx Load the member's awards.
|
// xxx Load the member's awards.
|
||||||
$request = $smcFunc['db_query']('', '
|
if (!empty($new_loaded_ids)) {
|
||||||
SELECT mem.id_member, mg.stars
|
$request = $smcFunc['db_query']('', '
|
||||||
FROM {db_prefix}membergroups AS mg, {db_prefix}members AS mem
|
SELECT mem.id_member, mg.stars
|
||||||
WHERE (FIND_IN_SET(mg.id_group, mem.additional_groups) OR ( mg.id_group=mem.id_post_group AND mem.id_group != 0 ))
|
FROM {db_prefix}membergroups AS mg, {db_prefix}members AS mem
|
||||||
AND mg.showAddBadge=1 AND mg.stars != \'\'
|
WHERE (FIND_IN_SET(mg.id_group, mem.additional_groups) OR ( mg.id_group=mem.id_post_group AND mem.id_group != 0 ))
|
||||||
AND id_member' . (count($new_loaded_ids) == 1 ? ' = {int:loaded_ids}' : ' IN ({array_int:loaded_ids})'),
|
AND mg.showAddBadge=1 AND mg.stars != \'\'
|
||||||
array(
|
AND id_member' . (count($new_loaded_ids) == 1 ? ' = {int:loaded_ids}' : ' IN ({array_int:loaded_ids})'),
|
||||||
'loaded_ids' => count($new_loaded_ids) == 1 ? $new_loaded_ids[0] : $new_loaded_ids,
|
array(
|
||||||
)
|
'loaded_ids' => count($new_loaded_ids) == 1 ? $new_loaded_ids[0] : $new_loaded_ids,
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
while ($row = $smcFunc['db_fetch_assoc']($request))
|
while ($row = $smcFunc['db_fetch_assoc']($request))
|
||||||
{
|
{
|
||||||
$user_profile[$row['id_member']]['stars'] .= ';'.$row['stars'];
|
$user_profile[$row['id_member']]['stars'] .= ';'.$row['stars'];
|
||||||
|
}
|
||||||
|
$smcFunc['db_free_result']($request);
|
||||||
}
|
}
|
||||||
$smcFunc['db_free_result']($request);
|
|
||||||
// xxx end Load the member's awards.
|
// xxx end Load the member's awards.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user