diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2006-03-20 01:35:56 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2006-03-20 01:35:56 +0000 |
commit | 3280427d50b95564c2a21396b5d3bb603795d014 (patch) | |
tree | 8f9d4d67b19586a4ae04fe2fa96dedb69474ba65 /calendars | |
parent | edfac56f9d97c1754bb05c60bbc723fee7839fc8 (diff) | |
download | phpicalendar-3280427d50b95564c2a21396b5d3bb603795d014.tar.gz phpicalendar-3280427d50b95564c2a21396b5d3bb603795d014.tar.bz2 phpicalendar-3280427d50b95564c2a21396b5d3bb603795d014.zip |
add trailing slashes to calendar_path if needed
Diffstat (limited to 'calendars')
-rw-r--r-- | calendars/publish.ical.php | 7 | ||||
-rw-r--r-- | calendars/publish.mozilla.php | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/calendars/publish.ical.php b/calendars/publish.ical.php index 9bb2239..c38dcd6 100644 --- a/calendars/publish.ical.php +++ b/calendars/publish.ical.php @@ -49,8 +49,11 @@ Don't forget to turn off logging when done!! // include PHP iCalendar configuration variables include('../config.inc.php'); -// set calendar path, or just use current directory -$calendar_path = (isset($calendar_path) && $calendar_path != '') ? $calendar_path : ''; +// set calendar path, or just use current directory...make sure there's a trailing slash +if(isset($calendar_path) && $calendar_path != ''){ + if (substr($calendar_path, -1, 1) !='/') $calendar_path = $calendar_path.'/'; +}else{ + $calendar_path = ''; // allow/disallow publishing diff --git a/calendars/publish.mozilla.php b/calendars/publish.mozilla.php index 5910a1c..233b8ed 100644 --- a/calendars/publish.mozilla.php +++ b/calendars/publish.mozilla.php @@ -60,8 +60,11 @@ Don't forget to turn off logging when done!! // include PHP iCalendar configuration variables include('../config.inc.php'); -// set calendar path, or just use current directory -$calendar_path = (isset($calendar_path) && $calendar_path != '') ? $calendar_path : ''; +// set calendar path, or just use current directory...make sure there's a trailing slash +if(isset($calendar_path) && $calendar_path != ''){ + if (substr($calendar_path, -1, 1) !='/') $calendar_path = $calendar_path.'/'; +}else{ + $calendar_path = ''; // allow/disallow publishing |