diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-02-16 13:15:09 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-02-16 13:15:09 -0500 |
commit | 20d6a7caed6636c28cc7b95c584549691dff4388 (patch) | |
tree | bcf44f5f31a38ff08b363ab45ab486ace9ff1a99 /lib/htmloutputter.php | |
parent | 32084e33a266797b306158df29e48f057651b410 (diff) | |
parent | d5cbfe8071d56438cfa168dc3db56a959317eae0 (diff) |
Merge branch '0.9.x' into 1.0.x
Conflicts:
lib/queuemanager.php
lib/xmppmanager.php
plugins/Xmpp/Fake_XMPP.php
scripts/imdaemon.php
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r-- | lib/htmloutputter.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 317f5ea61..47e56fc8f 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -376,9 +376,20 @@ class HTMLOutputter extends XMLOutputter $server = common_config('site', 'server'); } - // XXX: protocol + $ssl = common_config('javascript', 'ssl'); + + if (is_null($ssl)) { // null -> guess + if (common_config('site', 'ssl') == 'always' && + !common_config('javascript', 'server')) { + $ssl = true; + } else { + $ssl = false; + } + } + + $protocol = ($ssl) ? 'https' : 'http'; - $src = 'http://'.$server.$path.$src . '?version=' . STATUSNET_VERSION; + $src = $protocol.'://'.$server.$path.$src . '?version=' . STATUSNET_VERSION; } $this->element('script', array('type' => $type, |