From 4bb8ac11b86112928d013e8fae12e7542a732626 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 22 Oct 2002 18:30:13 +0000 Subject: Fixed bugs in description java pop-up, also set rtrim to ereg_replace for testing. --- config.inc.php | 2 +- day.php | 4 ++-- functions/ical_parser.php | 4 ++-- month_bottom.php | 2 +- sidebar.php | 2 +- week.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config.inc.php b/config.inc.php index de95457..1c386c3 100644 --- a/config.inc.php +++ b/config.inc.php @@ -5,7 +5,7 @@ // To set values, change the text between the single quotes // Follow instructions to the right for detailed information -$style_sheet = 'tan'; // Themes support +$style_sheet = 'silver'; // Themes support $calendar_path = './calendars'; // Path to directory with calendars $default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year' $minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' diff --git a/day.php b/day.php index d79f70c..91c1145 100644 --- a/day.php +++ b/day.php @@ -95,7 +95,7 @@ if (is_array($master_array[($getdate)])) { echo ''."\n"; foreach($master_array[($getdate)]['-1'] as $allday) { $event_text = stripslashes(urldecode($allday['event_text'])); - $description = $allday['description']; + $description = addslashes(urlencode($allday['description'])); $event_text2 = rawurlencode(addslashes($allday['event_text'])); echo ''."\n"; @@ -178,7 +178,7 @@ if (is_array($master_array[($getdate)])) { $event_text2 = rawurlencode(addslashes($master_array[($getdate)][$cal_time][($event_length[$i]['key'])]['event_text'])); $event_start = strtotime ($master_array[($getdate)][$cal_time][($event_length[$i]['key'])]['event_start']); $event_end = strtotime ($master_array[($getdate)][$cal_time][($event_length[$i]['key'])]['event_end']); - $description = rawurlencode(addslashes($master_array[($getdate)][$cal_time][($event_length[$i]['key'])]['description'])); + $description = addslashes(urlencode($master_array[($getdate)][$cal_time][($event_length[$i]['key'])]['description'])); $event_start = date ($timeFormat, $event_start); $event_end = date ($timeFormat, $event_end); $calendar_name2 = rawurlencode(addslashes($calendar_name)); diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 13fef3e..6d0f424 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -69,11 +69,11 @@ if ($parse_file) { while (!feof($ifile)) { $line = $nextline; $nextline = fgets($ifile, 1024); - $nextline = @rtrim($nextline, "\r\n"); + $nextline = ereg_replace("\r\n", "", $nextline); while (substr($nextline, 0, 1) == " ") { $line = $line . substr($nextline, 1); $nextline = fgets($ifile, 1024); - $nextline = @rtrim($nextline, "\r\n"); + $nextline = ereg_replace("\r\n", "", $nextline); } $line = trim($line); if (stristr($line, 'BEGIN:VEVENT')) { diff --git a/month_bottom.php b/month_bottom.php index 8dec8fc..62b21f4 100644 --- a/month_bottom.php +++ b/month_bottom.php @@ -364,7 +364,7 @@ $event_text2 = addslashes($new_val2["event_text"]); $event_text2 = str_replace("\"", """, $event_text2); $event_text2 = urlencode($event_text2); - $description = addslashes($new_val2["description"]); + $description = addslashes(urlencode($new_val2["description"])); $description = str_replace("\"", """, $description); $event_start = $new_val2["event_start"]; $event_end = $new_val2["event_end"]; diff --git a/sidebar.php b/sidebar.php index cbf083a..7b3415d 100644 --- a/sidebar.php +++ b/sidebar.php @@ -172,7 +172,7 @@ $event_text = strip_tags($event_text, ''); if ($event_text != "") { $event_text2 = rawurlencode(addslashes($val["event_text"])); - $description = urlencode(addslashes($val["description"])); + $description = addslashes(urlencode($val["description"])); $event_start = @$val["event_start"]; $event_end = @$val["event_end"]; $event_start = date ($timeFormat, @strtotime ("$event_start")); diff --git a/week.php b/week.php index 995db61..9106d94 100644 --- a/week.php +++ b/week.php @@ -176,7 +176,7 @@ for ($i=0;$i<7;$i++) { $all_day_text = stripslashes(urldecode($allday["event_text"])); $event_text2 = urlencode(addslashes($all_day_text)); $all_day_text = word_wrap($all_day_text, 12, $allday_week_lines); - $description = $allday["description"]; + $description = addslashes(urlencode($allday["description"])); echo "\n"; echo "\n"; echo "\n"; -- cgit v1.2.3
$all_day_text