X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftheme.php;h=0be8c3b9dfaa8ba2631bb67e08cbfb49b36ceb60;hb=316ed3f86b60150d66460b478bf7146811bb6bb1;hp=bed631d9c0ac54e37631a48a068a153e628d8a42;hpb=a6ab9c4a3e820b9d293075b1fec8b5eb05df87e9;p=quix0rs-gnu-social.git diff --git a/lib/theme.php b/lib/theme.php index bed631d9c0..0be8c3b9df 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; }