Commit bef4a8b6 authored by Evan Prodromou's avatar Evan Prodromou

Revert "When viewing a page in https, all links to non-actions (links to CSS,...

Revert "When viewing a page in https, all links to non-actions (links to CSS, JS, etc) should be https. Fixes the mixed content warnings that browsers display."

This reverts commit 20997619.

The commit doesn't take into account having different servers (theme
server, avatar server) and being able to set HTTPS for some but not all.
parent 42ba05de
......@@ -750,18 +750,8 @@ function common_local_url($action, $args=null, $params=null, $fragment=null)
return $url;
}
function common_path($relative, $ssl=null)
function common_path($relative, $ssl=false)
{
if($ssl==null) {
//ssl was not specifically requested
if( $_SERVER['HTTPS'] && $_SERVER['HTTPS']!="off" ) {
//currently in https, so stay in https
$ssl=true;
} else {
//not in https, so stay not in https
$ssl=false;
}
}
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
if (($ssl && (common_config('site', 'ssl') === 'sometimes'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment