function forum_format(&$forum) { global $conf; if (empty($forum)) { return; } $forum['create_date_fmt'] = date('Y-n-j', $forum['create_date']); $forum['icon_url'] = $forum['icon'] ? $conf['upload_url'] . "forum/{$forum['fid']}.png" : 'static/forum.png'; $forum['accesslist'] = $forum['accesson'] ? forum_access_find_by_fid($forum['fid']) : array(); $forum['modlist'] = array(); if ($forum['moduids']) { $modlist = user_find_by_uids($forum['moduids']); foreach ($modlist as &$mod) { $mod = user_safe_info($mod); } $forum['modlist'] = $modlist; } }
function user_ajax_info(&$user) { if (isset($user['password'])) { user_safe_info($user); } // 获取用户关注的信息,最近100条,仅仅返回 pid $myagreelist = myagree_find_by_uid($user['uid'], 1, 100); foreach ($myagreelist as $k => $v) { $myagreelist[$k] = $k; } $user['myagreelist'] = $myagreelist; }