From 1e9f96e9a755a2f816bb013625642087eb14fd51 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Mar 2011 23:25:51 +0000 Subject: [PATCH] Prevent recur data from being copied to different days. --- calendar/inc/class.calendar_merge.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index 9cec2679b5..de83908b93 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -152,6 +152,11 @@ class calendar_merge extends bo_merge if (substr($name,-4) == 'date') $name = substr($name,0,-4); $replacements['$$' . ($prefix ? $prefix . '/' : '') . 'calendar_'.$name . '$$'] = is_array($data['data']) ? implode(', ',$data['data']) : $data['data']; } + if(!$replacements['$$'.($prefix ? $prefix . '/' : '') . 'calendar_recur_type$$']) + { + // Need to set it to '' if not set or previous record may be used + $replacements['$$'.($prefix ? $prefix . '/' : '') . 'calendar_recur_type$$'] = ''; + } foreach(array('start','end') as $what) { foreach(array( @@ -173,7 +178,6 @@ class calendar_merge extends bo_merge { $replacements['$$'.($prefix?$prefix.'/':'').'#'.$name.'$$'] = $event['#'.$name]; } - return $replacements; }