diff options
author | Chad Little <clittle@users.sourceforge.net> | 2005-08-30 19:11:00 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2005-08-30 19:11:00 +0000 |
commit | 42913b2b129d400a6a1501aa3d4f36c059f515b7 (patch) | |
tree | 1447e0f82af34c8dfa3cc821fcd73faa5e75d7e5 | |
parent | 7b75d14fb7c3975baaa2b0ccf2708a12803c4c5b (diff) | |
download | phpicalendar-42913b2b129d400a6a1501aa3d4f36c059f515b7.tar.gz phpicalendar-42913b2b129d400a6a1501aa3d4f36c059f515b7.tar.bz2 phpicalendar-42913b2b129d400a6a1501aa3d4f36c059f515b7.zip |
Fixed event URL popups.
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | includes/event.php | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -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:]/]",'<a target="_new" href="\0">\0</a>',$event['description']); if (is_array($organizer)) { @@ -48,6 +52,11 @@ if ($event['location']) { if ($event['url'] != '') $event['location'] = '<a href="'.$event['url'].'" target="_blank">'.$event['location'].'</a>'; } +if (!$event['location'] && $event['url']) { + $event['location'] = '<a href="'.$event['url'].'" target="_blank">'.$event['url'].'</a>'; + $lang['l_location'] = 'URL'; +} + if (sizeof($attendee) == 0) $attendee = ''; if (sizeof($organizer) == 0) $organizer = ''; |