From: Evan Prodromou Date: Thu, 14 Oct 2010 05:35:11 +0000 (-0400) Subject: correctly use sslserver if it is set X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=97a7fb246c8de9a2cf1bfc38ca275a13e9c40f58;p=quix0rs-gnu-social.git correctly use sslserver if it is set --- diff --git a/classes/Design.php b/classes/Design.php index 50712ce8b5..a8fdb72191 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 f01f1814f0..4a1b7db472 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 669d9a19fd..95b7c1de4b 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 . '/';