N°3423 - Allow AttributeImage / AttributeDocument content to be cached by the browser (portal)

This commit is contained in:
Eric
2021-01-21 15:15:45 +01:00
parent 8f1d9fba57
commit 154156f4a1
8 changed files with 61 additions and 18 deletions

View File

@@ -1159,7 +1159,8 @@ class UserRights
else
{
if (ContextTag::Check(ContextTag::TAG_PORTAL)) {
$sPictureUrl = utils::GetAbsoluteUrlAppRoot().'pages/exec.php/object/document/display/'.$sContactClass.'/'.$oContact->GetKey().'/'.static::DEFAULT_CONTACT_PICTURE_ATTCODE.'?exec_module=itop-portal-base&exec_page=index.php&portal_id='.PORTAL_ID;
$sSignature = $oPicture->GetSignature();
$sPictureUrl = utils::GetAbsoluteUrlAppRoot().'pages/exec.php/object/document/display/'.$sContactClass.'/'.$oContact->GetKey().'/'.static::DEFAULT_CONTACT_PICTURE_ATTCODE.'?cache=86400&s='.$sSignature.'&exec_module=itop-portal-base&exec_page=index.php&portal_id='.PORTAL_ID;
}
else {
$sPictureUrl = $oPicture->GetDisplayURL($sContactClass, $oContact->GetKey(), static::DEFAULT_CONTACT_PICTURE_ATTCODE);