diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/permission_mask.html | 6 | ||||
-rw-r--r-- | phpBB/includes/acp/auth.php | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index aa18a40cb7..721fc42473 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -39,16 +39,14 @@ </div> <dl class="permissions-simple"> <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt> - {% if role_options %} + {% if p_mask.f_mask.role_options %} <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%"> <div class="dropdown-container dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}"> <span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span> <div class="dropdown hidden"> <ul class="dropdown-contents" id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" > - {% for role in loops.role_options %} - {% if role.UG_ID == p_mask.f_mask.UG_ID %} + {% for role in p_mask.f_mask.role_options %} <li data-id="{{ role.ID }}" data-target-id="advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" data-title="{{ role.TITLE }}"{% if role.SELECTED == true %} data-selected="{{ role.SELECTED }}"{% endif %}>{{ role.ROLE_NAME }}</li> - {% endif %} {% endfor %} </ul> </div> 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]); |