From 29d741746d47b9fdb6170a5e0a951726cc1207af Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Wed, 3 May 2006 04:26:25 +0000 Subject: remove requirement for subdirs in tmp when useing cpath --- functions/ical_parser.php | 4 ++-- functions/init.inc.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index d0f6efb..e8092c6 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -35,7 +35,7 @@ $this_year = $day_array2[1]; $parse_file = true; if ($save_parsed_cals == 'yes') { if (sizeof ($cal_filelist) > 1) { - $parsedcal = $tmp_dir.'/parsedcal-'.urlencode($cal_filename).'-'.$this_year; + $parsedcal = $tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$cal_filename).'-'.$this_year; if (file_exists($parsedcal)) { $fd = fopen($parsedcal, 'r'); $contents = fread($fd, filesize($parsedcal)); @@ -75,7 +75,7 @@ if ($save_parsed_cals == 'yes') { } else { foreach ($cal_filelist as $filename) { $realcal_mtime = filemtime($filename); - $parsedcal = $tmp_dir.'/parsedcal-'.urlencode($cal_filename).'-'.$this_year; + $parsedcal = $tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$cal_filename).'-'.$this_year; if (file_exists($parsedcal)) { $parsedcal_mtime = filemtime($parsedcal); if ($realcal_mtime == $parsedcal_mtime) { diff --git a/functions/init.inc.php b/functions/init.inc.php index a1641f6..4beb63a 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -36,11 +36,11 @@ $cpath = ''; #initialize cpath to prevent later undef warnings. if(isset($_REQUEST['cpath'])&& $_REQUEST['cpath'] !=''){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; - $tmp_dir .= "/$cpath"; +# $tmp_dir .= "/$cpath"; }elseif(isset($default_cpath_check) && $default_cpath_check !='' ){ $cpath = str_replace('..','',$default_cpath_check); $calendar_path .= "/$cpath"; - $tmp_dir .= "/$cpath"; +# $tmp_dir .= "/$cpath"; } #these need cpath to be set #set up specific template folder for a particular cpath -- cgit v1.2.3