mirror of
https://github.com/Combodo/iTop.git
synced 2026-08-23 22:58:18 +02:00
Compare commits
1 Commits
develop
...
feature/97
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f032710d7e |
@@ -166,8 +166,10 @@ class AttributeImage extends AttributeBlob
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$bExistingImageModified = ($oHostObject->IsModified() && (array_key_exists($this->GetCode(), $oHostObject->ListChanges())));
|
if (is_null($oHostObject)
|
||||||
if ($oHostObject->IsNew() || ($bExistingImageModified)) {
|
|| $oHostObject->IsNew()
|
||||||
|
|| ($oHostObject->IsModified() && array_key_exists($this->GetCode(), $oHostObject->ListChanges())) //$bExistingImageModified
|
||||||
|
) {
|
||||||
// If the object is modified (or not yet stored in the database) we must serve the content of the image directly inline
|
// If the object is modified (or not yet stored in the database) we must serve the content of the image directly inline
|
||||||
// otherwise (if we just give an URL) the browser will be given the wrong content... and may cache it
|
// otherwise (if we just give an URL) the browser will be given the wrong content... and may cache it
|
||||||
return 'data:'.$value->GetMimeType().';base64,'.base64_encode($value->GetData());
|
return 'data:'.$value->GetMimeType().';base64,'.base64_encode($value->GetData());
|
||||||
|
|||||||
Reference in New Issue
Block a user