aboutsummaryrefslogtreecommitdiffstats
path: root/ical_parser.php
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-10-01 09:33:11 +0000
committerjwangen <jwangen>2002-10-01 09:33:11 +0000
commit1c834d42efd75524233e1f6517e3a1cb06f6dfde (patch)
tree9d15bb0a648ac8b1ff757bced351fac7e2ec6da8 /ical_parser.php
parenta814000ee630c3fef19d952500a8b94f332b78c2 (diff)
downloadphpicalendar-1c834d42efd75524233e1f6517e3a1cb06f6dfde.tar.gz
phpicalendar-1c834d42efd75524233e1f6517e3a1cb06f6dfde.tar.bz2
phpicalendar-1c834d42efd75524233e1f6517e3a1cb06f6dfde.zip
Fixed bug where an all-day event would also get written as a regular event.
Diffstat (limited to 'ical_parser.php')
-rw-r--r--ical_parser.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/ical_parser.php b/ical_parser.php
index cb1c2d4..74ac113 100644
--- a/ical_parser.php
+++ b/ical_parser.php
@@ -59,7 +59,8 @@ foreach($contents as $line) {
if (strstr($line, "BEGIN:VEVENT")) {
$start_time = "";
$end_time = "";
- $end_day = "";
+ $start_date = "";
+ $end_date = "";
$summary = "";
$allday_start = "";
$allday_end = "";
@@ -509,7 +510,7 @@ foreach($contents as $line) {
}
// Let's write all the data to the master array
- if ($start_time != "") {
+ if (($start_time != "") && ($allday_start == "")) {
// check for overlapping events
$nbrOfOverlaps = checkOverlap();
@@ -549,7 +550,7 @@ foreach($contents as $line) {
$hour = $regs[4];
$minute = $regs[5];
- $end_day = $year . $month . $day;
+ $end_date = $year . $month . $day;
$end_time = $hour . $minute;
} elseif (strstr($field, "EXDATE;TZID")) {

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