From fd3db1c1a2b975a23c907b2e9b714a0cfe47f3e0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Mar 2016 15:44:32 -0700 Subject: [PATCH] Cosmetic - improved comments --- admin_options.php | 2 +- admin_team_add.php | 2 +- admin_team_delete.php | 2 +- cf_custom_field_add.php | 2 +- cf_custom_field_edit.php | 2 +- cf_dropdown_option_add.php | 2 +- cf_dropdown_option_edit.php | 2 +- charts.php | 2 +- client_add.php | 2 +- client_delete.php | 2 +- client_edit.php | 2 +- expense_delete.php | 2 +- expense_edit.php | 2 +- expenses.php | 5 ++--- export.php | 2 +- import.php | 4 ++-- 16 files changed, 18 insertions(+), 19 deletions(-) diff --git a/admin_options.php b/admin_options.php index 42c10bbe..2a44e3e2 100644 --- a/admin_options.php +++ b/admin_options.php @@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->getKey('title.options')); diff --git a/admin_team_add.php b/admin_team_add.php index 258f6caf..3ce0e662 100644 --- a/admin_team_add.php +++ b/admin_team_add.php @@ -93,7 +93,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.user_exists')); } -} +} // POST $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); diff --git a/admin_team_delete.php b/admin_team_delete.php index b53c5e92..2b308e54 100644 --- a/admin_team_delete.php +++ b/admin_team_delete.php @@ -58,7 +58,7 @@ if ($request->getMethod() == 'POST') { header('Location: admin_teams.php'); exit(); } -} +} // POST $smarty->assign('team_to_delete', $team_name); $smarty->assign('forms', array($form->getName()=>$form->toArray())); diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index 3af6c3a2..056ce531 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -65,7 +65,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"'); diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 3d92d945..15146db6 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -70,7 +70,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"'); diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index 26ede878..2ffb83f6 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionAddForm.name.focus()"'); diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index b46a3a53..f61225bc 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -64,7 +64,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.db')); } -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionEditForm.name.focus()"'); diff --git a/charts.php b/charts.php index a7d0887d..a58c3d86 100644 --- a/charts.php +++ b/charts.php @@ -117,7 +117,7 @@ if ($request->getMethod( )== 'POST') { exit(); } } -} +} // POST // Elements of chartForm. $chart_form = new Form('chartForm'); diff --git a/client_add.php b/client_add.php index b7187056..4aef5ab7 100644 --- a/client_add.php +++ b/client_add.php @@ -80,7 +80,7 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.client_exists')); } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.clientForm.name.focus()"'); diff --git a/client_delete.php b/client_delete.php index 8d3f65ef..cdc20b6f 100644 --- a/client_delete.php +++ b/client_delete.php @@ -64,7 +64,7 @@ if ($request->getMethod() == 'POST') { header('Location: clients.php'); exit(); } -} // post +} // POST $smarty->assign('client_to_delete', $client_to_delete); $smarty->assign('forms', array($form->getName()=>$form->toArray())); diff --git a/client_edit.php b/client_edit.php index c24a427e..747ed2b8 100644 --- a/client_edit.php +++ b/client_edit.php @@ -113,7 +113,7 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.client_exists')); } } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->getKey('title.edit_client')); diff --git a/expense_delete.php b/expense_delete.php index 2f531266..69ceb663 100644 --- a/expense_delete.php +++ b/expense_delete.php @@ -75,7 +75,7 @@ if ($request->getMethod() == 'POST') { header('Location: expenses.php'); exit(); } -} +} // POST $form = new Form('expenseItemForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); diff --git a/expense_edit.php b/expense_edit.php index 8ae67721..89ca38c4 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -203,7 +203,7 @@ if ($request->getMethod() == 'POST') { header("Location: expense_delete.php?id=$cl_id"); exit(); } -} // End of if ($request->getMethod() == "POST") +} // POST $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); diff --git a/expenses.php b/expenses.php index 8943fa99..0f93b3bf 100644 --- a/expenses.php +++ b/expenses.php @@ -98,8 +98,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t 'value'=>$cl_project, 'data'=>$project_list, 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->getKey('dropdown.select')) - )); + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); // Dropdown for clients if the clients plugin is enabled. if (in_array('cl', explode(',', $user->plugins))) { @@ -134,7 +133,7 @@ $form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses', $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. $form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->getKey('button.submit'))); -// Determine lock date. Time entries earlier than lock date cannot be created or modified. +// Determine lock date. Time entries earlier than lock date cannot be created or modified. $lock_interval = $user->lock_interval; $lockdate = 0; if ($lock_interval > 0) { diff --git a/export.php b/export.php index 3c46a5b5..9f3694ca 100644 --- a/export.php +++ b/export.php @@ -75,7 +75,7 @@ if ($request->getMethod() == 'POST') { exit; } else $errors->add($i18n->getKey('error.sys')); -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->getKey('title.export')); diff --git a/import.php b/import.php index a76af182..7d61e038 100644 --- a/import.php +++ b/import.php @@ -38,7 +38,7 @@ if (!ttAccessCheck(right_administer_site)) { $form = new Form('importForm'); $form->addInput(array('type'=>'upload','name'=>'xmlfile','value'=>'browse','maxsize'=>16777216)); // 16 MB file upload limit. -// Note: for the above limit to work make sure to set upload_max_filesize and post_max_size in php.ini to at least 16M. +// Note: for the above limit to work make sure to set upload_max_filesize and post_max_size in php.ini to at least 16M. $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.import'))); if ($request->getMethod() == 'POST') { @@ -47,7 +47,7 @@ if ($request->getMethod() == 'POST') { $import->importXml(); if ($errors->isEmpty()) $messages->add($i18n->getKey('form.import.success')); -} +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray()) ); $smarty->assign('title', $i18n->getKey('title.import')); -- 2.20.1