diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2005-12-02 17:24:01 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2005-12-02 17:24:01 +0000 |
commit | 7f4ff5912756fdc15dbb59ed7fcd97479c389c72 (patch) | |
tree | 5cad45bc60752b63dcc03a71711cd219c406b502 /functions/init.inc.php | |
parent | 613d019259721d83c888e7dd94872052263a6104 (diff) | |
download | phpicalendar-7f4ff5912756fdc15dbb59ed7fcd97479c389c72.tar.gz phpicalendar-7f4ff5912756fdc15dbb59ed7fcd97479c389c72.tar.bz2 phpicalendar-7f4ff5912756fdc15dbb59ed7fcd97479c389c72.zip |
set the default calendar_path before appending cpath
Diffstat (limited to 'functions/init.inc.php')
-rw-r--r-- | functions/init.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php index eb5c261..23539bb 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -27,6 +27,10 @@ if (isset($_COOKIE['phpicalendar'])) { if (isset($phpicalendar['cookie_time'])) $day_start = $phpicalendar['cookie_time']; } #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 ($calendar_path == '') { + $calendar_path = BASE.'calendars'; +} + if($_REQUEST['cpath']){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; @@ -84,10 +88,6 @@ if (ini_get('max_execution_time') < 60) { } -if ($calendar_path == '') { - $calendar_path = BASE.'calendars'; -} - // Pull the calendars off the GET line if provided. The $cal_filename // is always an array, because this makes it easier to deal with below. $cal_filenames = array(); |