diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-05-21 11:54:48 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-05-21 11:54:48 -0400 |
commit | 9933e1e341593b90fab6d366706710d604a1b43f (patch) | |
tree | a55deb6c419a92b271b1b3877e1a36328c023818 /lib/util.php | |
parent | 12a58d87e859cc83ebfbf3dfec96931f4387f2f5 (diff) |
fixup default avatar urls by using common function
darcs-hash:20080521155448-84dde-0e71fe5dccea49162911f80c65cd1e2a46043b14.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index 9635c1abb..09c4705a7 100644 --- a/lib/util.php +++ b/lib/util.php @@ -368,6 +368,14 @@ function common_avatar_url($filename) { return "http://".$config['site']['server'].$config['avatar']['path'].'/'.$filename; } +function common_default_avatar($size) { + static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', + AVATAR_STREAM_SIZE => 'stream', + AVATAR_MINI_SIZE => 'mini'); + global $config; + return "http://".$config['site']['server'].$config['avatar']['path'].'/'.$config['avatar']['default'][$sizenames[$size]]; +} + function common_local_url($action, $args=NULL) { global $config; /* XXX: pretty URLs */ |