diff options
author | Evan Prodromou <evan@status.net> | 2010-02-11 17:03:31 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-02-11 17:03:31 -0500 |
commit | 3018683718bd73bf00472622f9e81914703d50a7 (patch) | |
tree | fb4fd8e96fed48555459a16f33b76e55617ecf88 /classes/Design.php | |
parent | b96af33d978bddfa66aa893ff1d59f2d83903afa (diff) |
let backgrounds be put under SSL
Diffstat (limited to 'classes/Design.php')
-rw-r--r-- | classes/Design.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/Design.php b/classes/Design.php index 4e7d7dfb2..ff44e0109 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) |