diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-11-05 05:40:15 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-11-05 05:40:15 +0000 |
commit | 32afff28881d2d10ce266ac1bc555f0cd3327791 (patch) | |
tree | a0017d1a036f341b862ed3e1525f1c36acc9198b /functions | |
parent | cfe612487b6f3266d91cd168bcbdae51f30fa1e4 (diff) | |
download | phpicalendar-32afff28881d2d10ce266ac1bc555f0cd3327791.tar.gz phpicalendar-32afff28881d2d10ce266ac1bc555f0cd3327791.tar.bz2 phpicalendar-32afff28881d2d10ce266ac1bc555f0cd3327791.zip |
https support for webcals.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/init.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php index e4eb831..3be7abb 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -71,15 +71,17 @@ if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { } } -if (substr($cal_filename, 0, 7) == 'http://' || substr($cal_filename, 0, 9) == 'webcal://') { +if (substr($cal_filename, 0, 7) == 'http://' || substr($cal_filename, 0, 8) == 'https://' || substr($cal_filename, 0, 9) == 'webcal://') { $is_webcal = TRUE; $cal_webcalPrefix = str_replace('http://','webcal://',$cal_filename); $cal_httpPrefix = str_replace('webcal://','http://',$cal_filename); + $cal_httpsPrefix = str_replace('webcal://','https://',$cal_filename); + $cal_httpsPrefix = str_replace('http://','https://',$cal_httpsPrefix); $cal_filename = $cal_httpPrefix; } if ($is_webcal) { - if ($allow_webcals == 'yes' || in_array($cal_webcalPrefix, $list_webcals) || in_array($cal_httpPrefix, $list_webcals)) { + if ($allow_webcals == 'yes' || in_array($cal_webcalPrefix, $list_webcals) || in_array($cal_httpPrefix, $list_webcals) || in_array($cal_httpsPrefix, $list_webcals)) { $cal_displayname = substr(str_replace('32', ' ', basename($cal_filename)), 0, -4); $cal = urlencode($cal_filename); $filename = $cal_filename; |