From 2fb022abbfa5eeac033992841ca11d9642bc4508 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 12 Dec 2008 00:08:47 +0000 Subject: fix calendar path bug in initialization --- day.php | 2 +- functions/init/cpaths.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/day.php b/day.php index 8f45cab..af03d4f 100644 --- a/day.php +++ b/day.php @@ -55,7 +55,7 @@ $page->replace_files(array( $page->replace_tags(array( 'version' => $phpiCal_config->phpicalendar_version, 'charset' => $phpiCal_config->charset, - 'default_path' => '', + 'default_path' => $phpiCal_config->default_path, 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/functions/init/cpaths.php b/functions/init/cpaths.php index fafc0ec..bcf2c11 100644 --- a/functions/init/cpaths.php +++ b/functions/init/cpaths.php @@ -1,8 +1,14 @@ default_path == '') { + $phpiCal_config->setProperty('default_path', BASE); +} + #cpath modifies the calendar path based on the url or cookie values. This allows you to run multiple calendar subsets from a single phpicalendar installation. Operations on cpath are largely hidden from the end user. if ($phpiCal_config->calendar_path == '') { - $calendar_path = BASE.'calendars'; -}else $calendar_path = $phpiCal_config->calendar_path; + $phpiCal_config->setProperty('calendar_path', BASE.'calendars'); +} +$calendar_path = $phpiCal_config->calendar_path; $cpath = ''; #initialize cpath to prevent later undef warnings. if(isset($_REQUEST['cpath'])&& $_REQUEST['cpath'] !=''){ $cpath = str_replace('..','',$_REQUEST['cpath']); -- cgit v1.2.3