X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2FDesign.php;h=ff44e010964042f0d6e8b18de603668c2c71d496;hb=efcdfabc1225a2fdcb37a6cc3c96982b24b88d8f;hp=d82a0668dc05b54c08c294ffb2333952ec9ecedf;hpb=c8b8f07af14ad2ce9d0c0267962dd3bbf6473a4b;p=quix0rs-gnu-social.git diff --git a/classes/Design.php b/classes/Design.php index d82a0668dc..ff44e01096 100644 --- a/classes/Design.php +++ b/classes/Design.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -101,7 +101,7 @@ class Design extends Memcached_DataObject } if (0 != mb_strlen($css)) { - $out->element('style', array('type' => 'text/css'), $css); + $out->style($css); } } @@ -155,9 +155,20 @@ class Design extends Memcached_DataObject $server = common_config('site', 'server'); } - // XXX: protocol + $ssl = common_config('background', 'ssl'); - return 'http://'.$server.$path.$filename; + 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 $protocol.'://'.$server.$path.$filename; } function setDisposition($on, $off, $tile)