Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29459/functions
Modified Files:
ical_parser.php init.inc.php
Log Message:
Fixed webcal protocol prefixes
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.252
retrieving revision 1.253
diff -C2 -d -r1.252 -r1.253
*** ical_parser.php 17 Jun 2009 17:35:10 -0000 1.252
--- ical_parser.php 18 Jun 2009 16:21:45 -0000 1.253
***************
*** 88,95 ****
if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') {
$is_webcal = TRUE;
! $cal_webcalPrefix = str_replace('http://','webcal://',$filename);
! $cal_httpPrefix = str_replace('webcal://','http://',$filename);
! $cal_httpsPrefix = str_replace('webcal://','https://',$filename);
! $cal_httpsPrefix = str_replace('http://','https://',$cal_httpsPrefix);
$filename = $cal_httpPrefix;
$master_array['-4'][$calnumber]['webcal'] = 'yes';
--- 88,94 ----
if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') {
$is_webcal = TRUE;
! $cal_webcalPrefix = str_replace(array('http://', 'https://'), 'webcal://', $filename);
! $cal_httpPrefix = str_replace(array('webcal://', 'https://'), 'http://', $filename);
! $cal_httpsPrefix = str_replace(array('http://', 'webcal://'), 'https://', $filename);
$filename = $cal_httpPrefix;
$master_array['-4'][$calnumber]['webcal'] = 'yes';
Index: init.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** init.inc.php 4 Jan 2009 21:58:18 -0000 1.122
--- init.inc.php 18 Jun 2009 16:21:46 -0000 1.123
***************
*** 99,106 ****
// Make some protocol alternatives, and set our real identifier to the
// HTTP protocol.
! $cal_webcalPrefix = str_replace('http://','webcal://',$web_cal);
! $cal_httpPrefix = str_replace('webcal://','http://',$web_cal);
! $cal_httpsPrefix = str_replace('webcal://','https://',$web_cal);
! $cal_httpsPrefix = str_replace('http://','https://',$web_cal);
// We can only include this web calendar if we allow all web calendars
--- 99,105 ----
// Make some protocol alternatives, and set our real identifier to the
// HTTP protocol.
! $cal_webcalPrefix = str_replace(array('http://', 'https://'), 'webcal://', $web_cal);
! $cal_httpPrefix = str_replace(array('webcal://', 'https://'), 'http://', $web_cal);
! $cal_httpsPrefix = str_replace(array('http://', 'webcal://'), 'https://', $web_cal);
// We can only include this web calendar if we allow all web calendars
***************
*** 123,132 ****
}
$cals[] = urlencode($web_cal);
- //$filename = $cal_filename;
$subscribe_path = $cal_webcalPrefix;
// Add the webcal to the available calendars.
! $web_cal = $cal_httpPrefix;
! $cal_filelist[] = $web_cal;
}
--- 122,129 ----
}
$cals[] = urlencode($web_cal);
$subscribe_path = $cal_webcalPrefix;
// Add the webcal to the available calendars.
! $cal_filelist[] = $cal_httpPrefix;
}
|