]> git.mxchange.org Git - friendica.git/commitdiff
set default on get_avatar
authorfriendica <info@friendica.com>
Tue, 10 Apr 2012 22:33:43 +0000 (15:33 -0700)
committerfriendica <info@friendica.com>
Tue, 10 Apr 2012 22:33:43 +0000 (15:33 -0700)
include/network.php

index 58cef4756da00d7146a1036cb8e9bdd05124c8b4..23ef50b21bd34095a68de6386bda7d180bf84bcf 100644 (file)
@@ -694,13 +694,20 @@ function allowed_email($email) {
 
 if(! function_exists('avatar_img')) {
 function avatar_img($email) {
+
+       $a = get_app();
+
        $avatar['size'] = 175;
        $avatar['email'] = $email;
        $avatar['url'] = '';
+       $avatar['success'] = false;
 
        call_hooks('avatar_lookup', $avatar);
 
-       logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url']);
+       if(! $avatar['success'])
+               $avatar['url'] = $a->get_baseurl() . '/images/person-175.jpg';
+
+       logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
        return $avatar['url'];
 }}