summaryrefslogtreecommitdiff
path: root/lib/theme.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-02-16 13:15:09 -0500
committerCraig Andrews <candrews@integralblue.com>2010-02-16 13:15:09 -0500
commit20d6a7caed6636c28cc7b95c584549691dff4388 (patch)
treebcf44f5f31a38ff08b363ab45ab486ace9ff1a99 /lib/theme.php
parent32084e33a266797b306158df29e48f057651b410 (diff)
parentd5cbfe8071d56438cfa168dc3db56a959317eae0 (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/theme.php')
-rw-r--r--lib/theme.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/theme.php b/lib/theme.php
index 020ce1ac4..0be8c3b9d 100644
--- a/lib/theme.php
+++ b/lib/theme.php
@@ -110,9 +110,20 @@ class Theme
$server = common_config('site', 'server');
}
- // XXX: protocol
+ $ssl = common_config('theme', 'ssl');
+
+ if (is_null($ssl)) { // null -> guess
+ if (common_config('site', 'ssl') == 'always' &&
+ !common_config('theme', 'server')) {
+ $ssl = true;
+ } else {
+ $ssl = false;
+ }
+ }
+
+ $protocol = ($ssl) ? 'https' : 'http';
- $this->path = 'http://'.$server.$path.$name;
+ $this->path = $protocol . '://'.$server.$path.$name;
}
}