phpBB

Code Changes

File: memberlist.php

  Unmodified   Added   Modified   Removed
Line 719Line 719

'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'),
'S_GROUP_OPTIONS' => $group_options,


'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'),
'S_GROUP_OPTIONS' => $group_options,

			'S_CUSTOM_FIELDS'	=> (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,

			'S_CUSTOM_FIELDS'	=> (isset($profile_fields['row']) && count($profile_fields['row'])) ? true : false,


'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '',


'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '',

Line 933Line 933
		// We validate form and field here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;

		// We validate form and field here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;

		if ((($mode == '' || $mode == 'searchuser') || sizeof(array_intersect($request->variable_names(\phpbb\request\request_interface::GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))

		if ((($mode == '' || $mode == 'searchuser') || count(array_intersect($request->variable_names(\phpbb\request\request_interface::GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))

		{
$username = $request->variable('username', '', true);
$email = strtolower($request->variable('email', ''));

		{
$username = $request->variable('username', '', true);
$email = strtolower($request->variable('email', ''));

Line 980Line 980
			$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';


			$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';


			if (isset($find_key_match[$joined_select]) && sizeof($joined) == 3)

			if (isset($find_key_match[$joined_select]) && count($joined) == 3)

			{
$joined_time = gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]);


			{
$joined_time = gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]);


Line 990Line 990
				}
}


				}
}


			if (isset($find_key_match[$active_select]) && sizeof($active) == 3 && $auth->acl_get('u_viewonline'))

			if (isset($find_key_match[$active_select]) && count($active) == 3 && $auth->acl_get('u_viewonline'))

			{
$active_time = gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);


			{
$active_time = gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);


Line 1449Line 1449

$leaders_set = false;
// So, did we get any users?


$leaders_set = false;
// So, did we get any users?

		if (sizeof($user_list))

		if (count($user_list))

		{
// Session time?! Session time...
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time

		{
// Session time?! Session time...
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time

Line 1534Line 1534
			$vars = array('user_list', 'use_contact_fields');
extract($phpbb_dispatcher->trigger_event('core.memberlist_memberrow_before', compact($vars)));


			$vars = array('user_list', 'use_contact_fields');
extract($phpbb_dispatcher->trigger_event('core.memberlist_memberrow_before', compact($vars)));


			for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)

			for ($i = 0, $end = count($user_list); $i < $end; ++$i)

			{
$user_id = $user_list[$i];
$row = $id_cache[$user_id];

			{
$user_id = $user_list[$i];
$row = $id_cache[$user_id];

Line 1550Line 1550
				$memberrow = array_merge(phpbb_show_profile($row, false, false, false), array(
'ROW_NUMBER' => $i + ($start + 1),


				$memberrow = array_merge(phpbb_show_profile($row, false, false, false), array(
'ROW_NUMBER' => $i + ($start + 1),


					'S_CUSTOM_PROFILE'	=> (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,

					'S_CUSTOM_PROFILE'	=> (isset($cp_row['row']) && count($cp_row['row'])) ? true : false,

					'S_GROUP_LEADER'	=> $is_leader,
'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,

'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $row['username']),
));


					'S_GROUP_LEADER'	=> $is_leader,
'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,

'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $row['username']),
));


				if (isset($cp_row['row']) && sizeof($cp_row['row']))

				if (isset($cp_row['row']) && count($cp_row['row']))

				{
$memberrow = array_merge($memberrow, $cp_row['row']);
}

$template->assign_block_vars('memberrow', $memberrow);


				{
$memberrow = array_merge($memberrow, $cp_row['row']);
}

$template->assign_block_vars('memberrow', $memberrow);


				if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow']))

				if (isset($cp_row['blockrow']) && count($cp_row['blockrow']))

				{
foreach ($cp_row['blockrow'] as $field_data)
{

				{
foreach ($cp_row['blockrow'] as $field_data)
{

Line 1579Line 1579
		$pagination->generate_template_pagination($pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start);

// Generate page

		$pagination->generate_template_pagination($pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start);

// Generate page

		$template->assign_vars(array(

		$template_vars = array(

			'TOTAL_USERS'	=> $user->lang('LIST_USERS', (int) $total_users),

'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),

			'TOTAL_USERS'	=> $user->lang('LIST_USERS', (int) $total_users),

'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),

Line 1604Line 1604
			'S_LEADERS_SET'		=> $leaders_set,
'S_MODE_SELECT' => $s_sort_key,
'S_ORDER_SELECT' => $s_sort_dir,

			'S_LEADERS_SET'		=> $leaders_set,
'S_MODE_SELECT' => $s_sort_key,
'S_ORDER_SELECT' => $s_sort_dir,

			'S_MODE_ACTION'		=> $pagination_url)

			'S_MODE_ACTION'		=> $pagination_url,

		);

		);

 

/**
* Modify memberlist page template vars
*
* @event core.memberlist_modify_template_vars
* @var array params Array containing URL parameters
* @var string sort_url Sorting URL base
* @var array template_vars Array containing template vars
* @since 3.2.2-RC1
*/
$vars = array('params', 'sort_url', 'template_vars');
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_template_vars', compact($vars)));

$template->assign_vars($template_vars);

}

// Output the page

}

// Output the page