From 7f4ff5912756fdc15dbb59ed7fcd97479c389c72 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 2 Dec 2005 17:24:01 +0000 Subject: set the default calendar_path before appending cpath --- functions/init.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'functions/init.inc.php') 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(); -- cgit v1.2.3