|
From: <par...@us...> - 2009-02-05 15:31:09
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/init In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28244/functions/init Modified Files: cpaths.php Log Message: Fix CSS and RSS links when the server uses HTTPS or non-standard port: Patch #2511351 Index: cpaths.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init/cpaths.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cpaths.php 28 Dec 2008 10:50:58 -0000 1.6 --- cpaths.php 5 Feb 2009 15:31:03 -0000 1.7 *************** *** 2,6 **** # adjust paths in case they are incorrect if ($phpiCal_config->default_path == '') { ! $p = str_replace("/rss","","http://".$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']) ); $phpiCal_config->setProperty('default_path', $p); } --- 2,7 ---- # adjust paths in case they are incorrect if ($phpiCal_config->default_path == '') { ! $proto = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off') ? 'https://' : 'http://'); ! $p = str_replace("/rss","",$proto.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF']) ); $phpiCal_config->setProperty('default_path', $p); } |