aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2009-01-02 07:12:12 +0000
committerJim Hu <jimhu@users.sourceforge.net>2009-01-02 07:12:12 +0000
commitc60246816752a18ba37b8f3508799acd17686b30 (patch)
treeb010ee90fb0b568bd3a84f4f4c52b18b80d0645a /functions
parent281d63eedb805ec330a5572b85f48896981fca16 (diff)
downloadphpicalendar-c60246816752a18ba37b8f3508799acd17686b30.tar.gz
phpicalendar-c60246816752a18ba37b8f3508799acd17686b30.tar.bz2
phpicalendar-c60246816752a18ba37b8f3508799acd17686b30.zip
add download event to event popup
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php4
-rw-r--r--functions/init.inc.php6
-rw-r--r--functions/parse/end_vevent.php3
-rw-r--r--functions/parse/parse_tzs.php5
4 files changed, 13 insertions, 5 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 5e1afc6..aaaba93 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -126,7 +126,6 @@ foreach ($cal_filelist as $cal_key=>$filename) {
$nextline = ereg_replace("[\r\n]", "", $nextline);
}
$line = trim(stripslashes($line));
-
switch ($line) {
case 'BEGIN:VFREEBUSY':
case 'BEGIN:VEVENT':
@@ -150,6 +149,7 @@ foreach ($cal_filelist as $cal_key=>$filename) {
$url = '';
$geo = '';
$type = '';
+ $other = '';
$wkst = 'MO';
$except_dates = array();
@@ -440,6 +440,8 @@ foreach ($cal_filelist as $cal_key=>$filename) {
case 'URL':
$url = $data;
break;
+ default:
+ if(strpos(':',$data) > 1) $other .= $data;
}
}
}
diff --git a/functions/init.inc.php b/functions/init.inc.php
index 1b227cc..8ca11f6 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -1,7 +1,11 @@
<?php
+# require php 5
$php_started = getmicrotime();
# define BASE
if (!defined('BASE')) define('BASE', './');
+if (phpversion() < '5.1'){
+ die (phpversion()." detected. php 5.1 or higher required for this version.\n\n" );
+}
include_once(BASE.'functions/init/sanitize.php');
include_once(BASE.'functions/init/set_error_reporting.php');
include_once(BASE.'functions/init/configs.php');
@@ -11,8 +15,6 @@ include_once(BASE.'error.php');
include_once(BASE.'functions/calendar_functions.php');
include_once(BASE.'functions/userauth_functions.php');
-# require php 5
-if (phpversion() < '5.1') die (error(sprintf($lang['l_php_version_required'],phpversion()) ) );
// Grab the action (login or logout).
$action = '';
if (isset($_GET['action'])) $action = $_GET['action'];
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php
index 9f2e603..addca3a 100644
--- a/functions/parse/end_vevent.php
+++ b/functions/parse/end_vevent.php
@@ -334,10 +334,13 @@ foreach($recur_data as $recur_data_unixtime) {
'class' => $class,
'spans_day' => $spans_day,
'location' => $location,
+ 'categories' => $vtodo_categories,
'organizer' => serialize($organizer),
'attendee' => serialize($attendee),
'calnumber' => $calnumber,
'calname' => $actual_calname,
+ 'timezone' => $start_tz,
+ 'other' => trim($other),
'geo' => $geo,
'url' => $url,
'recur' => $recur
diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php
index 8b02cb5..fb250b2 100644
--- a/functions/parse/parse_tzs.php
+++ b/functions/parse/parse_tzs.php
@@ -43,9 +43,10 @@ while (!feof($ifile)) {
$is_daylight = false;
break;
case 'END:VTIMEZONE':
+ if (!isset($offset_d) && isset($offset_s)) $offset_d = $offset_s;
$tz_array[$tz_id] = array(
- 0 => $offset_s,
- 1 => $offset_d,
+ 0 => @$offset_s,
+ 1 => @$offset_d,
'dt_start' => @$begin_daylight,
'st_start' => @$begin_std,
'st_name' => @$st_name,

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