diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-09-26 04:46:37 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-09-26 04:46:37 +0000 |
commit | 9368e6aa4e5eb0d6254878c1926d5040cc278c02 (patch) | |
tree | 8ab19ba81c26b2d84d3246b718a78085913331cf /ical_parser.php | |
parent | d547caf72456b27a2898590b7e8398661fdf1b8b (diff) | |
download | phpicalendar-9368e6aa4e5eb0d6254878c1926d5040cc278c02.tar.gz phpicalendar-9368e6aa4e5eb0d6254878c1926d5040cc278c02.tar.bz2 phpicalendar-9368e6aa4e5eb0d6254878c1926d5040cc278c02.zip |
fixed alarm notifications screwing with duration.
Diffstat (limited to 'ical_parser.php')
-rw-r--r-- | ical_parser.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ical_parser.php b/ical_parser.php index b1036e8..b4aba00 100644 --- a/ical_parser.php +++ b/ical_parser.php @@ -61,7 +61,7 @@ foreach($contents as $line) { $number = ""; $except_dates = array(); $except_times = array(); - $the_duration = TRUE; + $first_duration = TRUE; } elseif (strstr($line, "END:VEVENT")) { // Clean out \n's and other slashes @@ -400,7 +400,8 @@ foreach($contents as $line) { $allday_end = $data; } elseif (strstr($field, "DURATION")) { - if ($first_duration = TRUE) { + + if (($first_duration = TRUE) && (!strstr($field, "=DURATION"))) { ereg ("^P([0-9]{1,2})?([W,D]{0,1})?(T)?([0-9]{1,2})?(H)?([0-9]{1,2})?(M)?([0-9]{1,2})?(S)?", $data, $duration); if ($duration[2] = "W") { $weeks = $duration[1]; |