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/theme.php | |
parent | 171bf3093a4cf3f3ff0b4d255392ffd5375e4c36 (diff) | |
parent | 269b4711eb1600597af314f2fdca00102ff5566a (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/theme.php')
-rw-r--r-- | lib/theme.php | 15 |
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; } } |