aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/auth.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-06 09:33:33 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-02-16 18:21:04 +0100
commit4cfba8f3a40c424d831b6034bdf1dc4975822406 (patch)
treed5145aedc8b4f3ef742b21335e46e30583c99748 /phpBB/includes/acp/auth.php
parenteab1b1ad11ae2e42cf4f6c3af9f7171d6dd0837b (diff)
downloadforums-4cfba8f3a40c424d831b6034bdf1dc4975822406.tar
forums-4cfba8f3a40c424d831b6034bdf1dc4975822406.tar.gz
forums-4cfba8f3a40c424d831b6034bdf1dc4975822406.tar.bz2
forums-4cfba8f3a40c424d831b6034bdf1dc4975822406.tar.xz
forums-4cfba8f3a40c424d831b6034bdf1dc4975822406.zip
[ticket/14315] Build role options for each permission group
Previously all role options were put into one array. This required filtering the options. Instead, these are now passed to the template via template loops. PHPBB3-14315
Diffstat (limited to 'phpBB/includes/acp/auth.php')
-rw-r--r--phpBB/includes/acp/auth.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 755923ff8c..e1f7fb646f 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -466,19 +466,20 @@ class auth_admin extends \phpbb\auth\auth
// Build role dropdown options
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
+ $role_options = array();
+
@reset($roles);
while (list($role_id, $role_row) = each($roles))
{
$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
- $template->assign_block_vars('role_options', array(
+ $role_options[] = array(
'ID' => $role_id,
- 'UG_ID' => $ug_id,
'ROLE_NAME' => $role_name,
'TITLE' => $role_description,
'SELECTED' => $role_id == $current_role_id,
- ));
+ );
}
if (!$current_role_id && $mode != 'view')
@@ -507,6 +508,8 @@ class auth_admin extends \phpbb\auth\auth
'S_ROLE_ID' => $current_role_id,
));
+ $template->assign_block_vars_array($tpl_pmask . '.' . $tpl_fmask . '.role_options', $role_options);
+
$this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
unset($content_array[$ug_id]);