Commit 3622e5f7 authored by webchick's avatar webchick

#316136 by pwolanin, David_Rothstein, coltrane, Heine: Fixed role name not...

#316136 by pwolanin, David_Rothstein, coltrane, Heine: Fixed role name not filtered on admin/user/permissions.
parent 9d746ed4
......@@ -313,7 +313,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) {
':module' => $block->module,
':delta' => $block->delta,
))->fetchCol();
$role_options = db_query('SELECT rid, name FROM {role} ORDER BY name')->fetchAllKeyed();
$role_options = array_map('check_plain', user_roles());
$form['visibility']['role'] = array(
'#type' => 'fieldset',
'#title' => t('Roles'),
......
......@@ -28,7 +28,7 @@ function filter_admin_overview($form) {
}
else {
$form['formats'][$id]['name'] = array('#markup' => check_plain($format->name));
$roles = filter_get_roles_by_format($format);
$roles = array_map('check_plain', filter_get_roles_by_format($format));
$roles_markup = $roles ? implode(', ', $roles) : t('No roles may use this format');
}
$form['formats'][$id]['roles'] = array('#markup' => $roles_markup);
......@@ -127,7 +127,7 @@ function filter_admin_format_form($form, &$form_state, $format) {
$form['roles'] = array(
'#type' => 'checkboxes',
'#title' => t('Roles'),
'#options' => user_roles(),
'#options' => array_map('check_plain', user_roles()),
'#disabled' => $is_fallback,
);
if ($is_fallback) {
......
......@@ -188,7 +188,7 @@ function user_admin_account() {
$destination = drupal_get_destination();
$status = array(t('blocked'), t('active'));
$roles = user_roles(TRUE);
$roles = array_map('check_plain', user_roles(TRUE));
$accounts = array();
foreach ($result as $account) {
$users_roles = array();
......@@ -705,7 +705,7 @@ function user_admin_permissions($form, $form_state, $rid = NULL) {
// Have to build checkboxes here after checkbox arrays are built
foreach ($role_names as $rid => $name) {
$form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array());
$form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE);
$form['role_names'][$rid] = array('#markup' => check_plain($name), '#tree' => TRUE);
}
$form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
......
......@@ -975,7 +975,7 @@ function user_account_form(&$form, &$form_state) {
'#access' => $admin,
);
$roles = user_roles(TRUE);
$roles = array_map('check_plain', user_roles(TRUE));
// The disabled checkbox subelement for the 'authenticated user' role
// must be generated separately and added to the checkboxes element,
// because of a limitation in Form API not supporting a single disabled
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment