From 9ad3203bf87da355f14ce1f10815b50386308dee Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 16 Feb 2007 06:25:42 +0000 Subject: fixes for 1634128 and allow passing event data via request instead of just post --- config.inc.php | 2 +- includes/event.php | 9 ++++----- rss/rss.php | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config.inc.php b/config.inc.php index c24709f..1253283 100644 --- a/config.inc.php +++ b/config.inc.php @@ -26,7 +26,7 @@ $second_offset = ''; // The time in seconds between your time and your serv $bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. $cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. $download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. -$default_path = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar +$default_path = 'http://localhost/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, or iso-8859-1 for most languages. // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. diff --git a/includes/event.php b/includes/event.php index ee7870a..4a2c9a4 100644 --- a/includes/event.php +++ b/includes/event.php @@ -11,10 +11,8 @@ function decode_popup ($item) { return $item; } - - #$event = $master_array[$_POST['date']][$_POST['time']][decode_popup($_POST['uid'])]; -$event = unserialize(stripslashes($_POST['event_data'])); +$event = unserialize(stripslashes($_REQUEST['event_data'])); $organizer = unserialize($event['organizer']); $attendee = unserialize($event['attendee']); @@ -26,8 +24,9 @@ if ($_POST['time'] == -1) { $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . date($timeFormat, $event['end_unixtime']); } -$event['description'] = stripslashes(urldecode($event['description'])); -$event['event_text'] = stripslashes(urldecode($event['event_text'])); +$event['description'] = stripslashes(utf8_decode(urldecode($event['description']))); +$event['event_text'] = stripslashes(utf8_decode(urldecode($event['event_text']))); +$event['location'] = stripslashes(utf8_decode(urldecode($event['location']))); if ($event['description']) $event['description'] = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$event['description']); diff --git a/rss/rss.php b/rss/rss.php index a480465..6062b8f 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -188,7 +188,8 @@ $uid_arr = array(); $rss_title = urldecode ("$dayofweek: $event_text"); - $rss_link = "$default_path/day.php?getdate=$thisdate&cal=$cal"; + $event_data = serialize($val); + $rss_link = "$default_path/event.php?getdate=$thisdate&cal=$cal&event_data=$event_data"; if (isset($cpath) && $cpath !='') $rss_link.="&cpath=$cpath"; $rss_description = htmlspecialchars ("$dayofweek $event_start: $description"); -- cgit v1.2.3