Index: branches/5.1.x/core/kernel/db/cat_dbitem.php =================================================================== diff -u -N -r13811 -r14007 --- branches/5.1.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 13811) +++ branches/5.1.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 14007) @@ -1,6 +1,6 @@ Validate()) { - // TODO: such approach will not respect changes from OnBeforeItemCreate event - $this->SetDBField('ResourceId', $this->Application->NextResourceId()); - } - - $this->SetDBField('Modified_date', adodb_mktime() ); - $this->SetDBField('Modified_time', adodb_mktime() ); - - $is_admin = $this->Application->isAdminUser; - $owner_field = $this->Application->getUnitOption($this->Prefix, 'OwnerField'); - - if (!$owner_field) { - $owner_field = 'CreatedById'; - } - - if ((!$this->IsTempTable() && !$is_admin) || ($is_admin && !$this->GetDBField($owner_field))) { - $this->SetDBField($owner_field, $this->Application->RecallVar('user_id')); - } - if ($this->useFilenames) { $this->checkFilename(); $this->generateFilename();