Skip to content

Commit

Permalink
Try a better fix for #28526
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 29, 2024
1 parent 4c116e1 commit 284fb49
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions htdocs/core/class/commonobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,19 @@ abstract class CommonObject
public $user_modification_id;


/**
* @var int ID
* @deprecated Use $user_creation_id
*/
public $fk_user_creat;

/**
* @var int ID
* @deprecated Use $user_modification_id
*/
public $fk_user_modif;


public $next_prev_filter;

/**
Expand Down Expand Up @@ -9048,6 +9061,11 @@ public function createCommon(User $user, $notrigger = false)
}
if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) {
$fieldvalues['fk_user_creat'] = $user->id;
$this->fk_user_creat = $user->id;
}
if (array_key_exists('user_modification_id', $fieldvalues) && !($fieldvalues['user_modification_id'] > 0)) {
$fieldvalues['user_modification_id'] = $user->id;
$this->user_modification_id = $user->id;
}
unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert.
if (array_key_exists('ref', $fieldvalues)) {
Expand Down

0 comments on commit 284fb49

Please sign in to comment.