diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-01-23 12:04:43 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-23 12:04:43 +0100 |
commit | e28a5da4575ef8830a430ad004f884c1eac83c61 (patch) | |
tree | d628fe4b6bc75a7b45473666551348a7c44a8540 | |
parent | 10756f3f87efac29448a48207548d5b71a3206b9 (diff) | |
parent | 39538ecb856a632c1f9bac8284deb1cbea35e696 (diff) | |
download | forums-e28a5da4575ef8830a430ad004f884c1eac83c61.tar forums-e28a5da4575ef8830a430ad004f884c1eac83c61.tar.gz forums-e28a5da4575ef8830a430ad004f884c1eac83c61.tar.bz2 forums-e28a5da4575ef8830a430ad004f884c1eac83c61.tar.xz forums-e28a5da4575ef8830a430ad004f884c1eac83c61.zip |
Merge branch '3.1.x'
-rw-r--r-- | phpBB/memberlist.php | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c23a409ae7..759a899de1 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1231,21 +1231,19 @@ switch ($mode) ); extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_sql_query_data', compact($vars))); - // Count the users ... - if ($sql_where) - { - $sql = 'SELECT COUNT(u.user_id) AS total_users - FROM ' . USERS_TABLE . " u$sql_from - WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ") - $sql_where"; - $result = $db->sql_query($sql); - $total_users = (int) $db->sql_fetchfield('total_users'); - $db->sql_freeresult($result); - } - else + $user_types = array(USER_NORMAL, USER_FOUNDER); + if ($auth->acl_get('a_user')) { - $total_users = $config['num_users']; + $user_types[] = USER_INACTIVE; } + // Count the users ... + $sql = 'SELECT COUNT(u.user_id) AS total_users + FROM ' . USERS_TABLE . " u$sql_from + WHERE " . $db->sql_in_set('u.user_type', $user_types) . " + $sql_where"; + $result = $db->sql_query($sql); + $total_users = (int) $db->sql_fetchfield('total_users'); + $db->sql_freeresult($result); // Build a relevant pagination_url $params = $sort_params = array(); @@ -1411,13 +1409,7 @@ switch ($mode) ); } - $user_types = array(USER_NORMAL, USER_FOUNDER); - if ($auth->acl_get('a_user')) - { - $user_types[] = USER_INACTIVE; - } - - $start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']); + $start = $pagination->validate_start($start, $config['topics_per_page'], $total_users); // Get us some users :D $sql = "SELECT u.user_id |