Skip to content

Commit ef85825

Browse files
author
Jim Hu
committed
autoincrement sequence if it is missing
1 parent f6da67d commit ef85825

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

config.inc.php

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
*/
101101
$list_webcals = array(
102102
# 'webcal://dimer.tamu.edu/calendars/seminars/Biochem.ics'
103+
'webcal://calendar.sxsw.com/[email protected]'
103104
);
104105
$more_webcals['recur_tests'] = array();
105106
$locked_cals = array(

functions/ical_parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
$ifile = @fopen($filename, "r");
105105
if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
106106
$nextline = fgets($ifile, 1024);
107-
if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
107+
#if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
108108

109109
// Set a value so we can check to make sure $master_array contains valid data
110110
$master_array['-1'] = 'valid cal file';

functions/parse/end_vevent.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
$uid_counter++;
3030
$uid_valid = false;
3131
}elseif(in_array($uid, $uid_list)) {
32-
#$uid .= $uid_counter;
33-
#$uid_counter++;
32+
# UID seen before. If sequence is the default, bump it.
33+
if ($sequence == 0) $sequence++;
3434
}else{
3535
$uid_valid = true;
3636
}
@@ -321,7 +321,8 @@
321321
}
322322
if($this_date_tmp == $end_date_tmp && ($end_time == '0000')) continue;
323323
if(!isset($master_array[$this_date_tmp][$time_key][$uid]['sequence']) ||
324-
$sequence > $master_array[$this_date_tmp][$time_key][$uid]['sequence']){
324+
$sequence > $master_array[$this_date_tmp][$time_key][$uid]['sequence']
325+
){
325326
$master_array[$this_date_tmp][$time_key][$uid] = array (
326327
'event_start' => $start_time, # hhmm
327328
'event_end' => $end_time, # hhmm

functions/parse/parse_tzs.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$ifile = @fopen($filename, "r");
33
if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
44
$nextline = fgets($ifile);
5-
if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
5+
#if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
66

77
// read file in line by line
88
// XXX end line is skipped because of the 1-line readahead

templates/default/month.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@
8585
</table>
8686
<!-- switch showbottom off -->
8787
</center>
88-
{FOOTER}
88+
{FOOTER}

0 commit comments

Comments
 (0)