utility for getting avatar or default avatar
darcs-hash:20080714034443-84dde-f443b04e6733b22709d746a700c0ba032d7afb60.gz
This commit is contained in:
parent
3cf477850f
commit
8c42fac88a
10
lib/util.php
10
lib/util.php
|
@ -1269,3 +1269,13 @@ function common_markup_to_html($c) {
|
|||
$c = preg_replace('/%%(\w+).(\w+)%%/e', 'common_config(\'\\1\', \'\\2\')', $c);
|
||||
return Markdown($c);
|
||||
}
|
||||
|
||||
function common_profile_avatar_url($profile, $size=AVATAR_PROFILE_SIZE) {
|
||||
$avatar = $profile->getAvatar($size);
|
||||
if ($avatar) {
|
||||
return common_avatar_display_url($avatar);
|
||||
} else {
|
||||
return common_default_avatar($size);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user