From a5a46dade4e2db652798c1d6fa8a0cc21a5d84f0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sat, 30 Nov 2002 20:33:30 +0000 Subject: Patches applied, added prefs_lang. --- includes/sidebar.php | 35 +++++++++++---------- includes/todo.php | 86 ++++++++++++++++++++++++++++------------------------ 2 files changed, 65 insertions(+), 56 deletions(-) (limited to 'includes') diff --git a/includes/sidebar.php b/includes/sidebar.php index 663ff8b..948bce5 100644 --- a/includes/sidebar.php +++ b/includes/sidebar.php @@ -218,32 +218,35 @@ if ((isset($master_array['-2'])) && ($show_todos == 'yes')) { ?> $vtodo_text = stripslashes(urldecode($val["vtodo_text"])); $vtodo_text = strip_tags($vtodo_text, ''); if ($vtodo_text != "") { - $vtodo_text2 = rawurlencode(addslashes($val["vtodo_text"])); - $description = addslashes(urlencode($val["description"])); - $completed = $val['completed_date']; - if(isset($completed)) $completed = localizeDate($dateFormat_day, strtotime($completed)); + $description = $val["description"]; + $completed_date = $val['completed_date']; $status = $val["status"]; - if ((!isset($status) || $status == "COMPLETED") && isset($completed)) $status = $completed_lang . $completed; - $priority = $val['priority']; - $start_date = $val["start_date"]; - $start_date = localizeDate ($dateFormat_day, strtotime($start_date)); - if(isset($val['due_date']) && strtotime($val['due_date']) != strtotime("+1 year",strtotime($start_date))) $due_date = localizeDate ($dateFormat_day, strtotime($val['due_date'])); - else $due_date = ''; + $due_date = $val['due_date']; + $vtodo_array = array( + 'calendar_name' => $calendar_name, + 'completed_date'=> $completed_date, + 'description' => $description, + 'due_date' => $due_date, + 'priority' => $priority, + 'start_date' => $start_date, + 'status' => $status, + 'vtodo_text' => $vtodo_text); - $calendar_name2 = addslashes($calendar_name); - $calendar_name2 = urlencode($calendar_name2); - $vtodo_text = word_wrap($vtodo_text, 21, $tomorrows_events_lines); + $vtodo_array = base64_encode(serialize($vtodo_array)); + + $vtodo_text = word_wrap($vtodo_text, 21, $tomorrows_events_lines); + if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { if ($show_completed == 'yes') { $vtodo_text = "$vtodo_text"; - echo "\"\" $vtodo_text
\n"; + echo "\"\" $vtodo_text
\n"; } } elseif (isset($val['priority']) && ($val['priority'] != 0) && ($val['priority'] <= 5)) { - echo "\"\" $vtodo_text
\n"; + echo "\"\" $vtodo_text
\n"; } else { - echo "\"\" $vtodo_text
\n"; + echo "\"\" $vtodo_text
\n"; } } } diff --git a/includes/todo.php b/includes/todo.php index a47e3e0..ae0cc9d 100644 --- a/includes/todo.php +++ b/includes/todo.php @@ -1,66 +1,72 @@ = 1 && $priority <= 4) { + $priority = $priority_high_lang; + } else if ($priority == 5) { + $priority = $priority_medium_lang; + } else if ($priority >= 6 && $priority <= 9) { + $priority = $priority_low_lang; + } else { + $priority = $priority_none_lang; + } } else { - $priority = $no_priority_lang; + $priority = $priority_none_lang; } -$vtodo = rawurldecode($vtodo); -$vtodo = stripslashes($vtodo); -$vtodo = str_replace('\\', '', $vtodo); -//$vtodo = htmlspecialchars($vtodo); -$description = rawurldecode($description); -$description = stripslashes($description); -$description = str_replace('\\', '', $description); -//$description = htmlspecialchars($description); -$calendar_name = rawurldecode($calendar_name); -$calendar_name = stripslashes($calendar_name); -$calendar_name = str_replace('\\', '', $calendar_name); -//$calendar_name = htmlspecialchars($calendar_name); -$status = rawurldecode($status); -$status = stripslashes($status); -$status = str_replace('\\', '', $status); -//$status = htmlspecialchars($status); ?> @@ -85,7 +91,7 @@ $status = str_replace('\\', '', $status); - + @@ -110,13 +116,13 @@ $status = str_replace('\\', '', $status); - + - + - + -- cgit v1.2.3
[:space:]]+[[:alnum:]/]",'\0',$vtodo).'

'; ?>
[:space:]]+[[:alnum:]/]",'\0',$vtodo_text).'

'; ?>