aboutsummaryrefslogtreecommitdiffstats
path: root/rss
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2005-11-23 07:51:01 +0000
committerJim Hu <jimhu@users.sourceforge.net>2005-11-23 07:51:01 +0000
commit77e0833ddd20afc10957d38ee2c954c221ac3de8 (patch)
tree08bf7a98cc549d127e0039b31e4ebc6f72f606fa /rss
parent839214cca1024b8fa61ae3964454e4c421040956 (diff)
downloadphpicalendar-77e0833ddd20afc10957d38ee2c954c221ac3de8.zip
phpicalendar-77e0833ddd20afc10957d38ee2c954c221ac3de8.tar.gz
phpicalendar-77e0833ddd20afc10957d38ee2c954c221ac3de8.tar.bz2
changes to fix bugs in handling webcals
Diffstat (limited to 'rss')
-rw-r--r--rss/index.php8
-rw-r--r--rss/rss.php2
2 files changed, 7 insertions, 3 deletions
diff --git a/rss/index.php b/rss/index.php
index e888a1f..b44070b 100644
--- a/rss/index.php
+++ b/rss/index.php
@@ -24,8 +24,12 @@ foreach ($filelist as $file) {
// $cal_filename is the filename of the calendar without .ics
// $cal is a urlencoded version of $cal_filename
// $cal_displayname is $cal_filename with occurrences of "32" replaced with " "
- $cal_filename_tmp = getCalendarName($file);
- $cal_tmp = urlencode($cal_filename_tmp);
+
+ if (substr($file, 0, 7) == 'http://' || substr($file, 0, 8) == 'https://' || substr($file, 0, 9) == 'webcal://') {
+ $cal_tmp = urlencode($file);
+ }else{
+ $cal_tmp = getCalendarName($file);
+ }
$cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp);
$rss_list .= '<font class="V12" color="blue"><b>'.$cal_displayname_tmp.' '. $calendar_lang.'</b></font><br />';
$rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&amp;cpath='.$cpath.'&amp;rssview=day<br />';
diff --git a/rss/rss.php b/rss/rss.php
index 2f147d8..9883557 100644
--- a/rss/rss.php
+++ b/rss/rss.php
@@ -95,7 +95,7 @@ if ($enable_rss != 'yes') {
//Note that this depends on other modifications I've made to
//allow phpicalendar to use calendar subdirectories - see bbs
-$cal_displayname = str_replace("32", " ", $cal);
+$cal_displayname = getCalendarName(urldecode($cal));
if ($cal == $ALL_CALENDARS_COMBINED) {
$temp = explode("/",$calendar_path);
$cal_displayname = str_replace("32"," ",ucfirst(array_pop($temp)));

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