diff options
author | Nils Adermann <naderman@naderman.de> | 2013-04-12 14:03:24 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2013-04-12 14:03:24 +0200 |
commit | 0ce94fde77ac61ce5be07f55242802d3dee784f2 (patch) | |
tree | 3cdf22fe4f5ae368a348aba13ce19d053febca4d | |
parent | fb371d6bbeb67abed3cd4c3f05906e02c2d2dce2 (diff) | |
parent | 7d8bbcd596ca2d6a3821134c6f8c7478650a2d7a (diff) | |
download | forums-0ce94fde77ac61ce5be07f55242802d3dee784f2.tar forums-0ce94fde77ac61ce5be07f55242802d3dee784f2.tar.gz forums-0ce94fde77ac61ce5be07f55242802d3dee784f2.tar.bz2 forums-0ce94fde77ac61ce5be07f55242802d3dee784f2.tar.xz forums-0ce94fde77ac61ce5be07f55242802d3dee784f2.zip |
Merge branch 'ticket/11358' into develop-olympus
* ticket/11358:
[ticket/11358] Removed all trailing white spaces.
[ticket/11358] Fixed the code according to coding guidlines.
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 83 |
1 files changed, 42 insertions, 41 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 00ca26dfa6..beb7aefee5 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -141,57 +141,58 @@ class acp_groups 'action' => $action)) ); } + break; - break; case 'set_default_on_all': - if (confirm_box(true)) - { - $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name']; - - $start = 0; + if (confirm_box(true)) + { + $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name']; + + $start = 0; - do + do + { + $sql = 'SELECT user_id + FROM ' . USER_GROUP_TABLE . " + WHERE group_id = $group_id + ORDER BY user_id"; + $result = $db->sql_query_limit($sql, 200, $start); + + $mark_ary = array(); + if ($row = $db->sql_fetchrow($result)) { - $sql = 'SELECT user_id - FROM ' . USER_GROUP_TABLE . " - WHERE group_id = $group_id - ORDER BY user_id"; - $result = $db->sql_query_limit($sql, 200, $start); - - $mark_ary = array(); - if ($row = $db->sql_fetchrow($result)) + do { - do - { - $mark_ary[] = $row['user_id']; - } - while ($row = $db->sql_fetchrow($result)); + $mark_ary[] = $row['user_id']; + } + while ($row = $db->sql_fetchrow($result)); - group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row); + group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row); - $start = (sizeof($mark_ary) < 200) ? 0 : $start + 200; - } - else - { - $start = 0; - } - $db->sql_freeresult($result); + $start = (sizeof($mark_ary) < 200) ? 0 : $start + 200; } - while ($start); - - trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); - } - else - { - confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( - 'mark' => $mark_ary, - 'g' => $group_id, - 'i' => $id, - 'mode' => $mode, - 'action' => $action)) - ); + else + { + $start = 0; + } + $db->sql_freeresult($result); } + while ($start); + + trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'mark' => $mark_ary, + 'g' => $group_id, + 'i' => $id, + 'mode' => $mode, + 'action' => $action)) + ); + } break; + case 'deleteusers': if (empty($mark_ary)) { |