Commit 97a7fb24 authored by Evan Prodromou's avatar Evan Prodromou

correctly use sslserver if it is set

parent 7fb765b2
......@@ -146,7 +146,12 @@ class Design extends Memcached_DataObject
if (empty($sslserver)) {
// XXX: this assumes that background dir == site dir + /background/
// not true if there's another server
$server = common_config('site', 'server');
if (is_string(common_config('site', 'sslserver')) &&
mb_strlen(common_config('site', 'sslserver')) > 0) {
$server = common_config('site', 'sslserver');
} else if (common_config('site', 'server')) {
$server = common_config('site', 'server');
}
$path = common_config('site', 'path') . '/background/';
} else {
$server = $sslserver;
......
......@@ -371,7 +371,12 @@ class HTMLOutputter extends XMLOutputter
$sslserver = common_config('javascript', 'sslserver');
if (empty($sslserver)) {
$server = common_config('site', 'server');
if (is_string(common_config('site', 'sslserver')) &&
mb_strlen(common_config('site', 'sslserver')) > 0) {
$server = common_config('site', 'sslserver');
} else if (common_config('site', 'server')) {
$server = common_config('site', 'server');
}
$path = common_config('site', 'path') . '/js/';
} else {
$server = $sslserver;
......
......@@ -121,7 +121,12 @@ class Theme
$sslserver = common_config($group, 'sslserver');
if (empty($sslserver)) {
$server = common_config('site', 'server');
if (is_string(common_config('site', 'sslserver')) &&
mb_strlen(common_config('site', 'sslserver')) > 0) {
$server = common_config('site', 'sslserver');
} else if (common_config('site', 'server')) {
$server = common_config('site', 'server');
}
$path = common_config('site', 'path') . '/';
if ($fallbackSubdir) {
$path .= $fallbackSubdir . '/';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment