From fe347ec1124de7022bbbf37d0a1fffeff56c7271 Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Tue, 25 May 2010 10:52:01 -0500 Subject: [PATCH] [feature/prune-users] Adjust some language strings for new features Adjust two language strings for ACP prune feature to include descriptions for new features. PHPBB3-9622 --- phpBB/adm/style/acp_prune_users.html | 27 ++++- phpBB/adm/style/confirm_body_prune.html | 28 +++-- phpBB/includes/acp/acp_prune.php | 139 +++++++++++++++++++----- phpBB/language/en/acp/prune.php | 14 ++- 4 files changed, 162 insertions(+), 46 deletions(-) diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 0f2b23dcef..a6c5679a11 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -9,7 +9,7 @@
- {L_ACP_PRUNE_USERS} + {L_CRITERIA}
@@ -18,9 +18,16 @@
+
+
+
+

{L_JOINED_EXPLAIN}
-
+
+ {L_AFTER} +

{L_BEFORE} +

{L_LAST_ACTIVE_EXPLAIN}
@@ -30,11 +37,27 @@
+
+
+
+
+
+

{L_PRUNE_USERS_GROUP_EXPLAIN}
+
+
+
+ +
+ {L_USERNAMES}

{L_SELECT_USERS_EXPLAIN}
[ {L_FIND_USERNAME} ]
+
+ +
+ {L_OPTIONS}

{L_DELETE_USER_POSTS_EXPLAIN}
diff --git a/phpBB/adm/style/confirm_body_prune.html b/phpBB/adm/style/confirm_body_prune.html index 9481386231..92e0a22e71 100644 --- a/phpBB/adm/style/confirm_body_prune.html +++ b/phpBB/adm/style/confirm_body_prune.html @@ -2,6 +2,23 @@ +
+

{L_PRUNE_USERS_LIST}

+

{L_PRUNE_USERS_LIST_DEACTIVATE}

{L_PRUNE_USERS_LIST_DELETE}

+ +
+ + » + {users.USERNAME} + [{L_USER_ADMIN}]
+ +
+ + {L_MARK_ALL} • + {L_UNMARK_ALL} + +
+

{MESSAGE_TITLE}

{MESSAGE_TEXT}

@@ -12,17 +29,6 @@   - -

{L_PRUNE_USERS_LIST}

-

{L_PRUNE_USERS_LIST_DEACTIVATE}

{L_PRUNE_USERS_LIST_DELETE}

- -
- - » {users.USERNAME} [{L_USER_ADMIN}]
- - -

-
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index 99bec29d6d..a21805972f 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -243,6 +243,7 @@ class acp_prune if (confirm_box(true)) { $user_ids = $usernames = array(); + $this->get_prune_users($user_ids, $usernames); if (sizeof($user_ids)) @@ -256,10 +257,7 @@ class acp_prune { if ($deleteposts) { - foreach ($user_ids as $user_id) - { - user_delete('remove', $user_id); - } + user_delete('remove', $user_ids); $l_log = 'LOG_PRUNE_USER_DEL_DEL'; } @@ -297,6 +295,7 @@ class acp_prune { $template->assign_block_vars('users', array( 'USERNAME' => $usernames[$user_id], + 'USER_ID' => $user_id, 'U_PROFILE' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx, 'mode=viewprofile&u=' . $user_id), 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '', )); @@ -312,8 +311,8 @@ class acp_prune 'mode' => $mode, 'prune' => 1, - 'users' => utf8_normalize_nfc(request_var('users', '', true)), - 'username' => utf8_normalize_nfc(request_var('username', '', true)), + 'users' => request_var('users', '', true), + 'username' => request_var('username', '', true), 'email' => request_var('email', ''), 'joined_select' => request_var('joined_select', ''), 'joined' => request_var('joined', ''), @@ -338,22 +337,27 @@ class acp_prune } $find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']); - $s_find_join_time = ''; - foreach ($find_time as $key => $value) - { - $s_find_join_time .= ''; - } - $s_find_active_time = ''; foreach ($find_time as $key => $value) { $s_find_active_time .= ''; } + $s_group_list = ''; + $sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . ' + WHERE group_type <> ' . GROUP_SPECIAL . ' + ORDER BY group_name ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $s_group_list .= '