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 {