aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-20 03:22:54 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-20 03:22:54 +0000
commit9b00469b471a8b159c60ecca333f0f7064ba1d27 (patch)
treee4716278c994d577c67a9bf3887c453c56b67030 /includes
parent3734188aa20c0fad1610e5de3078d7d022694bbd (diff)
downloadphpicalendar-9b00469b471a8b159c60ecca333f0f7064ba1d27.tar.gz
phpicalendar-9b00469b471a8b159c60ecca333f0f7064ba1d27.tar.bz2
phpicalendar-9b00469b471a8b159c60ecca333f0f7064ba1d27.zip
misc error warnings and notices
Diffstat (limited to 'includes')
-rw-r--r--includes/event.php23
-rw-r--r--includes/todo.php10
2 files changed, 18 insertions, 15 deletions
diff --git a/includes/event.php b/includes/event.php
index c8c5865..faedd21 100644
--- a/includes/event.php
+++ b/includes/event.php
@@ -1,4 +1,5 @@
<?php
+$current_view = "event";
define('BASE', '../');
#$getdate = $_POST['date'];
include_once(BASE.'functions/init.inc.php');
@@ -29,21 +30,23 @@ if ($_POST['time'] == -1) {
$event['description'] = stripslashes(utf8_decode(urldecode($event['description'])));
$event['event_text'] = stripslashes(utf8_decode(urldecode($event['event_text'])));
$event['location'] = stripslashes(utf8_decode(urldecode($event['location'])));
-
+$display ='';
if ($event['description']) $event['description'] = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$event['description']);
-if (is_array($organizer)) {
+$organizer = '';
+if (isset($organizer) && is_array($organizer)) {
$i=0;
- $display .= $organizer_lang . ' - ';
+ $display .= $lang['l_organizer'] . ' - ';
foreach ($organizer as $val) {
$organizers .= $organizer[$i]["name"] . ', ';
$i++;
}
$organizer = substr($organizers,0,-2);
}
-if (is_array($attendee)) {
+$attendees = '';
+if (isset($attendee) && is_array($attendee)) {
$i=0;
- $display .= $attendee_lang . ' - ';
+ $display .= $lang['l_attendee'] . ' - ';
foreach ($attendee as $val) {
$attendees .= $attendee[$i]["name"] . ', ';
$i++;
@@ -51,13 +54,13 @@ if (is_array($attendee)) {
$attendee = substr($attendees,0,-2);
}
-if ($event['location']) {
+if (isset($event['location'])) {
if ($event['url'] != '') $event['location'] = '<a href="'.$event['url'].'" target="_blank">'.stripslashes($event['location']).'</a>';
}else{
$event['location'] = stripslashes($event['location']);
}
-if (!$event['location'] && $event['url']) {
+if (!isset($event['location']) && isset($event['url'])) {
$event['location'] = '<a href="'.$event['url'].'" target="_blank">'.$event['url'].'</a>';
$lang['l_location'] = 'URL';
}
@@ -79,10 +82,10 @@ switch ($event['status']){
$event['status'] = '' ;
}
-$page = new Page(BASE.'templates/'.$template.'/event.tpl');
+$page = new Page(BASE.'templates/'.$phpiCal_config->template.'/event.tpl');
$page->replace_tags(array(
- 'charset' => $charset,
+ 'charset' => $phpiCal_config->charset,
'cal' => $event['calname'],
'event_text' => $event['event_text'],
'event_times' => $event_times,
@@ -92,7 +95,7 @@ $page->replace_tags(array(
'status' => $event['status'],
'location' => stripslashes($event['location']),
'cal_title_full' => $event['calname'].' '.$lang['l_calendar'],
- 'template' => $template,
+ 'template' => $phpiCal_config->template,
'l_organizer' => $lang['l_organizer'],
'l_attendee' => $lang['l_attendee'],
'l_status' => $lang['l_status'],
diff --git a/includes/todo.php b/includes/todo.php
index 6823405..1cefcdc 100644
--- a/includes/todo.php
+++ b/includes/todo.php
@@ -4,7 +4,7 @@ define('BASE', '../');
include_once(BASE.'functions/init.inc.php');
include_once(BASE.'functions/date_functions.php');
require_once(BASE.'functions/template.php');
-
+$current_view = 'todo';
$vtodo_array = unserialize(urldecode(base64_decode($_REQUEST['todo_data'])));
// Set the variables from the array
@@ -25,9 +25,9 @@ $vtodo_text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a tar
if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) {
$status = $lang['l_completed_date'] . ' ' . $completed_date;
} elseif ($status == "COMPLETED") {
- $status = $completed_lang;
+ $status = $lang['l_completed'];
} else {
- $status = $unfinished_lang;
+ $status = $lang['l_unfinished'];
}
if ($priority >= 1 && $priority <= 4) {
@@ -43,7 +43,7 @@ if ($priority >= 1 && $priority <= 4) {
$page = new Page(BASE.'templates/'.$template.'/todo.tpl');
$page->replace_tags(array(
- 'charset' => $charset,
+ 'charset' => $phpiCal_config->charset,
'cal' => $cal_title_full,
'vtodo_text' => $vtodo_text,
'description' => $description,
@@ -52,7 +52,7 @@ $page->replace_tags(array(
'status' => $status,
'due_date' => $due_date,
'cal_title_full' => $cal_title_full,
- 'template' => $template,
+ 'template' => $phpiCal_config->template,
'l_created' => $lang['l_created'],
'l_priority' => $lang['l_priority'],
'l_status' => $lang['l_status'],

© 2014-2024 Faster IT GmbH | imprint | privacy policy