mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°6077 - Attachment class: now creation_date and user_id are init by default (#339)
Those fields were empty in case the Attachment instance was created in an extension (Mail to Ticket for example). Now the values are set in the object DBInsertNoReload method : * creation_date : current date * user_id : current user The previous values set for console and portal are removed. A fix for Mail to Ticket extension is also planned : N°4081.
This commit is contained in:
@@ -1230,8 +1230,6 @@ class ObjectController extends BrickController
|
||||
$oAttachment->Set('expire', time() + MetaModel::GetConfig()->Get('draft_attachments_lifetime')); // one hour...
|
||||
$oAttachment->Set('temp_id', $sTempId);
|
||||
$oAttachment->Set('item_class', $sObjectClass);
|
||||
$oAttachment->Set('creation_date', time());
|
||||
$oAttachment->Set('user_id', UserRights::GetUserObject());
|
||||
$oAttachment->SetDefaultOrgId();
|
||||
$oAttachment->Set('contents', $oDocument);
|
||||
$iAttId = $oAttachment->DBInsert();
|
||||
|
||||
Reference in New Issue
Block a user