From f624f9143722a6e32f702f6e75f24ae457f85d8c Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 12 Dec 2008 06:22:57 +0000 Subject: misc changes for new config model --- 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 fee5d72..0b9f77b 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -149,13 +149,13 @@ if (count($local_cals) > 0) { $add_cpath = ''; if (isset($cpath) && $cpath !='') $add_cpath = "$cpath/"; - if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) { + if (($phpiCal_config->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); + } elseif ($phpiCal_config->download_uri != '') { + $newurl = eregi_replace("^(http://)", "", $phpiCal_config->download_uri); $subscribe_path = 'webcal://'.$newurl.'/'.$add_cpath.basename($filename); - $download_filename = $download_uri.'/'.$add_cpath.basename($filename); + $download_filename = $phpiCal_config->download_uri.'/'.$add_cpath.basename($filename); } else { $subscribe_path = $add_cpath; $download_filename = $add_cpath; -- cgit v1.2.3