Fix for Code

  1. @@ -235,7 +235,7 @@ function _date_field_settings($op, $fiel
  2.        return date_field_settings_form($field);
  3.  
  4.      case 'validate':
  5. -      if (!in_array('year', $field['granularity'])) {
  6. +      if ( $field['type'] != 'datetime' && !in_array('year', $field['granularity']) || $field['type'] == 'datetime' && ! count($field['granularity']) ) { /* SITEFIX : do not require year to be set on time only fields */
  7.          form_set_error('granularity', t('Granularity must include a year.'));
  8.        }
  9.        if ($field['tz_handling'] != 'none' && !in_array('hour', array_filter($field['granularity']))) {

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.