| 1 |
<?php |
<?php |
| 2 |
// $Id: wymeditor.module,v 1.2.2.10.6.4 2008/08/03 20:01:30 fall0ut Exp $ |
// $Id: wymeditor.module,v 1.2.2.10.6.5 2008/09/21 14:38:39 fall0ut Exp $ |
| 3 |
// altered by Luis Santos (luis.santos@openquest.pt) |
// altered by Luis Santos (luis.santos@openquest.pt) |
| 4 |
|
|
| 5 |
/** |
/** |
| 81 |
$form['name']['#attributes'] = array('readonly' => TRUE); |
$form['name']['#attributes'] = array('readonly' => TRUE); |
| 82 |
|
|
| 83 |
$roles = array(); |
$roles = array(); |
| 84 |
foreach ($form['roles'] as $id => $role) { |
foreach (user_roles() as $id => $role) { |
| 85 |
if (is_int($id) && $role['#default_value']) $roles[] = array('id' => $id, 'role' => $role['#title']); |
$roles[] = array('id' => $id, 'role' => $role); |
| 86 |
} |
} |
| 87 |
|
|
| 88 |
$form['wymeditor'] = array('#type' => 'fieldset', '#title' => t('WYMeditor profiles'), '#collapsible' => FALSE, '#tree' => TRUE); |
$form['wymeditor'] = array('#type' => 'fieldset', '#title' => t('WYMeditor profiles'), '#collapsible' => FALSE, '#tree' => TRUE); |
| 151 |
if (is_array($form[$key]['format'])) { |
if (is_array($form[$key]['format'])) { |
| 152 |
// The common point for the filter system is the declaration of the function |
// The common point for the filter system is the declaration of the function |
| 153 |
// 'filter_form_validate' on the '#validate' atribute of Form API |
// 'filter_form_validate' on the '#validate' atribute of Form API |
| 154 |
if (in_array('filter_form_validate', $form[$key]['format']['#element_validate'])) { |
if (is_array($form[$key]['format']['#element_validate']) && in_array('filter_form_validate', $form[$key]['format']['#element_validate'])) { |
| 155 |
$form[$key]['format']['#attributes'] = array('class' => 'filter-formats'); |
$form[$key]['format']['#attributes'] = array('class' => 'filter-formats'); |
| 156 |
if (!$format_types) { |
if (!$format_types) { |
| 157 |
$formats = array(); |
$formats = array(); |