From e03283ecafd3c992d91913f4fcda43a4dd040dc1 Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Fri, 27 Mar 2015 16:15:10 -0500 Subject: [PATCH] Fix gravatar in social wall - refs #4507 --- main/inc/lib/social.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 2281f965a3..0248a361a7 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -1410,8 +1410,12 @@ class SocialManager extends UserManager if (!empty($message['path'])) { $pathUserInfo = UserManager::get_user_picture_path_by_id($authorId, 'web', true); $pathImg = $pathUserInfo['dir'] . 'message_attachments'; - $imageBig = $pathImg .self::getImagePath($message['path'], IMAGE_WALL_BIG); - $imageSmall = $pathImg. self::getImagePath($message['path'], IMAGE_WALL_SMALL); + $imageBig = $pathUserInfo['file']; + $imageSmall = $pathUserInfo['file']; + if (!api_get_configuration_value('gravatar_enabled')) { + $imageBig = $pathImg .self::getImagePath($message['path'], IMAGE_WALL_BIG); + $imageSmall = $pathImg. self::getImagePath($message['path'], IMAGE_WALL_SMALL); + } $wallImage = ''; }