diff options
author | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-04-20 17:11:07 +0530 |
---|---|---|
committer | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-05-10 22:50:13 +0530 |
commit | 59177a86c4160a4879aaf77e602f91ccea0fb107 (patch) | |
tree | 2926fd1e62fa4782353d3ec2e2c7860885c5f0df /phpBB/includes/acp | |
parent | 8f7e85604bb36679db1baa37588fc5e39a8b853f (diff) | |
download | forums-59177a86c4160a4879aaf77e602f91ccea0fb107.tar forums-59177a86c4160a4879aaf77e602f91ccea0fb107.tar.gz forums-59177a86c4160a4879aaf77e602f91ccea0fb107.tar.bz2 forums-59177a86c4160a4879aaf77e602f91ccea0fb107.tar.xz forums-59177a86c4160a4879aaf77e602f91ccea0fb107.zip |
[ticket/10308] fix language and user's total posts
language modified to be clear and select box disappears in case no
posts by user. user's total posts are fetched using a new query.
PHPBB3-10308
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 363c900edc..1f0f053a85 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1009,6 +1009,13 @@ class acp_users $user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue'); $db->sql_freeresult($result); + $sql = 'SELECT COUNT(post_id) as user_total_posts + FROM ' . POSTS_TABLE . ' + WHERE poster_id = '. $user_id; + $result = $db->sql_query($sql); + $user_row['user_total_posts'] = (int) $db->sql_fetchfield('user_total_posts'); + $db->sql_freeresult($result); + $template->assign_vars(array( 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), @@ -1036,6 +1043,7 @@ class acp_users 'USER_EMAIL' => $user_row['user_email'], 'USER_WARNINGS' => $user_row['user_warnings'], 'USER_POSTS' => $user_row['user_posts'], + 'USER_TOTAL_POSTS' => $user_row['user_total_posts'], 'USER_INACTIVE_REASON' => $inactive_reason, )); |