/[drupal]/contributions/modules/wymeditor/wymeditor.module
ViewVC logotype

Diff of /contributions/modules/wymeditor/wymeditor.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.10.6.5, Sun Sep 21 14:38:39 2008 UTC revision 1.2.2.10.6.6, Wed Oct 8 19:42:52 2008 UTC
# Line 1  Line 1 
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  /**  /**
# Line 81  function wymeditor_form_alter(&$form, $f Line 81  function wymeditor_form_alter(&$form, $f
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);
# Line 151  function _wymeditor_input_format_alter(& Line 151  function _wymeditor_input_format_alter(&
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();

Legend:
Removed from v.1.2.2.10.6.5  
changed lines
  Added in v.1.2.2.10.6.6

  ViewVC Help
Powered by ViewVC 1.1.2