From 42913b2b129d400a6a1501aa3d4f36c059f515b7 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 30 Aug 2005 19:11:00 +0000 Subject: Fixed event URL popups. --- README | 2 +- includes/event.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README b/README index 7e9457c..5bad012 100644 --- a/README +++ b/README @@ -81,7 +81,7 @@ COPYING for more information about our license. Changes: -------- -2.0 +2.0 c -Enhanced error messaging system. -New Open Source Documentation. http://phpicalendar.net/documentation diff --git a/includes/event.php b/includes/event.php index 3d97fca..2d2de38 100644 --- a/includes/event.php +++ b/includes/event.php @@ -11,6 +11,8 @@ function decode_popup ($item) { return $item; } + + $event = $master_array[$_POST['date']][$_POST['time']][decode_popup($_POST['uid'])]; $organizer = unserialize($event['organizer']); $attendee = unserialize($event['attendee']); @@ -23,6 +25,8 @@ if ($_POST['time'] == -1) { $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . date($timeFormat, $event['end_unixtime']); } +$event['description'] = urldecode($event['description']); + if ($event['description']) $event['description'] = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$event['description']); if (is_array($organizer)) { @@ -48,6 +52,11 @@ if ($event['location']) { if ($event['url'] != '') $event['location'] = ''.$event['location'].''; } +if (!$event['location'] && $event['url']) { + $event['location'] = ''.$event['url'].''; + $lang['l_location'] = 'URL'; +} + if (sizeof($attendee) == 0) $attendee = ''; if (sizeof($organizer) == 0) $organizer = ''; -- cgit v1.2.3