From 9cc4b1667897ac0e9db28044d96e7b96a7ac38e5 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sat, 20 Dec 2008 00:33:14 +0000 Subject: misc minor fixes --- day.php | 4 ++-- functions/init/date_range.php | 2 +- functions/list_functions.php | 4 ++-- functions/parse/parse_tzs.php | 8 ++++---- print.php | 20 ++++++++++---------- templates/default/header.tpl | 2 +- templates/green/header.tpl | 6 +++++- templates/grey/header.tpl | 6 +++++- templates/red/header.tpl | 6 +++++- templates/tan/header.tpl | 6 +++++- week.php | 2 +- 11 files changed, 41 insertions(+), 25 deletions(-) diff --git a/day.php b/day.php index 7ed31ea..932b6c1 100644 --- a/day.php +++ b/day.php @@ -19,7 +19,7 @@ if ($phpiCal_config->minical_view == 'current') $minical_view = 'day'; $weekstart = 1; $unix_time = strtotime($getdate); -$today_today = date('Ymd', time() + $second_offset); +$today_today = date('Ymd', time() + $phpiCal_config->second_offset); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); $prev_day = date('Ymd', strtotime("-1 day", $unix_time)); @@ -86,7 +86,7 @@ $page->replace_tags(array( 'list_weeks' => $list_weeks, 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, - 'style_select' => $style_select, + 'style_select' => @$style_select, 'l_goprint' => $lang['l_goprint'], 'l_preferences' => $lang['l_preferences'], 'l_calendar' => $lang['l_calendar'], diff --git a/functions/init/date_range.php b/functions/init/date_range.php index 78b0db5..d7e4235 100644 --- a/functions/init/date_range.php +++ b/functions/init/date_range.php @@ -3,7 +3,7 @@ if (!isset($getdate)) { if (isset($_GET['getdate']) && ($_GET['getdate'] !== '')) { $getdate = $_GET['getdate']; } else { - $getdate = date('Ymd', time() + $second_offset); + $getdate = date('Ymd', time() + $phpIcal_config->second_offset); } } diff --git a/functions/list_functions.php b/functions/list_functions.php index 0ec2474..2775059 100644 --- a/functions/list_functions.php +++ b/functions/list_functions.php @@ -1,9 +1,9 @@ second_offset); $return = ''; $return .= ''; $return .= ''; diff --git a/functions/parse/parse_tzs.php b/functions/parse/parse_tzs.php index daafe33..c431d29 100644 --- a/functions/parse/parse_tzs.php +++ b/functions/parse/parse_tzs.php @@ -46,10 +46,10 @@ while (!feof($ifile)) { $tz_array[$tz_id] = array( 0 => $offset_s, 1 => $offset_d, - 'dt_start' => $begin_daylight, - 'st_start' => $begin_std, - 'st_name' => $st_name, - 'dt_name' => $dt_name + 'dt_start' => @$begin_daylight, + 'st_start' => @$begin_std, + 'st_name' => @$st_name, + 'dt_name' => @$dt_name ); #echo "
$tz_id"; print_r($tz_array[$tz_id]);echo"
"; break; diff --git a/print.php b/print.php index 3880cd2..804bfe5 100644 --- a/print.php +++ b/print.php @@ -47,22 +47,22 @@ header("Content-Type: text/html; charset=$charset"); $page = new Page(BASE.'templates/'.$template.'/print.tpl'); $page->replace_files(array( - 'header' => BASE.'templates/'.$template.'/header.tpl', - 'footer' => BASE.'templates/'.$template.'/footer.tpl', - 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl' + 'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl', + 'footer' => BASE.'templates/'.$phpiCal_config->template.'/footer.tpl', + 'sidebar' => BASE.'templates/'.$phpiCal_config->template.'/sidebar.tpl' )); $page->replace_tags(array( - 'version' => $phpicalendar_version, + 'version' => $phpiCal_config->phpicalendar_version, 'event_js' => '', - 'charset' => $charset, - 'default_path' => '', - 'template' => $template, + 'charset' => $phpiCal_config->charset, + 'default_path' => $phpiCal_config->default_path, + 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $cal_displayname, 'current_view' => $current_view, - 'printview' => $printview, + 'printview' => $printview, 'display_date' => $display_date, 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, @@ -79,7 +79,7 @@ $page->replace_tags(array( 'list_weeks' => $list_weeks, 'list_jumps' => $list_jumps, 'legend' => $list_calcolors, - 'style_select' => $style_select, + 'style_select' => @$style_select, 'l_time' => $lang['l_time'], 'l_summary' => $lang['l_summary'], 'l_description' => $lang['l_description'], @@ -88,7 +88,7 @@ $page->replace_tags(array( 'l_week' => $lang['l_week'], 'l_month' => $lang['l_month'], 'l_year' => $lang['l_year'], - 'l_location' => $lang['l_location'], + 'l_location' => $lang['l_location'], 'l_subscribe' => $lang['l_subscribe'], 'l_download' => $lang['l_download'], 'l_no_results' => $lang['l_no_results'], diff --git a/templates/default/header.tpl b/templates/default/header.tpl index 884b5fc..d8e07dc 100644 --- a/templates/default/header.tpl +++ b/templates/default/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + diff --git a/templates/green/header.tpl b/templates/green/header.tpl index 07837a9..d8e07dc 100644 --- a/templates/green/header.tpl +++ b/templates/green/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + @@ -18,3 +18,7 @@ + diff --git a/templates/grey/header.tpl b/templates/grey/header.tpl index 07837a9..d8e07dc 100644 --- a/templates/grey/header.tpl +++ b/templates/grey/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + @@ -18,3 +18,7 @@ + diff --git a/templates/red/header.tpl b/templates/red/header.tpl index 07837a9..d8e07dc 100644 --- a/templates/red/header.tpl +++ b/templates/red/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + @@ -18,3 +18,7 @@ + diff --git a/templates/tan/header.tpl b/templates/tan/header.tpl index 07837a9..d8e07dc 100644 --- a/templates/tan/header.tpl +++ b/templates/tan/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + @@ -18,3 +18,7 @@ + diff --git a/week.php b/week.php index 1807eb7..4f9ddbd 100644 --- a/week.php +++ b/week.php @@ -10,7 +10,7 @@ if ($phpiCal_config->minical_view == "current") $minical_view = "week"; $starttime = "0500"; $weekstart = 1; $unix_time = strtotime($getdate); -$today_today = date('Ymd', time() + $second_offset); +$today_today = date('Ymd', time() + $phpiCal_config->second_offset); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); $next_day = date('Ymd', strtotime("+1 day", $unix_time)); -- cgit v1.2.3