From fcc22ef2b036c6c5438c227ffc13b3625860e753 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 25 Dec 2006 15:19:45 +0000 Subject: show dropdown box for choosing the forum in user management screen -> permissions git-svn-id: file:///svn/phpbb/trunk@6808 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_permissions.php | 4 +- phpBB/includes/acp/acp_users.php | 82 ++++++++++++++++++++++------------ phpBB/includes/acp/auth.php | 7 +++ phpBB/includes/auth.php | 4 +- 4 files changed, 65 insertions(+), 32 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 8b611ffef1..61017a059d 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -305,7 +305,7 @@ class acp_permissions $s_forum_options = ''; foreach ($forum_list as $f_id => $f_row) { - $s_forum_options .= ''; + $s_forum_options .= ''; } // Build subforum options @@ -488,7 +488,7 @@ class acp_permissions foreach ($forum_list as $key => $row) { - $s_options .= ''; - while ($row = $db->sql_fetchrow($result)) + $forum_list = make_forum_select($forum_id, false, true, false, false, false, true); + + // Build forum options + foreach ($forum_list as $f_id => $f_row) { - $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'local', ACL_NEVER); - $auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false); + $s_forum_options .= ''; } - $db->sql_freeresult($result); $template->assign_vars(array( 'S_PERMISSIONS' => true, + + 'S_GLOBAL' => (!$forum_id) ? true : false, + 'S_FORUM_OPTIONS' => $s_forum_options, + + 'U_ACTION' => $this->u_action . '&u=' . $user_id, 'U_USER_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx" ,'i=permissions&mode=setting_user_global&user_id[]=' . $user_id), 'U_USER_FORUM_PERMISSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions&mode=setting_user_local&user_id[]=' . $user_id)) ); diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 95dffb9e72..26977a6ceb 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -380,6 +380,7 @@ class auth_admin extends auth } $template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array); + unset($s_role_js_array); // Now obtain memberships $user_groups_default = $user_groups_custom = array(); @@ -481,7 +482,11 @@ class auth_admin extends auth ); $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view')); + + unset($content_array[$ug_id]); } + + unset($hold_ary[$forum_id]); } } else @@ -569,6 +574,8 @@ class auth_admin extends auth $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view')); } + + unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]); } } } diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index a553d8e4ed..cf1b053f8c 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -113,7 +113,7 @@ class auth { if (isset($this->acl[0])) { - $this->cache[$f][$opt] = $this->acl[0]{$this->acl_options['global'][$opt]}; + $this->cache[$f][$opt] = $this->acl[0][$this->acl_options['global'][$opt]]; } } @@ -123,7 +123,7 @@ class auth { if (isset($this->acl[$f])) { - $this->cache[$f][$opt] |= $this->acl[$f]{$this->acl_options['local'][$opt]}; + $this->cache[$f][$opt] |= $this->acl[$f][$this->acl_options['local'][$opt]]; } } } -- cgit v1.2.1