/[drupal]/contributions/modules/date/date/date_elements.inc
ViewVC logotype

Diff of /contributions/modules/date/date/date_elements.inc

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

revision 1.22.2.16, Tue Jun 17 10:40:52 2008 UTC revision 1.22.2.17, Tue Jun 17 11:07:38 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id: date_elements.inc,v 1.22.2.15 2008/06/06 13:30:21 karens Exp $  //$Id: date_elements.inc,v 1.22.2.16 2008/06/17 10:40:52 karens Exp $
3  /**  /**
4   * @file   * @file
5   * Date forms and form themes and validation.   * Date forms and form themes and validation.
# Line 54  function _date_field_update($op, &$node, Line 54  function _date_field_update($op, &$node,
54      // Don't save empty values.      // Don't save empty values.
55      if (empty($item['value']) && $delta !== 0) {      if (empty($item['value']) && $delta !== 0) {
56        unset($items[$delta]);        unset($items[$delta]);
57          continue;
58      }      }
59      // For convenience, we process all possible columns in the element,      // For convenience, we process all possible columns in the element,
60      // but now we need to remove columns not used by this field.      // but now we need to remove columns not used by this field.
# Line 74  function _date_field_update($op, &$node, Line 75  function _date_field_update($op, &$node,
75        }        }
76      }      }
77    }    }
78      dsm('saving '.$field['field_name']);
79      dsm($items);
80    $node->$field['field_name'] = $items;    $node->$field['field_name'] = $items;
81  }  }
82    
# Line 350  function date_combo_validate($element) { Line 353  function date_combo_validate($element) {
353    if (!empty($form_values['timezone']) &&    if (!empty($form_values['timezone']) &&
354      $form_values[$field_name]['timezone'] != $element['#date_timezone']) {      $form_values[$field_name]['timezone'] != $element['#date_timezone']) {
355      $timezone = $form_values[$field_name]['timezone'];      $timezone = $form_values[$field_name]['timezone'];
356        dsm('updating timezone to '. $timezone);
357    }    }
358    
359    if (empty($item[$from_field])) {    if (empty($item[$from_field])) {
360      $item[$from_field] = NULL;      $item[$from_field] = NULL;
361      $item[$to_field]   = NULL;      $item[$to_field]   = NULL;

Legend:
Removed from v.1.22.2.16  
changed lines
  Added in v.1.22.2.17

  ViewVC Help
Powered by ViewVC 1.1.2