diff options
author | Sarven Capadisli <csarven@status.net> | 2010-02-13 20:28:39 +0100 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-02-13 20:28:39 +0100 |
commit | 9465a4d5c6b77bd77e78bc277a817e2b5724ec76 (patch) | |
tree | 8533ad32339160d5ba3cf27209f78740ffa977cd /lib/htmloutputter.php | |
parent | 171bf3093a4cf3f3ff0b4d255392ffd5375e4c36 (diff) | |
parent | 269b4711eb1600597af314f2fdca00102ff5566a (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
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, |