X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time_edit.php;h=5dad555c3168b9dd3eaba662341fe175aefb9f77;hb=d8baf4e8391fbbe974c58f599fe57059a8cad01c;hp=7e4f7bf2e6cb5bff104292d36ece414e16d0a4fc;hpb=9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c;p=timetracker.git diff --git a/time_edit.php b/time_edit.php index 7e4f7bf2..5dad555c 100644 --- a/time_edit.php +++ b/time_edit.php @@ -88,7 +88,7 @@ if ($request->isPost()) { $fields = $custom_fields->get($time_rec['id']); if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $cl_cf_1 = $fields[0]['value']; - else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) $cl_cf_1 = $fields[0]['option_id']; } @@ -98,7 +98,7 @@ if ($request->isPost()) { if (($cl_start == $cl_finish) && ($cl_duration == '0:00')) { $cl_finish = ''; $cl_duration = ''; - $messages->add($i18n->getKey('form.time_edit.uncompleted')); + $msg->add($i18n->getKey('form.time_edit.uncompleted')); } } @@ -190,7 +190,7 @@ if ($custom_fields && $custom_fields->fields[0]) { // Only one custom field is supported at this time. if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) { $form->addInput(array('type'=>'text','name'=>'cf_1','value'=>$cl_cf_1)); - } else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) { + } elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox', 'name'=>'cf_1', 'style'=>'width: 250px;', @@ -225,7 +225,7 @@ if ($request->isPost()) { if (!$cl_duration) { if ('0' == $cl_duration) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); - else if ($cl_start || $cl_finish) { + elseif ($cl_start || $cl_finish) { if (!ttTimeHelper::isValidTime($cl_start)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.start')); if ($cl_finish) { @@ -319,7 +319,7 @@ if ($request->isPost()) { if ($res && $custom_fields) { if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $res = $custom_fields->update($cl_id, $custom_fields->fields[0]['id'], null, $cl_cf_1); - else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) $res = $custom_fields->update($cl_id, $custom_fields->fields[0]['id'], $cl_cf_1, null); } if ($res) @@ -378,7 +378,7 @@ if ($request->isPost()) { if ($id && $custom_fields && $cl_cf_1) { if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $res = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cl_cf_1); - else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) $res = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cl_cf_1, null); } if ($id && $res) { @@ -393,7 +393,7 @@ if ($request->isPost()) { header("Location: time_delete.php?id=$cl_id"); exit(); } -} // POST +} // isPost $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list);