"sys_edit = now()");
foreach ($mask['edit'] as $field => $info)
+ if ($info['required'] === true && empty($_POST[$field]))
+ return array('error' => sprintf('Pflichtfeld %s nicht ausgefüllt', $info['name']),
+ 'errormsg' => 'Pflichtfelder nicht ausgefüllt');
+
if ($info['type'] == 'boolean') {
$update[] = sprintf("%s=%d", $field, $_POST[$field] == 'on'?1:0);
} elseif ($info['type'] == 'number') {
$values = array("'".pg_escape_string($_SESSION['sys']['login'])."'", 'now()');
foreach ($mask['edit'] as $field => $info)
+ if ($info['required'] === true && empty($_POST[$field]))
+ return array('error' => sprintf('Pflichtfeld %s nicht ausgefüllt', $info['name']),
+ 'errormsg' => 'Pflichtfelder nicht ausgefüllt');
if ($info['type'] == 'boolean') {
$fields[] = $field;
$values[] = $_POST[$field] == 'on'?1:0;