From 7816e4122a1e9edb241c009b800714e31db5c356 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 3 Jul 2008 13:03:47 -0400 Subject: add a display url function to display URLs darcs-hash:20080703170347-84dde-1ba2e178dd4051aa63e4073e472c73240e3d9fe8.gz --- lib/util.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/util.php') 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) { -- cgit v1.2.3-54-g00ecf