summaryrefslogtreecommitdiff
path: root/classes/Avatar.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-13 12:39:15 -0500
committerEvan Prodromou <evan@status.net>2010-02-13 12:39:15 -0500
commit269b4711eb1600597af314f2fdca00102ff5566a (patch)
treefd33f01c7ab842c9fce737291e0923fc60a140bc /classes/Avatar.php
parentf3a82e787c70e8cf749c79f22fe37ce6c9c9d4d3 (diff)
parent31461e120f23416c8c4979805900e3018fb2a6fd (diff)
Merge branch 'ssleverything' into testing
Diffstat (limited to 'classes/Avatar.php')
-rw-r--r--classes/Avatar.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/Avatar.php b/classes/Avatar.php
index 91bde0f04..dbe2cd813 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()