aboutsummaryrefslogtreecommitdiffstats
path: root/functions/init.inc.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-05-25 23:29:49 +0000
committerChad Little <clittle@users.sourceforge.net>2004-05-25 23:29:49 +0000
commitef687e7ade702bf9b684c9651cfa1463f9c0adaa (patch)
tree1cb67c592dbffdb9f343d1df59303e21ed71f11b /functions/init.inc.php
parent3c2d1a971c805dc983c56fa032f538b6a7aa12c2 (diff)
downloadphpicalendar-ef687e7ade702bf9b684c9651cfa1463f9c0adaa.tar.gz
phpicalendar-ef687e7ade702bf9b684c9651cfa1463f9c0adaa.tar.bz2
phpicalendar-ef687e7ade702bf9b684c9651cfa1463f9c0adaa.zip
Minor E_NOTICE fixes.
Diffstat (limited to 'functions/init.inc.php')
-rw-r--r--functions/init.inc.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php
index cfda336..a691aee 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -128,16 +128,18 @@ if ($is_webcal) {
}
// Sets the download and subscribe paths from the config if present.
- if ($download_uri == '' && preg_match('/(^\/|\.\.\/)/', $filename) == 0) {
- $subscribe_path = 'webcal://'.$HTTP_SERVER_VARS['SERVER_NAME'].dirname($HTTP_SERVER_VARS['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 = '';
+ if (isset($filename)) {
+ if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) {
+ $subscribe_path = 'webcal://'.$HTTP_SERVER_VARS['SERVER_NAME'].dirname($HTTP_SERVER_VARS['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 = '';
+ }
}
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy