Commit cdc0df99 authored by Carsten  Rose's avatar Carsten Rose

Merge remote-tracking branch 'origin/master'

parents ea7aae15 07e2e200
Pipeline #3130 passed with stages
in 1 minute and 49 seconds
......@@ -243,6 +243,7 @@ class Save {
private function elements($recordId) {
$columnCreated = false;
$columnModified = false;
$realColumnFound = false;
$newValues = array();
......@@ -260,6 +261,7 @@ class Save {
// Skip Upload Elements: those will be processed later.
if ($this->isColumnUploadField($column)) {
$realColumnFound = true;
continue;
}
......@@ -285,10 +287,14 @@ class Save {
Support::setIfNotSet($formValues, $column);
}
$newValues[$column] = $formValues[$column];
$realColumnFound = true;
}
if ($columnModified && !empty($newValues) && !isset($newValues[COLUMN_MODIFIED])) {
// Only save record if real columns exist.
if ($realColumnFound) {
if ($columnModified && !isset($newValues[COLUMN_MODIFIED])) {
$newValues[COLUMN_MODIFIED] = date('YmdHis');
}
......@@ -296,18 +302,16 @@ class Save {
if ($columnCreated && !isset($newValues[COLUMN_CREATED])) {
$newValues[COLUMN_CREATED] = date('YmdHis');
}
$rc = $this->insertRecord($this->formSpec[F_TABLE_NAME], $newValues);
$recordId = $this->insertRecord($this->formSpec[F_TABLE_NAME], $newValues);
} else {
if (!empty($newValues)) {
$this->updateRecord($this->formSpec[F_TABLE_NAME], $newValues, $recordId, $this->formSpec[F_PRIMARY_KEY]);
}
$rc = $recordId;
}
$this->nativeDoSlave($rc);
$this->nativeDoSlave($recordId);
return $rc;
return $recordId;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment