summaryrefslogtreecommitdiff
path: root/lib/htmloutputter.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-13 20:28:39 +0100
committerSarven Capadisli <csarven@status.net>2010-02-13 20:28:39 +0100
commit9465a4d5c6b77bd77e78bc277a817e2b5724ec76 (patch)
tree8533ad32339160d5ba3cf27209f78740ffa977cd /lib/htmloutputter.php
parent171bf3093a4cf3f3ff0b4d255392ffd5375e4c36 (diff)
parent269b4711eb1600597af314f2fdca00102ff5566a (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r--lib/htmloutputter.php15
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,