diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-08-19 10:52:06 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-08-19 10:52:06 +0000 |
commit | bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea (patch) | |
tree | 6b20e2e88f27d537f9654a7afc25400ffc116f18 /phpBB | |
parent | f71d1a2a00d1050964b1c324aee146e70ae2fcd2 (diff) | |
download | forums-bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea.tar forums-bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea.tar.gz forums-bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea.tar.bz2 forums-bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea.tar.xz forums-bcc1eb1c0ec6edc8857dac2837a4c9aa0110bbea.zip |
- only bugfixes
- use usergroup function to activate users at admin index
git-svn-id: file:///svn/phpbb/trunk@5200 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/admin_groups.php | 16 | ||||
-rw-r--r-- | phpBB/adm/admin_profile.php | 4 | ||||
-rw-r--r-- | phpBB/adm/admin_viewlogs.php | 2 | ||||
-rw-r--r-- | phpBB/adm/index.php | 12 |
4 files changed, 20 insertions, 14 deletions
diff --git a/phpBB/adm/admin_groups.php b/phpBB/adm/admin_groups.php index c758f4978d..4c0e546670 100644 --- a/phpBB/adm/admin_groups.php +++ b/phpBB/adm/admin_groups.php @@ -604,7 +604,7 @@ function swatch() FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND u.user_id = ug.user_id - ORDER BY ug.group_leader DESC, ug.user_pending DESC, u.username + ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username LIMIT $start, " . $config['topics_per_page']; $result = $db->sql_query($sql); @@ -674,26 +674,26 @@ function swatch() <td class="row3" colspan="5"><b><?php echo $user->lang['GROUP_APPROVED']; ?></b></td> </tr> <?php + if (sizeof($group_data['member'])) { - $pending = $group_data['member'][0]['user_pending']; - $row_class = ''; + $pending = false; + foreach ($group_data['member'] as $row) { - if ($pending) - { + $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; + if ($row['user_pending'] && !$pending) + { ?> <tr> <td class="row3" colspan="5"><b><?php echo $user->lang['GROUP_PENDING']; ?></b></td> </tr> <?php - + $pending = true; } - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; - ?> <tr class="<?php echo $row_class; ?>"> <td><a href="<?php echo "admin_users.$phpEx$SID&mode=edit&u=" . $row['user_id']; ?>"><?php echo $row['username']; ?></a></td> diff --git a/phpBB/adm/admin_profile.php b/phpBB/adm/admin_profile.php index 7b5f5aa599..587947d66b 100644 --- a/phpBB/adm/admin_profile.php +++ b/phpBB/adm/admin_profile.php @@ -401,7 +401,7 @@ if ($mode == 'create' || $mode == 'edit') continue; } - $s_hidden_fields .= build_hidden_fields($key_ary); + $s_hidden_fields .= build_hidden_keys($key_ary); } if (!sizeof($error)) @@ -1294,7 +1294,7 @@ function update_insert($table, $sql_ary, $where_fields) } } -function build_hidden_fields($key_ary) +function build_hidden_keys($key_ary) { $hidden_fields = ''; diff --git a/phpBB/adm/admin_viewlogs.php b/phpBB/adm/admin_viewlogs.php index f69858f0ed..f1043d2d99 100644 --- a/phpBB/adm/admin_viewlogs.php +++ b/phpBB/adm/admin_viewlogs.php @@ -43,7 +43,7 @@ $forum_id = request_var('f', 0); $start = request_var('start', 0); $deletemark = (isset($_POST['delmarked'])) ? true : false; $deleteall = (isset($_POST['delall'])) ? true : false; -$marked = request_var('mark', 0); +$marked = request_var('mark', array(0)); // Sort keys $sort_days = request_var('st', 0); diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index ff488b4e65..050a698256 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -156,8 +156,13 @@ elseif ($pane == 'right') if ($action == 'activate') { - $sql = 'UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_NORMAL . " WHERE user_id IN ($mark)"; - $db->sql_query($sql); + include($phpbb_root_path . 'includes/functions_user.php'); + $mark_ary = explode(', ', $mark); + + foreach ($mark_ary as $user_id) + { + user_active_flip($user_id, USER_INACTIVE); + } } else if ($action == 'delete') { @@ -165,6 +170,8 @@ elseif ($pane == 'right') $db->sql_query($sql); $sql = 'DELETE FROM ' . USERS_TABLE . " WHERE user_id IN ($mark)"; $db->sql_query($sql); + + add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected)); } if ($action != 'delete') @@ -172,7 +179,6 @@ elseif ($pane == 'right') set_config('num_users', $config['num_users'] + $db->sql_affectedrows(), true); } - add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected)); break; case 'remind': |