diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-12-18 06:06:18 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-12-18 06:06:18 +0000 |
commit | 7106889b7f21ce1ee4b4b5be97c80f90732fd03b (patch) | |
tree | 112ba23458ac4cbb82dc6124f74fc268f84fcf4c /functions | |
parent | 6836dee9183062225cf3095cafc07f5fe928af13 (diff) | |
download | phpicalendar-7106889b7f21ce1ee4b4b5be97c80f90732fd03b.tar.gz phpicalendar-7106889b7f21ce1ee4b4b5be97c80f90732fd03b.tar.bz2 phpicalendar-7106889b7f21ce1ee4b4b5be97c80f90732fd03b.zip |
Added a fix for dates before 1969 and initd some variables for E_ALL.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/ical_parser.php | 7 | ||||
-rw-r--r-- | functions/init.inc.php | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index cb2a432..332d71a 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -107,6 +107,8 @@ foreach ($cal_filelist as $filename) { $valarm_set = FALSE; $attendee = array(); $organizer = array(); + $url = ''; + $display_end_tmp = ''; unset( $until, $bymonth, $byday, $bymonthday, $byweek, $byweekno, @@ -866,6 +868,11 @@ foreach ($cal_filelist as $filename) { $data = ereg_replace('Z', '', $data); $field = ereg_replace(';VALUE=DATE-TIME', '', $field); if (preg_match("/^DTEND;VALUE=DATE/i", $field)) { + ereg ('([0-9]{4})([0-9]{2})([0-9]{2})', $data, $dtend_check); + if ($dtstart_check[1] < 1969) { + $dtstart_check[1] = '1990'; + $data = $dtend_check[1].$dtend_check[2].$dtend_check[3]; + } $allday_end = $data; } else { if (preg_match("/^DTEND;TZID=/i", $field)) { diff --git a/functions/init.inc.php b/functions/init.inc.php index c6c623c..2cd1802 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -6,7 +6,7 @@ //chmod(BASE.'calendars/School.ics',0666); // uncomment when developing, comment for shipping version -// error_reporting (E_ERROR | E_WARNING | E_PARSE); +error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Older versions of PHP do not define $_SERVER. Define it here instead. if (!isset($_SERVER) && isset($HTTP_SERVER_VARS)) { @@ -21,6 +21,7 @@ if (!defined('BASE')) define('BASE', './'); include_once(BASE.'config.inc.php'); include_once(BASE.'functions/error.php'); include_once(BASE.'functions/calendar_functions.php'); +$filename = ''; if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { $phpicalendar = unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar'])); if (isset($phpicalendar['cookie_language'])) $language = $phpicalendar['cookie_language']; |