X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FDesign.php;h=ff44e010964042f0d6e8b18de603668c2c71d496;hb=efcdfabc1225a2fdcb37a6cc3c96982b24b88d8f;hp=4e7d7dfb257854a4a898ae44524b9a0739671e72;hpb=d31b1d774e5fcbb424ec60688ff4c76badc2b136;p=quix0rs-gnu-social.git diff --git a/classes/Design.php b/classes/Design.php index 4e7d7dfb25..ff44e01096 100644 --- a/classes/Design.php +++ b/classes/Design.php @@ -155,9 +155,20 @@ class Design extends Memcached_DataObject $server = common_config('site', 'server'); } - // XXX: protocol + $ssl = common_config('background', 'ssl'); + + if (is_null($ssl)) { // null -> guess + if (common_config('site', 'ssl') == 'always' && + !common_config('background', 'server')) { + $ssl = true; + } else { + $ssl = false; + } + } + + $protocol = ($ssl) ? 'https' : 'http'; - return 'http://'.$server.$path.$filename; + return $protocol.'://'.$server.$path.$filename; } function setDisposition($on, $off, $tile)