From 371cfa4bfc53b20a42e7849984ca2febe9888885 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 28 Nov 2013 13:17:07 +0100 Subject: [PATCH 1/3] [ticket/12045] Correctly close
with
PHPBB3-12045 --- phpBB/adm/style/acp_prune_users.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 1257f3fb3d..3c4ac454d3 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -39,7 +39,7 @@
-
+
From d9c754a6502cb78662671d681944fbf00a0aa2b3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 28 Nov 2013 13:17:38 +0100 Subject: [PATCH 2/3] [ticket/12045] Correctly close before closing parent tag PHPBB3-12045 --- phpBB/adm/style/acp_prune_users.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 3c4ac454d3..2bbb03a834 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -43,7 +43,7 @@
-

{L_PRUNE_USERS_GROUP_EXPLAIN}
+

{L_PRUNE_USERS_GROUP_EXPLAIN}
From 5d69eddcf5780db9056c7ae21a110bc815679dca Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 28 Nov 2013 13:22:25 +0100 Subject: [PATCH 3/3] [ticket/12045] Only display group selection if there are groups Also fixed the empty option which is not allowed. PHPBB3-12045 --- phpBB/includes/acp/acp_prune.php | 11 +++++++++-- phpBB/language/en/acp/prune.php | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index 78db1eff15..5d9080b55b 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -331,23 +331,30 @@ class acp_prune $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); + $s_group_list = ''; while ($row = $db->sql_fetchrow($result)) { $s_group_list .= ''; } $db->sql_freeresult($result); + if ($s_group_list) + { + // Only prepend the "All groups" option if there are groups, + // otherwise we don't want to display this option at all. + $s_group_list = '' . $s_group_list; + } + $template->assign_vars(array( 'U_ACTION' => $this->u_action, 'S_ACTIVE_OPTIONS' => $s_find_active_time, - 'S_GROUP_LIST' => $s_group_list, + 'S_GROUP_LIST' => $s_group_list, 'S_COUNT_OPTIONS' => $s_find_count, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_prune&field=users'), )); diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php index 3e890182c0..7134efd765 100644 --- a/phpBB/language/en/acp/prune.php +++ b/phpBB/language/en/acp/prune.php @@ -52,6 +52,7 @@ $lang = array_merge($lang, array( 'POSTS_ON_QUEUE' => 'Posts Awaiting Approval', 'PRUNE_USERS_GROUP_EXPLAIN' => 'Limit to users within the selected group.', + 'PRUNE_USERS_GROUP_NONE' => 'All groups', 'PRUNE_USERS_LIST' => 'Users to be pruned', 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed. You can remove individual users from the deletion list by unchecking the box next to their username.', 'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated. You can remove individual users from the deactivation list by unchecking the box next to their username.',