X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2FAvatar.php;h=dbe2cd813847eb585f94999b595e2f495ab0d03b;hb=61fde6c8fff5201393db4496918fe193fe960c01;hp=91bde0f0401b6dc144b48a6ba434c312c80c967c;hpb=4e2acd153b4e3208e24464478098fac458a13590;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()