Fixing style errors.

This commit is contained in:
stickler-ci 2022-06-16 09:37:28 +00:00
parent 05aae267b1
commit a9e48a6aac

View File

@ -165,7 +165,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
// Action to update record // Action to update record
if ($action == 'update' && !empty($permissiontoadd)) { if ($action == 'update' && !empty($permissiontoadd)) {
foreach ($object->fields as $key => $val) { foreach ($object->fields as $key => $val) {
// Check if field was submited to be edited // Check if field was submited to be edited
if ($object->fields[$key]['type'] == 'duration') { if ($object->fields[$key]['type'] == 'duration') {
if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) { if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) {
@ -250,17 +250,17 @@ foreach ($object->fields as $key => $val) {
$object->setCategories($categories); $object->setCategories($categories);
} }
} }
} }
// Fill array 'array_options' with data from add form // Fill array 'array_options' with data from add form
if (!$error) { if (!$error) {
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) { if ($ret < 0) {
$error++; $error++;
} }
} }
if (!$error) { if (!$error) {
$result = $object->update($user); $result = $object->update($user);
if ($result > 0) { if ($result > 0) {
$action = 'view'; $action = 'view';