From: <ji...@us...> - 2005-02-13 17:40:18
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21255/phpicalendar/functions Modified Files: init.inc.php Log Message: Modifications init.inc.php to enable multiple calendar paths chosen via REQUEST. Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** init.inc.php 25 Oct 2004 02:21:27 -0000 1.71 --- init.inc.php 13 Feb 2005 17:40:08 -0000 1.72 *************** *** 70,73 **** --- 70,79 ---- } + if($_REQUEST['cpath']){ + $cpath = $_REQUEST['cpath']; + $calendar_path .= "/$cpath"; + $tmp_dir .= "/$cpath"; + } + if ($calendar_path == '') { $calendar_path = BASE.'calendars'; *************** *** 130,142 **** if (isset($filename)) { if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) { ! $subscribe_path = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$filename; $download_filename = $filename; } elseif ($download_uri != '') { $newurl = eregi_replace("^(http://)", "", $download_uri); ! $subscribe_path = 'webcal://'.$newurl.'/'.$cal_filename.'.ics'; ! $download_filename = $download_uri.'/'.$cal_filename.'.ics'; } else { ! $subscribe_path = ''; ! $download_filename = ''; } } --- 136,148 ---- if (isset($filename)) { if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) { ! $subscribe_path = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'."$cpath/".$filename; $download_filename = $filename; } elseif ($download_uri != '') { $newurl = eregi_replace("^(http://)", "", $download_uri); ! $subscribe_path = 'webcal://'.$newurl.'/'."$cpath/".$cal_filename.'.ics'; ! $download_filename = $download_uri.'/'."$cpath/".$cal_filename.'.ics'; } else { ! $subscribe_path = "$cpath/"; ! $download_filename = "$cpath/"; } } |