summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--date/date.theme11
-rw-r--r--date_api_ical.inc5
-rw-r--r--date_repeat/date_repeat_form.inc18
3 files changed, 4 insertions, 30 deletions
diff --git a/date/date.theme b/date/date.theme
index 1021556..47274e8 100644
--- a/date/date.theme
+++ b/date/date.theme
@@ -13,18 +13,7 @@
/**
* Theme from/to date combination in the view.
*
- * @param $field = the field settings
- * @param $node = node information, this is not always available and not
- * always the full node, it depends on what value was provided to the formatter.
- * Only the nid is always guaranteed to be available.
- * @param $dates - an array of date information, see explanation for date_field_object() for details.
- *
* Useful values:
- * $field['type_name'] is the content type
- * $field['type'] is the field type
- *
- * $node->nid is the node nid, get other node values using node_load($node->nid)
- *
* $dates['format'] - the format string used on these dates
* $dates['value']['local']['object'] - the local date object for the From date
* $dates['value2']['local']['object'] - the local date object for the To date
diff --git a/date_api_ical.inc b/date_api_ical.inc
index 1b705ea..a8eebfb 100644
--- a/date_api_ical.inc
+++ b/date_api_ical.inc
@@ -654,7 +654,10 @@ function date_api_ical_build_rrule($form_values) {
if (is_array($form_values['EXDATE'])) {
$ex_dates = array();
foreach ($form_values['EXDATE'] as $value) {
- $ex_dates[] = date_convert($value['datetime'], DATE_DATETIME, DATE_ICAL);
+ $ex_date = date_convert($value['datetime'], DATE_DATETIME, DATE_ICAL);
+ if (!empty($ex_date)) {
+ $ex_dates[] = $ex_date;
+ }
}
if (!empty($ex_dates)) {
$RRULE .= chr(13) . chr(10) .'EXDATE:'. implode(',', $ex_dates);
diff --git a/date_repeat/date_repeat_form.inc b/date_repeat/date_repeat_form.inc
index 0dc885c..3da1c0e 100644
--- a/date_repeat/date_repeat_form.inc
+++ b/date_repeat/date_repeat_form.inc
@@ -227,29 +227,11 @@ function date_repeat_merge($form_values) {
*/
function date_repeat_rrule_validate($element, &$form_state) {
include_once('./'. drupal_get_path('module', 'date_api') .'/date_api_ical.inc');
-
$form_values = $form_state['values'];
$field_name = $element['#parents'][0];
- //$delta = $element['#parents'][1];
$item = $form_values[$field_name]['rrule'];
$item = date_repeat_merge($item);
-
- $exceptions = array();
- foreach ($item['EXDATE'] as $delta => $value) {
- if (!empty($value['datetime'])) {
- $date = date_make_date($value['datetime'], 'UTC');
- $exceptions[] = date_format($date, 'Ymd');
- }
- }
-
- // Make sure our exceptions are sorted correctly,
- // then implode them back to a string and remove the added date
- // from the date edit box.
- asort($exceptions);
- $item = date_repeat_merge($item);
- $item['EXDATE'] = implode(',', $exceptions);
$rrule = date_api_ical_build_rrule($item);
- //form_set_value($element['advanced']['EXDATE'], NULL, $form_state);
form_set_value($element, $rrule, $form_state);
}