diff options
author | Evan Prodromou <evan@status.net> | 2010-10-14 01:35:11 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-10-14 01:35:11 -0400 |
commit | 97a7fb246c8de9a2cf1bfc38ca275a13e9c40f58 (patch) | |
tree | 984b1e3b3a55b01ba7956f849453abaffc83fd6b | |
parent | 7fb765b2cb0be47236ad3fbf625f908dd5da8f47 (diff) |
correctly use sslserver if it is set
-rw-r--r-- | classes/Design.php | 7 | ||||
-rw-r--r-- | lib/htmloutputter.php | 7 | ||||
-rw-r--r-- | lib/theme.php | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/classes/Design.php b/classes/Design.php index 50712ce8b..a8fdb7219 100644 --- a/classes/Design.php +++ b/classes/Design.php @@ -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; diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index f01f1814f..4a1b7db47 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -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; diff --git a/lib/theme.php b/lib/theme.php index 669d9a19f..95b7c1de4 100644 --- a/lib/theme.php +++ b/lib/theme.php @@ -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 . '/'; |