summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 7b821e635..4d1abe51a 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -625,12 +625,16 @@ function common_avatar_path($filename) {
}
function common_avatar_url($filename) {
- $server = common_config('avatar', 'server');
- if ($server) {
- return 'http://'.$server.'/'.$filename;
- } else {
return common_path('avatar/'.$filename);
- }
+}
+
+function common_avatar_display_url($avatar) {
+ $server = common_config('avatar', 'server');
+ if ($server) {
+ return 'http://'.$server.'/'.$avatar->filename;
+ } else {
+ return $avatar->url;
+ }
}
function common_default_avatar($size) {