aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/ucp.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-04-23 13:08:48 +0000
committerNils Adermann <naderman@naderman.de>2006-04-23 13:08:48 +0000
commitd9576fd70ba9f60c99a2ece5e520b309a86f7362 (patch)
treed5e2b850750fdc4ad1a4fe5d38a58ff4a081a2e6 /phpBB/ucp.php
parenta58fa3a9f2da83a6a79655ca7a7402c32d810310 (diff)
downloadforums-d9576fd70ba9f60c99a2ece5e520b309a86f7362.tar
forums-d9576fd70ba9f60c99a2ece5e520b309a86f7362.tar.gz
forums-d9576fd70ba9f60c99a2ece5e520b309a86f7362.tar.bz2
forums-d9576fd70ba9f60c99a2ece5e520b309a86f7362.tar.xz
forums-d9576fd70ba9f60c99a2ece5e520b309a86f7362.zip
- allow user A to have user B as a friend if A is a foe of B
- don't allow users to have the Anonymous user on their foe/friend list [Bug #1205] - properly hide users on the online/offline friend list in ucp [Bug #1206] git-svn-id: file:///svn/phpbb/trunk@5836 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/ucp.php')
-rwxr-xr-xphpBB/ucp.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 9775e5fd81..65e9adaabe 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -243,18 +243,18 @@ if (!$user->data['is_registered'])
// Output listing of friends online
$update_time = $config['load_online_time'] * 60;
-$sql = 'SELECT DISTINCT u.user_id, u.username, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline
+$sql = 'SELECT DISTINCT u.user_id, u.username, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline
FROM (' . USERS_TABLE . ' u, ' . ZEBRA_TABLE . ' z)
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = z.zebra_id)
WHERE z.user_id = ' . $user->data['user_id'] . '
AND z.friend = 1
AND u.user_id = z.zebra_id
- GROUP BY z.zebra_id, u.user_id, u.username';
+ GROUP BY z.zebra_id, u.user_id, u.username, u.user_allow_viewonline';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $which = (time() - $update_time < $row['online_time'] && $row['viewonline']) ? 'online' : 'offline';
+ $which = (time() - $update_time < $row['online_time'] && $row['viewonline'] && $row['user_allow_viewonline']) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array(
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['user_id'],