From 82e3ddaacd8e8564d7ae04f5bd5cebc06d8eb332 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 15 Jul 2021 21:34:58 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04142=20-=20Improve=20backoffice=20render?= =?UTF-8?q?ing=20by=20showing=20system=20avatar=20no=20matter=20what?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Layout/ActivityPanel/ActivityEntry/ActivityEntry.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php b/sources/application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php index ffe030809..d5f4b577b 100644 --- a/sources/application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php +++ b/sources/application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php @@ -221,13 +221,15 @@ class ActivityEntry extends UIBlock // - Initials $this->sAuthorInitials = UserRights::GetUserInitials($this->sAuthorLogin); // - Picture + // ... first compute the user picture... if (in_array('backoffice', utils::GetConfig()->Get('activity_panel.hide_avatars'))) { $this->sAuthorPictureAbsUrl = null; } else { $this->sAuthorPictureAbsUrl = UserRights::GetUserPictureAbsUrl($this->sAuthorLogin, false); - if ((null === $this->sAuthorPictureAbsUrl) && (ITOP_APPLICATION_SHORT === $this->sAuthorLogin)) { - $this->sAuthorPictureAbsUrl = utils::GetAbsoluteUrlAppRoot().static::DEFAULT_AUTHOR_PICTURE_REL_URL; - } + } + // ... then fallback on system picture if necessary + if ((null === $this->sAuthorPictureAbsUrl) && (ITOP_APPLICATION_SHORT === $this->sAuthorLogin)) { + $this->sAuthorPictureAbsUrl = utils::GetAbsoluteUrlAppRoot().static::DEFAULT_AUTHOR_PICTURE_REL_URL; } $this->bIsFromCurrentUser = UserRights::GetUserId($this->sAuthorLogin) === UserRights::GetUserId();