From a02ca8fd76dfa6b0f280780f76fb9bfce5a9fd36 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 26 Dec 2008 16:59:10 +0000 Subject: eliminate negative event lengths and adjust display lengths for short events --- includes/event.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'includes') diff --git a/includes/event.php b/includes/event.php index d5ac529..fe03042 100644 --- a/includes/event.php +++ b/includes/event.php @@ -43,20 +43,10 @@ if (isset($attendee) && is_array($attendee)) { } $attendee = implode(', ',$attendees); } - -if (isset($event['location'])) { - if ($event['url'] != '') $event['location'] = ''.stripslashes($event['location']).''; -}else{ - $event['location'] = stripslashes($event['location']); -} - -if (!isset($event['location']) && isset($event['url'])) { - $event['location'] = ''.$event['url'].''; - $lang['l_location'] = 'URL'; -} - +if (isset($event['location'])) $event['location'] = stripslashes($event['location']); if (sizeof($attendee) == 0) $attendee = ''; if (sizeof($organizer) == 0) $organizer = ''; +if ($event['url'] != '') $event['url'] = ''.$event['url'].''; switch ($event['status']){ case 'CONFIRMED': @@ -83,7 +73,8 @@ $page->replace_tags(array( 'organizer' => $organizer, 'attendee' => $attendee, 'status' => $event['status'], - 'location' => stripslashes($event['location']), + 'location' => $event['location'], + 'url' => $event['url'], 'cal_title_full' => $event['calname'].' '.$lang['l_calendar'], 'template' => $phpiCal_config->template, 'l_summary' => $lang['l_summary'], @@ -91,7 +82,8 @@ $page->replace_tags(array( 'l_organizer' => $lang['l_organizer'], 'l_attendee' => $lang['l_attendee'], 'l_status' => $lang['l_status'], - 'l_location' => $lang['l_location'] + 'l_location' => $lang['l_location'], + 'l_url' => $lang['l_url'] )); -- cgit v1.2.3