aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2009-04-08 04:42:59 +0000
committerJim Hu <jimhu@users.sourceforge.net>2009-04-08 04:42:59 +0000
commitef85825abc5bd774e3554a6533fc9241ba0eac8e (patch)
treee58df16e6d1966a0bcf775a6d046cbdd3aba76fa
parentf6da67d1980df72e6442f6014012a88103e100ba (diff)
downloadphpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.tar.gz
phpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.tar.bz2
phpicalendar-ef85825abc5bd774e3554a6533fc9241ba0eac8e.zip
autoincrement sequence if it is missing
-rw-r--r--config.inc.php1
-rw-r--r--functions/ical_parser.php2
-rw-r--r--functions/parse/end_vevent.php7
-rw-r--r--functions/parse/parse_tzs.php2
-rw-r--r--templates/default/month.tpl2
5 files changed, 8 insertions, 6 deletions
diff --git a/config.inc.php b/config.inc.php
index b5ba5ee..50f26a0 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -100,6 +100,7 @@ these arrays provide extra calendar options.
*/
$list_webcals = array(
# 'webcal://dimer.tamu.edu/calendars/seminars/Biochem.ics'
+'webcal://calendar.sxsw.com/iCal-EXDrB-sa-sxsw@rollerfeet.com.ics'
);
$more_webcals['recur_tests'] = array();
$locked_cals = array(
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index a641170..21a410f 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -104,7 +104,7 @@ foreach ($cal_filelist as $cal_key=>$filename) {
$ifile = @fopen($filename, "r");
if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
$nextline = fgets($ifile, 1024);
- if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
+ #if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
// Set a value so we can check to make sure $master_array contains valid data
$master_array['-1'] = 'valid cal file';
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
diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php
index fb250b2..4769d69 100644
--- a/functions/parse/parse_tzs.php
+++ b/functions/parse/parse_tzs.php
@@ -2,7 +2,7 @@
$ifile = @fopen($filename, "r");
if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename));
$nextline = fgets($ifile);
-if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
+#if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename));
// read file in line by line
// XXX end line is skipped because of the 1-line readahead
diff --git a/templates/default/month.tpl b/templates/default/month.tpl
index 7dcff53..8258228 100644
--- a/templates/default/month.tpl
+++ b/templates/default/month.tpl
@@ -85,4 +85,4 @@
</table>
<!-- switch showbottom off -->
</center>
-{FOOTER}
+{FOOTER} \ No newline at end of file

© 2014-2024 Faster IT GmbH | imprint | privacy policy