N°1852 Fix loss of inline images and attachments when user has been logged off

This commit is contained in:
Molkobain
2018-12-13 11:35:00 +01:00
parent 5a1b6e43c9
commit daafa9123c
8 changed files with 47 additions and 16 deletions

View File

@@ -2485,7 +2485,7 @@ EOF
$sJsonFieldsMap = json_encode($aFieldsMap);
$sState = $this->GetState();
$sSessionStorageKey = $sClass.'_'.$iKey;
$sTempId = session_id().'_'.$iTransactionId;
$sTempId = utils::GetUploadTempId($iTransactionId);
$oPage->add_ready_script(InlineImage::EnableCKEditorImageUpload($this, $sTempId));
$oPage->add_script(
@@ -2784,7 +2784,7 @@ EOF
}
// Note: This part (inline images activation) is duplicated in self::DisplayModifyForm and several other places. Maybe it should be refactored so it automatically activates when an HTML field is present, or be an option of the attribute. See bug n°1240.
$sTempId = session_id().'_'.$iTransactionId;
$sTempId = utils::GetUploadTempId($iTransactionId);
$oPage->add_ready_script(InlineImage::EnableCKEditorImageUpload($this, $sTempId));
}