Skip to content

Commit

Permalink
Debug modulebuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 24, 2017
1 parent e571616 commit 307b8ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -4982,6 +4982,7 @@ public function createCommon(User $user, $notrigger = false)

$fieldvalues = $this->set_save_query();
if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) $fieldvalues['date_creation']=$this->db->idate($now);
unset($fieldvalues['rowid']); // We suppose the field rowid is reserved field for autoincrement field.

$keys=array();
$values = array();
Expand Down Expand Up @@ -5140,6 +5141,7 @@ public function updateCommon(User $user, $notrigger = false)
$error = 0;

$fieldvalues = $this->set_save_query();
unset($fieldvalues['rowid']); // We don't update this field, it is the key to define which record to update.

foreach ($fieldvalues as $k => $v) {
if (is_array($key)){
Expand Down

0 comments on commit 307b8ef

Please sign in to comment.