phpBB

Code Changes

File: memberlist.php

  Unmodified   Added   Modified   Removed
Line 941Line 941
		}
else if ($topic_id)
{

		}
else if ($topic_id)
{

			$sql = 'SELECT f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name, f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options, f.forum_options, t.topic_title
FROM ' . FORUMS_TABLE . ' as f,
' . TOPICS_TABLE . ' as t
WHERE t.forum_id = f.forum_id';










			// Generate the navlinks based on the selected topic
$navlinks_sql_array = [
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
f.forum_options, t.topic_title',
'FROM' => [
FORUMS_TABLE => 'f',
TOPICS_TABLE => 't',
],
'WHERE' => 't.forum_id = f.forum_id AND t.topic_id = ' . (int) $topic_id,
];

$sql = $db->sql_build_query('SELECT', $navlinks_sql_array);

			$result = $db->sql_query($sql);
$topic_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

			$result = $db->sql_query($sql);
$topic_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

Line 1036Line 1045
		if ($auth->acl_get('u_viewonline'))
{
$sort_key_text['l'] = $user->lang['SORT_LAST_ACTIVE'];

		if ($auth->acl_get('u_viewonline'))
{
$sort_key_text['l'] = $user->lang['SORT_LAST_ACTIVE'];

			$sort_key_sql['l'] = 'u.user_lastvisit';

			$sort_key_sql['l'] = 'u.user_last_active';

		}

$sort_key_text['m'] = $user->lang['SORT_RANK'];

		}

$sort_key_text['m'] = $user->lang['SORT_RANK'];

Line 1138Line 1147
				{
if ($active_select === 'lt' && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
{

				{
if ($active_select === 'lt' && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
{

						$sql_where .= ' AND u.user_lastvisit = 0';

						$sql_where .= ' AND u.user_last_active = 0';

					}
else if ($active_select === 'gt')
{

					}
else if ($active_select === 'gt')
{

						$sql_where .= ' AND u.user_lastvisit ' . $find_key_match[$active_select] . ' ' . $active_time;

						$sql_where .= ' AND u.user_last_active ' . $find_key_match[$active_select] . ' ' . $active_time;

					}
else
{

					}
else
{

						$sql_where .= ' AND (u.user_lastvisit > 0 AND u.user_lastvisit < ' . $active_time . ')';

						$sql_where .= ' AND (u.user_last_active > 0 AND u.user_last_active < ' . $active_time . ')';

					}
}
}

					}
}
}

Line 1713Line 1722
			{
$row['session_time'] = $session_ary[$row['user_id']]['session_time'] ?? 0;
$row['session_viewonline'] = $session_ary[$row['user_id']]['session_viewonline'] ?? 0;

			{
$row['session_time'] = $session_ary[$row['user_id']]['session_time'] ?? 0;
$row['session_viewonline'] = $session_ary[$row['user_id']]['session_viewonline'] ?? 0;

				$row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit'];

				$row['last_visit'] = $row['user_last_active'] ?: $row['session_time'];


$id_cache[$row['user_id']] = $row;
}


$id_cache[$row['user_id']] = $row;
}