From 316ed3f86b60150d66460b478bf7146811bb6bb1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 11 Feb 2010 16:47:47 -0500 Subject: null theme ssl setting means 'guess' --- lib/theme.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/theme.php b/lib/theme.php index bed631d9c..0be8c3b9d 100644 --- a/lib/theme.php +++ b/lib/theme.php @@ -110,7 +110,18 @@ class Theme $server = common_config('site', 'server'); } - $protocol = common_config('theme', 'ssl') ? 'https' : 'http'; + $ssl = common_config('theme', 'ssl'); + + if (is_null($ssl)) { // null -> guess + if (common_config('site', 'ssl') == 'always' && + !common_config('theme', 'server')) { + $ssl = true; + } else { + $ssl = false; + } + } + + $protocol = ($ssl) ? 'https' : 'http'; $this->path = $protocol . '://'.$server.$path.$name; } -- cgit v1.2.3-54-g00ecf