diff options
| author | Nils Adermann <naderman@naderman.de> | 2012-05-29 16:40:00 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2012-05-29 16:40:00 +0200 |
| commit | 8438b61cef7ad80f8e4544f8f2cf25a5860c9da0 (patch) | |
| tree | 9e5aa04742a9477733136f19811262066f1a8e6d /phpBB/includes/acp/acp_users.php | |
| parent | 657942ec29c0e433aa59d9554430c13663657864 (diff) | |
| parent | 041b7be77ecd4e52048b94b4e47ad8268716a032 (diff) | |
| download | forums-8438b61cef7ad80f8e4544f8f2cf25a5860c9da0.tar forums-8438b61cef7ad80f8e4544f8f2cf25a5860c9da0.tar.gz forums-8438b61cef7ad80f8e4544f8f2cf25a5860c9da0.tar.bz2 forums-8438b61cef7ad80f8e4544f8f2cf25a5860c9da0.tar.xz forums-8438b61cef7ad80f8e4544f8f2cf25a5860c9da0.zip | |
Merge remote-tracking branch 'github-dhruv/ticket/10308' into develop
By Dhruv Goel
via Dhruv Goel
* github-dhruv/ticket/10308:
[ticket/10308] fixes indentation
[ticket/10308] fixes language variable name
[ticket/10308] makes variable boolean
[ticket/10308] fixes sql query, limit it to 1
[ticket/10308] fixes user deletion if no posts
[ticket/10308] renames language key to USER_NO_POSTS_DELETE
[ticket/10308] fix language and user's total posts
[ticket/10308] fixes language entity.
[ticket/10308] Displays message to user if there are no posts.
[ticket/10308] disable retain/ delete posts option when deleting a user
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
| -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 44717452e8..17687b05c7 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1001,6 +1001,13 @@ class acp_users $user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue'); $db->sql_freeresult($result); + $sql = 'SELECT post_id + FROM ' . POSTS_TABLE . ' + WHERE poster_id = '. $user_id; + $result = $db->sql_query_limit($sql, 1); + $user_row['user_has_posts'] = (bool) $db->sql_fetchfield('post_id'); + $db->sql_freeresult($result); + $template->assign_vars(array( 'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])), 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])), @@ -1028,6 +1035,7 @@ class acp_users 'USER_EMAIL' => $user_row['user_email'], 'USER_WARNINGS' => $user_row['user_warnings'], 'USER_POSTS' => $user_row['user_posts'], + 'USER_HAS_POSTS' => $user_row['user_has_posts'], 'USER_INACTIVE_REASON' => $inactive_reason, )); |
