X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FAvatar.php;h=dbe2cd813847eb585f94999b595e2f495ab0d03b;hb=fa4a2d34855da5eca29d81409cb5fbd64f13faba;hp=91bde0f0401b6dc144b48a6ba434c312c80c967c;hpb=4de09d6bd4eab3259d42fa846e4dd31f2516a038;p=quix0rs-gnu-social.git diff --git a/classes/Avatar.php b/classes/Avatar.php index 91bde0f040..dbe2cd8138 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -82,9 +82,20 @@ class Avatar extends Memcached_DataObject $server = common_config('site', 'server'); } - // XXX: protocol + $ssl = common_config('avatar', 'ssl'); + + if (is_null($ssl)) { // null -> guess + if (common_config('site', 'ssl') == 'always' && + !common_config('avatar', 'server')) { + $ssl = true; + } else { + $ssl = false; + } + } + + $protocol = ($ssl) ? 'https' : 'http'; - return 'http://'.$server.$path.$filename; + return $protocol.'://'.$server.$path.$filename; } function displayUrl()