Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19188/functions
Modified Files:
ical_parser.php template.php
Log Message:
Fix for recurrence-id moving whole day events.
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** ical_parser.php 15 May 2004 02:42:14 -0000 1.158
--- ical_parser.php 16 May 2004 20:30:19 -0000 1.159
***************
*** 148,153 ****
--- 148,155 ----
if ($uid_valid && isset($processed[$uid]) && isset($recurrence_id['date'])) {
+
$old_start_date = $processed[$uid][0];
$old_start_time = $processed[$uid][1];
+ if ($recurrence_id['value'] == 'DATE') $old_start_time = '-1';
$start_date_tmp = $recurrence_id['date'];
if (!isset($start_date)) $start_date = $old_start_date;
***************
*** 167,171 ****
--- 169,177 ----
if (isset($master_array[$start_date_tmp][$old_start_time][$uid])) {
unset($master_array[$start_date_tmp][$old_start_time][$uid]); // SJBO added $uid twice here
+ if (sizeof($master_array[$start_date_tmp][$old_start_time]) == 0) {
+ unset($master_array[$start_date_tmp][$old_start_time]);
+ }
}
+
$write_processed = false;
} else {
***************
*** 222,226 ****
if (!isset($hour)) $hour = 00;
if (!isset($minute)) $minute = 00;
! $processed[$uid] = array($start_date,($hour.$minute));
}
--- 228,232 ----
if (!isset($hour)) $hour = 00;
if (!isset($minute)) $minute = 00;
! $processed[$uid] = array($start_date,($hour.$minute), $type);
}
Index: template.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** template.php 16 May 2004 19:39:13 -0000 1.41
--- template.php 16 May 2004 20:30:19 -0000 1.42
***************
*** 557,561 ****
$return_etmp = '';
! if (is_array($master_array[$next_day])) {
foreach ($master_array[$next_day] as $event_times) {
foreach ($event_times as $val) {
--- 557,561 ----
$return_etmp = '';
! if (is_array($master_array[$next_day]) && sizeof($master_array[$next_day]) > 0) {
foreach ($master_array[$next_day] as $event_times) {
foreach ($event_times as $val) {
|