aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2017-06-28 00:58:03 +0700
committerMarc Alexander <admin@m-a-styles.de>2018-01-01 13:56:04 +0100
commitf8fbe3793680af1dae2db2829cfc84068831c52f (patch)
tree54c7108b28fb58688a8695a0b592c163314a09f9 /phpBB/memberlist.php
parentff18802656e72981f6ecb613d756bc19f2462689 (diff)
downloadforums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar
forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.gz
forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.bz2
forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.xz
forums-f8fbe3793680af1dae2db2829cfc84068831c52f.zip
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 985b45acf7..977857da59 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -719,7 +719,7 @@ switch ($mode)
'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&amp;mode=overview&amp;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&amp;mode=user&amp;u=' . $user_id, true, $user->session_id) : '',
@@ -933,7 +933,7 @@ switch ($mode)
// 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', ''));
@@ -980,7 +980,7 @@ switch ($mode)
$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]);
@@ -990,7 +990,7 @@ switch ($mode)
}
}
- 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]);
@@ -1449,7 +1449,7 @@ switch ($mode)
$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
@@ -1534,7 +1534,7 @@ switch ($mode)
$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];
@@ -1550,21 +1550,21 @@ switch ($mode)
$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']),
));
- 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);
- 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)
{