diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2009-04-08 04:42:59 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2009-04-08 04:42:59 +0000 |
commit | ef85825abc5bd774e3554a6533fc9241ba0eac8e (patch) | |
tree | e58df16e6d1966a0bcf775a6d046cbdd3aba76fa /functions/parse/end_vevent.php | |
parent | f6da67d1980df72e6442f6014012a88103e100ba (diff) | |
download | phpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.tar.gz phpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.tar.bz2 phpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.zip |
autoincrement sequence if it is missing
Diffstat (limited to 'functions/parse/end_vevent.php')
-rw-r--r-- | functions/parse/end_vevent.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index bd122f4..8e8186a 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -29,8 +29,8 @@ if (!isset($uid)) { $uid_counter++; $uid_valid = false; }elseif(in_array($uid, $uid_list)) { - #$uid .= $uid_counter; - #$uid_counter++; + # UID seen before. If sequence is the default, bump it. + if ($sequence == 0) $sequence++; }else{ $uid_valid = true; } @@ -321,7 +321,8 @@ foreach($recur_data as $recur_data_unixtime) { } if($this_date_tmp == $end_date_tmp && ($end_time == '0000')) continue; if(!isset($master_array[$this_date_tmp][$time_key][$uid]['sequence']) || - $sequence > $master_array[$this_date_tmp][$time_key][$uid]['sequence']){ + $sequence > $master_array[$this_date_tmp][$time_key][$uid]['sequence'] + ){ $master_array[$this_date_tmp][$time_key][$uid] = array ( 'event_start' => $start_time, # hhmm 'event_end' => $end_time, # hhmm |