aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_users_overview.html8
-rw-r--r--phpBB/includes/acp/acp_users.php8
-rw-r--r--phpBB/language/en/acp/users.php2
3 files changed, 14 insertions, 4 deletions
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 73be17c4c1..e6a1411bbb 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -140,9 +140,11 @@
<legend>{L_DELETE_USER}</legend>
<dl>
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
- <dd><select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain"<!-- IF USER_POSTS == 0 --> disabled="disabled" class="disabled-option"<!-- ENDIF -->>{L_RETAIN_POSTS}</option><option value="remove"<!-- IF USER_POSTS == 0 --> disabled="disabled" class="disabled-option"<!-- ENDIF -->>{L_DELETE_POSTS}</option></select></dd>
- <!-- IF USER_POSTS == 0 -->
- <dd>{L_USER_NO_POSTS}</dd>
+ <dd>
+ <!-- IF USER_TOTAL_POSTS == 0 -->
+ {L_USER_NO_POSTS}
+ <!-- ELSE -->
+ <select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
<!-- ENDIF -->
</dl>
<p class="quick">
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,
));
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
index 25e172e55c..7f3a3d2a48 100644
--- a/phpBB/language/en/acp/users.php
+++ b/phpBB/language/en/acp/users.php
@@ -124,7 +124,7 @@ $lang = array_merge($lang, array(
'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of',
'USER_LIFTED_NR' => 'Successfully removed the user’s newly registered status.',
'USER_NO_ATTACHMENTS' => 'There are no attached files to display.',
- 'USER_NO_POSTS' => 'The user has no posts.',
+ 'USER_NO_POSTS' => 'The user has no posts to retain or delete.',
'USER_OUTBOX_EMPTIED' => 'Successfully emptied user’s private message outbox.',
'USER_OUTBOX_EMPTY' => 'The user’s private message outbox was already empty.',
'USER_OVERVIEW_UPDATED' => 'User details updated.',