From e96a8387a039eec4e9cd8472e2653fd0f59d8216 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 6 Feb 2020 10:06:18 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02750=20-=20Regression:=20Fix=20default?= =?UTF-8?q?=20user=20profile=20image=20not=20shown=20in=20portal=20due=20t?= =?UTF-8?q?o=20N=C2=B02060?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.x/itop-portal-base/portal/config/services.yaml | 1 + .../CombodoCurrentContactPhotoUrl.php | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/config/services.yaml b/datamodels/2.x/itop-portal-base/portal/config/services.yaml index d43b9bd77..0bdf3c740 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/services.yaml +++ b/datamodels/2.x/itop-portal-base/portal/config/services.yaml @@ -49,6 +49,7 @@ services: $bDebug: '%kernel.debug%' $sPortalCachePath: '%kernel.cache_dir%/' $sPortalId: '%env(string:PORTAL_ID)%' + $sCombodoPortalBaseAbsoluteUrl: '%env(string:COMBODO_PORTAL_BASE_ABSOLUTE_URL)%' $aCombodoPortalInstanceConf: '%combodo.portal.instance.conf%' $sCombodoPortalInstanceAbsoluteUrl: '%env(string:COMBODO_PORTAL_INSTANCE_ABSOLUTE_URL)%' diff --git a/datamodels/2.x/itop-portal-base/portal/src/VariableAccessor/CombodoCurrentContactPhotoUrl.php b/datamodels/2.x/itop-portal-base/portal/src/VariableAccessor/CombodoCurrentContactPhotoUrl.php index 304bb06f9..423c4159f 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/VariableAccessor/CombodoCurrentContactPhotoUrl.php +++ b/datamodels/2.x/itop-portal-base/portal/src/VariableAccessor/CombodoCurrentContactPhotoUrl.php @@ -37,8 +37,8 @@ class CombodoCurrentContactPhotoUrl { /** @var \User $oUser */ private $oUser; - /** @var string $sCombodoPortalInstanceAbsoluteUrl */ - private $sCombodoPortalInstanceAbsoluteUrl; + /** @var string $sCombodoPortalBaseAbsoluteUrl */ + private $sCombodoPortalBaseAbsoluteUrl; /** @var string|null $sContactPhotoUrl */ private $sContactPhotoUrl; /** @var \Symfony\Component\DependencyInjection\ContainerInterface */ @@ -49,13 +49,13 @@ class CombodoCurrentContactPhotoUrl * * @param \User $oUser * @param \Symfony\Component\DependencyInjection\ContainerInterface $oContainer - * @param string $sCombodoPortalInstanceAbsoluteUrl + * @param string $sCombodoPortalBaseAbsoluteUrl */ - public function __construct(User $oUser, ContainerInterface $oContainer, $sCombodoPortalInstanceAbsoluteUrl) + public function __construct(User $oUser, ContainerInterface $oContainer, $sCombodoPortalBaseAbsoluteUrl) { $this->oUser = $oUser; $this->oContainer = $oContainer; - $this->sCombodoPortalInstanceAbsoluteUrl = $sCombodoPortalInstanceAbsoluteUrl; + $this->sCombodoPortalBaseAbsoluteUrl = $sCombodoPortalBaseAbsoluteUrl; $this->sContactPhotoUrl = null; } @@ -82,7 +82,7 @@ class CombodoCurrentContactPhotoUrl private function ComputeContactPhotoUrl() { // Contact - $sContactPhotoUrl = "{$this->sCombodoPortalInstanceAbsoluteUrl}img/user-profile-default-256px.png"; + $sContactPhotoUrl = "{$this->sCombodoPortalBaseAbsoluteUrl}img/user-profile-default-256px.png"; // - Checking if we can load the contact try {