diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-12 00:08:47 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-12 00:08:47 +0000 |
commit | 2fb022abbfa5eeac033992841ca11d9642bc4508 (patch) | |
tree | 10a77d8745a6b5c5272a5463f22cccaa5a2712a5 | |
parent | b1aaa3b6ca8894ac0422fb3aeadded29c2b83972 (diff) | |
download | phpicalendar-2fb022abbfa5eeac033992841ca11d9642bc4508.tar.gz phpicalendar-2fb022abbfa5eeac033992841ca11d9642bc4508.tar.bz2 phpicalendar-2fb022abbfa5eeac033992841ca11d9642bc4508.zip |
fix calendar path bug in initialization
-rw-r--r-- | day.php | 2 | ||||
-rw-r--r-- | functions/init/cpaths.php | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -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 @@ <?php +# adjust paths in case they are incorrect +if ($phpiCal_config->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']); |