From 360e2501d58ea518d7de230cc4718e8754f550ee Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Thu, 5 Feb 2009 15:31:03 +0000 Subject: Fix CSS and RSS links when the server uses HTTPS or non-standard port: Patch #2511351 --- functions/init/cpaths.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functions') diff --git a/functions/init/cpaths.php b/functions/init/cpaths.php index e728654..b73d3be 100644 --- a/functions/init/cpaths.php +++ b/functions/init/cpaths.php @@ -1,7 +1,8 @@ default_path == '') { - $p = str_replace("/rss","","http://".$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']) ); + $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); } -- cgit v1.2.3