aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-04-12 14:03:56 +0200
committerNils Adermann <naderman@naderman.de>2013-04-12 14:03:56 +0200
commit653666c76ef53028a6e06a71e6d39f327f988814 (patch)
tree5b19f6dbbdccfcdf7667907d721dfb5852854af0 /phpBB/includes/acp
parentd071d57a1ba81b3f502787ab190000a270817421 (diff)
parent0ce94fde77ac61ce5be07f55242802d3dee784f2 (diff)
downloadforums-653666c76ef53028a6e06a71e6d39f327f988814.tar
forums-653666c76ef53028a6e06a71e6d39f327f988814.tar.gz
forums-653666c76ef53028a6e06a71e6d39f327f988814.tar.bz2
forums-653666c76ef53028a6e06a71e6d39f327f988814.tar.xz
forums-653666c76ef53028a6e06a71e6d39f327f988814.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/11358] Removed all trailing white spaces. [ticket/11358] Fixed the code according to coding guidlines.
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_groups.php83
1 files changed, 42 insertions, 41 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 8cae0151c8..865810687b 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -148,57 +148,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 . '&amp;action=list&amp;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 . '&amp;action=list&amp;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))
{