Skip to content

Commit

Permalink
* This is probably just transitory thing, but I'm adding back contact…
Browse files Browse the repository at this point in the history
… lists (except for restricted members) into the we::$user['buddies'] array. Not touching buddy_list for now, as it's something that needs... More work. (Class-System.php)
  • Loading branch information
Nao committed Jul 5, 2014
1 parent 73e2099 commit 8f69758
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/app/Class-System.php
Expand Up @@ -314,6 +314,7 @@ protected static function init_user()
'users' => array(),
'groups' => array(),
'ignored' => array(),
'all' => array(),
'privacy' => PRIVACY_DEFAULT,
);

Expand All @@ -333,9 +334,8 @@ protected static function init_user()
);
while ($row = wesql::fetch_assoc($request))
{
// A list of ignored users can always be useful, can't it..?
if ($row['list_type'] == 'restrict')
$temp['ignored'][$row['id_member']] = 1;
// Make sure to ignore restricted users.
$temp[$row['list_type'] == 'restrict' ? 'ignored' : 'all'][$row['id_member']] = 1;
$temp['users'][$row['id_list']][$row['id_member']] = 1;
}
wesql::free_result($request);
Expand Down Expand Up @@ -408,6 +408,8 @@ protected static function init_user()
$user['contacts'] = $temp;
$user['groups'] = array_flip(array_flip($user['groups']));
$user['privacy_list'] =& $temp['privacy'];
$user['buddies'] = array_keys($temp['all']);
unset($temp['all']);

$is = array(
'guest' => $id_member == 0,
Expand Down

0 comments on commit 8f69758

Please sign in to comment.