From: Nik Okuntseff Date: Wed, 16 Mar 2016 04:49:03 +0000 (+0000) Subject: Cosmetic formatting improvements X-Git-Tag: timetracker_1.19-1~1819 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b5d95bbf6e8ce2b60c6640cdee5571025524e1a6;p=timetracker.git Cosmetic formatting improvements --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ee0b0604..9f12e225 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.16.3418 | Copyright © Anuko | +  Anuko Time Tracker 1.9.16.3419 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/cf_custom_fields.php b/cf_custom_fields.php index 35ae94d0..a44f30c6 100644 --- a/cf_custom_fields.php +++ b/cf_custom_fields.php @@ -40,9 +40,9 @@ $form = new Form('customFieldsForm'); if ($request->getMethod() == 'POST') { if ($request->getParameter('btn_add')) { - // The Add button clicked. Redirect to cf_custom_field_add.php page. - header('Location: cf_custom_field_add.php'); - exit(); + // The Add button clicked. Redirect to cf_custom_field_add.php page. + header('Location: cf_custom_field_add.php'); + exit(); } } else { $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->getKey('button.add'))); diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index 1eca2138..5dd2c574 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -55,13 +55,12 @@ if ($request->getMethod() == 'POST') { if (!ttValidString($cl_option_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name')); if ($errors->isEmpty()) { - $res = CustomFields::insertOption($cl_field_id, $cl_option_name); + $res = CustomFields::insertOption($cl_field_id, $cl_option_name); if ($res) { header("Location: cf_dropdown_options.php?field_id=$cl_field_id"); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } } diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index 8adb43aa..404896fa 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -44,19 +44,18 @@ if ($request->getMethod() == 'POST') { // Determine field id for redirect. $field_id = CustomFields::getFieldIdForOption($cl_id); if ($request->getParameter('btn_delete')) { - // Delete button pressed. - $res = CustomFields::deleteOption($cl_id); + // Delete button pressed. + $res = CustomFields::deleteOption($cl_id); if ($res) { header("Location: cf_dropdown_options.php?field_id=$field_id"); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } if ($request->getParameter('btn_cancel')) { - // Cancel button pressed. - header("Location: cf_dropdown_options.php?field_id=$field_id"); - exit(); + // Cancel button pressed. + header("Location: cf_dropdown_options.php?field_id=$field_id"); + exit(); } } else { $option = CustomFields::getOptionName($cl_id); diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index ddea967b..eff95b1d 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -61,9 +61,8 @@ if ($request->getMethod() == 'POST') { $field_id = CustomFields::getFieldIdForOption($cl_id); header("Location: cf_dropdown_options.php?field_id=$field_id"); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } } diff --git a/charts.php b/charts.php index 5bf90348..31ac49f1 100644 --- a/charts.php +++ b/charts.php @@ -88,10 +88,10 @@ if ($request->getMethod( )== 'POST') { // If chart interval changed - save it. $cl_interval = $request->getParameter('interval'); if ($cl_interval) { - // Save in the session + // Save in the session $_SESSION['chart_interval'] = $cl_interval; // and permanently. - $sc = new ttSysConfig($user->id); + $sc = new ttSysConfig($user->id); $sc->setValue(SYSC_CHART_INTERVAL, $cl_interval); } // If chart type changed - save it. diff --git a/client_add.php b/client_add.php index 9363e594..4ddb500e 100644 --- a/client_add.php +++ b/client_add.php @@ -47,7 +47,7 @@ if ($request->getMethod() == 'POST') { } else { // Do not assign all projects to a new client by default. This should help to reduce clutter. // foreach ($projects as $project_item) - // $cl_projects[] = $project_item['id']; + // $cl_projects[] = $project_item['id']; } $form = new Form('clientForm'); diff --git a/client_delete.php b/client_delete.php index 7cf05ebb..aea24d30 100644 --- a/client_delete.php +++ b/client_delete.php @@ -43,10 +43,8 @@ $client_to_delete = $client['name']; $form = new Form('clientDeleteForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$id)); -$form->addInput(array('type'=>'combobox', - 'name'=>'delete_client_entries', - 'data'=>array('0'=>$i18n->getKey('dropdown.do_not_delete'),'1'=>$i18n->getKey('dropdown.delete')), -)); +$form->addInput(array('type'=>'combobox','name'=>'delete_client_entries', + 'data'=>array('0'=>$i18n->getKey('dropdown.do_not_delete'),'1'=>$i18n->getKey('dropdown.delete')))); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel'))); @@ -63,8 +61,8 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.db')); if ($request->getParameter('btn_cancel')) { - header('Location: clients.php'); - exit(); + header('Location: clients.php'); + exit(); } } // post diff --git a/client_edit.php b/client_edit.php index c13d42e2..758b2ef0 100644 --- a/client_edit.php +++ b/client_edit.php @@ -77,7 +77,7 @@ if ($request->getMethod() == 'POST') { if (!ttValidFloat($cl_tax, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.tax')); if ($errors->isEmpty()) { - if ($request->getParameter('btn_save')) { + if ($request->getParameter('btn_save')) { $client = ttClientHelper::getClientByName($cl_name); if (($client && ($cl_id == $client['id'])) || !$client) { if (ttClientHelper::update(array( @@ -93,7 +93,7 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.db')); } else $errors->add($i18n->getKey('error.client_exists')); - } + } if ($request->getParameter('btn_copy')) { if (!ttClientHelper::getClientByName($cl_name)) { diff --git a/cron.php b/cron.php index 908c890c..81ef8982 100644 --- a/cron.php +++ b/cron.php @@ -48,10 +48,10 @@ $mdb2 = getConnection(); $now = mktime(); $sql = "select * from tt_cron where $now >= next - and status = 1 and report_id is not null and email is not null"; + and status = 1 and report_id is not null and email is not null"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) - exit; + exit(); while ($val = $res->fetchRow()) { // We have jobs to execute in user language.