From 4070ac772a00d8ffb9590ffdeca10e5d494c26e2 Mon Sep 17 00:00:00 2001 From: Taylor Hurt Date: Tue, 30 Aug 2016 18:39:07 -0400 Subject: [PATCH 0001/2515] adds delete button to edit pages (#10) --- WEB-INF/templates/mobile/client_edit.tpl | 2 +- WEB-INF/templates/mobile/project_edit.tpl | 2 +- WEB-INF/templates/mobile/task_edit.tpl | 2 +- WEB-INF/templates/mobile/user_edit.tpl | 2 +- mobile/client_edit.php | 6 ++ mobile/expense_delete.php | 6 +- mobile/project_edit.php | 6 ++ mobile/task_edit.php | 7 ++ mobile/user_edit.php | 120 ++++++++++++---------- 9 files changed, 90 insertions(+), 63 deletions(-) diff --git a/WEB-INF/templates/mobile/client_edit.tpl b/WEB-INF/templates/mobile/client_edit.tpl index 578aa64e6..5cee575b2 100644 --- a/WEB-INF/templates/mobile/client_edit.tpl +++ b/WEB-INF/templates/mobile/client_edit.tpl @@ -32,7 +32,7 @@ {/if}   - {$forms.clientForm.btn_save.control} {$forms.clientForm.btn_copy.control} + {$forms.clientForm.btn_save.control} {$forms.clientForm.btn_copy.control} {$forms.clientForm.btn_delete.control} diff --git a/WEB-INF/templates/mobile/project_edit.tpl b/WEB-INF/templates/mobile/project_edit.tpl index c94e47540..b8266f472 100644 --- a/WEB-INF/templates/mobile/project_edit.tpl +++ b/WEB-INF/templates/mobile/project_edit.tpl @@ -36,7 +36,7 @@   - {$forms.projectForm.btn_save.control} {$forms.projectForm.btn_copy.control} + {$forms.projectForm.btn_save.control} {$forms.projectForm.btn_copy.control} {$forms.projectForm.btn_delete.control} diff --git a/WEB-INF/templates/mobile/task_edit.tpl b/WEB-INF/templates/mobile/task_edit.tpl index 5af8d9355..f9136284f 100644 --- a/WEB-INF/templates/mobile/task_edit.tpl +++ b/WEB-INF/templates/mobile/task_edit.tpl @@ -28,7 +28,7 @@   - {$forms.taskForm.btn_save.control} {$forms.taskForm.btn_copy.control} + {$forms.taskForm.btn_save.control} {$forms.taskForm.btn_copy.control} {$forms.taskForm.btn_delete.control} diff --git a/WEB-INF/templates/mobile/user_edit.tpl b/WEB-INF/templates/mobile/user_edit.tpl index 7f81ca032..cbfded788 100644 --- a/WEB-INF/templates/mobile/user_edit.tpl +++ b/WEB-INF/templates/mobile/user_edit.tpl @@ -105,7 +105,7 @@ function handleClientControl() { {$i18n.label.required_fields} - {$forms.userForm.btn_submit.control} + {$forms.userForm.btn_submit.control} {$forms.userForm.btn_delete.control} diff --git a/mobile/client_edit.php b/mobile/client_edit.php index 2c553daf0..cd6266dac 100644 --- a/mobile/client_edit.php +++ b/mobile/client_edit.php @@ -70,6 +70,7 @@ $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'datakeys'=>array('id','name'),'layout'=>'H','value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->getKey('button.copy'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); if ($request->isPost()) { // Validate user input. @@ -112,6 +113,11 @@ } else $err->add($i18n->getKey('error.client_exists')); } + + if ($request->getParameter('btn_delete')) { + header("Location: client_delete.php?id=$cl_id"); + exit(); + } } } // isPost diff --git a/mobile/expense_delete.php b/mobile/expense_delete.php index 38800b629..b027bd941 100644 --- a/mobile/expense_delete.php +++ b/mobile/expense_delete.php @@ -26,7 +26,7 @@ // | https://www.anuko.com/time_tracker/credits.htm // +----------------------------------------------------------------------+ -require_once('initialize.php'); +require_once('../initialize.php'); import('form.Form'); import('DateAndTime'); import('ttExpenseHelper'); @@ -74,5 +74,5 @@ $smarty->assign('expense_item', $expense_item); $smarty->assign('forms', array($form->getName() => $form->toArray())); $smarty->assign('title', $i18n->getKey('title.delete_expense')); -$smarty->assign('content_page_name', 'expense_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'mobile/expense_delete.tpl'); +$smarty->display('mobile/index.tpl'); diff --git a/mobile/project_edit.php b/mobile/project_edit.php index c1eb18047..490a11e24 100644 --- a/mobile/project_edit.php +++ b/mobile/project_edit.php @@ -81,6 +81,7 @@ $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->getKey('button.copy'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); if ($request->isPost()) { // Validate user input. @@ -123,6 +124,11 @@ } else $err->add($i18n->getKey('error.project_exists')); } + + if ($request->getParameter('btn_delete')) { + header("Location: project_delete.php?id=$cl_project_id"); + exit(); + } } } // isPost diff --git a/mobile/task_edit.php b/mobile/task_edit.php index fd5b35bb0..248167ff5 100644 --- a/mobile/task_edit.php +++ b/mobile/task_edit.php @@ -65,6 +65,8 @@ $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->getKey('button.copy'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); + if ($request->isPost()) { // Validate user input. @@ -105,6 +107,11 @@ } else $err->add($i18n->getKey('error.task_exists')); } + + if ($request->getParameter('btn_delete')) { + header("Location: task_delete.php?id=$cl_task_id"); + exit(); + } } } // isPost diff --git a/mobile/user_edit.php b/mobile/user_edit.php index 156e320ac..6077a13a9 100644 --- a/mobile/user_edit.php +++ b/mobile/user_edit.php @@ -161,67 +161,75 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$user_id)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.save'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.person_name')); - if (!ttValidString($cl_login)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.login')); - if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { - if (!ttValidString($cl_password1)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); - if (!ttValidString($cl_password2)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); - } - if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); - - if ($err->no()) { - $existing_user = ttUserHelper::getUserByLogin($cl_login); - if (!$existing_user || ($user_id == $existing_user['id'])) { - - $fields = array( - 'name' => $cl_name, - 'login' => $cl_login, - 'password' => $cl_password1, - 'email' => $cl_email, - 'status' => $cl_status, - 'rate' => $cl_rate, - 'projects' => $assigned_projects); - if (right_assign_roles & $user->rights) { - $fields['role'] = $cl_role; - $fields['client_id'] = $cl_client_id; - } - - if (ttUserHelper::update($user_id, $fields)) { - - // If our own login changed, set new one in cookie to remember it. - if (($user_id == $user->id) && ($user->login != $cl_login)) { - setcookie('tt_login', $cl_login, time() + COOKIE_EXPIRE, '/'); - } - - // In case the name of the "on behalf" user has changed - set it in session. - if (($user->behalf_id == $user_id) && ($user->behalf_name != $cl_name)) { - $_SESSION['behalf_name'] = $cl_name; + if ($request->getParameter('btn_submit')) { + // Validate user input. + if (!ttValidString($cl_name)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.person_name')); + if (!ttValidString($cl_login)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.login')); + if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { + if (!ttValidString($cl_password1)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.password')); + if (!ttValidString($cl_password2)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password')); + if ($cl_password1 !== $cl_password2) + $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); + } + if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); + if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); + + if ($err->no()) { + $existing_user = ttUserHelper::getUserByLogin($cl_login); + if (!$existing_user || ($user_id == $existing_user['id'])) { + + $fields = array( + 'name' => $cl_name, + 'login' => $cl_login, + 'password' => $cl_password1, + 'email' => $cl_email, + 'status' => $cl_status, + 'rate' => $cl_rate, + 'projects' => $assigned_projects); + if (right_assign_roles & $user->rights) { + $fields['role'] = $cl_role; + $fields['client_id'] = $cl_client_id; } - - // If we deactivated our own account, do housekeeping and logout. - if ($user->id == $user_id && !is_null($cl_status) && $cl_status == INACTIVE) { - // Remove tt_login cookie that stores login name. - unset($_COOKIE['tt_login']); - setcookie('tt_login', NULL, -1); - - $auth->doLogout(); - header('Location: login.php'); + + if (ttUserHelper::update($user_id, $fields)) { + + // If our own login changed, set new one in cookie to remember it. + if (($user_id == $user->id) && ($user->login != $cl_login)) { + setcookie('tt_login', $cl_login, time() + COOKIE_EXPIRE, '/'); + } + + // In case the name of the "on behalf" user has changed - set it in session. + if (($user->behalf_id == $user_id) && ($user->behalf_name != $cl_name)) { + $_SESSION['behalf_name'] = $cl_name; + } + + // If we deactivated our own account, do housekeeping and logout. + if ($user->id == $user_id && !is_null($cl_status) && $cl_status == INACTIVE) { + // Remove tt_login cookie that stores login name. + unset($_COOKIE['tt_login']); + setcookie('tt_login', NULL, -1); + + $auth->doLogout(); + header('Location: login.php'); + exit(); + } + + header('Location: users.php'); exit(); - } - - header('Location: users.php'); - exit(); - + + } else + $err->add($i18n->getKey('error.db')); } else - $err->add($i18n->getKey('error.db')); - } else - $err->add($i18n->getKey('error.user_exists')); + $err->add($i18n->getKey('error.user_exists')); + } + } + + if ($request->getParameter('btn_delete')) { + header("Location: user_delete.php?id=$user_id"); + exit(); } } // isPost From 7e262c715b1aa98a098de900633a17bea4250ffc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 30 Aug 2016 23:23:18 +0000 Subject: [PATCH 0002/2515] Changed version after pull request #10 merge. --- WEB-INF/templates/footer.tpl | 2 +- client_delete.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b38b0d194..a91075bb5 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.30.3527 | Copyright © Anuko | +  Anuko Time Tracker 1.9.30.3528 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/client_delete.php b/client_delete.php index 201d02ca0..2340db03f 100644 --- a/client_delete.php +++ b/client_delete.php @@ -57,8 +57,8 @@ } else $err->add($i18n->getKey('error.db')); } - } else - $err->add($i18n->getKey('error.db')); + } else + $err->add($i18n->getKey('error.db')); if ($request->getParameter('btn_cancel')) { header('Location: clients.php'); From 5aa92645bf876259fa327cf89a23df1f7034b1e3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 31 Aug 2016 18:09:41 +0000 Subject: [PATCH 0003/2515] Added a check for config.php file to start with PHP opening tag. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a91075bb5..793494dfc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.30.3528 | Copyright © Anuko | +  Anuko Time Tracker 1.9.30.3529 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 49d61f1e1..46fc0fc74 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -55,6 +55,16 @@ function setChange($sql) { // Require the configuration file with application settings. if (file_exists(APP_DIR."/WEB-INF/config.php")) { echo('WEB-INF/config.php file exists.
'); + + // Config file must start with the PHP opening tag. We are checking this because + // a Unicode editor may insert a byte order matk (BOM) before it. This is not good as it will + // spit white space before output in some situations such as in PDF reports. + $file = fopen(APP_DIR."/WEB-INF/config.php", "r"); + $line = fgets($file); + if (strcmp("Error: WEB-INF/config.php file does not start with PHP opening tag.
'); + } + fclose($file); } else { echo('Error: WEB-INF/config.php file does not exist.
'); } From 14452b9930953c2692a7281978d90beabd8d010e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Sep 2016 23:08:58 +0000 Subject: [PATCH 0004/2515] Fixed double notifications, hopefully. --- WEB-INF/templates/footer.tpl | 2 +- cron.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 793494dfc..c9af24b22 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.30.3529 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3530 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/cron.php b/cron.php index 345ddd3e8..9212e5583 100644 --- a/cron.php +++ b/cron.php @@ -46,6 +46,7 @@ $mdb2 = getConnection(); $now = mktime(); +$now = 1473548400; $sql = "select * from tt_cron where $now >= next and status = 1 and report_id is not null and email is not null"; @@ -71,7 +72,8 @@ echo "Error while emailing report...
"; // Calculate next execution time. - $next = tdCron::getNextOccurrence($val['cron_spec'], $now); + $next = tdCron::getNextOccurrence($val['cron_spec'], $now + 60); // +60 sec is here to get us correct $next when $now is close to existing "next". + // This is because the accuracy of tdcron class appears to be 1 minute. // Update last and next values in tt_cron. $sql = "update tt_cron set last = $now, next = $next where id = ".$val['id']; From afe2d051307ae2cd54bdb957f04e1d9f625f2dd9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Sep 2016 23:21:42 +0000 Subject: [PATCH 0005/2515] Fixed a critical issue with previous commit (hard-coded timestamp for testing). --- WEB-INF/templates/footer.tpl | 2 +- cron.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c9af24b22..2d0ded6a3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.31.3530 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3531 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/cron.php b/cron.php index 9212e5583..7be547d61 100644 --- a/cron.php +++ b/cron.php @@ -46,7 +46,6 @@ $mdb2 = getConnection(); $now = mktime(); -$now = 1473548400; $sql = "select * from tt_cron where $now >= next and status = 1 and report_id is not null and email is not null"; From 90ff65cf45284f90b1c4e09fe575319b320f56ac Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Sep 2016 20:03:12 +0000 Subject: [PATCH 0006/2515] Updated PEAR and PEAR packages. --- WEB-INF/lib/pear/INSTALL | 2 - WEB-INF/lib/pear/Mail.php | 31 +- WEB-INF/lib/pear/Mail/RFC822.php | 84 +- WEB-INF/lib/pear/Mail/mail.php | 12 +- WEB-INF/lib/pear/Mail/mock.php | 19 +- WEB-INF/lib/pear/Mail/null.php | 9 +- WEB-INF/lib/pear/Mail/sendmail.php | 10 +- WEB-INF/lib/pear/Mail/smtp.php | 43 +- WEB-INF/lib/pear/Mail/smtpmx.php | 10 +- WEB-INF/lib/pear/Net/SMTP.php | 954 ++++++++++-------- WEB-INF/lib/pear/Net/Socket.php | 304 ++++-- WEB-INF/lib/pear/OS/Guess.php | 7 +- WEB-INF/lib/pear/PEAR.php | 185 ++-- WEB-INF/lib/pear/PEAR/Autoloader.php | 5 +- WEB-INF/lib/pear/PEAR/Builder.php | 32 +- WEB-INF/lib/pear/PEAR/ChannelFile.php | 33 +- WEB-INF/lib/pear/PEAR/ChannelFile/Parser.php | 3 +- WEB-INF/lib/pear/PEAR/Command.php | 53 +- WEB-INF/lib/pear/PEAR/Command/Auth.php | 9 +- WEB-INF/lib/pear/PEAR/Command/Build.php | 11 +- WEB-INF/lib/pear/PEAR/Command/Channels.php | 11 +- WEB-INF/lib/pear/PEAR/Command/Common.php | 9 +- WEB-INF/lib/pear/PEAR/Command/Config.php | 12 +- WEB-INF/lib/pear/PEAR/Command/Install.php | 39 +- WEB-INF/lib/pear/PEAR/Command/Mirror.php | 11 +- WEB-INF/lib/pear/PEAR/Command/Package.php | 21 +- WEB-INF/lib/pear/PEAR/Command/Pickle.php | 13 +- WEB-INF/lib/pear/PEAR/Command/Registry.php | 13 +- WEB-INF/lib/pear/PEAR/Command/Remote.php | 17 +- WEB-INF/lib/pear/PEAR/Command/Test.php | 18 +- WEB-INF/lib/pear/PEAR/Common.php | 87 +- WEB-INF/lib/pear/PEAR/Config.php | 90 +- WEB-INF/lib/pear/PEAR/Dependency2.php | 19 +- WEB-INF/lib/pear/PEAR/DependencyDB.php | 21 +- WEB-INF/lib/pear/PEAR/Downloader.php | 90 +- WEB-INF/lib/pear/PEAR/Downloader/Package.php | 47 +- WEB-INF/lib/pear/PEAR/ErrorStack.php | 70 +- WEB-INF/lib/pear/PEAR/Exception.php | 3 +- WEB-INF/lib/pear/PEAR/FixPHP5PEARWarnings.php | 7 - WEB-INF/lib/pear/PEAR/Frontend.php | 17 +- WEB-INF/lib/pear/PEAR/Frontend/CLI.php | 9 +- WEB-INF/lib/pear/PEAR/Installer.php | 83 +- WEB-INF/lib/pear/PEAR/Installer/Role.php | 26 +- WEB-INF/lib/pear/PEAR/Installer/Role/Cfg.php | 3 +- .../lib/pear/PEAR/Installer/Role/Common.php | 7 +- WEB-INF/lib/pear/PEAR/Installer/Role/Data.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Doc.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Ext.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Man.php | 28 + WEB-INF/lib/pear/PEAR/Installer/Role/Man.xml | 15 + WEB-INF/lib/pear/PEAR/Installer/Role/Php.php | 3 +- .../lib/pear/PEAR/Installer/Role/Script.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Src.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Test.php | 3 +- WEB-INF/lib/pear/PEAR/Installer/Role/Www.php | 3 +- WEB-INF/lib/pear/PEAR/PackageFile.php | 7 +- .../pear/PEAR/PackageFile/Generator/v1.php | 28 +- .../pear/PEAR/PackageFile/Generator/v2.php | 23 +- .../lib/pear/PEAR/PackageFile/Parser/v1.php | 3 +- .../lib/pear/PEAR/PackageFile/Parser/v2.php | 5 +- WEB-INF/lib/pear/PEAR/PackageFile/v1.php | 20 +- WEB-INF/lib/pear/PEAR/PackageFile/v2.php | 29 +- .../pear/PEAR/PackageFile/v2/Validator.php | 35 +- WEB-INF/lib/pear/PEAR/PackageFile/v2/rw.php | 5 +- WEB-INF/lib/pear/PEAR/Packager.php | 5 +- WEB-INF/lib/pear/PEAR/REST.php | 45 +- WEB-INF/lib/pear/PEAR/REST/10.php | 9 +- WEB-INF/lib/pear/PEAR/REST/11.php | 9 +- WEB-INF/lib/pear/PEAR/REST/13.php | 101 +- WEB-INF/lib/pear/PEAR/Registry.php | 51 +- WEB-INF/lib/pear/PEAR/RunTest.php | 66 +- WEB-INF/lib/pear/PEAR/Task/Common.php | 143 +-- .../lib/pear/PEAR/Task/Postinstallscript.php | 332 +++--- .../pear/PEAR/Task/Postinstallscript/rw.php | 125 ++- WEB-INF/lib/pear/PEAR/Task/Replace.php | 74 +- WEB-INF/lib/pear/PEAR/Task/Replace/rw.php | 30 +- WEB-INF/lib/pear/PEAR/Task/Unixeol.php | 50 +- WEB-INF/lib/pear/PEAR/Task/Unixeol/rw.php | 29 +- WEB-INF/lib/pear/PEAR/Task/Windowseol.php | 65 +- WEB-INF/lib/pear/PEAR/Task/Windowseol/rw.php | 44 +- WEB-INF/lib/pear/PEAR/Validate.php | 18 +- WEB-INF/lib/pear/PEAR/Validator/PECL.php | 3 +- WEB-INF/lib/pear/PEAR/XMLParser.php | 8 +- WEB-INF/lib/pear/PEAR5.php | 33 - WEB-INF/lib/pear/README | 32 - WEB-INF/lib/pear/README.rst | 88 ++ WEB-INF/lib/pear/System.php | 79 +- WEB-INF/lib/pear/scripts/pear.bat | 220 ++-- WEB-INF/lib/pear/scripts/pearcmd.php | 353 ++++--- WEB-INF/lib/pear/scripts/peardev.bat | 228 ++--- WEB-INF/lib/pear/scripts/pecl.bat | 228 ++--- WEB-INF/lib/pear/scripts/peclcmd.php | 7 +- WEB-INF/templates/footer.tpl | 2 +- 93 files changed, 2805 insertions(+), 2453 deletions(-) delete mode 100644 WEB-INF/lib/pear/PEAR/FixPHP5PEARWarnings.php create mode 100644 WEB-INF/lib/pear/PEAR/Installer/Role/Man.php create mode 100644 WEB-INF/lib/pear/PEAR/Installer/Role/Man.xml delete mode 100644 WEB-INF/lib/pear/PEAR5.php delete mode 100644 WEB-INF/lib/pear/README create mode 100644 WEB-INF/lib/pear/README.rst diff --git a/WEB-INF/lib/pear/INSTALL b/WEB-INF/lib/pear/INSTALL index 08f4c0b08..1312bc888 100644 --- a/WEB-INF/lib/pear/INSTALL +++ b/WEB-INF/lib/pear/INSTALL @@ -50,5 +50,3 @@ a public mailing list devoted to support for PEAR packages and installation- related issues. Happy PHPing, we hope PEAR will be a great tool for your development work! - -$Id: INSTALL 313023 2011-07-06 19:17:11Z dufuz $ \ No newline at end of file diff --git a/WEB-INF/lib/pear/Mail.php b/WEB-INF/lib/pear/Mail.php index 75132ac2a..e7cff2f64 100644 --- a/WEB-INF/lib/pear/Mail.php +++ b/WEB-INF/lib/pear/Mail.php @@ -1,8 +1,8 @@ * @copyright 1997-2010 Chuck Hagenbuch * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Mail.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ @@ -50,8 +50,7 @@ * mailers under the PEAR hierarchy, and provides supporting functions * useful in multiple mailer backends. * - * @access public - * @version $Revision: 294747 $ + * @version $Revision$ * @package Mail */ class Mail @@ -60,7 +59,7 @@ class Mail * Line terminator used for separating header lines. * @var string */ - var $sep = "\r\n"; + public $sep = "\r\n"; /** * Provides an interface for generating Mail:: objects of various @@ -68,10 +67,10 @@ class Mail * * @param string $driver The kind of Mail:: object to instantiate. * @param array $params The parameters to pass to the Mail:: object. + * * @return object Mail a instance of the driver class or if fails a PEAR Error - * @access public */ - function &factory($driver, $params = array()) + public static function factory($driver, $params = array()) { $driver = strtolower($driver); @include_once 'Mail/' . $driver . '.php'; @@ -108,10 +107,9 @@ function &factory($driver, $params = array()) * containing a descriptive error message on * failure. * - * @access public * @deprecated use Mail_mail::send instead */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { if (!is_array($headers)) { return PEAR::raiseError('$headers must be an array'); @@ -147,10 +145,8 @@ function send($recipients, $headers, $body) * filter is to prevent mail injection attacks. * * @param array $headers The associative array of headers to sanitize. - * - * @access private */ - function _sanitizeHeaders(&$headers) + protected function _sanitizeHeaders(&$headers) { foreach ($headers as $key => $value) { $headers[$key] = @@ -173,9 +169,8 @@ function _sanitizeHeaders(&$headers) * otherwise returns an array containing two * elements: Any From: address found in the headers, * and the plain text version of the headers. - * @access private */ - function prepareHeaders($headers) + protected function prepareHeaders($headers) { $lines = array(); $from = null; @@ -235,9 +230,8 @@ function prepareHeaders($headers) * * @return mixed An array of forward paths (bare addresses) or a PEAR_Error * object if the address list could not be parsed. - * @access private */ - function parseRecipients($recipients) + protected function parseRecipients($recipients) { include_once 'Mail/RFC822.php'; @@ -250,7 +244,8 @@ function parseRecipients($recipients) // Parse recipients, leaving out all personal info. This is // for smtp recipients, etc. All relevant personal information // should already be in the headers. - $addresses = Mail_RFC822::parseAddressList($recipients, 'localhost', false); + $Mail_RFC822 = new Mail_RFC822(); + $addresses = $Mail_RFC822->parseAddressList($recipients, 'localhost', false); // If parseAddressList() returned a PEAR_Error object, just return it. if (is_a($addresses, 'PEAR_Error')) { diff --git a/WEB-INF/lib/pear/Mail/RFC822.php b/WEB-INF/lib/pear/Mail/RFC822.php index 58d36465c..d010a20e8 100644 --- a/WEB-INF/lib/pear/Mail/RFC822.php +++ b/WEB-INF/lib/pear/Mail/RFC822.php @@ -2,7 +2,7 @@ /** * RFC 822 Email address list validation Utility * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: * @@ -40,7 +40,7 @@ * @author Chuck Hagenbuch * @author Chuck Hagenbuch - * @version $Revision: 294749 $ + * @version $Revision$ * @license BSD * @package Mail */ @@ -141,7 +141,6 @@ class Mail_RFC822 { * Sets up the object. The address must either be set here or when * calling parseAddressList(). One or the other. * - * @access public * @param string $address The address(es) to validate. * @param string $default_domain Default domain/host etc. If not supplied, will be set to localhost. * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. @@ -149,7 +148,7 @@ class Mail_RFC822 { * * @return object Mail_RFC822 A new Mail_RFC822 object. */ - function Mail_RFC822($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) + public function __construct($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) { if (isset($address)) $this->address = $address; if (isset($default_domain)) $this->default_domain = $default_domain; @@ -162,7 +161,6 @@ function Mail_RFC822($address = null, $default_domain = null, $nest_groups = nul * Starts the whole process. The address must either be set here * or when creating the object. One or the other. * - * @access public * @param string $address The address(es) to validate. * @param string $default_domain Default domain/host etc. * @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing. @@ -170,7 +168,7 @@ function Mail_RFC822($address = null, $default_domain = null, $nest_groups = nul * * @return array A structured array of addresses. */ - function parseAddressList($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) + public function parseAddressList($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null) { if (!isset($this) || !isset($this->mailRFC822)) { $obj = new Mail_RFC822($address, $default_domain, $nest_groups, $validate, $limit); @@ -222,11 +220,10 @@ function parseAddressList($address = null, $default_domain = null, $nest_groups /** * Splits an address into separate addresses. * - * @access private * @param string $address The addresses to split. * @return boolean Success or failure. */ - function _splitAddresses($address) + protected function _splitAddresses($address) { if (!empty($this->limit) && count($this->addresses) == $this->limit) { return ''; @@ -298,11 +295,10 @@ function _splitAddresses($address) /** * Checks for a group at the start of the string. * - * @access private * @param string $address The address to check. * @return boolean Whether or not there is a group at the start of the string. */ - function _isGroup($address) + protected function _isGroup($address) { // First comma not in quotes, angles or escaped: $parts = explode(',', $address); @@ -322,12 +318,11 @@ function _isGroup($address) /** * A common function that will check an exploded string. * - * @access private * @param array $parts The exloded string. * @param string $char The char that was exploded on. * @return mixed False if the string contains unclosed quotes/brackets, or the string on success. */ - function _splitCheck($parts, $char) + protected function _splitCheck($parts, $char) { $string = $parts[0]; @@ -355,12 +350,11 @@ function _splitCheck($parts, $char) /** * Checks if a string has unclosed quotes or not. * - * @access private * @param string $string The string to check. * @return boolean True if there are unclosed quotes inside the string, * false otherwise. */ - function _hasUnclosedQuotes($string) + protected function _hasUnclosedQuotes($string) { $string = trim($string); $iMax = strlen($string); @@ -392,12 +386,11 @@ function _hasUnclosedQuotes($string) * Checks if a string has an unclosed brackets or not. IMPORTANT: * This function handles both angle brackets and square brackets; * - * @access private * @param string $string The string to check. * @param string $chars The characters to check for. * @return boolean True if there are unclosed brackets inside the string, false otherwise. */ - function _hasUnclosedBrackets($string, $chars) + protected function _hasUnclosedBrackets($string, $chars) { $num_angle_start = substr_count($string, $chars[0]); $num_angle_end = substr_count($string, $chars[1]); @@ -416,13 +409,12 @@ function _hasUnclosedBrackets($string, $chars) /** * Sub function that is used only by hasUnclosedBrackets(). * - * @access private * @param string $string The string to check. * @param integer &$num The number of occurences. * @param string $char The character to count. * @return integer The number of occurences of $char in $string, adjusted for backslashes. */ - function _hasUnclosedBracketsSub($string, &$num, $char) + protected function _hasUnclosedBracketsSub($string, &$num, $char) { $parts = explode($char, $string); for ($i = 0; $i < count($parts); $i++){ @@ -438,11 +430,10 @@ function _hasUnclosedBracketsSub($string, &$num, $char) /** * Function to begin checking the address. * - * @access private * @param string $address The address to validate. * @return mixed False on failure, or a structured array of address information on success. */ - function _validateAddress($address) + protected function _validateAddress($address) { $is_group = false; $addresses = array(); @@ -483,14 +474,6 @@ function _validateAddress($address) $addresses[] = $address['address']; } - // Check that $addresses is set, if address like this: - // Groupname:; - // Then errors were appearing. - if (!count($addresses)){ - $this->error = 'Empty group.'; - return false; - } - // Trim the whitespace from all of the address strings. array_map('trim', $addresses); @@ -531,11 +514,10 @@ function _validateAddress($address) /** * Function to validate a phrase. * - * @access private * @param string $phrase The phrase to check. * @return boolean Success or failure. */ - function _validatePhrase($phrase) + protected function _validatePhrase($phrase) { // Splits on one or more Tab or space. $parts = preg_split('/[ \\x09]+/', $phrase, -1, PREG_SPLIT_NO_EMPTY); @@ -572,11 +554,10 @@ function _validatePhrase($phrase) * can split a list of addresses up before encoding personal names * (umlauts, etc.), for example. * - * @access private * @param string $atom The string to check. * @return boolean Success or failure. */ - function _validateAtom($atom) + protected function _validateAtom($atom) { if (!$this->validate) { // Validation has been turned off; assume the atom is okay. @@ -605,11 +586,10 @@ function _validateAtom($atom) * Function to validate quoted string, which is: * quoted-string = <"> *(qtext/quoted-pair) <"> * - * @access private * @param string $qstring The string to check * @return boolean Success or failure. */ - function _validateQuotedString($qstring) + protected function _validateQuotedString($qstring) { // Leading and trailing " $qstring = substr($qstring, 1, -1); @@ -623,11 +603,10 @@ function _validateQuotedString($qstring) * mailbox = addr-spec ; simple address * / phrase route-addr ; name and route-addr * - * @access public * @param string &$mailbox The string to check. * @return boolean Success or failure. */ - function validateMailbox(&$mailbox) + public function validateMailbox(&$mailbox) { // A couple of defaults. $phrase = ''; @@ -712,11 +691,10 @@ function validateMailbox(&$mailbox) * Angle brackets have already been removed at the point of * getting to this function. * - * @access private * @param string $route_addr The string to check. * @return mixed False on failure, or an array containing validated address/route information on success. */ - function _validateRouteAddr($route_addr) + protected function _validateRouteAddr($route_addr) { // Check for colon. if (strpos($route_addr, ':') !== false) { @@ -762,11 +740,10 @@ function _validateRouteAddr($route_addr) * Function to validate a route, which is: * route = 1#("@" domain) ":" * - * @access private * @param string $route The string to check. * @return mixed False on failure, or the validated $route on success. */ - function _validateRoute($route) + protected function _validateRoute($route) { // Split on comma. $domains = explode(',', trim($route)); @@ -785,11 +762,10 @@ function _validateRoute($route) * * domain = sub-domain *("." sub-domain) * - * @access private * @param string $domain The string to check. * @return mixed False on failure, or the validated domain on success. */ - function _validateDomain($domain) + protected function _validateDomain($domain) { // Note the different use of $subdomains and $sub_domains $subdomains = explode('.', $domain); @@ -813,11 +789,10 @@ function _validateDomain($domain) * Function to validate a subdomain: * subdomain = domain-ref / domain-literal * - * @access private * @param string $subdomain The string to check. * @return boolean Success or failure. */ - function _validateSubdomain($subdomain) + protected function _validateSubdomain($subdomain) { if (preg_match('|^\[(.*)]$|', $subdomain, $arr)){ if (!$this->_validateDliteral($arr[1])) return false; @@ -833,11 +808,10 @@ function _validateSubdomain($subdomain) * Function to validate a domain literal: * domain-literal = "[" *(dtext / quoted-pair) "]" * - * @access private * @param string $dliteral The string to check. * @return boolean Success or failure. */ - function _validateDliteral($dliteral) + protected function _validateDliteral($dliteral) { return !preg_match('/(.)[][\x0D\\\\]/', $dliteral, $matches) && $matches[1] != '\\'; } @@ -847,11 +821,10 @@ function _validateDliteral($dliteral) * * addr-spec = local-part "@" domain * - * @access private * @param string $addr_spec The string to check. * @return mixed False on failure, or the validated addr-spec on success. */ - function _validateAddrSpec($addr_spec) + protected function _validateAddrSpec($addr_spec) { $addr_spec = trim($addr_spec); @@ -878,17 +851,16 @@ function _validateAddrSpec($addr_spec) * Function to validate the local part of an address: * local-part = word *("." word) * - * @access private * @param string $local_part * @return mixed False on failure, or the validated local part on success. */ - function _validateLocalPart($local_part) + protected function _validateLocalPart($local_part) { $parts = explode('.', $local_part); $words = array(); // Split the local_part into words. - while (count($parts) > 0){ + while (count($parts) > 0) { $words[] = $this->_splitCheck($parts, '.'); for ($i = 0; $i < $this->index + 1; $i++) { array_shift($parts); @@ -897,6 +869,10 @@ function _validateLocalPart($local_part) // Validate each word. foreach ($words as $word) { + // word cannot be empty (#17317) + if ($word === '') { + return false; + } // If this word contains an unquoted space, it is invalid. (6.2.4) if (strpos($word, ' ') && $word[0] !== '"') { @@ -920,7 +896,7 @@ function _validateLocalPart($local_part) * @param string $data Addresses to count * @return int Approximate count */ - function approximateCount($data) + public function approximateCount($data) { return count(preg_split('/(? * @copyright 2010 Chuck Hagenbuch * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: mail.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ /** * internal PHP-mail() implementation of the PEAR Mail:: interface. * @package Mail - * @version $Revision: 294747 $ + * @version $Revision$ */ class Mail_mail extends Mail { @@ -64,7 +64,7 @@ class Mail_mail extends Mail { * * @param array $params Extra arguments for the mail() function. */ - function Mail_mail($params = null) + public function __construct($params = null) { // The other mail implementations accept parameters as arrays. // In the interest of being consistent, explode an array into @@ -109,10 +109,8 @@ function Mail_mail($params = null) * @return mixed Returns true on success, or a PEAR_Error * containing a descriptive error message on * failure. - * - * @access public */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { if (!is_array($headers)) { return PEAR::raiseError('$headers must be an array'); diff --git a/WEB-INF/lib/pear/Mail/mock.php b/WEB-INF/lib/pear/Mail/mock.php index 61570ba40..e3e290bdc 100644 --- a/WEB-INF/lib/pear/Mail/mock.php +++ b/WEB-INF/lib/pear/Mail/mock.php @@ -2,7 +2,7 @@ /** * Mock implementation * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: * @@ -39,7 +39,7 @@ * @author Chuck Hagenbuch * @copyright 2010 Chuck Hagenbuch * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: mock.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ @@ -47,7 +47,7 @@ * Mock implementation of the PEAR Mail:: interface for testing. * @access public * @package Mail - * @version $Revision: 294747 $ + * @version $Revision$ */ class Mail_mock extends Mail { @@ -55,23 +55,22 @@ class Mail_mock extends Mail { * Array of messages that have been sent with the mock. * * @var array - * @access public */ - var $sentMessages = array(); + public $sentMessages = array(); /** * Callback before sending mail. * * @var callback */ - var $_preSendCallback; + protected $_preSendCallback; /** * Callback after sending mai. * * @var callback */ - var $_postSendCallback; + protected $_postSendCallback; /** * Constructor. @@ -82,9 +81,8 @@ class Mail_mock extends Mail { * postSendCallback Called after an email would have been sent. * * @param array Hash containing any parameters. - * @access public */ - function Mail_mock($params) + public function __construct($params) { if (isset($params['preSendCallback']) && is_callable($params['preSendCallback'])) { @@ -120,9 +118,8 @@ function Mail_mock($params) * @return mixed Returns true on success, or a PEAR_Error * containing a descriptive error message on * failure. - * @access public */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { if ($this->_preSendCallback) { call_user_func_array($this->_preSendCallback, diff --git a/WEB-INF/lib/pear/Mail/null.php b/WEB-INF/lib/pear/Mail/null.php index f8d58272e..7896a4299 100644 --- a/WEB-INF/lib/pear/Mail/null.php +++ b/WEB-INF/lib/pear/Mail/null.php @@ -2,7 +2,7 @@ /** * Null implementation of the PEAR Mail interface * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: * @@ -39,7 +39,7 @@ * @author Phil Kernick * @copyright 2010 Phil Kernick * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: null.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ @@ -47,7 +47,7 @@ * Null implementation of the PEAR Mail:: interface. * @access public * @package Mail - * @version $Revision: 294747 $ + * @version $Revision$ */ class Mail_null extends Mail { @@ -74,9 +74,8 @@ class Mail_null extends Mail { * @return mixed Returns true on success, or a PEAR_Error * containing a descriptive error message on * failure. - * @access public */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { return true; } diff --git a/WEB-INF/lib/pear/Mail/sendmail.php b/WEB-INF/lib/pear/Mail/sendmail.php index b056575e9..f8866bdf3 100644 --- a/WEB-INF/lib/pear/Mail/sendmail.php +++ b/WEB-INF/lib/pear/Mail/sendmail.php @@ -1,7 +1,7 @@ sendmail_path = $params['sendmail_path']; @@ -100,9 +99,8 @@ function Mail_sendmail($params) * @return mixed Returns true on success, or a PEAR_Error * containing a descriptive error message on * failure. - * @access public */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { if (!is_array($headers)) { return PEAR::raiseError('$headers must be an array'); diff --git a/WEB-INF/lib/pear/Mail/smtp.php b/WEB-INF/lib/pear/Mail/smtp.php index 52ea60208..d446b1bcd 100644 --- a/WEB-INF/lib/pear/Mail/smtp.php +++ b/WEB-INF/lib/pear/Mail/smtp.php @@ -2,7 +2,7 @@ /** * SMTP implementation of the PEAR Mail interface. Requires the Net_SMTP class. * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: * @@ -40,7 +40,7 @@ * @author Chuck Hagenbuch * @copyright 2010 Chuck Hagenbuch * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: smtp.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ @@ -69,7 +69,7 @@ * SMTP implementation of the PEAR Mail interface. Requires the Net_SMTP class. * @access public * @package Mail - * @version $Revision: 294747 $ + * @version $Revision$ */ class Mail_smtp extends Mail { @@ -162,6 +162,8 @@ class Mail_smtp extends Mail { * @var bool */ var $pipelining; + + var $socket_options = array(); /** * Constructor. @@ -186,9 +188,8 @@ class Mail_smtp extends Mail { * * @param array Hash containing any parameters different from the * defaults. - * @access public */ - function Mail_smtp($params) + public function __construct($params) { if (isset($params['host'])) $this->host = $params['host']; if (isset($params['port'])) $this->port = $params['port']; @@ -200,20 +201,18 @@ function Mail_smtp($params) if (isset($params['debug'])) $this->debug = (bool)$params['debug']; if (isset($params['persist'])) $this->persist = (bool)$params['persist']; if (isset($params['pipelining'])) $this->pipelining = (bool)$params['pipelining']; - + if (isset($params['socket_options'])) $this->socket_options = $params['socket_options']; // Deprecated options if (isset($params['verp'])) { $this->addServiceExtensionParameter('XVERP', is_bool($params['verp']) ? null : $params['verp']); } - - register_shutdown_function(array(&$this, '_Mail_smtp')); } /** * Destructor implementation to ensure that we disconnect from any * potentially-alive persistent SMTP connections. */ - function _Mail_smtp() + public function __destruct() { $this->disconnect(); } @@ -240,12 +239,11 @@ function _Mail_smtp() * @return mixed Returns true on success, or a PEAR_Error * containing a descriptive error message on * failure. - * @access public */ - function send($recipients, $headers, $body) + public function send($recipients, $headers, $body) { /* If we don't already have an SMTP object, create one. */ - $result = &$this->getSMTPObject(); + $result = $this->getSMTPObject(); if (PEAR::isError($result)) { return $result; } @@ -304,7 +302,7 @@ function send($recipients, $headers, $body) } /* Send the message's headers and the body as SMTP data. */ - $res = $this->_smtp->data($textHeaders . "\r\n\r\n" . $body); + $res = $this->_smtp->data($body, $textHeaders); list(,$args) = $this->_smtp->getResponse(); if (preg_match("/Ok: queued as (.*)/", $args, $queued)) { @@ -337,18 +335,20 @@ function send($recipients, $headers, $body) * failure. * * @since 1.2.0 - * @access public */ - function &getSMTPObject() + public function getSMTPObject() { if (is_object($this->_smtp) !== false) { return $this->_smtp; } include_once 'Net/SMTP.php'; - $this->_smtp = &new Net_SMTP($this->host, + $this->_smtp = new Net_SMTP($this->host, $this->port, - $this->localhost); + $this->localhost, + $this->pipelining, + 0, + $this->socket_options); /* If we still don't have an SMTP object at this point, fail. */ if (is_object($this->_smtp) === false) { @@ -393,9 +393,8 @@ function &getSMTPObject() * @param string Any value the keyword needs. * * @since 1.2.0 - * @access public */ - function addServiceExtensionParameter($keyword, $value = null) + public function addServiceExtensionParameter($keyword, $value = null) { $this->_extparams[$keyword] = $value; } @@ -406,9 +405,8 @@ function addServiceExtensionParameter($keyword, $value = null) * @return boolean True if the SMTP connection no longer exists. * * @since 1.1.9 - * @access public */ - function disconnect() + public function disconnect() { /* If we have an SMTP object, disconnect and destroy it. */ if (is_object($this->_smtp) && $this->_smtp->disconnect()) { @@ -428,9 +426,8 @@ function disconnect() * @return string A string describing the current SMTP error. * * @since 1.1.7 - * @access private */ - function _error($text, &$error) + protected function _error($text, $error) { /* Split the SMTP response into a code and a response string. */ list($code, $response) = $this->_smtp->getResponse(); diff --git a/WEB-INF/lib/pear/Mail/smtpmx.php b/WEB-INF/lib/pear/Mail/smtpmx.php index f0b694086..6eb8bec2e 100644 --- a/WEB-INF/lib/pear/Mail/smtpmx.php +++ b/WEB-INF/lib/pear/Mail/smtpmx.php @@ -1,4 +1,4 @@ - * @copyright 2010 gERD Schaufelberger * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: smtpmx.php 294747 2010-02-08 08:18:33Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/Mail/ */ @@ -56,7 +56,7 @@ * @access public * @author gERD Schaufelberger * @package Mail - * @version $Revision: 294747 $ + * @version $Revision$ */ class Mail_smtpmx extends Mail { @@ -386,7 +386,7 @@ function send($recipients, $headers, $body) } // Send data - $res = $this->_smtp->data("$textHeaders\r\n$body"); + $res = $this->_smtp->data($body, $textHeaders); if (is_a($res, 'PEAR_Error')) { $info = array('rcpt' => $rcpt); return $this->_raiseError('failed_send_data', $info); diff --git a/WEB-INF/lib/pear/Net/SMTP.php b/WEB-INF/lib/pear/Net/SMTP.php index ea4b55e8d..dd822a565 100644 --- a/WEB-INF/lib/pear/Net/SMTP.php +++ b/WEB-INF/lib/pear/Net/SMTP.php @@ -1,14 +1,14 @@ | // | Damian Alejandro Fernandez Sosa | // +----------------------------------------------------------------------+ -// -// $Id: SMTP.php 293948 2010-01-24 21:46:00Z jon $ require_once 'PEAR.php'; require_once 'Net/Socket.php'; /** * Provides an implementation of the SMTP protocol using PEAR's - * Net_Socket:: class. + * Net_Socket class. * * @package Net_SMTP * @author Chuck Hagenbuch * @author Jon Parise * @author Damian Alejandro Fernandez Sosa * - * @example basic.php A basic implementation of the Net_SMTP package. + * @example basic.php A basic implementation of the Net_SMTP package. */ class Net_SMTP { /** * The server to connect to. * @var string - * @access public */ - var $host = 'localhost'; + public $host = 'localhost'; /** * The port to connect to. * @var int - * @access public */ - var $port = 25; + public $port = 25; /** * The value to give when sending EHLO or HELO. * @var string - * @access public */ - var $localhost = 'localhost'; + public $localhost = 'localhost'; /** * List of supported authentication methods, in preferential order. * @var array - * @access public */ - var $auth_methods = array('DIGEST-MD5', 'CRAM-MD5', 'LOGIN', 'PLAIN'); + public $auth_methods = array(); /** * Use SMTP command pipelining (specified in RFC 2920) if the SMTP @@ -73,65 +67,69 @@ class Net_SMTP * SMTP server but return immediately. * * @var bool - * @access public */ - var $pipelining = false; + public $pipelining = false; /** * Number of pipelined commands. * @var int - * @access private */ - var $_pipelined_commands = 0; + protected $pipelined_commands = 0; /** * Should debugging output be enabled? * @var boolean - * @access private */ - var $_debug = false; + protected $debug = false; /** * Debug output handler. * @var callback - * @access private */ - var $_debug_handler = null; + protected $debug_handler = null; /** * The socket resource being used to connect to the SMTP server. * @var resource - * @access private */ - var $_socket = null; + protected $socket = null; + + /** + * Array of socket options that will be passed to Net_Socket::connect(). + * @see stream_context_create() + * @var array + */ + protected $socket_options = null; + + /** + * The socket I/O timeout value in seconds. + * @var int + */ + protected $timeout = 0; /** * The most recent server response code. * @var int - * @access private */ - var $_code = -1; + protected $code = -1; /** * The most recent server response arguments. * @var array - * @access private */ - var $_arguments = array(); + protected $arguments = array(); /** * Stores the SMTP server's greeting string. * @var string - * @access private */ - var $_greeting = null; + protected $greeting = null; /** * Stores detected features of the SMTP server. * @var array - * @access private */ - var $_esmtp = array(); + protected $esmtp = array(); /** * Instantiates a new Net_SMTP object, overriding any defaults @@ -144,16 +142,18 @@ class Net_SMTP * $smtp = new Net_SMTP('ssl://mail.host.com', 465); * $smtp->connect(); * - * @param string $host The server to connect to. - * @param integer $port The port to connect to. - * @param string $localhost The value to give when sending EHLO or HELO. - * @param boolean $pipeling Use SMTP command pipelining + * @param string $host The server to connect to. + * @param integer $port The port to connect to. + * @param string $localhost The value to give when sending EHLO or HELO. + * @param boolean $pipelining Use SMTP command pipelining + * @param integer $timeout Socket I/O timeout in seconds. + * @param array $socket_options Socket stream_context_create() options. * - * @access public - * @since 1.0 + * @since 1.0 */ - function Net_SMTP($host = null, $port = null, $localhost = null, $pipelining = false) - { + public function __construct($host = null, $port = null, $localhost = null, + $pipelining = false, $timeout = 0, $socket_options = null + ) { if (isset($host)) { $this->host = $host; } @@ -163,49 +163,65 @@ function Net_SMTP($host = null, $port = null, $localhost = null, $pipelining = f if (isset($localhost)) { $this->localhost = $localhost; } - $this->pipelining = $pipelining; - $this->_socket = new Net_Socket(); + $this->pipelining = $pipelining; + $this->socket = new Net_Socket(); + $this->socket_options = $socket_options; + $this->timeout = $timeout; - /* Include the Auth_SASL package. If the package is not - * available, we disable the authentication methods that - * depend upon it. */ - if ((@include_once 'Auth/SASL.php') === false) { - $pos = array_search('DIGEST-MD5', $this->auth_methods); - unset($this->auth_methods[$pos]); - $pos = array_search('CRAM-MD5', $this->auth_methods); - unset($this->auth_methods[$pos]); + /* Include the Auth_SASL package. If the package is available, we + * enable the authentication methods that depend upon it. */ + if (@include_once 'Auth/SASL.php') { + $this->setAuthMethod('CRAM-MD5', array($this, 'authCramMD5')); + $this->setAuthMethod('DIGEST-MD5', array($this, 'authDigestMD5')); } + + /* These standard authentication methods are always available. */ + $this->setAuthMethod('LOGIN', array($this, 'authLogin'), false); + $this->setAuthMethod('PLAIN', array($this, 'authPlain'), false); + } + + /** + * Set the socket I/O timeout value in seconds plus microseconds. + * + * @param integer $seconds Timeout value in seconds. + * @param integer $microseconds Additional value in microseconds. + * + * @since 1.5.0 + */ + public function setTimeout($seconds, $microseconds = 0) + { + return $this->socket->setTimeout($seconds, $microseconds); } /** * Set the value of the debugging flag. * - * @param boolean $debug New value for the debugging flag. + * @param boolean $debug New value for the debugging flag. + * @param callback $handler Debug handler callback * - * @access public - * @since 1.1.0 + * @since 1.1.0 */ - function setDebug($debug, $handler = null) + public function setDebug($debug, $handler = null) { - $this->_debug = $debug; - $this->_debug_handler = $handler; + $this->debug = $debug; + $this->debug_handler = $handler; } /** * Write the given debug text to the current debug output handler. * - * @param string $message Debug mesage text. + * @param string $message Debug mesage text. * - * @access private - * @since 1.3.3 + * @since 1.3.3 */ - function _debug($message) + protected function debug($message) { - if ($this->_debug) { - if ($this->_debug_handler) { - call_user_func_array($this->_debug_handler, - array(&$this, $message)); + if ($this->debug) { + if ($this->debug_handler) { + call_user_func_array( + $this->debug_handler, array(&$this, $message) + ); } else { echo "DEBUG: $message\n"; } @@ -215,24 +231,24 @@ function _debug($message) /** * Send the given string of data to the server. * - * @param string $data The string of data to send. + * @param string $data The string of data to send. * - * @return mixed True on success or a PEAR_Error object on failure. + * @return mixed The number of bytes that were actually written, + * or a PEAR_Error object on failure. * - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _send($data) + protected function send($data) { - $this->_debug("Send: $data"); + $this->debug("Send: $data"); - $error = $this->_socket->write($data); - if ($error === false || PEAR::isError($error)) { - $msg = ($error) ? $error->getMessage() : "unknown error"; + $result = $this->socket->write($data); + if (!$result || PEAR::isError($result)) { + $msg = $result ? $result->getMessage() : "unknown error"; return PEAR::raiseError("Failed to write to socket: $msg"); } - return true; + return $result; } /** @@ -240,19 +256,18 @@ function _send($data) * arguments. A carriage return / linefeed (CRLF) sequence will * be appended to each command string before it is sent to the * SMTP server - an error will be thrown if the command string - * already contains any newline characters. Use _send() for + * already contains any newline characters. Use send() for * commands that must contain newlines. * - * @param string $command The SMTP command to send to the server. - * @param string $args A string of optional arguments to append - * to the command. + * @param string $command The SMTP command to send to the server. + * @param string $args A string of optional arguments to append + * to the command. * - * @return mixed The result of the _send() call. + * @return mixed The result of the send() call. * - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _put($command, $args = '') + protected function put($command, $args = '') { if (!empty($args)) { $command .= ' ' . $args; @@ -262,57 +277,56 @@ function _put($command, $args = '') return PEAR::raiseError('Commands cannot contain newlines'); } - return $this->_send($command . "\r\n"); + return $this->send($command . "\r\n"); } /** * Read a reply from the SMTP server. The reply consists of a response * code and a response message. * - * @param mixed $valid The set of valid response codes. These - * may be specified as an array of integer - * values or as a single integer value. - * @param bool $later Do not parse the response now, but wait - * until the last command in the pipelined - * command group + * @param mixed $valid The set of valid response codes. These + * may be specified as an array of integer + * values or as a single integer value. + * @param bool $later Do not parse the response now, but wait + * until the last command in the pipelined + * command group * - * @return mixed True if the server returned a valid response code or - * a PEAR_Error object is an error condition is reached. + * @return mixed True if the server returned a valid response code or + * a PEAR_Error object is an error condition is reached. * - * @access private - * @since 1.1.0 + * @since 1.1.0 * - * @see getResponse + * @see getResponse */ - function _parseResponse($valid, $later = false) + protected function parseResponse($valid, $later = false) { - $this->_code = -1; - $this->_arguments = array(); + $this->code = -1; + $this->arguments = array(); if ($later) { - $this->_pipelined_commands++; + $this->pipelined_commands++; return true; } - for ($i = 0; $i <= $this->_pipelined_commands; $i++) { - while ($line = $this->_socket->readLine()) { - $this->_debug("Recv: $line"); + for ($i = 0; $i <= $this->pipelined_commands; $i++) { + while ($line = $this->socket->readLine()) { + $this->debug("Recv: $line"); - /* If we receive an empty line, the connection has been closed. */ + /* If we receive an empty line, the connection was closed. */ if (empty($line)) { $this->disconnect(); - return PEAR::raiseError('Connection was unexpectedly closed'); + return PEAR::raiseError('Connection was closed'); } /* Read the code and store the rest in the arguments array. */ $code = substr($line, 0, 3); - $this->_arguments[] = trim(substr($line, 4)); + $this->arguments[] = trim(substr($line, 4)); /* Check the syntax of the response code. */ if (is_numeric($code)) { - $this->_code = (int)$code; + $this->code = (int)$code; } else { - $this->_code = -1; + $this->code = -1; break; } @@ -323,79 +337,115 @@ function _parseResponse($valid, $later = false) } } - $this->_pipelined_commands = 0; + $this->pipelined_commands = 0; /* Compare the server's response code with the valid code/codes. */ - if (is_int($valid) && ($this->_code === $valid)) { + if (is_int($valid) && ($this->code === $valid)) { return true; - } elseif (is_array($valid) && in_array($this->_code, $valid, true)) { + } elseif (is_array($valid) && in_array($this->code, $valid, true)) { return true; } - return PEAR::raiseError('Invalid response code received from server', - $this->_code); + return PEAR::raiseError('Invalid response code received from server', $this->code); + } + + /** + * Issue an SMTP command and verify its response. + * + * @param string $command The SMTP command string or data. + * @param mixed $valid The set of valid response codes. These + * may be specified as an array of integer + * values or as a single integer value. + * + * @return mixed True on success or a PEAR_Error object on failure. + * + * @since 1.6.0 + */ + public function command($command, $valid) + { + if (PEAR::isError($error = $this->put($command))) { + return $error; + } + if (PEAR::isError($error = $this->parseResponse($valid))) { + return $error; + } + + return true; } /** * Return a 2-tuple containing the last response from the SMTP server. * - * @return array A two-element array: the first element contains the - * response code as an integer and the second element - * contains the response's arguments as a string. + * @return array A two-element array: the first element contains the + * response code as an integer and the second element + * contains the response's arguments as a string. * - * @access public - * @since 1.1.0 + * @since 1.1.0 */ - function getResponse() + public function getResponse() { - return array($this->_code, join("\n", $this->_arguments)); + return array($this->code, join("\n", $this->arguments)); } /** * Return the SMTP server's greeting string. * - * @return string A string containing the greeting string, or null if a - * greeting has not been received. + * @return string A string containing the greeting string, or null if + * a greeting has not been received. * - * @access public - * @since 1.3.3 + * @since 1.3.3 */ - function getGreeting() + public function getGreeting() { - return $this->_greeting; + return $this->greeting; } /** * Attempt to connect to the SMTP server. * - * @param int $timeout The timeout value (in seconds) for the - * socket connection. - * @param bool $persistent Should a persistent socket connection - * be used? + * @param int $timeout The timeout value (in seconds) for the + * socket connection attempt. + * @param bool $persistent Should a persistent socket connection + * be used? * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function connect($timeout = null, $persistent = false) + public function connect($timeout = null, $persistent = false) { - $this->_greeting = null; - $result = $this->_socket->connect($this->host, $this->port, - $persistent, $timeout); + $this->greeting = null; + + $result = $this->socket->connect( + $this->host, $this->port, $persistent, $timeout, $this->socket_options + ); + if (PEAR::isError($result)) { - return PEAR::raiseError('Failed to connect socket: ' . - $result->getMessage()); + return PEAR::raiseError( + 'Failed to connect socket: ' . $result->getMessage() + ); + } + + /* + * Now that we're connected, reset the socket's timeout value for + * future I/O operations. This allows us to have different socket + * timeout values for the initial connection (our $timeout parameter) + * and all other socket operations. + */ + if ($this->timeout > 0) { + if (PEAR::isError($error = $this->setTimeout($this->timeout))) { + return $error; + } } - if (PEAR::isError($error = $this->_parseResponse(220))) { + if (PEAR::isError($error = $this->parseResponse(220))) { return $error; } /* Extract and store a copy of the server's greeting string. */ - list(, $this->_greeting) = $this->getResponse(); + list(, $this->greeting) = $this->getResponse(); - if (PEAR::isError($error = $this->_negotiate())) { + if (PEAR::isError($error = $this->negotiate())) { return $error; } @@ -407,20 +457,20 @@ function connect($timeout = null, $persistent = false) * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function disconnect() + public function disconnect() { - if (PEAR::isError($error = $this->_put('QUIT'))) { + if (PEAR::isError($error = $this->put('QUIT'))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(221))) { + if (PEAR::isError($error = $this->parseResponse(221))) { return $error; } - if (PEAR::isError($error = $this->_socket->disconnect())) { - return PEAR::raiseError('Failed to disconnect socket: ' . - $error->getMessage()); + if (PEAR::isError($error = $this->socket->disconnect())) { + return PEAR::raiseError( + 'Failed to disconnect socket: ' . $error->getMessage() + ); } return true; @@ -433,40 +483,34 @@ function disconnect() * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. * - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _negotiate() + protected function negotiate() { - if (PEAR::isError($error = $this->_put('EHLO', $this->localhost))) { + if (PEAR::isError($error = $this->put('EHLO', $this->localhost))) { return $error; } - if (PEAR::isError($this->_parseResponse(250))) { - /* If we receive a 503 response, we're already authenticated. */ - if ($this->_code === 503) { - return true; - } - + if (PEAR::isError($this->parseResponse(250))) { /* If the EHLO failed, try the simpler HELO command. */ - if (PEAR::isError($error = $this->_put('HELO', $this->localhost))) { + if (PEAR::isError($error = $this->put('HELO', $this->localhost))) { return $error; } - if (PEAR::isError($this->_parseResponse(250))) { - return PEAR::raiseError('HELO was not accepted: ', $this->_code); + if (PEAR::isError($this->parseResponse(250))) { + return PEAR::raiseError('HELO was not accepted', $this->code); } return true; } - foreach ($this->_arguments as $argument) { - $verb = strtok($argument, ' '); - $arguments = substr($argument, strlen($verb) + 1, - strlen($argument) - strlen($verb) - 1); - $this->_esmtp[$verb] = $arguments; + foreach ($this->arguments as $argument) { + $verb = strtok($argument, ' '); + $len = strlen($verb); + $arguments = substr($argument, $len + 1, strlen($argument) - $len - 1); + $this->esmtp[$verb] = $arguments; } - if (!isset($this->_esmtp['PIPELINING'])) { + if (!isset($this->esmtp['PIPELINING'])) { $this->pipelining = false; } @@ -477,17 +521,16 @@ function _negotiate() * Returns the name of the best authentication method that the server * has advertised. * - * @return mixed Returns a string containing the name of the best - * supported authentication method or a PEAR_Error object - * if a failure condition is encountered. - * @access private - * @since 1.1.0 + * @return mixed Returns a string containing the name of the best + * supported authentication method or a PEAR_Error object + * if a failure condition is encountered. + * @since 1.1.0 */ - function _getBestAuthMethod() + protected function getBestAuthMethod() { - $available_methods = explode(' ', $this->_esmtp['AUTH']); + $available_methods = explode(' ', $this->esmtp['AUTH']); - foreach ($this->auth_methods as $method) { + foreach ($this->auth_methods as $method => $callback) { if (in_array($method, $available_methods)) { return $method; } @@ -499,35 +542,47 @@ function _getBestAuthMethod() /** * Attempt to do SMTP authentication. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. - * @param string The requested authentication method. If none is - * specified, the best supported method will be used. - * @param bool Flag indicating whether or not TLS should be attempted. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $method The requested authentication method. If none is + * specified, the best supported method will be used. + * @param bool $tls Flag indicating whether or not TLS should be attempted. + * @param string $authz An optional authorization identifier. If specified, this + * identifier will be used as the authorization proxy. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function auth($uid, $pwd , $method = '', $tls = true) + public function auth($uid, $pwd , $method = '', $tls = true, $authz = '') { /* We can only attempt a TLS connection if one has been requested, - * we're running PHP 5.1.0 or later, have access to the OpenSSL - * extension, are connected to an SMTP server which supports the - * STARTTLS extension, and aren't already connected over a secure + * we're running PHP 5.1.0 or later, have access to the OpenSSL + * extension, are connected to an SMTP server which supports the + * STARTTLS extension, and aren't already connected over a secure * (SSL) socket connection. */ - if ($tls && version_compare(PHP_VERSION, '5.1.0', '>=') && - extension_loaded('openssl') && isset($this->_esmtp['STARTTLS']) && - strncasecmp($this->host, 'ssl://', 6) !== 0) { + if ($tls && version_compare(PHP_VERSION, '5.1.0', '>=') + && extension_loaded('openssl') && isset($this->esmtp['STARTTLS']) + && strncasecmp($this->host, 'ssl://', 6) !== 0 + ) { /* Start the TLS connection attempt. */ - if (PEAR::isError($result = $this->_put('STARTTLS'))) { + if (PEAR::isError($result = $this->put('STARTTLS'))) { return $result; } - if (PEAR::isError($result = $this->_parseResponse(220))) { + if (PEAR::isError($result = $this->parseResponse(220))) { return $result; } - if (PEAR::isError($result = $this->_socket->enableCrypto(true, STREAM_CRYPTO_METHOD_TLS_CLIENT))) { + if (isset($this->socket_options['ssl']['crypto_method'])) { + $crypto_method = $this->socket_options['ssl']['crypto_method']; + } else { + /* STREAM_CRYPTO_METHOD_TLS_ANY_CLIENT constant does not exist + * and STREAM_CRYPTO_METHOD_SSLv23_CLIENT constant is + * inconsistent across PHP versions. */ + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT + | @STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | @STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } + if (PEAR::isError($result = $this->socket->enableCrypto(true, $crypto_method))) { return $result; } elseif ($result !== true) { return PEAR::raiseError('STARTTLS failed'); @@ -535,47 +590,41 @@ function auth($uid, $pwd , $method = '', $tls = true) /* Send EHLO again to recieve the AUTH string from the * SMTP server. */ - $this->_negotiate(); + $this->negotiate(); } - if (empty($this->_esmtp['AUTH'])) { + if (empty($this->esmtp['AUTH'])) { return PEAR::raiseError('SMTP server does not support authentication'); } /* If no method has been specified, get the name of the best * supported method advertised by the SMTP server. */ if (empty($method)) { - if (PEAR::isError($method = $this->_getBestAuthMethod())) { + if (PEAR::isError($method = $this->getBestAuthMethod())) { /* Return the PEAR_Error object from _getBestAuthMethod(). */ return $method; } } else { $method = strtoupper($method); - if (!in_array($method, $this->auth_methods)) { + if (!array_key_exists($method, $this->auth_methods)) { return PEAR::raiseError("$method is not a supported authentication method"); } } - switch ($method) { - case 'DIGEST-MD5': - $result = $this->_authDigest_MD5($uid, $pwd); - break; - - case 'CRAM-MD5': - $result = $this->_authCRAM_MD5($uid, $pwd); - break; - - case 'LOGIN': - $result = $this->_authLogin($uid, $pwd); - break; + if (!isset($this->auth_methods[$method])) { + return PEAR::raiseError("$method is not a supported authentication method"); + } - case 'PLAIN': - $result = $this->_authPlain($uid, $pwd); - break; + if (!is_callable($this->auth_methods[$method], false)) { + return PEAR::raiseError("$method authentication method cannot be called"); + } - default: - $result = PEAR::raiseError("$method is not a supported authentication method"); - break; + if (is_array($this->auth_methods[$method])) { + list($object, $method) = $this->auth_methods[$method]; + $result = $object->{$method}($uid, $pwd, $authz, $this); + } else { + $func = $this->auth_methods[$method]; + $result = $func($uid, $pwd, $authz, $this); } /* If an error was encountered, return the PEAR_Error object. */ @@ -586,52 +635,94 @@ function auth($uid, $pwd , $method = '', $tls = true) return true; } + /** + * Add a new authentication method. + * + * @param string $name The authentication method name (e.g. 'PLAIN') + * @param mixed $callback The authentication callback (given as the name of a + * function or as an (object, method name) array). + * @param bool $prepend Should the new method be prepended to the list of + * available methods? This is the default behavior, + * giving the new method the highest priority. + * + * @return mixed True on success or a PEAR_Error object on failure. + * + * @since 1.6.0 + */ + public function setAuthMethod($name, $callback, $prepend = true) + { + if (!is_string($name)) { + return PEAR::raiseError('Method name is not a string'); + } + + if (!is_string($callback) && !is_array($callback)) { + return PEAR::raiseError('Method callback must be string or array'); + } + + if (is_array($callback)) { + if (!is_object($callback[0]) || !is_string($callback[1])) { + return PEAR::raiseError('Bad mMethod callback array'); + } + } + + if ($prepend) { + $this->auth_methods = array_merge( + array($name => $callback), $this->auth_methods + ); + } else { + $this->auth_methods[$name] = $callback; + } + + return true; + } + /** * Authenticates the user using the DIGEST-MD5 method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $authz The optional authorization proxy identifier. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _authDigest_MD5($uid, $pwd) + protected function authDigestMD5($uid, $pwd, $authz = '') { - if (PEAR::isError($error = $this->_put('AUTH', 'DIGEST-MD5'))) { + if (PEAR::isError($error = $this->put('AUTH', 'DIGEST-MD5'))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { /* 503: Error: already authenticated */ - if ($this->_code === 503) { + if ($this->code === 503) { return true; } return $error; } - $challenge = base64_decode($this->_arguments[0]); - $digest = &Auth_SASL::factory('digestmd5'); - $auth_str = base64_encode($digest->getResponse($uid, $pwd, $challenge, - $this->host, "smtp")); + $digest = Auth_SASL::factory('digest-md5'); + $challenge = base64_decode($this->arguments[0]); + $auth_str = base64_encode( + $digest->getResponse($uid, $pwd, $challenge, $this->host, "smtp", $authz) + ); - if (PEAR::isError($error = $this->_put($auth_str))) { + if (PEAR::isError($error = $this->put($auth_str))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { return $error; } /* We don't use the protocol's third step because SMTP doesn't * allow subsequent authentication, so we just silently ignore * it. */ - if (PEAR::isError($error = $this->_put(''))) { + if (PEAR::isError($error = $this->put(''))) { return $error; } /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { + if (PEAR::isError($error = $this->parseResponse(235))) { return $error; } } @@ -639,38 +730,38 @@ function _authDigest_MD5($uid, $pwd) /** * Authenticates the user using the CRAM-MD5 method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $authz The optional authorization proxy identifier. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _authCRAM_MD5($uid, $pwd) + protected function authCRAMMD5($uid, $pwd, $authz = '') { - if (PEAR::isError($error = $this->_put('AUTH', 'CRAM-MD5'))) { + if (PEAR::isError($error = $this->put('AUTH', 'CRAM-MD5'))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { /* 503: Error: already authenticated */ - if ($this->_code === 503) { + if ($this->code === 503) { return true; } return $error; } - $challenge = base64_decode($this->_arguments[0]); - $cram = &Auth_SASL::factory('crammd5'); - $auth_str = base64_encode($cram->getResponse($uid, $pwd, $challenge)); + $challenge = base64_decode($this->arguments[0]); + $cram = Auth_SASL::factory('cram-md5'); + $auth_str = base64_encode($cram->getResponse($uid, $pwd, $challenge)); - if (PEAR::isError($error = $this->_put($auth_str))) { + if (PEAR::isError($error = $this->put($auth_str))) { return $error; } /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { + if (PEAR::isError($error = $this->parseResponse(235))) { return $error; } } @@ -678,42 +769,42 @@ function _authCRAM_MD5($uid, $pwd) /** * Authenticates the user using the LOGIN method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $authz The optional authorization proxy identifier. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _authLogin($uid, $pwd) + protected function authLogin($uid, $pwd, $authz = '') { - if (PEAR::isError($error = $this->_put('AUTH', 'LOGIN'))) { + if (PEAR::isError($error = $this->put('AUTH', 'LOGIN'))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { /* 503: Error: already authenticated */ - if ($this->_code === 503) { + if ($this->code === 503) { return true; } return $error; } - if (PEAR::isError($error = $this->_put(base64_encode($uid)))) { + if (PEAR::isError($error = $this->put(base64_encode($uid)))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { return $error; } - if (PEAR::isError($error = $this->_put(base64_encode($pwd)))) { + if (PEAR::isError($error = $this->put(base64_encode($pwd)))) { return $error; } /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { + if (PEAR::isError($error = $this->parseResponse(235))) { return $error; } @@ -723,36 +814,36 @@ function _authLogin($uid, $pwd) /** * Authenticates the user using the PLAIN method. * - * @param string The userid to authenticate as. - * @param string The password to authenticate with. + * @param string $uid The userid to authenticate as. + * @param string $pwd The password to authenticate with. + * @param string $authz The optional authorization proxy identifier. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access private - * @since 1.1.0 + * @since 1.1.0 */ - function _authPlain($uid, $pwd) + protected function authPlain($uid, $pwd, $authz = '') { - if (PEAR::isError($error = $this->_put('AUTH', 'PLAIN'))) { + if (PEAR::isError($error = $this->put('AUTH', 'PLAIN'))) { return $error; } /* 334: Continue authentication request */ - if (PEAR::isError($error = $this->_parseResponse(334))) { + if (PEAR::isError($error = $this->parseResponse(334))) { /* 503: Error: already authenticated */ - if ($this->_code === 503) { + if ($this->code === 503) { return true; } return $error; } - $auth_str = base64_encode(chr(0) . $uid . chr(0) . $pwd); + $auth_str = base64_encode($authz . chr(0) . $uid . chr(0) . $pwd); - if (PEAR::isError($error = $this->_put($auth_str))) { + if (PEAR::isError($error = $this->put($auth_str))) { return $error; } /* 235: Authentication successful */ - if (PEAR::isError($error = $this->_parseResponse(235))) { + if (PEAR::isError($error = $this->parseResponse(235))) { return $error; } @@ -762,19 +853,18 @@ function _authPlain($uid, $pwd) /** * Send the HELO command. * - * @param string The domain name to say we are. + * @param string $domain The domain name to say we are. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function helo($domain) + public function helo($domain) { - if (PEAR::isError($error = $this->_put('HELO', $domain))) { + if (PEAR::isError($error = $this->put('HELO', $domain))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250))) { + if (PEAR::isError($error = $this->parseResponse(250))) { return $error; } @@ -785,55 +875,50 @@ function helo($domain) * Return the list of SMTP service extensions advertised by the server. * * @return array The list of SMTP service extensions. - * @access public * @since 1.3 */ - function getServiceExtensions() + public function getServiceExtensions() { - return $this->_esmtp; + return $this->esmtp; } /** * Send the MAIL FROM: command. * - * @param string $sender The sender (reverse path) to set. - * @param string $params String containing additional MAIL parameters, - * such as the NOTIFY flags defined by RFC 1891 - * or the VERP protocol. + * @param string $sender The sender (reverse path) to set. + * @param string $params String containing additional MAIL parameters, + * such as the NOTIFY flags defined by RFC 1891 + * or the VERP protocol. * - * If $params is an array, only the 'verp' option - * is supported. If 'verp' is true, the XVERP - * parameter is appended to the MAIL command. If - * the 'verp' value is a string, the full - * XVERP=value parameter is appended. + * If $params is an array, only the 'verp' option + * is supported. If 'verp' is true, the XVERP + * parameter is appended to the MAIL command. + * If the 'verp' value is a string, the full + * XVERP=value parameter is appended. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function mailFrom($sender, $params = null) + public function mailFrom($sender, $params = null) { $args = "FROM:<$sender>"; /* Support the deprecated array form of $params. */ if (is_array($params) && isset($params['verp'])) { - /* XVERP */ if ($params['verp'] === true) { $args .= ' XVERP'; - - /* XVERP=something */ } elseif (trim($params['verp'])) { $args .= ' XVERP=' . $params['verp']; } - } elseif (is_string($params)) { + } elseif (is_string($params) && !empty($params)) { $args .= ' ' . $params; } - if (PEAR::isError($error = $this->_put('MAIL', $args))) { + if (PEAR::isError($error = $this->put('MAIL', $args))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } @@ -850,20 +935,19 @@ function mailFrom($sender, $params = null) * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. * - * @access public - * @since 1.0 + * @since 1.0 */ - function rcptTo($recipient, $params = null) + public function rcptTo($recipient, $params = null) { $args = "TO:<$recipient>"; if (is_string($params)) { $args .= ' ' . $params; } - if (PEAR::isError($error = $this->_put('RCPT', $args))) { + if (PEAR::isError($error = $this->put('RCPT', $args))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(array(250, 251), $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(array(250, 251), $this->pipelining))) { return $error; } @@ -877,114 +961,155 @@ function rcptTo($recipient, $params = null) * easier overloading for the cases where it is desirable to * customize the quoting behavior. * - * @param string $data The message text to quote. The string must be passed + * @param string &$data The message text to quote. The string must be passed * by reference, and the text will be modified in place. * - * @access public - * @since 1.2 + * @since 1.2 */ - function quotedata(&$data) + public function quotedata(&$data) { - /* Change Unix (\n) and Mac (\r) linefeeds into - * Internet-standard CRLF (\r\n) linefeeds. */ - $data = preg_replace(array('/(?_esmtp['SIZE']) && ($this->_esmtp['SIZE'] > 0)) { - /* Start by considering the size of the optional headers string. - * We also account for the addition 4 character "\r\n\r\n" - * separator sequence. */ - $size = (is_null($headers)) ? 0 : strlen($headers) + 4; - - if (is_resource($data)) { - $stat = fstat($data); - if ($stat === false) { - return PEAR::raiseError('Failed to get file size'); - } - $size += $stat['size']; - } else { - $size += strlen($data); - } + /* Start by considering the size of the optional headers string. We + * also account for the addition 4 character "\r\n\r\n" separator + * sequence. */ + $size = (is_null($headers)) ? 0 : strlen($headers) + 4; - if ($size >= $this->_esmtp['SIZE']) { - $this->disconnect(); - return PEAR::raiseError('Message size exceeds server limit'); + if (is_resource($data)) { + $stat = fstat($data); + if ($stat === false) { + return PEAR::raiseError('Failed to get file size'); } + $size += $stat['size']; + } else { + $size += strlen($data); + } + + /* RFC 1870, section 3, subsection 3 states "a value of zero indicates + * that no fixed maximum message size is in force". Furthermore, it + * says that if "the parameter is omitted no information is conveyed + * about the server's fixed maximum message size". */ + $limit = (isset($this->esmtp['SIZE'])) ? $this->esmtp['SIZE'] : 0; + if ($limit > 0 && $size >= $limit) { + $this->disconnect(); + return PEAR::raiseError('Message size exceeds server limit'); } /* Initiate the DATA command. */ - if (PEAR::isError($error = $this->_put('DATA'))) { + if (PEAR::isError($error = $this->put('DATA'))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(354))) { + if (PEAR::isError($error = $this->parseResponse(354))) { return $error; } /* If we have a separate headers string, send it first. */ if (!is_null($headers)) { $this->quotedata($headers); - if (PEAR::isError($result = $this->_send($headers . "\r\n\r\n"))) { + if (PEAR::isError($result = $this->send($headers . "\r\n\r\n"))) { return $result; } + + /* Subtract the headers size now that they've been sent. */ + $size -= strlen($headers) + 4; } /* Now we can send the message body data. */ if (is_resource($data)) { - /* Stream the contents of the file resource out over our socket - * connection, line by line. Each line must be run through the + /* Stream the contents of the file resource out over our socket + * connection, line by line. Each line must be run through the * quoting routine. */ - while ($line = fgets($data, 1024)) { + while (strlen($line = fread($data, 8192)) > 0) { + /* If the last character is an newline, we need to grab the + * next character to check to see if it is a period. */ + while (!feof($data)) { + $char = fread($data, 1); + $line .= $char; + if ($char != "\n") { + break; + } + } $this->quotedata($line); - if (PEAR::isError($result = $this->_send($line))) { + if (PEAR::isError($result = $this->send($line))) { return $result; } } - /* Finally, send the DATA terminator sequence. */ - if (PEAR::isError($result = $this->_send("\r\n.\r\n"))) { - return $result; - } + $last = $line; } else { - /* Just send the entire quoted string followed by the DATA - * terminator. */ - $this->quotedata($data); - if (PEAR::isError($result = $this->_send($data . "\r\n.\r\n"))) { - return $result; + /* + * Break up the data by sending one chunk (up to 512k) at a time. + * This approach reduces our peak memory usage. + */ + for ($offset = 0; $offset < $size;) { + $end = $offset + 512000; + + /* + * Ensure we don't read beyond our data size or span multiple + * lines. quotedata() can't properly handle character data + * that's split across two line break boundaries. + */ + if ($end >= $size) { + $end = $size; + } else { + for (; $end < $size; $end++) { + if ($data[$end] != "\n") { + break; + } + } + } + + /* Extract our chunk and run it through the quoting routine. */ + $chunk = substr($data, $offset, $end - $offset); + $this->quotedata($chunk); + + /* If we run into a problem along the way, abort. */ + if (PEAR::isError($result = $this->send($chunk))) { + return $result; + } + + /* Advance the offset to the end of this chunk. */ + $offset = $end; } + + $last = $chunk; + } + + /* Don't add another CRLF sequence if it's already in the data */ + $terminator = (substr($last, -2) == "\r\n" ? '' : "\r\n") . ".\r\n"; + + /* Finally, send the DATA terminator sequence. */ + if (PEAR::isError($result = $this->send($terminator))) { + return $result; } /* Verify that the data was successfully received by the server. */ - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } @@ -994,134 +1119,79 @@ function data($data, $headers = null) /** * Send the SEND FROM: command. * - * @param string The reverse path to send. + * @param string $path The reverse path to send. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.2.6 + * @since 1.2.6 */ - function sendFrom($path) + public function sendFrom($path) { - if (PEAR::isError($error = $this->_put('SEND', "FROM:<$path>"))) { + if (PEAR::isError($error = $this->put('SEND', "FROM:<$path>"))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } return true; } - /** - * Backwards-compatibility wrapper for sendFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function send_from($path) - { - return sendFrom($path); - } - /** * Send the SOML FROM: command. * - * @param string The reverse path to send. + * @param string $path The reverse path to send. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.2.6 + * @since 1.2.6 */ - function somlFrom($path) + public function somlFrom($path) { - if (PEAR::isError($error = $this->_put('SOML', "FROM:<$path>"))) { + if (PEAR::isError($error = $this->put('SOML', "FROM:<$path>"))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } return true; } - /** - * Backwards-compatibility wrapper for somlFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function soml_from($path) - { - return somlFrom($path); - } - /** * Send the SAML FROM: command. * - * @param string The reverse path to send. + * @param string $path The reverse path to send. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.2.6 + * @since 1.2.6 */ - function samlFrom($path) + public function samlFrom($path) { - if (PEAR::isError($error = $this->_put('SAML', "FROM:<$path>"))) { + if (PEAR::isError($error = $this->put('SAML', "FROM:<$path>"))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } return true; } - /** - * Backwards-compatibility wrapper for samlFrom(). - * - * @param string The reverse path to send. - * - * @return mixed Returns a PEAR_Error with an error message on any - * kind of failure, or true on success. - * - * @access public - * @since 1.0 - * @deprecated 1.2.6 - */ - function saml_from($path) - { - return samlFrom($path); - } - /** * Send the RSET command. * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public * @since 1.0 */ - function rset() + public function rset() { - if (PEAR::isError($error = $this->_put('RSET'))) { + if (PEAR::isError($error = $this->put('RSET'))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) { + if (PEAR::isError($error = $this->parseResponse(250, $this->pipelining))) { return $error; } @@ -1131,20 +1201,19 @@ function rset() /** * Send the VRFY command. * - * @param string The string to verify + * @param string $string The string to verify * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function vrfy($string) + public function vrfy($string) { /* Note: 251 is also a valid response code */ - if (PEAR::isError($error = $this->_put('VRFY', $string))) { + if (PEAR::isError($error = $this->put('VRFY', $string))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(array(250, 252)))) { + if (PEAR::isError($error = $this->parseResponse(array(250, 252)))) { return $error; } @@ -1156,15 +1225,14 @@ function vrfy($string) * * @return mixed Returns a PEAR_Error with an error message on any * kind of failure, or true on success. - * @access public - * @since 1.0 + * @since 1.0 */ - function noop() + public function noop() { - if (PEAR::isError($error = $this->_put('NOOP'))) { + if (PEAR::isError($error = $this->put('NOOP'))) { return $error; } - if (PEAR::isError($error = $this->_parseResponse(250))) { + if (PEAR::isError($error = $this->parseResponse(250))) { return $error; } @@ -1175,14 +1243,12 @@ function noop() * Backwards-compatibility method. identifySender()'s functionality is * now handled internally. * - * @return boolean This method always return true. + * @return boolean This method always return true. * - * @access public - * @since 1.0 + * @since 1.0 */ - function identifySender() + public function identifySender() { return true; } - } diff --git a/WEB-INF/lib/pear/Net/Socket.php b/WEB-INF/lib/pear/Net/Socket.php index 73bb4dd11..bf1d1bbcd 100644 --- a/WEB-INF/lib/pear/Net/Socket.php +++ b/WEB-INF/lib/pear/Net/Socket.php @@ -1,39 +1,50 @@ | -// | Chuck Hagenbuch | -// +----------------------------------------------------------------------+ -// -// $Id: Socket.php,v 1.38 2008/02/15 18:24:17 chagenbu Exp $ +/** + * Net_Socket + * + * PHP Version 4 + * + * Copyright (c) 1997-2013 The PHP Group + * + * This source file is subject to version 2.0 of the PHP license, + * that is bundled with this package in the file LICENSE, and is + * available at through the world-wide-web at + * http://www.php.net/license/2_02.txt. + * If you did not receive a copy of the PHP license and are unable to + * obtain it through the world-wide-web, please send a note to + * license@php.net so we can mail you a copy immediately. + * + * Authors: Stig Bakken + * Chuck Hagenbuch + * + * @category Net + * @package Net_Socket + * @author Stig Bakken + * @author Chuck Hagenbuch + * @copyright 1997-2003 The PHP Group + * @license http://www.php.net/license/2_02.txt PHP 2.02 + * @link http://pear.php.net/packages/Net_Socket + */ require_once 'PEAR.php'; -define('NET_SOCKET_READ', 1); +define('NET_SOCKET_READ', 1); define('NET_SOCKET_WRITE', 2); define('NET_SOCKET_ERROR', 4); /** * Generalized Socket class. * - * @version 1.1 - * @author Stig Bakken - * @author Chuck Hagenbuch + * @category Net + * @package Net_Socket + * @author Stig Bakken + * @author Chuck Hagenbuch + * @copyright 1997-2003 The PHP Group + * @license http://www.php.net/license/2_02.txt PHP 2.02 + * @link http://pear.php.net/packages/Net_Socket */ -class Net_Socket extends PEAR { - +class Net_Socket extends PEAR +{ /** * Socket file pointer. * @var resource $fp @@ -65,11 +76,11 @@ class Net_Socket extends PEAR { var $port = 0; /** - * Number of seconds to wait on socket connections before assuming + * Number of seconds to wait on socket operations before assuming * there's no more data. Defaults to no timeout. - * @var integer $timeout + * @var integer|float $timeout */ - var $timeout = false; + var $timeout = null; /** * Number of bytes to read at a time in readLine() and @@ -78,23 +89,30 @@ class Net_Socket extends PEAR { */ var $lineLength = 2048; + /** + * The string to use as a newline terminator. Usually "\r\n" or "\n". + * @var string $newline + */ + var $newline = "\r\n"; + /** * Connect to the specified port. If called when the socket is * already connected, it disconnects and connects again. * - * @param string $addr IP address or host name. - * @param integer $port TCP port number. - * @param boolean $persistent (optional) Whether the connection is - * persistent (kept open between requests - * by the web server). - * @param integer $timeout (optional) How long to wait for data. - * @param array $options See options for stream_context_create. + * @param string $addr IP address or host name (may be with protocol prefix). + * @param integer $port TCP port number. + * @param boolean $persistent (optional) Whether the connection is + * persistent (kept open between requests + * by the web server). + * @param integer $timeout (optional) Connection socket timeout. + * @param array $options See options for stream_context_create. * * @access public * - * @return boolean | PEAR_Error True on success or a PEAR_Error on failure. + * @return boolean|PEAR_Error True on success or a PEAR_Error on failure. */ - function connect($addr, $port = 0, $persistent = null, $timeout = null, $options = null) + function connect($addr, $port = 0, $persistent = null, + $timeout = null, $options = null) { if (is_resource($this->fp)) { @fclose($this->fp); @@ -103,11 +121,10 @@ function connect($addr, $port = 0, $persistent = null, $timeout = null, $options if (!$addr) { return $this->raiseError('$addr cannot be empty'); - } elseif (strspn($addr, '.0123456789') == strlen($addr) || - strstr($addr, '/') !== false) { - $this->addr = $addr; + } else if (strspn($addr, ':.0123456789') == strlen($addr)) { + $this->addr = strpos($addr, ':') !== false ? '['.$addr.']' : $addr; } else { - $this->addr = @gethostbyname($addr); + $this->addr = $addr; } $this->port = $port % 65536; @@ -116,40 +133,40 @@ function connect($addr, $port = 0, $persistent = null, $timeout = null, $options $this->persistent = $persistent; } - if ($timeout !== null) { - $this->timeout = $timeout; - } - $openfunc = $this->persistent ? 'pfsockopen' : 'fsockopen'; - $errno = 0; - $errstr = ''; + $errno = 0; + $errstr = ''; + $old_track_errors = @ini_set('track_errors', 1); + + if ($timeout <= 0) { + $timeout = @ini_get('default_socket_timeout'); + } + if ($options && function_exists('stream_context_create')) { - if ($this->timeout) { - $timeout = $this->timeout; - } else { - $timeout = 0; - } $context = stream_context_create($options); // Since PHP 5 fsockopen doesn't allow context specification if (function_exists('stream_socket_client')) { - $flags = $this->persistent ? STREAM_CLIENT_PERSISTENT : STREAM_CLIENT_CONNECT; + $flags = STREAM_CLIENT_CONNECT; + + if ($this->persistent) { + $flags = STREAM_CLIENT_PERSISTENT; + } + $addr = $this->addr . ':' . $this->port; - $fp = stream_socket_client($addr, $errno, $errstr, $timeout, $flags, $context); + $fp = stream_socket_client($addr, $errno, $errstr, + $timeout, $flags, $context); } else { - $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $timeout, $context); + $fp = @$openfunc($this->addr, $this->port, $errno, + $errstr, $timeout, $context); } } else { - if ($this->timeout) { - $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $this->timeout); - } else { - $fp = @$openfunc($this->addr, $this->port, $errno, $errstr); - } + $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $timeout); } if (!$fp) { - if ($errno == 0 && isset($php_errormsg)) { + if ($errno == 0 && !strlen($errstr) && isset($php_errormsg)) { $errstr = $php_errormsg; } @ini_set('track_errors', $old_track_errors); @@ -158,7 +175,7 @@ function connect($addr, $port = 0, $persistent = null, $timeout = null, $options @ini_set('track_errors', $old_track_errors); $this->fp = $fp; - + $this->setTimeout(); return $this->setBlocking($this->blocking); } @@ -179,6 +196,18 @@ function disconnect() return true; } + /** + * Set the newline character/sequence to use. + * + * @param string $newline Newline character(s) + * @return boolean True + */ + function setNewline($newline) + { + $this->newline = $newline; + return true; + } + /** * Find out if the socket is in blocking mode. * @@ -196,7 +225,8 @@ function isBlocking() * if there is no data available, whereas it will block until there * is data for blocking sockets. * - * @param boolean $mode True for blocking sockets, false for nonblocking. + * @param boolean $mode True for blocking sockets, false for nonblocking. + * * @access public * @return mixed true on success or a PEAR_Error instance otherwise */ @@ -207,7 +237,7 @@ function setBlocking($mode) } $this->blocking = $mode; - socket_set_blocking($this->fp, $this->blocking); + stream_set_blocking($this->fp, (int)$this->blocking); return true; } @@ -215,25 +245,40 @@ function setBlocking($mode) * Sets the timeout value on socket descriptor, * expressed in the sum of seconds and microseconds * - * @param integer $seconds Seconds. - * @param integer $microseconds Microseconds. + * @param integer $seconds Seconds. + * @param integer $microseconds Microseconds, optional. + * * @access public - * @return mixed true on success or a PEAR_Error instance otherwise + * @return mixed True on success or false on failure or + * a PEAR_Error instance when not connected */ - function setTimeout($seconds, $microseconds) + function setTimeout($seconds = null, $microseconds = null) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } - return socket_set_timeout($this->fp, $seconds, $microseconds); + if ($seconds === null && $microseconds === null) { + $seconds = (int) $this->timeout; + $microseconds = (int) (($this->timeout - $seconds) * 1000000); + } else { + $this->timeout = $seconds + $microseconds/1000000; + } + + if ($this->timeout > 0) { + return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds); + } + else { + return false; + } } /** * Sets the file buffering size on the stream. * See php's stream_set_write_buffer for more information. * - * @param integer $size Write buffer size. + * @param integer $size Write buffer size. + * * @access public * @return mixed on success or an PEAR_Error object otherwise */ @@ -262,7 +307,8 @@ function setWriteBuffer($size) *

* * @access public - * @return mixed Array containing information about existing socket resource or a PEAR_Error instance otherwise + * @return mixed Array containing information about existing socket + * resource or a PEAR_Error instance otherwise */ function getStatus() { @@ -270,23 +316,32 @@ function getStatus() return $this->raiseError('not connected'); } - return socket_get_status($this->fp); + return stream_get_meta_data($this->fp); } /** * Get a specified line of data * + * @param int $size Reading ends when size - 1 bytes have been read, + * or a newline or an EOF (whichever comes first). + * If no size is specified, it will keep reading from + * the stream until it reaches the end of the line. + * * @access public - * @return $size bytes of data from the socket, or a PEAR_Error if - * not connected. + * @return mixed $size bytes of data from the socket, or a PEAR_Error if + * not connected. If an error occurs, FALSE is returned. */ - function gets($size) + function gets($size = null) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } - return @fgets($this->fp, $size); + if (is_null($size)) { + return @fgets($this->fp); + } else { + return @fgets($this->fp, $size); + } } /** @@ -295,7 +350,8 @@ function gets($size) * chunk; if you know the size of the data you're getting * beforehand, this is definitely the way to go. * - * @param integer $size The number of bytes to read from the socket. + * @param integer $size The number of bytes to read from the socket. + * * @access public * @return $size bytes of data from the socket, or a PEAR_Error if * not connected. @@ -312,14 +368,16 @@ function read($size) /** * Write a specified amount of data. * - * @param string $data Data to write. - * @param integer $blocksize Amount of data to write at once. - * NULL means all at once. + * @param string $data Data to write. + * @param integer $blocksize Amount of data to write at once. + * NULL means all at once. * * @access public - * @return mixed If the socket is not connected, returns an instance of PEAR_Error - * If the write succeeds, returns the number of bytes written + * @return mixed If the socket is not connected, returns an instance of + * PEAR_Error. + * If the write succeeds, returns the number of bytes written. * If the write fails, returns false. + * If the socket times out, returns an instance of PEAR_Error. */ function write($data, $blocksize = null) { @@ -328,19 +386,47 @@ function write($data, $blocksize = null) } if (is_null($blocksize) && !OS_WINDOWS) { - return @fwrite($this->fp, $data); + $written = @fwrite($this->fp, $data); + + // Check for timeout or lost connection + if (!$written) { + $meta_data = $this->getStatus(); + + if (!is_array($meta_data)) { + return $meta_data; // PEAR_Error + } + + if (!empty($meta_data['timed_out'])) { + return $this->raiseError('timed out'); + } + } + + return $written; } else { if (is_null($blocksize)) { $blocksize = 1024; } - $pos = 0; + $pos = 0; $size = strlen($data); while ($pos < $size) { $written = @fwrite($this->fp, substr($data, $pos, $blocksize)); - if ($written === false) { - return false; + + // Check for timeout or lost connection + if (!$written) { + $meta_data = $this->getStatus(); + + if (!is_array($meta_data)) { + return $meta_data; // PEAR_Error + } + + if (!empty($meta_data['timed_out'])) { + return $this->raiseError('timed out'); + } + + return $written; } + $pos += $written; } @@ -349,10 +435,12 @@ function write($data, $blocksize = null) } /** - * Write a line of data to the socket, followed by a trailing "\r\n". + * Write a line of data to the socket, followed by a trailing newline. + * + * @param string $data Data to write * * @access public - * @return mixed fputs result, or an error + * @return mixed fwrite() result, or PEAR_Error when not connected */ function writeLine($data) { @@ -360,7 +448,7 @@ function writeLine($data) return $this->raiseError('not connected'); } - return fwrite($this->fp, $data . "\r\n"); + return fwrite($this->fp, $data . $this->newline); } /** @@ -441,7 +529,7 @@ function readString() } $string = ''; - while (($char = @fread($this->fp, 1)) != "\x00") { + while (($char = @fread($this->fp, 1)) != "\x00") { $string .= $char; } return $string; @@ -481,11 +569,13 @@ function readLine() } $line = ''; + $timeout = time() + $this->timeout; + while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) { $line .= @fgets($this->fp, $this->lineLength); if (substr($line, -1) == "\n") { - return rtrim($line, "\r\n"); + return rtrim($line, $this->newline); } } return $line; @@ -521,9 +611,9 @@ function readAll() * Runs the equivalent of the select() system call on the socket * with a timeout specified by tv_sec and tv_usec. * - * @param integer $state Which of read/write/error to check for. - * @param integer $tv_sec Number of seconds for timeout. - * @param integer $tv_usec Number of microseconds for timeout. + * @param integer $state Which of read/write/error to check for. + * @param integer $tv_sec Number of seconds for timeout. + * @param integer $tv_usec Number of microseconds for timeout. * * @access public * @return False if select fails, integer describing which of read/write/error @@ -535,8 +625,8 @@ function select($state, $tv_sec, $tv_usec = 0) return $this->raiseError('not connected'); } - $read = null; - $write = null; + $read = null; + $write = null; $except = null; if ($state & NET_SOCKET_READ) { $read[] = $this->fp; @@ -547,7 +637,8 @@ function select($state, $tv_sec, $tv_usec = 0) if ($state & NET_SOCKET_ERROR) { $except[] = $this->fp; } - if (false === ($sr = stream_select($read, $write, $except, $tv_sec, $tv_usec))) { + if (false === ($sr = stream_select($read, $write, $except, + $tv_sec, $tv_usec))) { return false; } @@ -567,15 +658,17 @@ function select($state, $tv_sec, $tv_usec = 0) /** * Turns encryption on/off on a connected socket. * - * @param bool $enabled Set this parameter to true to enable encryption - * and false to disable encryption. - * @param integer $type Type of encryption. See - * http://se.php.net/manual/en/function.stream-socket-enable-crypto.php for values. + * @param bool $enabled Set this parameter to true to enable encryption + * and false to disable encryption. + * @param integer $type Type of encryption. See stream_socket_enable_crypto() + * for values. * + * @see http://se.php.net/manual/en/function.stream-socket-enable-crypto.php * @access public - * @return false on error, true on success and 0 if there isn't enough data and the - * user should try again (non-blocking sockets only). A PEAR_Error object - * is returned if the socket is not connected + * @return false on error, true on success and 0 if there isn't enough data + * and the user should try again (non-blocking sockets only). + * A PEAR_Error object is returned if the socket is not + * connected */ function enableCrypto($enabled, $type) { @@ -585,7 +678,8 @@ function enableCrypto($enabled, $type) } return @stream_socket_enable_crypto($this->fp, $enabled, $type); } else { - return $this->raiseError('Net_Socket::enableCrypto() requires php version >= 5.1.0'); + $msg = 'Net_Socket::enableCrypto() requires php version >= 5.1.0'; + return $this->raiseError($msg); } } diff --git a/WEB-INF/lib/pear/OS/Guess.php b/WEB-INF/lib/pear/OS/Guess.php index d3f2cc764..4c9254a26 100644 --- a/WEB-INF/lib/pear/OS/Guess.php +++ b/WEB-INF/lib/pear/OS/Guess.php @@ -10,7 +10,6 @@ * @author Gregory Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Guess.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since PEAR 0.1 */ @@ -87,7 +86,7 @@ * @author Gregory Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -99,7 +98,7 @@ class OS_Guess var $release; var $extra; - function OS_Guess($uname = null) + function __construct($uname = null) { list($this->sysname, $this->release, @@ -335,4 +334,4 @@ function _matchFragment($fragment, $value) * indent-tabs-mode: nil * c-basic-offset: 4 * End: - */ \ No newline at end of file + */ diff --git a/WEB-INF/lib/pear/PEAR.php b/WEB-INF/lib/pear/PEAR.php index 2aa85259d..d661cc212 100644 --- a/WEB-INF/lib/pear/PEAR.php +++ b/WEB-INF/lib/pear/PEAR.php @@ -14,7 +14,6 @@ * @author Greg Beaver * @copyright 1997-2010 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PEAR.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -33,8 +32,6 @@ */ define('PEAR_ERROR_EXCEPTION', 32); /**#@-*/ -define('PEAR_ZE2', (function_exists('version_compare') && - version_compare(zend_version(), "2-dev", "ge"))); if (substr(PHP_OS, 0, 3) == 'WIN') { define('OS_WINDOWS', true); @@ -78,7 +75,7 @@ * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @see PEAR_Error * @since Class available since PHP 4.0.2 @@ -136,6 +133,18 @@ class PEAR */ var $_expected_errors = array(); + /** + * List of methods that can be called both statically and non-statically. + * @var array + */ + protected static $bivalentMethods = array( + 'setErrorHandling' => true, + 'raiseError' => true, + 'throwError' => true, + 'pushErrorHandling' => true, + 'popErrorHandling' => true, + ); + /** * Constructor. Registers this object in * $_PEAR_destructor_object_list for destructor emulation if a @@ -146,7 +155,7 @@ class PEAR * @access public * @return void */ - function PEAR($error_class = null) + function __construct($error_class = null) { $classname = strtolower(get_class($this)); if ($this->_debug) { @@ -173,6 +182,18 @@ function PEAR($error_class = null) } } + /** + * Only here for backwards compatibility. + * E.g. Archive_Tar calls $this->PEAR() in its constructor. + * + * @param string $error_class Which class to use for error objects, + * defaults to PEAR_Error. + */ + public function PEAR($error_class = null) + { + self::__construct($error_class); + } + /** * Destructor (the emulated type of...). Does nothing right now, * but is included for forward compatibility, so subclass @@ -190,19 +211,44 @@ function _PEAR() { } } + public function __call($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array($this), $arguments) + ); + } + + public static function __callStatic($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array(null), $arguments) + ); + } + /** * If you have a class that's mostly/entirely static, and you need static * properties, you can use this method to simulate them. Eg. in your method(s) * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); * You MUST use a reference, or they will not persist! * - * @access public * @param string $class The calling classname, to prevent clashes * @param string $var The variable to retrieve. * @return mixed A reference to the variable. If not set it will be * auto initialised to NULL. */ - function &getStaticProperty($class, $var) + public static function &getStaticProperty($class, $var) { static $properties; if (!isset($properties[$class])) { @@ -220,12 +266,12 @@ function &getStaticProperty($class, $var) * Use this function to register a shutdown method for static * classes. * - * @access public * @param mixed $func The function name (or array of class/method) to call * @param mixed $args The arguments to pass to the function + * * @return void */ - function registerShutdownFunc($func, $args = array()) + public static function registerShutdownFunc($func, $args = array()) { // if we are called statically, there is a potential // that no shutdown func is registered. Bug #6445 @@ -244,10 +290,10 @@ function registerShutdownFunc($func, $args = array()) * only if $code is a string and * $obj->getMessage() == $code or * $code is an integer and $obj->getCode() == $code - * @access public + * * @return bool true if parameter is an error */ - function isError($data, $code = null) + public static function isError($data, $code = null) { if (!is_a($data, 'PEAR_Error')) { return false; @@ -269,6 +315,9 @@ function isError($data, $code = null) * PEAR objects. If called in an object, setErrorHandling sets * the default behaviour for that object. * + * @param object $object + * Object the method was called on (non-static mode) + * * @param int $mode * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, @@ -300,11 +349,12 @@ function isError($data, $code = null) * * @since PHP 4.0.5 */ - function setErrorHandling($mode = null, $options = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $setmode = &$this->_default_error_mode; - $setoptions = &$this->_default_error_options; + protected static function _setErrorHandling( + $object, $mode = null, $options = null + ) { + if ($object !== null) { + $setmode = &$object->_default_error_mode; + $setoptions = &$object->_default_error_options; } else { $setmode = &$GLOBALS['_PEAR_default_error_mode']; $setoptions = &$GLOBALS['_PEAR_default_error_options']; @@ -464,12 +514,12 @@ function delExpect($error_code) * @param bool $skipmsg If true, raiseError will only pass error codes, * the error message parameter will be dropped. * - * @access public * @return object a PEAR error object * @see PEAR::setErrorHandling * @since PHP 4.0.5 */ - function &raiseError($message = null, + protected static function _raiseError($object, + $message = null, $code = null, $mode = null, $options = null, @@ -487,10 +537,10 @@ function &raiseError($message = null, } if ( - isset($this) && - isset($this->_expected_errors) && - count($this->_expected_errors) > 0 && - count($exp = end($this->_expected_errors)) + $object !== null && + isset($object->_expected_errors) && + count($object->_expected_errors) > 0 && + count($exp = end($object->_expected_errors)) ) { if ($exp[0] == "*" || (is_int(reset($exp)) && in_array($code, $exp)) || @@ -503,9 +553,9 @@ function &raiseError($message = null, // No mode given, try global ones if ($mode === null) { // Class error handler - if (isset($this) && isset($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; + if ($object !== null && isset($object->_default_error_mode)) { + $mode = $object->_default_error_mode; + $options = $object->_default_error_options; // Global error handler } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { $mode = $GLOBALS['_PEAR_default_error_mode']; @@ -515,18 +565,12 @@ function &raiseError($message = null, if ($error_class !== null) { $ec = $error_class; - } elseif (isset($this) && isset($this->_error_class)) { - $ec = $this->_error_class; + } elseif ($object !== null && isset($object->_error_class)) { + $ec = $object->_error_class; } else { $ec = 'PEAR_Error'; } - if (intval(PHP_VERSION) < 5) { - // little non-eval hack to fix bug #12147 - include 'PEAR/FixPHP5PEARWarnings.php'; - return $a; - } - if ($skipmsg) { $a = new $ec($code, $mode, $options, $userinfo); } else { @@ -548,14 +592,13 @@ function &raiseError($message = null, * @param string $userinfo If you need to pass along for example debug * information, this parameter is meant for that. * - * @access public * @return object a PEAR error object * @see PEAR::raiseError */ - function &throwError($message = null, $code = null, $userinfo = null) + protected static function _throwError($object, $message = null, $code = null, $userinfo = null) { - if (isset($this) && is_a($this, 'PEAR')) { - $a = &$this->raiseError($message, $code, null, null, $userinfo); + if ($object !== null) { + $a = &$object->raiseError($message, $code, null, null, $userinfo); return $a; } @@ -563,7 +606,7 @@ function &throwError($message = null, $code = null, $userinfo = null) return $a; } - function staticPushErrorHandling($mode, $options = null) + public static function staticPushErrorHandling($mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $def_mode = &$GLOBALS['_PEAR_default_error_mode']; @@ -598,7 +641,7 @@ function staticPushErrorHandling($mode, $options = null) return true; } - function staticPopErrorHandling() + public static function staticPopErrorHandling() { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $setmode = &$GLOBALS['_PEAR_default_error_mode']; @@ -646,20 +689,20 @@ function staticPopErrorHandling() * * @see PEAR::setErrorHandling */ - function pushErrorHandling($mode, $options = null) + protected static function _pushErrorHandling($object, $mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { - $def_mode = &$this->_default_error_mode; - $def_options = &$this->_default_error_options; + if ($object !== null) { + $def_mode = &$object->_default_error_mode; + $def_options = &$object->_default_error_options; } else { $def_mode = &$GLOBALS['_PEAR_default_error_mode']; $def_options = &$GLOBALS['_PEAR_default_error_options']; } $stack[] = array($def_mode, $def_options); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -674,14 +717,14 @@ function pushErrorHandling($mode, $options = null) * * @see PEAR::pushErrorHandling */ - function popErrorHandling() + protected static function _popErrorHandling($object) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; array_pop($stack); list($mode, $options) = $stack[sizeof($stack) - 1]; array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -689,13 +732,13 @@ function popErrorHandling() } /** - * OS independant PHP extension load. Remember to take care + * OS independent PHP extension load. Remember to take care * on the correct extension name for case sensitive OSes. * * @param string $ext The extension name * @return bool Success or not on the dl() call */ - function loadExtension($ext) + public static function loadExtension($ext) { if (extension_loaded($ext)) { return true; @@ -704,8 +747,7 @@ function loadExtension($ext) // if either returns true dl() will produce a FATAL error, stop that if ( function_exists('dl') === false || - ini_get('enable_dl') != 1 || - ini_get('safe_mode') == 1 + ini_get('enable_dl') != 1 ) { return false; } @@ -726,10 +768,6 @@ function_exists('dl') === false || } } -if (PEAR_ZE2) { - include_once 'PEAR5.php'; -} - function _PEAR_call_destructors() { global $_PEAR_destructor_object_list; @@ -737,11 +775,8 @@ function _PEAR_call_destructors() sizeof($_PEAR_destructor_object_list)) { reset($_PEAR_destructor_object_list); - if (PEAR_ZE2) { - $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo'); - } else { - $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); - } + + $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); if ($destructLifoExists) { $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); @@ -788,7 +823,7 @@ function _PEAR_call_destructors() * @author Gregory Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/manual/en/core.pear.pear-error.php * @see PEAR::raiseError(), PEAR::throwError() * @since Class available since PHP 4.0.2 @@ -823,7 +858,7 @@ class PEAR_Error * @access public * */ - function PEAR_Error($message = 'unknown error', $code = null, + function __construct($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null) { if ($mode === null) { @@ -834,11 +869,7 @@ function PEAR_Error($message = 'unknown error', $code = null, $this->mode = $mode; $this->userinfo = $userinfo; - if (PEAR_ZE2) { - $skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace'); - } else { - $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); - } + $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); if (!$skiptrace) { $this->backtrace = debug_backtrace(); @@ -896,6 +927,24 @@ function PEAR_Error($message = 'unknown error', $code = null, } } + /** + * Only here for backwards compatibility. + * + * Class "Cache_Error" still uses it, among others. + * + * @param string $message Message + * @param int $code Error code + * @param int $mode Error mode + * @param mixed $options See __construct() + * @param string $userinfo Additional user/debug info + */ + public function PEAR_Error( + $message = 'unknown error', $code = null, $mode = null, + $options = null, $userinfo = null + ) { + self::__construct($message, $code, $mode, $options, $userinfo); + } + /** * Get the error mode from an error object. * diff --git a/WEB-INF/lib/pear/PEAR/Autoloader.php b/WEB-INF/lib/pear/PEAR/Autoloader.php index 0ed707ec8..bcb57f65b 100644 --- a/WEB-INF/lib/pear/PEAR/Autoloader.php +++ b/WEB-INF/lib/pear/PEAR/Autoloader.php @@ -10,7 +10,6 @@ * @author Stig Bakken * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Autoloader.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 @@ -45,7 +44,7 @@ * @author Stig Bakken * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 @@ -144,7 +143,7 @@ function addAggregateObject($classname) $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname); include_once $include_file; } - $obj =& new $classname; + $obj = new $classname; $methods = get_class_methods($classname); foreach ($methods as $method) { // don't import priviate methods and constructors diff --git a/WEB-INF/lib/pear/PEAR/Builder.php b/WEB-INF/lib/pear/PEAR/Builder.php index 90f3a1455..94b09f08d 100644 --- a/WEB-INF/lib/pear/PEAR/Builder.php +++ b/WEB-INF/lib/pear/PEAR/Builder.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Builder.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 * @@ -23,6 +22,7 @@ */ require_once 'PEAR/Common.php'; require_once 'PEAR/PackageFile.php'; +require_once 'System.php'; /** * Class to handle building (compiling) extensions. @@ -33,7 +33,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since PHP 4.0.2 * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php @@ -63,9 +63,9 @@ class PEAR_Builder extends PEAR_Common * * @access public */ - function PEAR_Builder(&$ui) + function __construct(&$ui) { - parent::PEAR_Common(); + parent::__construct(); $this->setFrontendObject($ui); } @@ -79,7 +79,7 @@ function _build_win32($descfile, $callback = null) $pkg = $descfile; $descfile = $pkg->getPackageFile(); } else { - $pf = &new PEAR_PackageFile($this->config, $this->debug); + $pf = new PEAR_PackageFile($this->config, $this->debug); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; @@ -242,7 +242,7 @@ function _harvestInstDir($dest_prefix, $dirname, &$built_files) */ function build($descfile, $callback = null) { - if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/', + if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)?$/', $this->config->get('php_bin'), $matches)) { if (isset($matches[2]) && strlen($matches[2]) && trim($matches[2]) != trim($this->config->get('php_prefix'))) { @@ -279,7 +279,7 @@ function build($descfile, $callback = null) $this->addTempFile($dir); } } else { - $pf = &new PEAR_PackageFile($this->config); + $pf = new PEAR_PackageFile($this->config); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; @@ -322,6 +322,16 @@ function build($descfile, $callback = null) // {{{ start of interactive part $configure_command = "$dir/configure"; + + $phpConfigName = $this->config->get('php_prefix') + . 'php-config' + . $this->config->get('php_suffix'); + $phpConfigPath = System::which($phpConfigName); + if ($phpConfigPath !== false) { + $configure_command .= ' --with-php-config=' + . $phpConfigPath; + } + $configure_options = $pkg->getConfigureOptions(); if ($configure_options) { foreach ($configure_options as $o) { @@ -375,7 +385,7 @@ function build($descfile, $callback = null) if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { return $this->raiseError("could not chdir to $build_dir"); } - putenv('PHP_PEAR_VERSION=1.9.4'); + putenv('PHP_PEAR_VERSION=1.10.1'); foreach ($to_run as $cmd) { $err = $this->_runCommand($cmd, $callback); if (PEAR::isError($err)) { @@ -476,7 +486,7 @@ function _runCommand($command, $callback = null) return ($exitcode == 0); } - function log($level, $msg) + function log($level, $msg, $append_crlf = true) { if ($this->current_callback) { if ($this->debug >= $level) { @@ -484,6 +494,6 @@ function log($level, $msg) } return; } - return PEAR_Common::log($level, $msg); + return parent::log($level, $msg, $append_crlf); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/ChannelFile.php b/WEB-INF/lib/pear/PEAR/ChannelFile.php index f2c02ab42..f993764c8 100644 --- a/WEB-INF/lib/pear/PEAR/ChannelFile.php +++ b/WEB-INF/lib/pear/PEAR/ChannelFile.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ChannelFile.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -146,7 +145,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -194,9 +193,9 @@ class PEAR_ChannelFile */ var $_isValid = false; - function PEAR_ChannelFile() + function __construct() { - $this->_stack = &new PEAR_ErrorStack('PEAR_ChannelFile'); + $this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile'); $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); $this->_isValid = false; } @@ -306,11 +305,12 @@ function toArray() /** * @param array - * @static + * * @return PEAR_ChannelFile|false false if invalid */ - function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack') - { + public static function &fromArray( + $data, $compatibility = false, $stackClass = 'PEAR_ErrorStack' + ) { $a = new PEAR_ChannelFile($compatibility, $stackClass); $a->_fromArray($data); if (!$a->validate()) { @@ -322,13 +322,14 @@ function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStac /** * Unlike {@link fromArray()} this does not do any validation + * * @param array - * @static + * * @return PEAR_ChannelFile */ - function &fromArrayWithErrors($data, $compatibility = false, - $stackClass = 'PEAR_ErrorStack') - { + public static function &fromArrayWithErrors( + $data, $compatibility = false, $stackClass = 'PEAR_ErrorStack' + ) { $a = new PEAR_ChannelFile($compatibility, $stackClass); $a->_fromArray($data); return $a; @@ -1501,7 +1502,7 @@ function &getValidationObject($package = false) if (isset($this->_channelInfo['validatepackage'])) { if ($package == $this->_channelInfo['validatepackage']) { // channel validation packages are always validated by PEAR_Validate - $val = &new PEAR_Validate; + $val = new PEAR_Validate; return $val; } @@ -1513,7 +1514,7 @@ function &getValidationObject($package = false) $this->_channelInfo['validatepackage']['_content']) . '.php'; $vclass = str_replace('.', '_', $this->_channelInfo['validatepackage']['_content']); - $val = &new $vclass; + $val = new $vclass; } else { $a = false; return $a; @@ -1521,10 +1522,10 @@ function &getValidationObject($package = false) } else { $vclass = str_replace('.', '_', $this->_channelInfo['validatepackage']['_content']); - $val = &new $vclass; + $val = new $vclass; } } else { - $val = &new PEAR_Validate; + $val = new PEAR_Validate; } return $val; @@ -1556,4 +1557,4 @@ function lastModified() return time(); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/ChannelFile/Parser.php b/WEB-INF/lib/pear/PEAR/ChannelFile/Parser.php index e630ace22..a27e8fd06 100644 --- a/WEB-INF/lib/pear/PEAR/ChannelFile/Parser.php +++ b/WEB-INF/lib/pear/PEAR/ChannelFile/Parser.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Parser.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -26,7 +25,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Command.php b/WEB-INF/lib/pear/PEAR/Command.php index db39b8f36..9ec55507d 100644 --- a/WEB-INF/lib/pear/PEAR/Command.php +++ b/WEB-INF/lib/pear/PEAR/Command.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Command.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -94,7 +93,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -109,11 +108,8 @@ class PEAR_Command * @param object $config Instance of PEAR_Config object * * @return object the command object or a PEAR error - * - * @access public - * @static */ - function &factory($command, &$config) + public static function &factory($command, &$config) { if (empty($GLOBALS['_PEAR_Command_commandlist'])) { PEAR_Command::registerCommands(); @@ -134,13 +130,13 @@ function &factory($command, &$config) return $a; } $ui =& PEAR_Command::getFrontendObject(); - $obj = &new $class($ui, $config); + $obj = new $class($ui, $config); return $obj; } // }}} // {{{ & getObject() - function &getObject($command) + public static function &getObject($command) { $class = $GLOBALS['_PEAR_Command_commandlist'][$command]; if (!class_exists($class)) { @@ -151,7 +147,7 @@ function &getObject($command) } $ui =& PEAR_Command::getFrontendObject(); $config = &PEAR_Config::singleton(); - $obj = &new $class($ui, $config); + $obj = new $class($ui, $config); return $obj; } @@ -162,9 +158,8 @@ function &getObject($command) * Get instance of frontend object. * * @return object|PEAR_Error - * @static */ - function &getFrontendObject() + public static function &getFrontendObject() { $a = &PEAR_Frontend::singleton(); return $a; @@ -179,9 +174,8 @@ function &getFrontendObject() * @param string $uiclass Name of class implementing the frontend * * @return object the frontend object, or a PEAR error - * @static */ - function &setFrontendClass($uiclass) + public static function &setFrontendClass($uiclass) { $a = &PEAR_Frontend::setFrontendClass($uiclass); return $a; @@ -196,9 +190,8 @@ function &setFrontendClass($uiclass) * @param string $uitype Name of the frontend type (for example "CLI") * * @return object the frontend object, or a PEAR error - * @static */ - function setFrontendType($uitype) + public static function setFrontendType($uitype) { $uiclass = 'PEAR_Frontend_' . $uitype; return PEAR_Command::setFrontendClass($uiclass); @@ -221,11 +214,8 @@ function setFrontendType($uitype) * included. * * @return bool TRUE on success, a PEAR error on failure - * - * @access public - * @static */ - function registerCommands($merge = false, $dir = null) + public static function registerCommands($merge = false, $dir = null) { $parser = new PEAR_XMLParser; if ($dir === null) { @@ -305,11 +295,8 @@ function registerCommands($merge = false, $dir = null) * classes implement them. * * @return array command => implementing class - * - * @access public - * @static */ - function getCommands() + public static function getCommands() { if (empty($GLOBALS['_PEAR_Command_commandlist'])) { PEAR_Command::registerCommands(); @@ -324,11 +311,8 @@ function getCommands() * Get the list of command shortcuts. * * @return array shortcut => command - * - * @access public - * @static */ - function getShortcuts() + public static function getShortcuts() { if (empty($GLOBALS['_PEAR_Command_shortcuts'])) { PEAR_Command::registerCommands(); @@ -347,11 +331,8 @@ function getShortcuts() * @param array $long_args (reference) long getopt format * * @return void - * - * @access public - * @static */ - function getGetoptArgs($command, &$short_args, &$long_args) + public static function getGetoptArgs($command, &$short_args, &$long_args) { if (empty($GLOBALS['_PEAR_Command_commandlist'])) { PEAR_Command::registerCommands(); @@ -375,11 +356,8 @@ function getGetoptArgs($command, &$short_args, &$long_args) * @param string $command Name of the command * * @return string command description - * - * @access public - * @static */ - function getDescription($command) + public static function getDescription($command) { if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) { return null; @@ -394,11 +372,8 @@ function getDescription($command) * Get help for command. * * @param string $command Name of the command to return help for - * - * @access public - * @static */ - function getHelp($command) + public static function getHelp($command) { $cmds = PEAR_Command::getCommands(); if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { diff --git a/WEB-INF/lib/pear/PEAR/Command/Auth.php b/WEB-INF/lib/pear/PEAR/Command/Auth.php index 63cd152b9..aa021ec26 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Auth.php +++ b/WEB-INF/lib/pear/PEAR/Command/Auth.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Auth.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 * @deprecated since 1.8.0alpha1 @@ -30,7 +29,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 * @deprecated since 1.8.0alpha1 @@ -74,8 +73,8 @@ class PEAR_Command_Auth extends PEAR_Command_Channels * * @access public */ - function PEAR_Command_Auth(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Channels($ui, $config); + parent::__construct($ui, $config); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Build.php b/WEB-INF/lib/pear/PEAR/Command/Build.php index 1de732024..7f851932d 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Build.php +++ b/WEB-INF/lib/pear/PEAR/Command/Build.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Build.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -31,7 +30,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -53,9 +52,9 @@ class PEAR_Command_Build extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Build(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function doBuild($command, $options, $params) @@ -65,7 +64,7 @@ function doBuild($command, $options, $params) $params[0] = 'package.xml'; } - $builder = &new PEAR_Builder($this->ui); + $builder = new PEAR_Builder($this->ui); $this->debug = $this->config->get('verbose'); $err = $builder->build($params[0], array(&$this, 'buildCallback')); if (PEAR::isError($err)) { @@ -82,4 +81,4 @@ function buildCallback($what, $data) $this->ui->outputData(rtrim($data), 'build'); } } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Channels.php b/WEB-INF/lib/pear/PEAR/Command/Channels.php index fcf01b503..690483d1d 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Channels.php +++ b/WEB-INF/lib/pear/PEAR/Command/Channels.php @@ -12,7 +12,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Channels.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -32,7 +31,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -167,9 +166,9 @@ class PEAR_Command_Channels extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Channels(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function _sortChannels($a, $b) @@ -695,7 +694,7 @@ function doAlias($command, $options, $params) 'already aliased to "' . strtolower($params[1]) . '", cannot re-alias'); } - $chan = &$reg->getChannel($params[0]); + $chan = $reg->getChannel($params[0]); if (PEAR::isError($chan)) { return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] . '" information (' . $chan->getMessage() . ')'); @@ -880,4 +879,4 @@ function doLogout($command, $options, $params) $this->config->store(); return true; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Common.php b/WEB-INF/lib/pear/PEAR/Command/Common.php index 279a71662..4be537629 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Common.php +++ b/WEB-INF/lib/pear/PEAR/Command/Common.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -29,7 +28,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -81,9 +80,9 @@ class PEAR_Command_Common extends PEAR * * @access public */ - function PEAR_Command_Common(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR(); + parent::__construct(); $this->config = &$config; $this->ui = &$ui; } @@ -270,4 +269,4 @@ function run($command, $options, $params) return $this->$func($command, $options, $params); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Config.php b/WEB-INF/lib/pear/PEAR/Command/Config.php index a761b277f..705a7cbb8 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Config.php +++ b/WEB-INF/lib/pear/PEAR/Command/Config.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Config.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -29,7 +28,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -133,9 +132,9 @@ class PEAR_Command_Config extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Config(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function doConfigShow($command, $options, $params) @@ -338,7 +337,7 @@ function doConfigCreate($command, $options, $params) } $params[1] = realpath($params[1]); - $config = &new PEAR_Config($params[1], '#no#system#config#', false, false); + $config = new PEAR_Config($params[1], '#no#system#config#', false, false); if ($root{strlen($root) - 1} == '/') { $root = substr($root, 0, strlen($root) - 1); } @@ -355,6 +354,7 @@ function doConfigCreate($command, $options, $params) $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download"); $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp"); $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear"); + $config->set('man_dir', $windows ? "$root\\pear\\man" : "$root/pear/man"); $config->writeConfigFile(); $this->_showConfig($config); $this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"', @@ -411,4 +411,4 @@ function _checkLayer($layer = null) return false; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Install.php b/WEB-INF/lib/pear/PEAR/Command/Install.php index c035f6d20..9d572eda8 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Install.php +++ b/WEB-INF/lib/pear/PEAR/Command/Install.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Install.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -30,7 +29,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -313,9 +312,9 @@ class PEAR_Command_Install extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Install(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } // }}} @@ -328,7 +327,7 @@ function &getDownloader(&$ui, $options, &$config) if (!class_exists('PEAR_Downloader')) { require_once 'PEAR/Downloader.php'; } - $a = &new PEAR_Downloader($ui, $options, $config); + $a = new PEAR_Downloader($ui, $options, $config); return $a; } @@ -340,7 +339,7 @@ function &getInstaller(&$ui) if (!class_exists('PEAR_Installer')) { require_once 'PEAR/Installer.php'; } - $a = &new PEAR_Installer($ui); + $a = new PEAR_Installer($ui); return $a; } @@ -468,7 +467,7 @@ function _parseIni($filename) $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; $zend_extension_line = 'zend_extension' . $debug . $ts; $all = @file($filename); - if (!$all) { + if ($all === false) { return PEAR::raiseError('php.ini "' . $filename .'" could not be read'); } $zend_extensions = $extensions = array(); @@ -556,7 +555,13 @@ function doInstall($command, $options, $params) $packrootphp_dir = $this->installer->_prependPath( $this->config->get('php_dir', null, 'pear.php.net'), $options['packagingroot']); - $instreg = new PEAR_Registry($packrootphp_dir); // other instreg! + $metadata_dir = $this->config->get('metadata_dir', null, 'pear.php.net'); + if ($metadata_dir) { + $metadata_dir = $this->installer->_prependPath( + $metadata_dir, + $options['packagingroot']); + } + $instreg = new PEAR_Registry($packrootphp_dir, false, false, $metadata_dir); // other instreg! if ($this->config->get('verbose') > 2) { $this->ui->outputData('using package root: ' . $options['packagingroot']); @@ -768,17 +773,13 @@ function doInstall($command, $options, $params) if ($param->getPackageType() == 'extsrc' || $param->getPackageType() == 'extbin') { $exttype = 'extension'; + $extpath = $pinfo[1]['basename']; } else { - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $exttype = 'zend_extension' . $debug . $ts; + $exttype = 'zend_extension'; + $extpath = $atts['installed_as']; } $extrainfo[] = 'You should add "' . $exttype . '=' . - $pinfo[1]['basename'] . '" to php.ini'; + $extpath . '" to php.ini'; } else { $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() . ' enabled in php.ini'; @@ -1136,7 +1137,7 @@ function doBundle($command, $options, $params) $dest .= DIRECTORY_SEPARATOR . $pkgname; $orig = $pkgname . '-' . $pkgversion; - $tar = &new Archive_Tar($pkgfile->getArchiveFile()); + $tar = new Archive_Tar($pkgfile->getArchiveFile()); if (!$tar->extractModify($dest, $orig)) { return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile()); } @@ -1198,7 +1199,7 @@ function _filterUptodatePackages($packages, $command) if (!isset($latestReleases[$channel])) { // fill in cache for this channel - $chan = &$reg->getChannel($channel); + $chan = $reg->getChannel($channel); if (PEAR::isError($chan)) { return $this->raiseError($chan); } @@ -1265,4 +1266,4 @@ function _filterUptodatePackages($packages, $command) return $ret; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Mirror.php b/WEB-INF/lib/pear/PEAR/Command/Mirror.php index 4d157c6b8..bae7ad13e 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Mirror.php +++ b/WEB-INF/lib/pear/PEAR/Command/Mirror.php @@ -9,7 +9,6 @@ * @author Alexander Merz * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Mirror.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.2.0 */ @@ -27,7 +26,7 @@ * @author Alexander Merz * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.2.0 */ @@ -60,9 +59,9 @@ class PEAR_Command_Mirror extends PEAR_Command_Common * @param object PEAR_Frontend a reference to an frontend * @param object PEAR_Config a reference to the configuration data */ - function PEAR_Command_Mirror(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } /** @@ -82,7 +81,7 @@ function &factory($a) * @param string $command the command * @param array $options the command options before the command * @param array $params the stuff after the command name - * @return bool true if succesful + * @return bool true if successful * @throw PEAR_Error */ function doDownloadAll($command, $options, $params) @@ -136,4 +135,4 @@ function doDownloadAll($command, $options, $params) return true; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Package.php b/WEB-INF/lib/pear/PEAR/Command/Package.php index 81df7bf69..c62948f1e 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Package.php +++ b/WEB-INF/lib/pear/PEAR/Command/Package.php @@ -12,7 +12,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Package.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -283,9 +282,9 @@ class PEAR_Command_Package extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Package(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function _displayValidationResults($err, $warn, $strict = false) @@ -310,7 +309,7 @@ function &getPackager() if (!class_exists('PEAR_Packager')) { require_once 'PEAR/Packager.php'; } - $a = &new PEAR_Packager; + $a = new PEAR_Packager; return $a; } @@ -322,7 +321,7 @@ function &getPackageFile($config, $debug = false) if (!class_exists('PEAR_PackageFile')) { require_once 'PEAR/PackageFile.php'; } - $a = &new PEAR_PackageFile($config, $debug); + $a = new PEAR_PackageFile($config, $debug); $common = new PEAR_Common; $common->ui = $this->ui; $a->setLogger($common); @@ -372,7 +371,7 @@ function doPackageValidate($command, $options, $params) $info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL); } else { $archive = $info->getArchiveFile(); - $tar = &new Archive_Tar($archive); + $tar = new Archive_Tar($archive); $tar->extract(dirname($info->getPackageFile())); $info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR . $info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR . @@ -467,7 +466,7 @@ function doSvnTag($command, $options, $params) 'name' => 'modified', 'type' => 'yesno', 'default' => 'no', - 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not commited, do you still want to tag ' . $version . '?', + 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not committed, do you still want to tag ' . $version . '?', )); $answers = $this->ui->confirmDialog($params); @@ -881,7 +880,7 @@ function doPackageDependencies($command, $options, $params) ); foreach ($deps as $type => $subd) { $req = ($type == 'required') ? 'Yes' : 'No'; - if ($type == 'group') { + if ($type == 'group' && isset($subd['attribs']['name'])) { $group = $subd['attribs']['name']; } else { $group = ''; @@ -1031,7 +1030,7 @@ function &getInstaller(&$ui) if (!class_exists('PEAR_Installer')) { require_once 'PEAR/Installer.php'; } - $a = &new PEAR_Installer($ui); + $a = new PEAR_Installer($ui); return $a; } @@ -1048,7 +1047,7 @@ function &getCommandPackaging(&$ui, &$config) } if (class_exists('PEAR_Command_Packaging')) { - $a = &new PEAR_Command_Packaging($ui, $config); + $a = new PEAR_Command_Packaging($ui, $config); } else { $a = null; } @@ -1121,4 +1120,4 @@ function doConvert($command, $options, $params) $this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"'); return true; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Pickle.php b/WEB-INF/lib/pear/PEAR/Command/Pickle.php index 87aa25ea3..af6079b69 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Pickle.php +++ b/WEB-INF/lib/pear/PEAR/Command/Pickle.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 2005-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Pickle.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.1 */ @@ -27,7 +26,7 @@ * @author Greg Beaver * @copyright 2005-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.1 */ @@ -76,9 +75,9 @@ class PEAR_Command_Pickle extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Pickle(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } /** @@ -92,7 +91,7 @@ function &getPackager() require_once 'PEAR/Packager.php'; } - $a = &new PEAR_Packager; + $a = new PEAR_Packager; return $a; } @@ -114,7 +113,7 @@ function &getPackageFile($config, $debug = false) require_once 'PEAR/PackageFile.php'; } - $a = &new PEAR_PackageFile($config, $debug); + $a = new PEAR_PackageFile($config, $debug); $common = new PEAR_Common; $common->ui = $this->ui; $a->setLogger($common); @@ -418,4 +417,4 @@ function _convertPackage($packagexml) $gen = &$pf->getDefaultGenerator(); $gen->toPackageFile('.'); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Registry.php b/WEB-INF/lib/pear/PEAR/Command/Registry.php index 4304db5dd..37ee48bea 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Registry.php +++ b/WEB-INF/lib/pear/PEAR/Command/Registry.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -29,7 +28,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -98,9 +97,9 @@ class PEAR_Command_Registry extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Registry(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function _sortinfo($a, $b) @@ -261,7 +260,7 @@ function doFileList($command, $options, $params) require_once 'PEAR/PackageFile.php'; } - $pkg = &new PEAR_PackageFile($this->config, $this->_debug); + $pkg = new PEAR_PackageFile($this->config, $this->_debug); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); PEAR::staticPopErrorHandling(); @@ -435,7 +434,7 @@ function doInfo($command, $options, $params) require_once 'PEAR/PackageFile.php'; } - $pkg = &new PEAR_PackageFile($this->config, $this->_debug); + $pkg = new PEAR_PackageFile($this->config, $this->_debug); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); PEAR::staticPopErrorHandling(); @@ -1142,4 +1141,4 @@ function _doInfo2($command, $options, $params, &$obj, $installed) $data['raw'] = $obj->getArray(); // no validation needed $this->ui->outputData($data, 'package-info'); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Remote.php b/WEB-INF/lib/pear/PEAR/Command/Remote.php index 74478d83c..f73db24f8 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Remote.php +++ b/WEB-INF/lib/pear/PEAR/Command/Remote.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Remote.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -31,7 +30,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -155,9 +154,9 @@ class PEAR_Command_Remote extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Remote(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function _checkChannelForStatus($channel, $chan) @@ -579,7 +578,7 @@ function &getDownloader($options) if (!class_exists('PEAR_Downloader')) { require_once 'PEAR/Downloader.php'; } - $a = &new PEAR_Downloader($this->ui, $options, $this->config); + $a = new PEAR_Downloader($this->ui, $options, $this->config); return $a; } @@ -668,13 +667,13 @@ function doListUpgrades($command, $options, $params) $preferred_mirror = $this->config->get('preferred_mirror'); if ($chan->supportsREST($preferred_mirror) && ( - //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) || - ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) + ($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror)) + || ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) ) ) { if ($base2) { - $rest = &$this->config->getREST('1.4', array()); + $rest = &$this->config->getREST('1.3', array()); $base = $base2; } else { $rest = &$this->config->getREST('1.0', array()); @@ -807,4 +806,4 @@ function doClearCache($command, $options, $params) $this->ui->outputData(rtrim($output), $command); return $num; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Command/Test.php b/WEB-INF/lib/pear/PEAR/Command/Test.php index a757d9e57..a59b1cf81 100644 --- a/WEB-INF/lib/pear/PEAR/Command/Test.php +++ b/WEB-INF/lib/pear/PEAR/Command/Test.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -31,7 +30,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -87,6 +86,10 @@ class PEAR_Command_Test extends PEAR_Command_Common 'shortopt' => 'x', 'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)', ), + 'showdiff' => array( + 'shortopt' => 'd', + 'doc' => 'Output diff on test failure', + ), ), 'doc' => '[testfile|dir ...] Run regression tests with PHP\'s regression testing script (run-tests.php).', @@ -100,9 +103,9 @@ class PEAR_Command_Test extends PEAR_Command_Common * * @access public */ - function PEAR_Command_Test(&$ui, &$config) + function __construct(&$ui, &$config) { - parent::PEAR_Command_Common($ui, $config); + parent::__construct($ui, $config); } function doRunTests($command, $options, $params) @@ -332,6 +335,9 @@ function doRunTests($command, $options, $params) } } - return true; + if (count($failed) == 0) { + return true; + } + return $this->raiseError('Some tests failed'); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Common.php b/WEB-INF/lib/pear/PEAR/Common.php index 3a8c7e80d..5fe76ad18 100644 --- a/WEB-INF/lib/pear/PEAR/Common.php +++ b/WEB-INF/lib/pear/PEAR/Common.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1.0 * @deprecated File deprecated since Release 1.4.0a1 @@ -118,7 +117,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 * @deprecated This class will disappear, and its components will be spread @@ -165,9 +164,9 @@ class PEAR_Common extends PEAR * * @access public */ - function PEAR_Common() + function __construct() { - parent::PEAR(); + parent::__construct(); $this->config = &PEAR_Config::singleton(); $this->debug = $this->config->get('verbose'); } @@ -241,11 +240,8 @@ function mkDirHier($dir) * @param string $msg message to write to the log * * @return void - * - * @access public - * @static */ - function log($level, $msg, $append_crlf = true) + public function log($level, $msg, $append_crlf = true) { if ($this->debug >= $level) { if (!class_exists('PEAR_Frontend')) { @@ -325,9 +321,8 @@ function betterStates($state, $include = false) * Get the valid roles for a PEAR package maintainer * * @return array - * @static */ - function getUserRoles() + public static function getUserRoles() { return $GLOBALS['_PEAR_Common_maintainer_roles']; } @@ -336,9 +331,8 @@ function getUserRoles() * Get the valid package release states of packages * * @return array - * @static */ - function getReleaseStates() + public static function getReleaseStates() { return $GLOBALS['_PEAR_Common_release_states']; } @@ -347,9 +341,8 @@ function getReleaseStates() * Get the implemented dependency types (php, ext, pkg etc.) * * @return array - * @static */ - function getDependencyTypes() + public static function getDependencyTypes() { return $GLOBALS['_PEAR_Common_dependency_types']; } @@ -358,9 +351,8 @@ function getDependencyTypes() * Get the implemented dependency relations (has, lt, ge etc.) * * @return array - * @static */ - function getDependencyRelations() + public static function getDependencyRelations() { return $GLOBALS['_PEAR_Common_dependency_relations']; } @@ -369,9 +361,8 @@ function getDependencyRelations() * Get the implemented file roles * * @return array - * @static */ - function getFileRoles() + public static function getFileRoles() { return $GLOBALS['_PEAR_Common_file_roles']; } @@ -380,9 +371,8 @@ function getFileRoles() * Get the implemented file replacement types in * * @return array - * @static */ - function getReplacementTypes() + public static function getReplacementTypes() { return $GLOBALS['_PEAR_Common_replacement_types']; } @@ -391,9 +381,8 @@ function getReplacementTypes() * Get the implemented file replacement types in * * @return array - * @static */ - function getProvideTypes() + public static function getProvideTypes() { return $GLOBALS['_PEAR_Common_provide_types']; } @@ -402,9 +391,8 @@ function getProvideTypes() * Get the implemented file replacement types in * * @return array - * @static */ - function getScriptPhases() + public static function getScriptPhases() { return $GLOBALS['_PEAR_Common_script_phases']; } @@ -440,9 +428,8 @@ function validPackageVersion($ver) /** * @param string $path relative or absolute include path * @return boolean - * @static */ - function isIncludeable($path) + public static function isIncludeable($path) { if (file_exists($path) && is_readable($path)) { return true; @@ -489,7 +476,7 @@ function _postProcessChecks($pf) */ function infoFromTgzFile($file) { - $packagefile = &new PEAR_PackageFile($this->config); + $packagefile = new PEAR_PackageFile($this->config); $pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL); return $this->_postProcessChecks($pf); } @@ -508,7 +495,7 @@ function infoFromTgzFile($file) */ function infoFromDescriptionFile($descfile) { - $packagefile = &new PEAR_PackageFile($this->config); + $packagefile = new PEAR_PackageFile($this->config); $pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); return $this->_postProcessChecks($pf); } @@ -527,7 +514,7 @@ function infoFromDescriptionFile($descfile) */ function infoFromString($data) { - $packagefile = &new PEAR_PackageFile($this->config); + $packagefile = new PEAR_PackageFile($this->config); $pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false); return $this->_postProcessChecks($pf); } @@ -571,7 +558,7 @@ function _postProcessValidPackagexml(&$pf) function infoFromAny($info) { if (is_string($info) && file_exists($info)) { - $packagefile = &new PEAR_PackageFile($this->config); + $packagefile = new PEAR_PackageFile($this->config); $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pf)) { $errs = $pf->getUserinfo(); @@ -604,7 +591,7 @@ function infoFromAny($info) function xmlFromInfo($pkginfo) { $config = &PEAR_Config::singleton(); - $packagefile = &new PEAR_PackageFile($config); + $packagefile = new PEAR_PackageFile($config); $pf = &$packagefile->fromArray($pkginfo); $gen = &$pf->getDefaultGenerator(); return $gen->toXml(PEAR_VALIDATE_PACKAGING); @@ -626,7 +613,7 @@ function xmlFromInfo($pkginfo) function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '') { $config = &PEAR_Config::singleton(); - $packagefile = &new PEAR_PackageFile($config); + $packagefile = new PEAR_PackageFile($config); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); if (strpos($info, 'fromXmlString($info, PEAR_VALIDATE_NORMAL, ''); @@ -814,24 +801,38 @@ function detectDependencies($any, $status_callback = null) * @param string $save_dir (optional) directory to save file in * @param mixed $callback (optional) function/method to call for status * updates - * - * @return string Returns the full path of the downloaded file or a PEAR - * error on failure. If the error is caused by - * socket-related errors, the error object will - * have the fsockopen error code available through - * getCode(). + * @param false|string|array $lastmodified header values to check against + * for caching + * use false to return the header + * values from this download + * @param false|array $accept Accept headers to send + * @param false|string $channel Channel to use for retrieving + * authentication + * + * @return mixed Returns the full path of the downloaded file or a PEAR + * error on failure. If the error is caused by + * socket-related errors, the error object will + * have the fsockopen error code available through + * getCode(). If caching is requested, then return the header + * values. + * If $lastmodified was given and the there are no changes, + * boolean false is returned. * * @access public - * @deprecated in favor of PEAR_Downloader::downloadHttp() */ - function downloadHttp($url, &$ui, $save_dir = '.', $callback = null) - { + function downloadHttp( + $url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, + $accept = false, $channel = false + ) { if (!class_exists('PEAR_Downloader')) { require_once 'PEAR/Downloader.php'; } - return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback); + return PEAR_Downloader::_downloadHttp( + $this, $url, $ui, $save_dir, $callback, $lastmodified, + $accept, $channel + ); } } require_once 'PEAR/Config.php'; -require_once 'PEAR/PackageFile.php'; \ No newline at end of file +require_once 'PEAR/PackageFile.php'; diff --git a/WEB-INF/lib/pear/PEAR/Config.php b/WEB-INF/lib/pear/PEAR/Config.php index 86a7db3f3..3856acb10 100644 --- a/WEB-INF/lib/pear/PEAR/Config.php +++ b/WEB-INF/lib/pear/PEAR/Config.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Config.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -87,6 +86,13 @@ } } +// Default for metadata_dir +if (getenv('PHP_PEAR_METADATA_DIR')) { + define('PEAR_CONFIG_DEFAULT_METADATA_DIR', getenv('PHP_PEAR_METADATA_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_METADATA_DIR', ''); +} + // Default for ext_dir if (getenv('PHP_PEAR_EXTENSION_DIR')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); @@ -142,6 +148,18 @@ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www'); } +// Default for man_dir +if (getenv('PHP_PEAR_MAN_DIR')) { + define('PEAR_CONFIG_DEFAULT_MAN_DIR', getenv('PHP_PEAR_MAN_DIR')); +} else { + if (defined('PHP_MANDIR')) { // Added in PHP5.3.7 + define('PEAR_CONFIG_DEFAULT_MAN_DIR', PHP_MANDIR); + } else { + define('PEAR_CONFIG_DEFAULT_MAN_DIR', PHP_PREFIX . DIRECTORY_SEPARATOR . + 'local' . DIRECTORY_SEPARATOR .'man'); + } +} + // Default for test_dir if (getenv('PHP_PEAR_TEST_DIR')) { define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR')); @@ -246,7 +264,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -440,6 +458,13 @@ class PEAR_Config extends PEAR 'prompt' => 'PEAR www files directory', 'group' => 'File Locations (Advanced)', ), + 'man_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_MAN_DIR, + 'doc' => 'directory where unix manual pages are installed', + 'prompt' => 'Systems manpage files directory', + 'group' => 'File Locations (Advanced)', + ), 'test_dir' => array( 'type' => 'directory', 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR, @@ -496,6 +521,13 @@ class PEAR_Config extends PEAR 'prompt' => 'php.ini location', 'group' => 'File Locations (Advanced)', ), + 'metadata_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_METADATA_DIR, + 'doc' => 'directory where metadata files are installed (registry, filemap, channels, ...)', + 'prompt' => 'PEAR metadata directory', + 'group' => 'File Locations (Advanced)', + ), // Maintainers 'username' => array( 'type' => 'string', @@ -592,10 +624,10 @@ class PEAR_Config extends PEAR * * @see PEAR_Config::singleton */ - function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false, + function __construct($user_file = '', $system_file = '', $ftp_file = false, $strict = true) { - $this->PEAR(); + parent::__construct(); PEAR_Installer_Role::initializeConfig($this); $sl = DIRECTORY_SEPARATOR; if (empty($user_file)) { @@ -647,7 +679,9 @@ function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false, $this->configuration['default'][$key] = $info['default']; } - $this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']); + $this->_registry['default'] = new PEAR_Registry( + $this->configuration['default']['php_dir'], false, false, + $this->configuration['default']['metadata_dir']); $this->_registry['default']->setConfig($this, false); $this->_regInitialized['default'] = false; //$GLOBALS['_PEAR_Config_instance'] = &$this; @@ -655,9 +689,8 @@ function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false, /** * Return the default locations of user and system configuration files - * @static */ - function getDefaultConfigFiles() + public static function getDefaultConfigFiles() { $sl = DIRECTORY_SEPARATOR; if (OS_WINDOWS) { @@ -684,17 +717,15 @@ function getDefaultConfigFiles() * * @return object an existing or new PEAR_Config instance * - * @access public - * * @see PEAR_Config::PEAR_Config */ - function &singleton($user_file = '', $system_file = '', $strict = true) + public static function &singleton($user_file = '', $system_file = '', $strict = true) { if (is_object($GLOBALS['_PEAR_Config_instance'])) { return $GLOBALS['_PEAR_Config_instance']; } - $t_conf = &new PEAR_Config($user_file, $system_file, false, $strict); + $t_conf = new PEAR_Config($user_file, $system_file, false, $strict); if ($t_conf->_errorsFound > 0) { return $t_conf->lastError; } @@ -754,7 +785,9 @@ function readConfigFile($file = null, $layer = 'user', $strict = true) $this->configuration[$layer] = $data; $this->_setupChannels(); if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer] = new PEAR_Registry( + $phpdir, false, false, + $this->get('metadata_dir', $layer, 'pear.php.net')); $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { @@ -783,7 +816,7 @@ function readFTPConfigFile($path) return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config'); } - $this->_ftp = &new PEAR_FTP; + $this->_ftp = new PEAR_FTP; $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN); $e = $this->_ftp->init($path); if (PEAR::isError($e)) { @@ -911,7 +944,9 @@ function mergeConfigFile($file, $override = true, $layer = 'user', $strict = tru $this->_setupChannels(); if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer] = new PEAR_Registry( + $phpdir, false, false, + $this->get('metadata_dir', $layer, 'pear.php.net')); $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { @@ -924,9 +959,8 @@ function mergeConfigFile($file, $override = true, $layer = 'user', $strict = tru * @param array * @param array * @return array - * @static */ - function arrayMergeRecursive($arr2, $arr1) + public static function arrayMergeRecursive($arr2, $arr1) { $ret = array(); foreach ($arr2 as $key => $data) { @@ -1022,16 +1056,12 @@ function _readConfigDataFrom($file) } $size = filesize($file); - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); fclose($fp); $contents = file_get_contents($file); if (empty($contents)) { return $this->raiseError('Configuration file "' . $file . '" is empty'); } - set_magic_quotes_runtime($rt); - $version = false; if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) { $version = $matches[1]; @@ -1357,7 +1387,7 @@ function get($key, $layer = null, $channel = false) if ($key == 'preferred_mirror') { $reg = &$this->getRegistry(); if (is_object($reg)) { - $chan = &$reg->getChannel($channel); + $chan = $reg->getChannel($channel); if (PEAR::isError($chan)) { return $channel; } @@ -1383,7 +1413,7 @@ function get($key, $layer = null, $channel = false) if ($key == 'preferred_mirror') { $reg = &$this->getRegistry(); if (is_object($reg)) { - $chan = &$reg->getChannel($channel); + $chan = $reg->getChannel($channel); if (PEAR::isError($chan)) { return $channel; } @@ -1434,7 +1464,7 @@ function _getChannelValue($key, $layer, $channel) if ($ret !== null) { $reg = &$this->getRegistry($layer); if (is_object($reg)) { - $chan = &$reg->getChannel($channel); + $chan = $reg->getChannel($channel); if (PEAR::isError($chan)) { return $channel; } @@ -1492,7 +1522,7 @@ function set($key, $value, $layer = 'user', $channel = false) $reg = &$this->getRegistry($layer); if (is_object($reg)) { - $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net'); + $chan = $reg->getChannel($channel ? $channel : 'pear.php.net'); if (PEAR::isError($chan)) { return false; } @@ -1574,7 +1604,7 @@ function set($key, $value, $layer = 'user', $channel = false) if ($key == 'php_dir' && !$this->_noRegistry) { if (!isset($this->_registry[$layer]) || $value != $this->_registry[$layer]->install_dir) { - $this->_registry[$layer] = &new PEAR_Registry($value); + $this->_registry[$layer] = new PEAR_Registry($value); $this->_regInitialized[$layer] = false; $this->_registry[$layer]->setConfig($this, false); } @@ -1604,7 +1634,9 @@ function _lazyChannelSetup($uselayer = false) if (!is_object($this->_registry[$layer])) { if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer] = new PEAR_Registry( + $phpdir, false, false, + $this->get('metadata_dir', $layer, 'pear.php.net')); $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { @@ -2035,7 +2067,7 @@ function &getREST($version, $options = array()) require_once 'PEAR/REST/' . $version . '.php'; } - $remote = &new $class($this, $options); + $remote = new $class($this, $options); return $remote; } @@ -2088,7 +2120,9 @@ function setInstallRoot($root) continue; } $this->_registry[$layer] = - &new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net')); + new PEAR_Registry( + $this->get('php_dir', $layer, 'pear.php.net'), false, false, + $this->get('metadata_dir', $layer, 'pear.php.net')); $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } diff --git a/WEB-INF/lib/pear/PEAR/Dependency2.php b/WEB-INF/lib/pear/PEAR/Dependency2.php index f3ddeb1cf..635c551ec 100644 --- a/WEB-INF/lib/pear/PEAR/Dependency2.php +++ b/WEB-INF/lib/pear/PEAR/Dependency2.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Dependency2.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -31,7 +30,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -82,7 +81,7 @@ class PEAR_Dependency2 * @param array format of PEAR_Registry::parsedPackageName() * @param int installation state (one of PEAR_VALIDATE_*) */ - function PEAR_Dependency2(&$config, $installoptions, $package, + function __construct(&$config, $installoptions, $package, $state = PEAR_VALIDATE_INSTALLING) { $this->_config = &$config; @@ -541,7 +540,7 @@ function validatePhpDependency($dep) */ function getPEARVersion() { - return '1.9.4'; + return '1.10.1'; } function validatePearinstallerDependency($dep) @@ -607,7 +606,7 @@ function validateSubpackageDependency($dep, $required, $params) * @param boolean whether this is a required dependency * @param array a list of downloaded packages to be installed, if any * @param boolean if true, then deps on pear.php.net that fail will also check - * against pecl.php.net packages to accomodate extensions that have + * against pecl.php.net packages to accommodate extensions that have * moved to pecl.php.net from pear.php.net */ function validatePackageDependency($dep, $required, $params, $depv1 = false) @@ -894,9 +893,9 @@ function validatePackageUninstall(&$dl) if (!class_exists('PEAR_Downloader_Package')) { require_once 'PEAR/Downloader/Package.php'; } - $dp = &new PEAR_Downloader_Package($dl); + $dp = new PEAR_Downloader_Package($dl); $dp->setPackageFile($downloaded[$i]); - $params[$i] = &$dp; + $params[$i] = $dp; } // check cache @@ -1175,7 +1174,7 @@ function validatePackage($pkg, &$dl, $params = array()) require_once 'PEAR/Downloader/Package.php'; } - $dp = &new PEAR_Downloader_Package($dl); + $dp = new PEAR_Downloader_Package($dl); if (is_object($pkg)) { $dp->setPackageFile($pkg); } else { @@ -1199,7 +1198,7 @@ function validatePackage($pkg, &$dl, $params = array()) } foreach ($ds as $d) { - $checker = &new PEAR_Dependency2($this->_config, $this->_options, + $checker = new PEAR_Dependency2($this->_config, $this->_options, array('channel' => $channel, 'package' => $package), $this->_state); $dep = $d['dep']; $required = $d['type'] == 'required'; @@ -1355,4 +1354,4 @@ function warning($msg) return array(sprintf($msg, $this->_registry->parsedPackageNameToString( $this->_currentPackage, true))); } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/DependencyDB.php b/WEB-INF/lib/pear/PEAR/DependencyDB.php index 948f0c9d7..1ee604343 100644 --- a/WEB-INF/lib/pear/PEAR/DependencyDB.php +++ b/WEB-INF/lib/pear/PEAR/DependencyDB.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: DependencyDB.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -30,7 +29,7 @@ * @author Tomas V.V.Cox * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -89,9 +88,8 @@ class PEAR_DependencyDB * @param PEAR_Config * @param string|false full path to the dependency database, or false to use default * @return PEAR_DependencyDB|PEAR_Error - * @static */ - function &singleton(&$config, $depdb = false) + public static function &singleton(&$config, $depdb = false) { $phpdir = $config->get('php_dir', null, 'pear.php.net'); if (!isset($GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir])) { @@ -122,8 +120,11 @@ function setConfig(&$config, $depdb = false) $this->_registry = &$this->_config->getRegistry(); if (!$depdb) { - $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb'; + $dir = $this->_config->get('metadata_dir', null, 'pear.php.net'); + if (!$dir) { + $dir = $this->_config->get('php_dir', null, 'pear.php.net'); + } + $this->_depdb = $dir . DIRECTORY_SEPARATOR . '.depdb'; } else { $this->_depdb = $depdb; } @@ -550,12 +551,9 @@ function _getDepDB() return $err; } - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); clearstatcache(); fclose($fp); $data = unserialize(file_get_contents($this->_depdb)); - set_magic_quotes_runtime($rt); $this->_cache = $data; return $data; } @@ -577,10 +575,7 @@ function _writeDepDB(&$deps) return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing"); } - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); fwrite($fp, serialize($deps)); - set_magic_quotes_runtime($rt); fclose($fp); $this->_unlock(); $this->_cache = $deps; @@ -766,4 +761,4 @@ function _registerDep(&$data, &$pkg, $dep, $type, $group = false) ); } } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Downloader.php b/WEB-INF/lib/pear/PEAR/Downloader.php index 730df0b73..6d6cdd7a2 100644 --- a/WEB-INF/lib/pear/PEAR/Downloader.php +++ b/WEB-INF/lib/pear/PEAR/Downloader.php @@ -12,7 +12,6 @@ * @author Martin Jansen * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Downloader.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.0 */ @@ -39,7 +38,7 @@ * @author Martin Jansen * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.0 */ @@ -140,27 +139,44 @@ class PEAR_Downloader extends PEAR_Common */ var $_downloadDir; + /** + * List of methods that can be called both statically and non-statically. + * @var array + */ + protected static $bivalentMethods = array( + 'setErrorHandling' => true, + 'raiseError' => true, + 'throwError' => true, + 'pushErrorHandling' => true, + 'popErrorHandling' => true, + 'downloadHttp' => true, + ); + /** * @param PEAR_Frontend_* * @param array * @param PEAR_Config */ - function PEAR_Downloader(&$ui, $options, &$config) + function __construct($ui = null, $options = array(), $config = null) { - parent::PEAR_Common(); + parent::__construct(); $this->_options = $options; - $this->config = &$config; - $this->_preferredState = $this->config->get('preferred_state'); + if ($config !== null) { + $this->config = &$config; + $this->_preferredState = $this->config->get('preferred_state'); + } $this->ui = &$ui; if (!$this->_preferredState) { // don't inadvertantly use a non-set preferred_state $this->_preferredState = null; } - if (isset($this->_options['installroot'])) { - $this->config->setInstallRoot($this->_options['installroot']); + if ($config !== null) { + if (isset($this->_options['installroot'])) { + $this->config->setInstallRoot($this->_options['installroot']); + } + $this->_registry = &$config->getRegistry(); } - $this->_registry = &$config->getRegistry(); if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) { $this->_installed = $this->_registry->listAllPackages(); @@ -235,12 +251,12 @@ function discover($channel) * @param PEAR_Downloader * @return PEAR_Downloader_Package */ - function &newDownloaderPackage(&$t) + function newDownloaderPackage(&$t) { if (!class_exists('PEAR_Downloader_Package')) { require_once 'PEAR/Downloader/Package.php'; } - $a = &new PEAR_Downloader_Package($t); + $a = new PEAR_Downloader_Package($t); return $a; } @@ -256,7 +272,7 @@ function &getDependency2Object(&$c, $i, $p, $s) if (!class_exists('PEAR_Dependency2')) { require_once 'PEAR/Dependency2.php'; } - $z = &new PEAR_Dependency2($c, $i, $p, $s); + $z = new PEAR_Dependency2($c, $i, $p, $s); return $z; } @@ -274,7 +290,7 @@ function &download($params) $channelschecked = array(); // convert all parameters into PEAR_Downloader_Package objects foreach ($params as $i => $param) { - $params[$i] = &$this->newDownloaderPackage($this); + $params[$i] = $this->newDownloaderPackage($this); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $err = $params[$i]->initialize($param); PEAR::staticPopErrorHandling(); @@ -315,7 +331,7 @@ function &download($params) require_once 'System.php'; } - $curchannel = &$this->_registry->getChannel($params[$i]->getChannel()); + $curchannel = $this->_registry->getChannel($params[$i]->getChannel()); if (PEAR::isError($curchannel)) { PEAR::staticPopErrorHandling(); return $this->raiseError($curchannel); @@ -331,7 +347,10 @@ function &download($params) $a = $this->downloadHttp($url, $this->ui, $dir, null, $curchannel->lastModified()); PEAR::staticPopErrorHandling(); - if (PEAR::isError($a) || !$a) { + if ($a === false) { + //channel.xml not modified + break; + } else if (PEAR::isError($a)) { // Attempt fallback to https automatically PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $a = $this->downloadHttp('https://' . $mirror . @@ -806,7 +825,7 @@ function _getPackageDownloadUrl($parr) } while (false); } - $chan = &$this->_registry->getChannel($parr['channel']); + $chan = $this->_registry->getChannel($parr['channel']); if (PEAR::isError($chan)) { return $chan; } @@ -929,7 +948,7 @@ function _getDepPackageDownloadUrl($dep, $parr) $curchannel = $this->config->get('default_channel'); if (isset($dep['uri'])) { $xsdversion = '2.0'; - $chan = &$this->_registry->getChannel('__uri'); + $chan = $this->_registry->getChannel('__uri'); if (PEAR::isError($chan)) { return $chan; } @@ -954,7 +973,7 @@ function _getDepPackageDownloadUrl($dep, $parr) } while (false); } - $chan = &$this->_registry->getChannel($remotechannel); + $chan = $this->_registry->getChannel($remotechannel); if (PEAR::isError($chan)) { return $chan; } @@ -969,7 +988,7 @@ function _getDepPackageDownloadUrl($dep, $parr) } if (isset($dep['uri'])) { - $info = &$this->newDownloaderPackage($this); + $info = $this->newDownloaderPackage($this); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $err = $info->initialize($dep); PEAR::staticPopErrorHandling(); @@ -1523,18 +1542,21 @@ function _sortInstall($a, $b) * use false to return the header values from this download * @param false|array $accept Accept headers to send * @param false|string $channel Channel to use for retrieving authentication - * @return string|array Returns the full path of the downloaded file or a PEAR - * error on failure. If the error is caused by - * socket-related errors, the error object will - * have the fsockopen error code available through - * getCode(). If caching is requested, then return the header - * values. + * @return mixed Returns the full path of the downloaded file or a PEAR + * error on failure. If the error is caused by + * socket-related errors, the error object will + * have the fsockopen error code available through + * getCode(). If caching is requested, then return the header + * values. + * If $lastmodified was given and the there are no changes, + * boolean false is returned. * * @access public */ - function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, - $accept = false, $channel = false) - { + public static function _downloadHttp( + $object, $url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, + $accept = false, $channel = false + ) { static $redirect = 0; // always reset , so we are clean case of error $wasredirect = $redirect; @@ -1556,8 +1578,8 @@ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodifi $port = isset($info['port']) ? $info['port'] : null; $path = isset($info['path']) ? $info['path'] : null; - if (isset($this)) { - $config = &$this->config; + if ($object !== null) { + $config = $object->config; } else { $config = &PEAR_Config::singleton(); } @@ -1639,9 +1661,9 @@ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodifi } $request .= $ifmodifiedsince . - "User-Agent: PEAR/1.9.4/PHP/" . PHP_VERSION . "\r\n"; + "User-Agent: PEAR/1.10.1/PHP/" . PHP_VERSION . "\r\n"; - if (isset($this)) { // only pass in authentication for non-static calls + if ($object !== null) { // only pass in authentication for non-static calls $username = $config->get('username', null, $channel); $password = $config->get('password', null, $channel); if ($username && $password) { @@ -1689,7 +1711,7 @@ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodifi } $redirect = $wasredirect + 1; - return $this->downloadHttp($headers['location'], + return static::_downloadHttp($object, $headers['location'], $ui, $save_dir, $callback, $lastmodified, $accept); } @@ -1763,4 +1785,4 @@ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodifi } return $dest_file; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Downloader/Package.php b/WEB-INF/lib/pear/PEAR/Downloader/Package.php index 987c96567..fe979eb67 100644 --- a/WEB-INF/lib/pear/PEAR/Downloader/Package.php +++ b/WEB-INF/lib/pear/PEAR/Downloader/Package.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Package.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -50,7 +49,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -130,7 +129,7 @@ class PEAR_Downloader_Package /** * @param PEAR_Downloader */ - function PEAR_Downloader_Package(&$downloader) + function __construct(&$downloader) { $this->_downloader = &$downloader; $this->_config = &$this->_downloader->config; @@ -397,9 +396,8 @@ function alreadyValidated() /** * Remove packages to be downloaded that are already installed * @param array of PEAR_Downloader_Package objects - * @static */ - function removeInstalled(&$params) + public static function removeInstalled(&$params) { if (!isset($params[0])) { return; @@ -415,7 +413,7 @@ function removeInstalled(&$params) if ($param->_installRegistry->packageExists($package, $channel)) { $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel); if (version_compare($packageVersion, $param->getVersion(), '==')) { - if (!isset($options['force'])) { + if (!isset($options['force']) && !isset($options['packagingroot'])) { $info = $param->getParsedPackage(); unset($info['version']); unset($info['state']); @@ -427,7 +425,7 @@ function removeInstalled(&$params) $params[$i] = false; } } elseif (!isset($options['force']) && !isset($options['upgrade']) && - !isset($options['soft'])) { + !isset($options['soft']) && !isset($options['packagingroot'])) { $info = $param->getParsedPackage(); $param->_downloader->log(1, 'Skipping package "' . $param->getShortName() . @@ -1243,7 +1241,7 @@ function isInstalled($dep, $oper = '==') * @param array $errorparams empty array * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts */ - function detectStupidDuplicates($params, &$errorparams) + public static function detectStupidDuplicates($params, &$errorparams) { $existing = array(); foreach ($params as $i => $param) { @@ -1281,9 +1279,8 @@ function detectStupidDuplicates($params, &$errorparams) /** * @param array * @param bool ignore install groups - for final removal of dupe packages - * @static */ - function removeDuplicates(&$params, $ignoreGroups = false) + public static function removeDuplicates(&$params, $ignoreGroups = false) { $pnames = array(); foreach ($params as $i => $param) { @@ -1345,9 +1342,8 @@ function setExplicitState($s) } /** - * @static */ - function mergeDependencies(&$params) + public static function mergeDependencies(&$params) { $bundles = $newparams = array(); foreach ($params as $i => $param) { @@ -1384,14 +1380,14 @@ function mergeDependencies(&$params) $obj->setExplicitState($s); } - $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); + $obj = new PEAR_Downloader_Package($params[$i]->getDownloader()); PEAR::pushErrorHandling(PEAR_ERROR_RETURN); if (PEAR::isError($dir = $dl->getDownloadDir())) { PEAR::popErrorHandling(); return $dir; } - - $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file); + $a = $dir . DIRECTORY_SEPARATOR . $file; + $e = $obj->_fromFile($a); PEAR::popErrorHandling(); if (PEAR::isError($e)) { if (!isset($options['soft'])) { @@ -1400,10 +1396,9 @@ function mergeDependencies(&$params) continue; } - $j = &$obj; - if (!PEAR_Downloader_Package::willDownload($j, - array_merge($params, $newparams)) && !$param->isInstalled($j)) { - $newparams[] = &$j; + if (!PEAR_Downloader_Package::willDownload($obj, + array_merge($params, $newparams)) && !$param->isInstalled($obj)) { + $newparams[] = $obj; } } } @@ -1437,7 +1432,7 @@ function mergeDependencies(&$params) // convert the dependencies into PEAR_Downloader_Package objects for the next time around $params[$i]->_downloadDeps = array(); foreach ($newdeps as $dep) { - $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); + $obj = new PEAR_Downloader_Package($params[$i]->getDownloader()); if ($s = $params[$i]->explicitState()) { $obj->setExplicitState($s); } @@ -1459,8 +1454,7 @@ function mergeDependencies(&$params) } } - $j = &$obj; - $newparams[] = &$j; + $newparams[] = $obj; } } @@ -1476,9 +1470,8 @@ function mergeDependencies(&$params) /** - * @static */ - function willDownload($param, $params) + public static function willDownload($param, $params) { if (!is_array($params)) { return false; @@ -1501,7 +1494,7 @@ function willDownload($param, $params) */ function &getPackagefileObject(&$c, $d) { - $a = &new PEAR_PackageFile($c, $d); + $a = new PEAR_PackageFile($c, $d); return $a; } @@ -1576,7 +1569,7 @@ function _fromUrl($param, $saveparam = '') if ($this->_rawpackagefile) { require_once 'Archive/Tar.php'; - $tar = &new Archive_Tar($file); + $tar = new Archive_Tar($file); $packagexml = $tar->extractInString('package2.xml'); if (!$packagexml) { $packagexml = $tar->extractInString('package.xml'); @@ -1985,4 +1978,4 @@ function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = return $info; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/ErrorStack.php b/WEB-INF/lib/pear/PEAR/ErrorStack.php index 0303f5273..7b705bdbb 100644 --- a/WEB-INF/lib/pear/PEAR/ErrorStack.php +++ b/WEB-INF/lib/pear/PEAR/ErrorStack.php @@ -23,7 +23,6 @@ * @author Greg Beaver * @copyright 2004-2008 Greg Beaver * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR_ErrorStack */ @@ -132,12 +131,11 @@ * $local_stack = new PEAR_ErrorStack('MyPackage'); * * @author Greg Beaver - * @version 1.9.4 + * @version 1.10.1 * @package PEAR_ErrorStack * @category Debugging * @copyright 2004-2008 Greg Beaver * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR_ErrorStack */ class PEAR_ErrorStack { @@ -194,43 +192,43 @@ class PEAR_ErrorStack { * @access protected */ var $_contextCallback = false; - + /** * If set to a valid callback, this will be called every time an error * is pushed onto the stack. The return value will be used to determine * whether to allow an error to be pushed or logged. - * + * * The return value must be one an PEAR_ERRORSTACK_* constant * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG * @var false|string|array * @access protected */ var $_errorCallback = array(); - + /** * PEAR::Log object for logging errors * @var false|Log * @access protected */ var $_logger = false; - + /** * Error messages - designed to be overridden * @var array * @abstract */ var $_errorMsgs = array(); - + /** * Set up a new error stack - * + * * @param string $package name of the package this error stack represents * @param callback $msgCallback callback used for error message generation * @param callback $contextCallback callback used for context generation, * defaults to {@link getFileLine()} * @param boolean $throwPEAR_Error */ - function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = false, + function __construct($package, $msgCallback = false, $contextCallback = false, $throwPEAR_Error = false) { $this->_package = $package; @@ -250,12 +248,13 @@ function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = fals * defaults to {@link getFileLine()} * @param boolean $throwPEAR_Error * @param string $stackClass class to instantiate - * @static + * * @return PEAR_ErrorStack */ - function &singleton($package, $msgCallback = false, $contextCallback = false, - $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack') - { + public static function &singleton( + $package, $msgCallback = false, $contextCallback = false, + $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack' + ) { if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; } @@ -297,15 +296,14 @@ function _handleError($err) /** * Set up a PEAR::Log object for all error stacks that don't have one * @param Log $log - * @static */ - function setDefaultLogger(&$log) + public static function setDefaultLogger(&$log) { if (is_object($log) && method_exists($log, 'log') ) { $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; } elseif (is_callable($log)) { $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; - } + } } /** @@ -358,9 +356,8 @@ function getMessageCallback() * messages for a singleton * @param array|string Callback function/method * @param string Package name, or false for all packages - * @static */ - function setDefaultCallback($callback = false, $package = false) + public static function setDefaultCallback($callback = false, $package = false) { if (!is_callable($callback)) { $callback = false; @@ -432,9 +429,8 @@ function popCallback() * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG * @see staticPopCallback(), pushCallback() * @param string|array $cb - * @static */ - function staticPushCallback($cb) + public static function staticPushCallback($cb) { array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb); } @@ -443,9 +439,8 @@ function staticPushCallback($cb) * Remove a temporary overriding error callback * @see staticPushCallback() * @return array|string|false - * @static */ - function staticPopCallback() + public static function staticPopCallback() { $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']); if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) { @@ -604,11 +599,11 @@ function push($code, $level = 'error', $params = array(), $msg = false, * to find error context * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also * thrown. see docs for {@link push()} - * @static */ - function staticPush($package, $code, $level = 'error', $params = array(), - $msg = false, $repackage = false, $backtrace = false) - { + public static function staticPush( + $package, $code, $level = 'error', $params = array(), + $msg = false, $repackage = false, $backtrace = false + ) { $s = &PEAR_ErrorStack::singleton($package); if ($s->_contextCallback) { if (!$backtrace) { @@ -750,9 +745,8 @@ function getErrors($purge = false, $level = false) * @param string|false Package name to check for errors * @param string Level name to check for a particular severity * @return boolean - * @static */ - function staticHasErrors($package = false, $level = false) + public static function staticHasErrors($package = false, $level = false) { if ($package) { if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { @@ -776,12 +770,13 @@ function staticHasErrors($package = false, $level = false) * @param boolean $merge Set to return a flat array, not organized by package * @param array $sortfunc Function used to sort a merged array - default * sorts by time, and should be good for most cases - * @static + * * @return array */ - function staticGetErrors($purge = false, $level = false, $merge = false, - $sortfunc = array('PEAR_ErrorStack', '_sortErrors')) - { + public static function staticGetErrors( + $purge = false, $level = false, $merge = false, + $sortfunc = array('PEAR_ErrorStack', '_sortErrors') + ) { $ret = array(); if (!is_callable($sortfunc)) { $sortfunc = array('PEAR_ErrorStack', '_sortErrors'); @@ -806,7 +801,7 @@ function staticGetErrors($purge = false, $level = false, $merge = false, * Error sorting function, sorts by time * @access private */ - function _sortErrors($a, $b) + public static function _sortErrors($a, $b) { if ($a['time'] == $b['time']) { return 0; @@ -829,9 +824,8 @@ function _sortErrors($a, $b) * @param unused * @param integer backtrace frame. * @param array Results of debug_backtrace() - * @static */ - function getFileLine($code, $params, $backtrace = null) + public static function getFileLine($code, $params, $backtrace = null) { if ($backtrace === null) { return false; @@ -903,10 +897,10 @@ function getFileLine($code, $params, $backtrace = null) * @param PEAR_ErrorStack * @param array * @param string|false Pre-generated error message template - * @static + * * @return string */ - function getErrorMessage(&$stack, $err, $template = false) + public static function getErrorMessage(&$stack, $err, $template = false) { if ($template) { $mainmsg = $template; diff --git a/WEB-INF/lib/pear/PEAR/Exception.php b/WEB-INF/lib/pear/PEAR/Exception.php index 4a0e7b86f..0aba17104 100644 --- a/WEB-INF/lib/pear/PEAR/Exception.php +++ b/WEB-INF/lib/pear/PEAR/Exception.php @@ -13,7 +13,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.3 */ @@ -89,7 +88,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.3 * diff --git a/WEB-INF/lib/pear/PEAR/FixPHP5PEARWarnings.php b/WEB-INF/lib/pear/PEAR/FixPHP5PEARWarnings.php deleted file mode 100644 index be5dc3ce7..000000000 --- a/WEB-INF/lib/pear/PEAR/FixPHP5PEARWarnings.php +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Frontend.php b/WEB-INF/lib/pear/PEAR/Frontend.php index 531e541f9..8c8c8c6b4 100644 --- a/WEB-INF/lib/pear/PEAR/Frontend.php +++ b/WEB-INF/lib/pear/PEAR/Frontend.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Frontend.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -39,7 +38,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -48,9 +47,8 @@ class PEAR_Frontend extends PEAR /** * Retrieve the frontend object * @return PEAR_Frontend_CLI|PEAR_Frontend_Web|PEAR_Frontend_Gtk - * @static */ - function &singleton($type = null) + public static function &singleton($type = null) { if ($type === null) { if (!isset($GLOBALS['_PEAR_FRONTEND_SINGLETON'])) { @@ -71,9 +69,8 @@ function &singleton($type = null) * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php) * @param string $uiclass full class name * @return PEAR_Frontend - * @static */ - function &setFrontendClass($uiclass) + public static function &setFrontendClass($uiclass) { if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) { @@ -88,7 +85,7 @@ function &setFrontendClass($uiclass) } if (class_exists($uiclass)) { - $obj = &new $uiclass; + $obj = new $uiclass; // quick test to see if this class implements a few of the most // important frontend methods if (is_a($obj, 'PEAR_Frontend')) { @@ -111,9 +108,8 @@ function &setFrontendClass($uiclass) * Frontends are expected to be a descendant of PEAR_Frontend * @param PEAR_Frontend * @return PEAR_Frontend - * @static */ - function &setFrontendObject($uiobject) + public static function &setFrontendObject($uiobject) { if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) { @@ -134,9 +130,8 @@ function &setFrontendObject($uiobject) /** * @param string $path relative or absolute include path * @return boolean - * @static */ - function isIncludeable($path) + public static function isIncludeable($path) { if (file_exists($path) && is_readable($path)) { return true; diff --git a/WEB-INF/lib/pear/PEAR/Frontend/CLI.php b/WEB-INF/lib/pear/PEAR/Frontend/CLI.php index 340b99b79..f0723d039 100644 --- a/WEB-INF/lib/pear/PEAR/Frontend/CLI.php +++ b/WEB-INF/lib/pear/PEAR/Frontend/CLI.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: CLI.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -27,7 +26,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -47,9 +46,9 @@ class PEAR_Frontend_CLI extends PEAR_Frontend 'normal' => '', ); - function PEAR_Frontend_CLI() + function __construct() { - parent::PEAR(); + parent::__construct(); $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 if (function_exists('posix_isatty') && !posix_isatty(1)) { // output is being redirected to a file or through a pipe @@ -748,4 +747,4 @@ function _display($text) { print $text; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Installer.php b/WEB-INF/lib/pear/PEAR/Installer.php index eb17ca791..d5cc7df69 100644 --- a/WEB-INF/lib/pear/PEAR/Installer.php +++ b/WEB-INF/lib/pear/PEAR/Installer.php @@ -12,7 +12,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Installer.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -36,7 +35,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -116,9 +115,9 @@ class PEAR_Installer extends PEAR_Downloader * * @access public */ - function PEAR_Installer(&$ui) + function __construct(&$ui) { - parent::PEAR_Common(); + parent::__construct($ui, array(), null); $this->setFrontendObject($ui); $this->debug = $this->config->get('verbose'); } @@ -589,7 +588,7 @@ function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options) foreach ($atts as $tag => $raw) { $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), array('', '_'), $tag); $task = "PEAR_Task_$tag"; - $task = &new $task($this->config, $this, PEAR_TASK_INSTALL); + $task = new $task($this->config, $this, PEAR_TASK_INSTALL); if (!$task->isScript()) { // scripts are only handled after installation $task->init($raw, $attribs, $pkg->getLastInstalledVersion()); $res = $task->startSession($pkg, $contents, $final_dest_file); @@ -808,7 +807,10 @@ function commitFileTransaction() if (!empty($res)) { $new = $this->_registry->getPackage($result[1], $result[0]); $this->file_operations[$key] = false; - $this->log(3, "file $data[0] was scheduled for removal from {$this->pkginfo->getName()} but is owned by {$new->getChannel()}/{$new->getName()}, removal has been cancelled."); + $pkginfoName = $this->pkginfo->getName(); + $newChannel = $new->getChannel(); + $newPackage = $new->getName(); + $this->log(3, "file $data[0] was scheduled for removal from $pkginfoName but is owned by $newChannel/$newPackage, removal has been cancelled."); } } } @@ -1017,42 +1019,6 @@ function mkDirHier($dir) return parent::mkDirHier($dir); } - // }}} - // {{{ download() - - /** - * Download any files and their dependencies, if necessary - * - * @param array a mixed list of package names, local files, or package.xml - * @param PEAR_Config - * @param array options from the command line - * @param array this is the array that will be populated with packages to - * install. Format of each entry: - * - * - * array('pkg' => 'package_name', 'file' => '/path/to/local/file', - * 'info' => array() // parsed package.xml - * ); - * - * @param array this will be populated with any error messages - * @param false private recursion variable - * @param false private recursion variable - * @param false private recursion variable - * @deprecated in favor of PEAR_Downloader - */ - function download($packages, $options, &$config, &$installpackages, - &$errors, $installed = false, $willinstall = false, $state = false) - { - // trickiness: initialize here - parent::PEAR_Downloader($this->ui, $options, $config); - $ret = parent::download($packages); - $errors = $this->getErrorMsgs(); - $installpackages = $this->getDownloadedPackages(); - trigger_error("PEAR Warning: PEAR_Installer::download() is deprecated " . - "in favor of PEAR_Downloader class", E_USER_WARNING); - return $ret; - } - // }}} // {{{ _parsePackageXml() @@ -1162,15 +1128,6 @@ function install($pkgfile, $options = array()) $pkgname = $pkg->getName(); $channel = $pkg->getChannel(); - if (isset($this->_options['packagingroot'])) { - $regdir = $this->_prependPath( - $this->config->get('php_dir', null, 'pear.php.net'), - $this->_options['packagingroot']); - - $packrootphp_dir = $this->_prependPath( - $this->config->get('php_dir', null, $channel), - $this->_options['packagingroot']); - } if (isset($options['installroot'])) { $this->config->setInstallRoot($options['installroot']); @@ -1182,7 +1139,21 @@ function install($pkgfile, $options = array()) $this->config->setInstallRoot(false); $this->_registry = &$this->config->getRegistry(); if (isset($this->_options['packagingroot'])) { - $installregistry = &new PEAR_Registry($regdir); + $regdir = $this->_prependPath( + $this->config->get('php_dir', null, 'pear.php.net'), + $this->_options['packagingroot']); + + $metadata_dir = $this->config->get('metadata_dir', null, 'pear.php.net'); + if ($metadata_dir) { + $metadata_dir = $this->_prependPath( + $metadata_dir, + $this->_options['packagingroot']); + } + $packrootphp_dir = $this->_prependPath( + $this->config->get('php_dir', null, $channel), + $this->_options['packagingroot']); + + $installregistry = new PEAR_Registry($regdir, false, false, $metadata_dir); if (!$installregistry->channelExists($channel, true)) { // we need to fake a channel-discover of this channel $chanobj = $this->_registry->getChannel($channel, true); @@ -1271,7 +1242,7 @@ function install($pkgfile, $options = array()) } } - $pfk = &new PEAR_PackageFile($this->config); + $pfk = new PEAR_PackageFile($this->config); $parentpkg = &$pfk->fromArray($parentreg); $installregistry->updatePackage2($parentpkg); } @@ -1535,7 +1506,7 @@ function _compileSourceFiles($savechannel, &$filelist) { require_once 'PEAR/Builder.php'; $this->log(1, "$this->source_files source files, building"); - $bob = &new PEAR_Builder($this->ui); + $bob = new PEAR_Builder($this->ui); $bob->debug = $this->debug; $built = $bob->build($filelist, array(&$this, '_buildCallback')); if (PEAR::isError($built)) { @@ -1679,7 +1650,7 @@ function uninstall($package, $options = array()) require_once 'PEAR/Dependency2.php'; } - $depchecker = &new PEAR_Dependency2($this->config, $options, + $depchecker = new PEAR_Dependency2($this->config, $options, array('channel' => $channel, 'package' => $package), PEAR_VALIDATE_UNINSTALLING); $e = $depchecker->validatePackageUninstall($this); @@ -1820,4 +1791,4 @@ function _buildCallback($what, $data) } // }}} -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role.php b/WEB-INF/lib/pear/PEAR/Installer/Role.php index 0c50fa79c..0623424a2 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Role.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -25,7 +24,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -36,10 +35,8 @@ class PEAR_Installer_Role * * Never call this directly, it is called by the PEAR_Config constructor * @param PEAR_Config - * @access private - * @static */ - function initializeConfig(&$config) + public static function initializeConfig(&$config) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -59,9 +56,8 @@ function initializeConfig(&$config) * @param string role name * @param PEAR_Config * @return PEAR_Installer_Role_Common - * @static */ - function &factory($pkg, $role, &$config) + public static function &factory($pkg, $role, &$config) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -88,9 +84,8 @@ function &factory($pkg, $role, &$config) * @param string * @param bool clear cache * @return array - * @static */ - function getValidRoles($release, $clear = false) + public static function getValidRoles($release, $clear = false) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -123,9 +118,8 @@ function getValidRoles($release, $clear = false) * roles are actually fully bundled releases of a package * @param bool clear cache * @return array - * @static */ - function getInstallableRoles($clear = false) + public static function getInstallableRoles($clear = false) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -158,9 +152,8 @@ function getInstallableRoles($clear = false) * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php * @param bool clear cache * @return array - * @static */ - function getBaseinstallRoles($clear = false) + public static function getBaseinstallRoles($clear = false) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -190,9 +183,8 @@ function getBaseinstallRoles($clear = false) * like the "php" role. * @param bool clear cache * @return array - * @static */ - function getPhpRoles($clear = false) + public static function getPhpRoles($clear = false) { if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { PEAR_Installer_Role::registerRoles(); @@ -226,10 +218,8 @@ function getPhpRoles($clear = false) * included. * * @return bool TRUE on success, a PEAR error on failure - * @access public - * @static */ - function registerRoles($dir = null) + public static function registerRoles($dir = null) { $GLOBALS['_PEAR_INSTALLER_ROLES'] = array(); $parser = new PEAR_XMLParser; diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Cfg.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Cfg.php index 762012248..903b1d641 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Cfg.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Cfg.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 2007-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Cfg.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.7.0 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 2007-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.7.0 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Common.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Common.php index 23e7348d7..df0b3c66c 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Common.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Common.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,7 +23,7 @@ * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -39,7 +38,7 @@ class PEAR_Installer_Role_Common /** * @param PEAR_Config */ - function PEAR_Installer_Role_Common(&$config) + function __construct(&$config) { $this->config = $config; } @@ -171,4 +170,4 @@ function isExtension() return $roleInfo['phpextension']; } } -?> \ No newline at end of file +?> diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Data.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Data.php index e3b7fa2ff..1a2c9c30c 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Data.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Data.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Data.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Doc.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Doc.php index d592ffff0..675cc8777 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Doc.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Doc.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Doc.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Ext.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Ext.php index eceb0279f..6224e2b89 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Ext.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Ext.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Ext.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Man.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Man.php new file mode 100644 index 000000000..5c3a842b8 --- /dev/null +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Man.php @@ -0,0 +1,28 @@ + + * @copyright 2011 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version SVN: $Id: $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.10.0 + */ + +/** + * @category pear + * @package PEAR + * @author Hannes Magnusson + * @copyright 2011 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.10.1 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.10.0 + */ +class PEAR_Installer_Role_Man extends PEAR_Installer_Role_Common {} +?> diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Man.xml b/WEB-INF/lib/pear/PEAR/Installer/Role/Man.xml new file mode 100644 index 000000000..ec2bd76c3 --- /dev/null +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Man.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + man_dir + 1 + + + + + + diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Php.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Php.php index e2abf44ee..d1b97a863 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Php.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Php.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Php.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Script.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Script.php index b31469e4b..f1eeda0b6 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Script.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Script.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Script.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Src.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Src.php index 503705313..2c7ae2142 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Src.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Src.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Src.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Test.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Test.php index 14c0e6091..c19c5dc06 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Test.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Test.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/WEB-INF/lib/pear/PEAR/Installer/Role/Www.php b/WEB-INF/lib/pear/PEAR/Installer/Role/Www.php index 11adeff82..42b197a90 100644 --- a/WEB-INF/lib/pear/PEAR/Installer/Role/Www.php +++ b/WEB-INF/lib/pear/PEAR/Installer/Role/Www.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 2007-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Www.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.7.0 */ @@ -20,7 +19,7 @@ * @author Greg Beaver * @copyright 2007-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.7.0 */ diff --git a/WEB-INF/lib/pear/PEAR/PackageFile.php b/WEB-INF/lib/pear/PEAR/PackageFile.php index 7ae336284..8fb6e41fa 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PackageFile.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -35,7 +34,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -67,7 +66,7 @@ class PEAR_PackageFile * @param string @tmpdir Optional temporary directory for uncompressing * files */ - function PEAR_PackageFile(&$config, $debug = false) + function __construct(&$config, $debug = false) { $this->_config = $config; $this->_debug = $debug; @@ -489,4 +488,4 @@ function &fromAnyFile($info, $state) $info = PEAR::raiseError("Cannot open '$info' for parsing"); return $info; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v1.php b/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v1.php index 2f42f178d..5a963787c 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v1.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v1.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -29,7 +28,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -39,14 +38,14 @@ class PEAR_PackageFile_Generator_v1 * @var PEAR_PackageFile_v1 */ var $_packagefile; - function PEAR_PackageFile_Generator_v1(&$packagefile) + function __construct(&$packagefile) { $this->_packagefile = &$packagefile; } function getPackagerVersion() { - return '1.9.4'; + return '1.10.1'; } /** @@ -109,7 +108,7 @@ function toTgz(&$packager, $compress = true, $where = null) // }}} $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true); if ($packagexml) { - $tar =& new Archive_Tar($dest_package, $compress); + $tar = new Archive_Tar($dest_package, $compress); $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors // ----- Creates with the package.xml file $ok = $tar->createModify(array($packagexml), '', $where); @@ -168,9 +167,6 @@ function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'pa */ function _fixXmlEncoding($string) { - if (version_compare(phpversion(), '5.0.0', 'lt')) { - $string = utf8_encode($string); - } return strtr($string, array( '&' => '&', '>' => '>', @@ -200,7 +196,7 @@ function toXml($state = PEAR_VALIDATE_NORMAL, $nofilevalidation = false) ); $ret = "\n"; $ret .= "\n"; - $ret .= "\n" . + $ret .= "\n" . " $pkginfo[package]"; if (isset($pkginfo['extends'])) { $ret .= "\n$pkginfo[extends]"; @@ -1178,13 +1174,15 @@ function _processPhpDeps($deps) } if (count($min)) { // get the highest minimum - $min = array_pop($a = array_flip($min)); + $a = array_flip($min); + $min = array_pop($a); } else { $min = false; } if (count($max)) { // get the lowest maximum - $max = array_shift($a = array_flip($max)); + $a = array_flip($max); + $max = array_shift($a); } else { $max = false; } @@ -1250,13 +1248,15 @@ function _processMultipleDepsName($deps) } if (count($min)) { // get the highest minimum - $min = array_pop($a = array_flip($min)); + $a = array_flip($min); + $min = array_pop($a); } else { $min = false; } if (count($max)) { // get the lowest maximum - $max = array_shift($a = array_flip($max)); + $a = array_flip($max); + $max = array_shift($a); } else { $max = false; } @@ -1281,4 +1281,4 @@ function _processMultipleDepsName($deps) return $ret; } } -?> \ No newline at end of file +?> diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v2.php b/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v2.php index 4d202df27..24e89f3aa 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v2.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/Generator/v2.php @@ -10,7 +10,6 @@ * @author Stephan Schmidt (original XML_Serializer code) * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -31,7 +30,7 @@ * @author Stephan Schmidt (original XML_Serializer code) * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -70,7 +69,7 @@ class PEAR_PackageFile_Generator_v2 http://pear.php.net/dtd/package-2.0.xsd', ), // attributes of the root tag 'attributesArray' => 'attribs', // all values in this key will be treated as attributes - 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjuction with attributesArray + 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjunction with attributesArray 'beautifyFilelist' => false, 'encoding' => 'UTF-8', ); @@ -100,7 +99,7 @@ class PEAR_PackageFile_Generator_v2 /** * @param PEAR_PackageFile_v2 */ - function PEAR_PackageFile_Generator_v2(&$packagefile) + function __construct(&$packagefile) { $this->_packagefile = &$packagefile; if (isset($this->_packagefile->encoding)) { @@ -113,7 +112,7 @@ function PEAR_PackageFile_Generator_v2(&$packagefile) */ function getPackagerVersion() { - return '1.9.4'; + return '1.10.1'; } /** @@ -232,7 +231,7 @@ function toTgz2(&$packager, &$pf1, $compress = true, $where = null) array($this->_packagefile->getTasksNs() . ':', '-'), array('', '_'), $tag); $task = "PEAR_Task_$tag"; - $task = &new $task($this->_packagefile->_config, + $task = new $task($this->_packagefile->_config, $this->_packagefile->_logger, PEAR_TASK_PACKAGE); $task->init($raw, $atts, null); @@ -269,7 +268,7 @@ function toTgz2(&$packager, &$pf1, $compress = true, $where = null) $name = $pf1 !== null ? 'package2.xml' : 'package.xml'; $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, $name); if ($packagexml) { - $tar =& new Archive_Tar($dest_package, $compress); + $tar = new Archive_Tar($dest_package, $compress); $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors // ----- Creates with the package.xml file $ok = $tar->createModify(array($packagexml), '', $where); @@ -398,7 +397,7 @@ function toXml($state = PEAR_VALIDATE_NORMAL, $options = array()) $this->options['beautifyFilelist'] = true; } - $arr['attribs']['packagerversion'] = '1.9.4'; + $arr['attribs']['packagerversion'] = '1.10.1'; if ($this->serialize($arr, $options)) { return $this->_serializedData . "\n"; } @@ -869,12 +868,6 @@ function _createXMLTag($tag, $replaceEntities = true) } if (is_scalar($tag['content']) || is_null($tag['content'])) { - if ($this->options['encoding'] == 'UTF-8' && - version_compare(phpversion(), '5.0.0', 'lt') - ) { - $tag['content'] = utf8_encode($tag['content']); - } - if ($replaceEntities === true) { $replaceEntities = XML_UTIL_ENTITIES_XML; } @@ -890,4 +883,4 @@ function _createXMLTag($tag, $replaceEntities = true) } return $tag; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v1.php b/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v1.php index 23395dc75..8e08e0b42 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v1.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v1.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -91,7 +90,7 @@ function &parse($data, $file, $archive = false) $code = xml_get_error_code($xp); $line = xml_get_current_line_number($xp); xml_parser_free($xp); - $a = &PEAR::raiseError(sprintf("XML error: %s at line %d", + $a = PEAR::raiseError(sprintf("XML error: %s at line %d", $str = xml_error_string($code), $line), 2); return $a; } diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v2.php b/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v2.php index a3ba7063f..49a29f1aa 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v2.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/Parser/v2.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -93,9 +92,9 @@ function postProcess($data, $element) * a subclass * @return PEAR_PackageFile_v2 */ - function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2') + function parse($data, $file = null, $archive = false, $class = 'PEAR_PackageFile_v2') { - if (PEAR::isError($err = parent::parse($data, $file))) { + if (PEAR::isError($err = parent::parse($data))) { return $err; } diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/v1.php b/WEB-INF/lib/pear/PEAR/PackageFile/v1.php index 43e346bcd..413db67d1 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/v1.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/v1.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -275,7 +274,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -346,9 +345,9 @@ class PEAR_PackageFile_v1 * @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack * @param string Name of Error Stack class to use. */ - function PEAR_PackageFile_v1() + function __construct() { - $this->_stack = &new PEAR_ErrorStack('PEAR_PackageFile_v1'); + $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v1'); $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); $this->_isValid = 0; } @@ -1308,7 +1307,7 @@ function &getDefaultGenerator() if (!class_exists('PEAR_PackageFile_Generator_v1')) { require_once 'PEAR/PackageFile/Generator/v1.php'; } - $a = &new PEAR_PackageFile_Generator_v1($this); + $a = new PEAR_PackageFile_Generator_v1($this); return $a; } @@ -1331,7 +1330,7 @@ function getFileContents($file) if (!class_exists('Archive_Tar')) { require_once 'Archive/Tar.php'; } - $tar = &new Archive_Tar($this->_archiveFile); + $tar = new Archive_Tar($this->_archiveFile); $tar->pushErrorHandling(PEAR_ERROR_RETURN); if ($file != 'package.xml' && $file != 'package2.xml') { $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; @@ -1466,15 +1465,6 @@ function _analyzeSourceCode($file) $look_for = $token; continue 2; case T_STRING: - if (version_compare(zend_version(), '2.0', '<')) { - if (in_array(strtolower($data), - array('public', 'private', 'protected', 'abstract', - 'interface', 'implements', 'throw') - )) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5, - array($file)); - } - } if ($look_for == T_CLASS) { $current_class = $data; $current_class_level = $brace_level; diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/v2.php b/WEB-INF/lib/pear/PEAR/PackageFile/v2.php index 1ca412dc8..ae0a1fa89 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/v2.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/v2.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -23,7 +22,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -129,12 +128,21 @@ class PEAR_PackageFile_v2 /** * The constructor merely sets up the private error stack */ - function PEAR_PackageFile_v2() + function __construct() { $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null); $this->_isValid = false; } + /** + * PHP 4 style constructor for backwards compatibility. + * Used by PEAR_PackageFileManager2 + */ + public function PEAR_PackageFile_v2() + { + $this->__construct(); + } + /** * To make unit-testing easier * @param PEAR_Frontend_* @@ -145,7 +153,7 @@ function PEAR_PackageFile_v2() */ function &getPEARDownloader(&$i, $o, &$c) { - $z = &new PEAR_Downloader($i, $o, $c); + $z = new PEAR_Downloader($i, $o, $c); return $z; } @@ -163,7 +171,7 @@ function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING) if (!class_exists('PEAR_Dependency2')) { require_once 'PEAR/Dependency2.php'; } - $z = &new PEAR_Dependency2($c, $o, $p, $s); + $z = new PEAR_Dependency2($c, $o, $p, $s); return $z; } @@ -564,7 +572,7 @@ function listPostinstallScripts() $atts = $filelist[$name]; foreach ($tasks as $tag => $raw) { $task = $this->getTask($tag); - $task = &new $task($this->_config, $common, PEAR_TASK_INSTALL); + $task = new $task($this->_config, $common, PEAR_TASK_INSTALL); if ($task->isScript()) { $ret[] = $filelist[$name]['installed_as']; } @@ -610,7 +618,7 @@ function initPostinstallScripts() $atts = $filelist[$name]; foreach ($tasks as $tag => $raw) { $taskname = $this->getTask($tag); - $task = &new $taskname($this->_config, $common, PEAR_TASK_INSTALL); + $task = new $taskname($this->_config, $common, PEAR_TASK_INSTALL); if (!$task->isScript()) { continue; // scripts are only handled after installation } @@ -1177,6 +1185,9 @@ function getFilelist($preserve = false) $contents['dir']['file'] = array($contents['dir']['file']); } foreach ($contents['dir']['file'] as $file) { + if (!isset($file['attribs']['name'])) { + continue; + } $name = $file['attribs']['name']; if (!$preserve) { $file = $file['attribs']; @@ -1854,7 +1865,7 @@ function getFileContents($file) return implode('', file($file)); } } else { // tgz - $tar = &new Archive_Tar($this->_archiveFile); + $tar = new Archive_Tar($this->_archiveFile); $tar->pushErrorHandling(PEAR_ERROR_RETURN); if ($file != 'package.xml' && $file != 'package2.xml') { $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; @@ -1893,7 +1904,7 @@ function &getDefaultGenerator() if (!class_exists('PEAR_PackageFile_Generator_v2')) { require_once 'PEAR/PackageFile/Generator/v2.php'; } - $a = &new PEAR_PackageFile_Generator_v2($this); + $a = new PEAR_PackageFile_Generator_v2($this); return $a; } diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/v2/Validator.php b/WEB-INF/lib/pear/PEAR/PackageFile/v2/Validator.php index 33c8eee38..eff9d03ca 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/v2/Validator.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/v2/Validator.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Validator.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a8 */ @@ -21,7 +20,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a8 * @access private @@ -112,7 +111,8 @@ function validate(&$pf, $state = PEAR_VALIDATE_NORMAL) isset($test['dependencies']['required']) && isset($test['dependencies']['required']['pearinstaller']) && isset($test['dependencies']['required']['pearinstaller']['min']) && - version_compare('1.9.4', + '1.10.1' != '@package' . '_version@' && + version_compare('1.10.1', $test['dependencies']['required']['pearinstaller']['min'], '<') ) { $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']); @@ -1350,7 +1350,7 @@ function _pearVersionTooLow($version) $this->_stack->push(__FUNCTION__, 'error', array('version' => $version), 'This package.xml requires PEAR version %version% to parse properly, we are ' . - 'version 1.9.4'); + 'version 1.10.1'); } function _invalidTagOrder($oktags, $actual, $root) @@ -1737,7 +1737,7 @@ function _analyzeBundledPackages() if (!is_array($info)) { $info = array($info); } - $pkg = &new PEAR_PackageFile($this->_pf->_config); + $pkg = new PEAR_PackageFile($this->_pf->_config); foreach ($info as $package) { if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) { $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package); @@ -1875,7 +1875,7 @@ function analyzeSourceCode($file, $string = false) $pn = $this->_pf->getPackage(); $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file, 'package' => $pn), - 'in %file%: Could not process file for unkown reasons,' . + 'in %file%: Could not process file for unknown reasons,' . ' possibly a PHP parse error in %file% from %package%'); } } @@ -1980,25 +1980,6 @@ function analyzeSourceCode($file, $string = false) $look_for = $token; continue 2; case T_STRING: - if (version_compare(zend_version(), '2.0', '<')) { - if (in_array(strtolower($data), - array('public', 'private', 'protected', 'abstract', - 'interface', 'implements', 'throw') - ) - ) { - if (isset($this->_stack)) { - $this->_stack->push(__FUNCTION__, 'warning', array( - 'file' => $file), - 'Error, PHP5 token encountered in %file%,' . - ' analysis should be in PHP5'); - } else { - PEAR::raiseError('Error: PHP5 token encountered in ' . $file . - 'packaging should be done in PHP 5'); - return false; - } - } - } - if ($look_for == T_CLASS) { $current_class = $data; $current_class_level = $brace_level; @@ -2045,7 +2026,7 @@ function analyzeSourceCode($file, $string = false) continue 2; case T_DOUBLE_COLON: $token = $tokens[$i - 1][0]; - if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC)) { + if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC || $token == T_VARIABLE)) { if (isset($this->_stack)) { $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file), 'Parser error: invalid PHP found in file "%file%"'); @@ -2151,4 +2132,4 @@ function _buildProvidesArray($srcinfo) return $providesret; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/PackageFile/v2/rw.php b/WEB-INF/lib/pear/PEAR/PackageFile/v2/rw.php index 58f76c559..f2b58e396 100644 --- a/WEB-INF/lib/pear/PEAR/PackageFile/v2/rw.php +++ b/WEB-INF/lib/pear/PEAR/PackageFile/v2/rw.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a8 */ @@ -23,7 +22,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a8 */ @@ -242,7 +241,7 @@ function updateMaintainer($newrole, $handle, $name, $email, $active = 'yes') } } foreach ($info as $i => $maintainer) { - if ($maintainer['user'] == $handle) { + if (is_array($maintainer) && $maintainer['user'] == $handle) { $found = $i; break 2; } diff --git a/WEB-INF/lib/pear/PEAR/Packager.php b/WEB-INF/lib/pear/PEAR/Packager.php index 8995a167f..3303f4c10 100644 --- a/WEB-INF/lib/pear/PEAR/Packager.php +++ b/WEB-INF/lib/pear/PEAR/Packager.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Packager.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -31,7 +30,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -50,7 +49,7 @@ function package($pkgfile = null, $compress = true, $pkg2 = null) } PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $pkg = &new PEAR_PackageFile($this->config, $this->debug); + $pkg = new PEAR_PackageFile($this->config, $this->debug); $pf = &$pkg->fromPackageFile($pkgfile, PEAR_VALIDATE_NORMAL); $main = &$pf; PEAR::staticPopErrorHandling(); diff --git a/WEB-INF/lib/pear/PEAR/REST.php b/WEB-INF/lib/pear/PEAR/REST.php index 34a804f2b..c0dfeaa69 100644 --- a/WEB-INF/lib/pear/PEAR/REST.php +++ b/WEB-INF/lib/pear/PEAR/REST.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: REST.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -28,7 +27,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -37,7 +36,7 @@ class PEAR_REST var $config; var $_options; - function PEAR_REST(&$config, $options = array()) + function __construct(&$config, $options = array()) { $this->config = &$config; $this->_options = $options; @@ -129,11 +128,13 @@ function retrieveData($url, $accept = false, $forcestring = false, $channel = fa } if (isset($headers['content-type'])) { - switch ($headers['content-type']) { + $content_type = explode(";", $headers['content-type']); + $content_type = $content_type[0]; + switch ($content_type) { case 'text/xml' : case 'application/xml' : case 'text/plain' : - if ($headers['content-type'] === 'text/plain') { + if ($content_type === 'text/plain') { $check = substr($content, 0, 5); if ($check !== 'config->get('username', null, $channel); $password = $this->config->get('password', null, $channel); @@ -480,4 +493,4 @@ function downloadHttp($url, $lastmodified = null, $accept = false, $channel = fa return $data; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/REST/10.php b/WEB-INF/lib/pear/PEAR/REST/10.php index 6ded7aeac..affcc18ee 100644 --- a/WEB-INF/lib/pear/PEAR/REST/10.php +++ b/WEB-INF/lib/pear/PEAR/REST/10.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 10.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a12 */ @@ -27,7 +26,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a12 */ @@ -37,9 +36,9 @@ class PEAR_REST_10 * @var PEAR_REST */ var $_rest; - function PEAR_REST_10($config, $options = array()) + function __construct($config, $options = array()) { - $this->_rest = &new PEAR_REST($config, $options); + $this->_rest = new PEAR_REST($config, $options); } /** @@ -868,4 +867,4 @@ function _sortReleasesByVersionNumber($a, $b) return 1; } } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/REST/11.php b/WEB-INF/lib/pear/PEAR/REST/11.php index 831cfccdb..9bd51ba6f 100644 --- a/WEB-INF/lib/pear/PEAR/REST/11.php +++ b/WEB-INF/lib/pear/PEAR/REST/11.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 11.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.3 */ @@ -27,7 +26,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.3 */ @@ -38,9 +37,9 @@ class PEAR_REST_11 */ var $_rest; - function PEAR_REST_11($config, $options = array()) + function __construct($config, $options = array()) { - $this->_rest = &new PEAR_REST($config, $options); + $this->_rest = new PEAR_REST($config, $options); } function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) @@ -338,4 +337,4 @@ function betterStates($state, $include = false) return array_slice($states, $i + 1); } } -?> \ No newline at end of file +?> diff --git a/WEB-INF/lib/pear/PEAR/REST/13.php b/WEB-INF/lib/pear/PEAR/REST/13.php index 722ae0de3..3855c6e05 100644 --- a/WEB-INF/lib/pear/PEAR/REST/13.php +++ b/WEB-INF/lib/pear/PEAR/REST/13.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 13.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a12 */ @@ -28,7 +27,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a12 */ @@ -296,4 +295,102 @@ function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); } + + /** + * List package upgrades but take the PHP version into account. + */ + function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + + $ret = array(); + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return $ret; + } + + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + foreach ($packagelist['p'] as $package) { + if (!isset($installed[strtolower($package)])) { + continue; + } + + $inst_version = $reg->packageInfo($package, 'version', $channel); + $inst_state = $reg->packageInfo($package, 'release_state', $channel); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases2.xml', false, false, $channel); + PEAR::popErrorHandling(); + if (PEAR::isError($info)) { + continue; // no remote releases + } + + if (!isset($info['r'])) { + continue; + } + + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + + // $info['r'] is sorted by version number + usort($info['r'], array($this, '_sortReleasesByVersionNumber')); + foreach ($info['r'] as $release) { + if ($inst_version && version_compare($release['v'], $inst_version, '<=')) { + // not newer than the one installed + break; + } + if (version_compare($release['m'], phpversion(), '>')) { + // skip dependency releases that require a PHP version + // newer than our PHP version + continue; + } + + // new version > installed version + if (!$pref_state) { + // every state is a good state + $found = true; + break; + } else { + $new_state = $release['s']; + // if new state >= installed state: go + if (in_array($new_state, $this->betterStates($inst_state, true))) { + $found = true; + break; + } else { + // only allow to lower the state of package, + // if new state >= preferred state: go + if (in_array($new_state, $this->betterStates($pref_state, true))) { + $found = true; + break; + } + } + } + } + + if (!$found) { + continue; + } + + $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . + $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($relinfo)) { + return $relinfo; + } + + $ret[$package] = array( + 'version' => $release['v'], + 'state' => $release['s'], + 'filesize' => $relinfo['f'], + ); + } + + return $ret; + } } \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Registry.php b/WEB-INF/lib/pear/PEAR/Registry.php index 35e17db49..c22d82f4a 100644 --- a/WEB-INF/lib/pear/PEAR/Registry.php +++ b/WEB-INF/lib/pear/PEAR/Registry.php @@ -11,7 +11,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -37,7 +36,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -131,24 +130,27 @@ class PEAR_Registry extends PEAR * * @access public */ - function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, - $pecl_channel = false) + function __construct($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, + $pecl_channel = false, $pear_metadata_dir = '') { - parent::PEAR(); - $this->setInstallDir($pear_install_dir); + parent::__construct(); + $this->setInstallDir($pear_install_dir, $pear_metadata_dir); $this->_pearChannel = $pear_channel; $this->_peclChannel = $pecl_channel; $this->_config = false; } - function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR) + function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR, $pear_metadata_dir = '') { $ds = DIRECTORY_SEPARATOR; $this->install_dir = $pear_install_dir; - $this->channelsdir = $pear_install_dir.$ds.'.channels'; - $this->statedir = $pear_install_dir.$ds.'.registry'; - $this->filemap = $pear_install_dir.$ds.'.filemap'; - $this->lockfile = $pear_install_dir.$ds.'.lock'; + if (!$pear_metadata_dir) { + $pear_metadata_dir = $pear_install_dir; + } + $this->channelsdir = $pear_metadata_dir.$ds.'.channels'; + $this->statedir = $pear_metadata_dir.$ds.'.registry'; + $this->filemap = $pear_metadata_dir.$ds.'.filemap'; + $this->lockfile = $pear_metadata_dir.$ds.'.lock'; } function hasWriteAccess() @@ -181,7 +183,7 @@ function setConfig(&$config, $resetInstallDir = true) { $this->_config = &$config; if ($resetInstallDir) { - $this->setInstallDir($config->get('php_dir')); + $this->setInstallDir($config->get('php_dir'), $config->get('metadata_dir')); } } @@ -319,7 +321,7 @@ function _initializeDepDB() $initializing = true; if (!$this->_config) { // never used? $file = OS_WINDOWS ? 'pear.ini' : '.pearrc'; - $this->_config = &new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR . + $this->_config = new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR . $file); $this->_config->setRegistry($this); $this->_config->set('php_dir', $this->install_dir); @@ -328,9 +330,9 @@ function _initializeDepDB() $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); if (PEAR::isError($this->_dependencyDB)) { // attempt to recover by removing the dep db - if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') . + if (file_exists($this->_config->get('metadata_dir', null, 'pear.php.net') . DIRECTORY_SEPARATOR . '.depdb')) { - @unlink($this->_config->get('php_dir', null, 'pear.php.net') . + @unlink($this->_config->get('metadata_dir', null, 'pear.php.net') . DIRECTORY_SEPARATOR . '.depdb'); } @@ -782,12 +784,9 @@ function _readFileMap() } clearstatcache(); - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); $fsize = filesize($this->filemap); fclose($fp); $data = file_get_contents($this->filemap); - set_magic_quotes_runtime($rt); $tmp = unserialize($data); if (!$tmp && $fsize > 7) { return $this->raiseError('PEAR_Registry: invalid filemap data', PEAR_REGISTRY_ERROR_FORMAT, null, null, $data); @@ -1136,12 +1135,9 @@ function _packageInfo($package = null, $key = null, $channel = 'pear.php.net') return null; } - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); clearstatcache(); $this->_closePackageFile($fp); $data = file_get_contents($this->_packageFileName($package, $channel)); - set_magic_quotes_runtime($rt); $data = unserialize($data); if ($key === null) { return $data; @@ -1175,12 +1171,9 @@ function _channelInfo($channel, $noaliases = false) return null; } - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); clearstatcache(); $this->_closeChannelFile($fp); $data = file_get_contents($this->_channelFileName($channel)); - set_magic_quotes_runtime($rt); $data = unserialize($data); return $data; } @@ -1447,7 +1440,7 @@ function &_getPackage($package, $channel = 'pear.php.net') $a = $this->_config; if (!$a) { - $this->_config = &new PEAR_Config; + $this->_config = new PEAR_Config; $this->_config->set('php_dir', $this->statedir); } @@ -1455,7 +1448,7 @@ function &_getPackage($package, $channel = 'pear.php.net') require_once 'PEAR/PackageFile.php'; } - $pkg = &new PEAR_PackageFile($this->_config); + $pkg = new PEAR_PackageFile($this->_config); $pf = &$pkg->fromArray($info); return $pf; } @@ -1934,12 +1927,12 @@ function updatePackage2($info) * @param bool whether to strictly return raw channels (no aliases) * @return PEAR_ChannelFile|PEAR_Error */ - function &getChannel($channel, $noaliases = false) + function getChannel($channel, $noaliases = false) { if (PEAR::isError($e = $this->_lock(LOCK_SH))) { return $e; } - $ret = &$this->_getChannel($channel, $noaliases); + $ret = $this->_getChannel($channel, $noaliases); $this->_unlock(); if (!$ret) { return PEAR::raiseError('Unknown channel: ' . $channel); @@ -2392,4 +2385,4 @@ function parsedPackageNameToString($parsed, $brief = false) } return $ret; } -} \ No newline at end of file +} diff --git a/WEB-INF/lib/pear/PEAR/RunTest.php b/WEB-INF/lib/pear/PEAR/RunTest.php index 518249069..59dedbf9b 100644 --- a/WEB-INF/lib/pear/PEAR/RunTest.php +++ b/WEB-INF/lib/pear/PEAR/RunTest.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: RunTest.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.3 */ @@ -38,7 +37,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.3 */ @@ -60,7 +59,6 @@ class PEAR_RunTest var $ini_overwrites = array( 'output_handler=', 'open_basedir=', - 'safe_mode=0', 'disable_functions=', 'output_buffering=Off', 'display_errors=1', @@ -75,7 +73,6 @@ class PEAR_RunTest 'error_append_string=', 'auto_prepend_file=', 'auto_append_file=', - 'magic_quotes_runtime=0', 'xdebug.default_enable=0', 'allow_url_fopen=1', ); @@ -84,7 +81,7 @@ class PEAR_RunTest * An object that supports the PEAR_Common->log() signature, or null * @param PEAR_Common|null */ - function PEAR_RunTest($logger = null, $options = array()) + function __construct($logger = null, $options = array()) { if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 0); @@ -115,19 +112,11 @@ function PEAR_RunTest($logger = null, $options = array()) function system_with_timeout($commandline, $env = null, $stdin = null) { $data = ''; - if (version_compare(phpversion(), '5.0.0', '<')) { - $proc = proc_open($commandline, array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), $pipes); - } else { - $proc = proc_open($commandline, array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), $pipes, null, $env, array('suppress_errors' => true)); - } + $proc = proc_open($commandline, array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), $pipes, null, $env, array('suppress_errors' => true)); if (!$proc) { return false; @@ -231,12 +220,7 @@ function settings2params($ini_settings) function _preparePhpBin($php, $file, $ini_settings) { $file = escapeshellarg($file); - // This was fixed in php 5.3 and is not needed after that - if (OS_WINDOWS && version_compare(PHP_VERSION, '5.3', '<')) { - $cmd = '"'.escapeshellarg($php).' '.$ini_settings.' -f ' . $file .'"'; - } else { - $cmd = $php . $ini_settings . ' -f ' . $file; - } + $cmd = $php . $ini_settings . ' -f ' . $file; return $cmd; } @@ -275,10 +259,8 @@ function runPHPUnit($file, $ini_settings = '') */ function run($file, $ini_settings = array(), $test_number = 1) { - if (isset($this->_savephp)) { - $this->_php = $this->_savephp; - unset($this->_savephp); - } + $this->_restorePHPBinary(); + if (empty($this->_options['cgi'])) { // try to see if php-cgi is in the path $res = $this->system_with_timeout('php-cgi -v'); @@ -340,7 +322,7 @@ function run($file, $ini_settings = array(), $test_number = 1) } return 'SKIPPED'; } - $this->_savephp = $this->_php; + $this->_savePHPBinary(); $this->_php = $this->_options['cgi']; } @@ -494,8 +476,6 @@ function run($file, $ini_settings = array(), $test_number = 1) } chdir($cwd); // in case the test moves us around - $this->_testCleanup($section_text, $temp_clean); - /* when using CGI, strip the headers from the output */ $output = $this->_stripHeadersCGI($output); @@ -516,6 +496,9 @@ function run($file, $ini_settings = array(), $test_number = 1) $output .= "\n====EXPECTHEADERS FAILURE====:\n$changed"; } } + + $this->_testCleanup($section_text, $temp_clean); + // Does the output match what is expected? do { if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { @@ -639,6 +622,11 @@ function run($file, $ini_settings = array(), $test_number = 1) $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; $data = $this->generate_diff($wanted, $output, $returns, $expectf); $res = $this->_writeLog($diff_filename, $data); + if (isset($this->_options['showdiff'])) { + $this->_logger->log(0, "========DIFF========"); + $this->_logger->log(0, $data); + $this->_logger->log(0, "========DONE========"); + } if (PEAR::isError($res)) { return $res; } @@ -954,6 +942,8 @@ function _processUpload($section_text, $file) function _testCleanup($section_text, $temp_clean) { if ($section_text['CLEAN']) { + $this->_restorePHPBinary(); + // perform test cleanup $this->save_text($temp_clean, $section_text['CLEAN']); $output = $this->system_with_timeout("$this->_php $temp_clean 2>&1"); @@ -965,4 +955,18 @@ function _testCleanup($section_text, $temp_clean) } } } + + function _savePHPBinary() + { + $this->_savephp = $this->_php; + } + + function _restorePHPBinary() + { + if (isset($this->_savephp)) + { + $this->_php = $this->_savephp; + unset($this->_savephp); + } + } } diff --git a/WEB-INF/lib/pear/PEAR/Task/Common.php b/WEB-INF/lib/pear/PEAR/Task/Common.php index 5b99c2e43..ebb71dc8a 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Common.php +++ b/WEB-INF/lib/pear/PEAR/Task/Common.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 */ /**#@+ * Error codes for task validation routines @@ -42,14 +41,15 @@ * This will first replace any instance of @data-dir@ in the test.php file * with the path to the current data directory. Then, it will include the * test.php file and run the script it contains to configure the package post-installation. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.10.1 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 * @abstract */ class PEAR_Task_Common @@ -62,34 +62,35 @@ class PEAR_Task_Common * changes directly to disk * * Child task classes must override this property. + * * @access protected */ - var $type = 'simple'; + protected $type = 'simple'; /** * Determines which install phase this task is executed under */ - var $phase = PEAR_TASK_INSTALL; + public $phase = PEAR_TASK_INSTALL; /** * @access protected */ - var $config; + protected $config; /** * @access protected */ - var $registry; + protected $registry; /** * @access protected */ - var $logger; + public $logger; /** * @access protected */ - var $installphase; + protected $installphase; /** * @param PEAR_Config * @param PEAR_Common */ - function PEAR_Task_Common(&$config, &$logger, $phase) + function __construct(&$config, &$logger, $phase) { $this->config = &$config; $this->registry = &$config->getRegistry(); @@ -102,101 +103,105 @@ function PEAR_Task_Common(&$config, &$logger, $phase) /** * Validate the basic contents of a task tag. + * * @param PEAR_PackageFile_v2 * @param array * @param PEAR_Config * @param array the entire parsed tag + * * @return true|array On error, return an array in format: - * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...]) + * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...]) + * + * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in + * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and + * an array of legal values in * - * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in - * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array - * of legal values in - * @static * @abstract */ - function validateXml($pkg, $xml, $config, $fileXml) + public static function validateXml($pkg, $xml, $config, $fileXml) { } /** * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param array attributes from the tag containing this task - * @param string|null last installed version of this package + * + * @param array raw, parsed xml + * @param array attributes from the tag containing this task + * @param string|null last installed version of this package * @abstract */ - function init($xml, $fileAttributes, $lastVersion) + public function init($xml, $fileAttributes, $lastVersion) { } /** - * Begin a task processing session. All multiple tasks will be processed after each file - * has been successfully installed, all simple tasks should perform their task here and - * return any errors using the custom throwError() method to allow forward compatibility + * Begin a task processing session. All multiple tasks will be processed + * after each file has been successfully installed, all simple tasks should + * perform their task here and return any errors using the custom + * throwError() method to allow forward compatibility * * This method MUST NOT write out any changes to disk - * @param PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) - * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents + * + * @param PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) + * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError), otherwise return the new contents * @abstract */ - function startSession($pkg, $contents, $dest) + public function startSession($pkg, $contents, $dest) { } /** - * This method is used to process each of the tasks for a particular multiple class - * type. Simple tasks need not implement this method. - * @param array an array of tasks - * @access protected - * @static - * @abstract + * This method is used to process each of the tasks for a particular + * multiple class type. Simple tasks need not implement this method. + * + * @param array an array of tasks + * @access protected */ - function run($tasks) + public static function run($tasks) { } /** - * @static * @final */ - function hasPostinstallTasks() + public static function hasPostinstallTasks() { return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); } - /** - * @static - * @final - */ - function runPostinstallTasks() - { - foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) { - $err = call_user_func(array($class, 'run'), - $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]); - if ($err) { - return PEAR_Task_Common::throwError($err); - } - } - unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); + /** + * @final + */ + public static function runPostinstallTasks() + { + foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) { + $err = call_user_func( + array($class, 'run'), + $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class] + ); + if ($err) { + return PEAR_Task_Common::throwError($err); + } + } + unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); } /** * Determines whether a role is a script * @return bool */ - function isScript() + public function isScript() { - return $this->type == 'script'; + return $this->type == 'script'; } - function throwError($msg, $code = -1) + public function throwError($msg, $code = -1) { include_once 'PEAR.php'; + return PEAR::raiseError($msg, $code); } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Postinstallscript.php b/WEB-INF/lib/pear/PEAR/Task/Postinstallscript.php index e43ecca4b..950deb5ce 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Postinstallscript.php +++ b/WEB-INF/lib/pear/PEAR/Task/Postinstallscript.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Postinstallscript.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 */ /** * Base class @@ -22,85 +21,95 @@ * * Note that post-install scripts are handled separately from installation, by the * "pear run-scripts" command - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.10.1 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 */ class PEAR_Task_Postinstallscript extends PEAR_Task_Common { - var $type = 'script'; - var $_class; - var $_params; - var $_obj; + public $type = 'script'; + public $_class; + public $_params; + public $_obj; /** * * @var PEAR_PackageFile_v2 */ - var $_pkg; - var $_contents; - var $phase = PEAR_TASK_INSTALL; + public $_pkg; + public $_contents; + public $phase = PEAR_TASK_INSTALL; /** * Validate the raw xml at parsing-time. * * This also attempts to validate the script to make sure it meets the criteria * for a post-install script - * @param PEAR_PackageFile_v2 - * @param array The XML contents of the tag - * @param PEAR_Config - * @param array the entire parsed tag - * @static + * + * @param PEAR_PackageFile_v2 + * @param array The XML contents of the tag + * @param PEAR_Config + * @param array the entire parsed tag */ - function validateXml($pkg, $xml, $config, $fileXml) + public static function validateXml($pkg, $xml, $config, $fileXml) { if ($fileXml['role'] != 'php') { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must be role="php"'); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" must be role="php"', ); } PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $file = $pkg->getFileContents($fileXml['name']); if (PEAR::isError($file)) { PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" is not valid: ' . - $file->getMessage()); + + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" is not valid: '. + $file->getMessage(), ); } elseif ($file === null) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" could not be retrieved for processing!'); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" could not be retrieved for processing!', ); } else { $analysis = $pkg->analyzeSourceCode($file, true); if (!$analysis) { PEAR::popErrorHandling(); $warnings = ''; foreach ($pkg->getValidationWarnings() as $warn) { - $warnings .= $warn['message'] . "\n"; + $warnings .= $warn['message']."\n"; } - return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' . - $fileXml['name'] . '" failed: ' . $warnings); + + return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "'. + $fileXml['name'].'" failed: '.$warnings, ); } if (count($analysis['declared_classes']) != 1) { PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare exactly 1 class'); + + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" must declare exactly 1 class', ); } $class = $analysis['declared_classes'][0]; - if ($class != str_replace(array('/', '.php'), array('_', ''), - $fileXml['name']) . '_postinstall') { + if ($class != str_replace( + array('/', '.php'), array('_', ''), + $fileXml['name'] + ).'_postinstall') { PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" class "' . $class . '" must be named "' . - str_replace(array('/', '.php'), array('_', ''), - $fileXml['name']) . '_postinstall"'); + + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" class "'.$class.'" must be named "'. + str_replace( + array('/', '.php'), array('_', ''), + $fileXml['name'] + ).'_postinstall"', ); } if (!isset($analysis['declared_methods'][$class])) { PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare methods init() and run()'); + + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" must declare methods init() and run()', ); } $methods = array('init' => 0, 'run' => 1); foreach ($analysis['declared_methods'][$class] as $method) { @@ -110,129 +119,137 @@ function validateXml($pkg, $xml, $config, $fileXml) } if (count($methods)) { PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare methods init() and run()'); + + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" must declare methods init() and run()', ); } } PEAR::popErrorHandling(); $definedparams = array(); - $tasksNamespace = $pkg->getTasksNs() . ':'; - if (!isset($xml[$tasksNamespace . 'paramgroup']) && isset($xml['paramgroup'])) { + $tasksNamespace = $pkg->getTasksNs().':'; + if (!isset($xml[$tasksNamespace.'paramgroup']) && isset($xml['paramgroup'])) { // in order to support the older betas, which did not expect internal tags // to also use the namespace $tasksNamespace = ''; } - if (isset($xml[$tasksNamespace . 'paramgroup'])) { - $params = $xml[$tasksNamespace . 'paramgroup']; + if (isset($xml[$tasksNamespace.'paramgroup'])) { + $params = $xml[$tasksNamespace.'paramgroup']; if (!is_array($params) || !isset($params[0])) { $params = array($params); } foreach ($params as $param) { - if (!isset($param[$tasksNamespace . 'id'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must have ' . - 'an ' . $tasksNamespace . 'id> tag'); + if (!isset($param[$tasksNamespace.'id'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" must have '. + 'an '.$tasksNamespace.'id> tag', ); } - if (isset($param[$tasksNamespace . 'name'])) { - if (!in_array($param[$tasksNamespace . 'name'], $definedparams)) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" parameter "' . $param[$tasksNamespace . 'name'] . - '" has not been previously defined'); + if (isset($param[$tasksNamespace.'name'])) { + if (!in_array($param[$tasksNamespace.'name'], $definedparams)) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" '.$tasksNamespace. + 'paramgroup> id "'.$param[$tasksNamespace.'id']. + '" parameter "'.$param[$tasksNamespace.'name']. + '" has not been previously defined', ); } - if (!isset($param[$tasksNamespace . 'conditiontype'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'conditiontype> tag containing either "=", ' . - '"!=", or "preg_match"'); + if (!isset($param[$tasksNamespace.'conditiontype'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" '.$tasksNamespace. + 'paramgroup> id "'.$param[$tasksNamespace.'id']. + '" must have a '.$tasksNamespace. + 'conditiontype> tag containing either "=", '. + '"!=", or "preg_match"', ); } - if (!in_array($param[$tasksNamespace . 'conditiontype'], - array('=', '!=', 'preg_match'))) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'conditiontype> tag containing either "=", ' . - '"!=", or "preg_match"'); + if (!in_array( + $param[$tasksNamespace.'conditiontype'], + array('=', '!=', 'preg_match') + )) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" '.$tasksNamespace. + 'paramgroup> id "'.$param[$tasksNamespace.'id']. + '" must have a '.$tasksNamespace. + 'conditiontype> tag containing either "=", '. + '"!=", or "preg_match"', ); } - if (!isset($param[$tasksNamespace . 'value'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'value> tag containing expected parameter value'); + if (!isset($param[$tasksNamespace.'value'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" '.$tasksNamespace. + 'paramgroup> id "'.$param[$tasksNamespace.'id']. + '" must have a '.$tasksNamespace. + 'value> tag containing expected parameter value', ); } } - if (isset($param[$tasksNamespace . 'instructions'])) { - if (!is_string($param[$tasksNamespace . 'instructions'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" ' . $tasksNamespace . 'instructions> must be simple text'); + if (isset($param[$tasksNamespace.'instructions'])) { + if (!is_string($param[$tasksNamespace.'instructions'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" '.$tasksNamespace. + 'paramgroup> id "'.$param[$tasksNamespace.'id']. + '" '.$tasksNamespace.'instructions> must be simple text', ); } } - if (!isset($param[$tasksNamespace . 'param'])) { + if (!isset($param[$tasksNamespace.'param'])) { continue; // is no longer required } - $subparams = $param[$tasksNamespace . 'param']; + $subparams = $param[$tasksNamespace.'param']; if (!is_array($subparams) || !isset($subparams[0])) { $subparams = array($subparams); } foreach ($subparams as $subparam) { - if (!isset($subparam[$tasksNamespace . 'name'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter for ' . - $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . '" must have ' . - 'a ' . $tasksNamespace . 'name> tag'); + if (!isset($subparam[$tasksNamespace.'name'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" parameter for '. + $tasksNamespace.'paramgroup> id "'. + $param[$tasksNamespace.'id'].'" must have '. + 'a '.$tasksNamespace.'name> tag', ); } - if (!preg_match('/[a-zA-Z0-9]+/', - $subparam[$tasksNamespace . 'name'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" is not a valid name. Must contain only alphanumeric characters'); + if (!preg_match( + '/[a-zA-Z0-9]+/', + $subparam[$tasksNamespace.'name'] + )) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" parameter "'. + $subparam[$tasksNamespace.'name']. + '" for '.$tasksNamespace.'paramgroup> id "'. + $param[$tasksNamespace.'id']. + '" is not a valid name. Must contain only alphanumeric characters', ); } - if (!isset($subparam[$tasksNamespace . 'prompt'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . 'prompt> tag'); + if (!isset($subparam[$tasksNamespace.'prompt'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" parameter "'. + $subparam[$tasksNamespace.'name']. + '" for '.$tasksNamespace.'paramgroup> id "'. + $param[$tasksNamespace.'id']. + '" must have a '.$tasksNamespace.'prompt> tag', ); } - if (!isset($subparam[$tasksNamespace . 'type'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . 'type> tag'); + if (!isset($subparam[$tasksNamespace.'type'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'. + $fileXml['name'].'" parameter "'. + $subparam[$tasksNamespace.'name']. + '" for '.$tasksNamespace.'paramgroup> id "'. + $param[$tasksNamespace.'id']. + '" must have a '.$tasksNamespace.'type> tag', ); } - $definedparams[] = $param[$tasksNamespace . 'id'] . '::' . - $subparam[$tasksNamespace . 'name']; + $definedparams[] = $param[$tasksNamespace.'id'].'::'. + $subparam[$tasksNamespace.'name']; } } } + return true; } /** * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param array attributes from the tag containing this task - * @param string|null last installed version of this package, if any (useful for upgrades) + * @param array $xml raw, parsed xml + * @param array $fileattribs attributes from the tag containing + * this task + * @param string|null $lastversion last installed version of this package, + * if any (useful for upgrades) */ - function init($xml, $fileattribs, $lastversion) + public function init($xml, $fileattribs, $lastversion) { $this->_class = str_replace('/', '_', $fileattribs['name']); $this->_filename = $fileattribs['name']; - $this->_class = str_replace ('.php', '', $this->_class) . '_postinstall'; + $this->_class = str_replace('.php', '', $this->_class).'_postinstall'; $this->_params = $xml; $this->_lastversion = $lastversion; } @@ -242,7 +259,7 @@ function init($xml, $fileattribs, $lastversion) * * @access private */ - function _stripNamespace($params = null) + public function _stripNamespace($params = null) { if ($params === null) { $params = array(); @@ -253,7 +270,7 @@ function _stripNamespace($params = null) if (is_array($param)) { $param = $this->_stripNamespace($param); } - $params[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; + $params[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param; } $this->_params = $params; } else { @@ -262,21 +279,24 @@ function _stripNamespace($params = null) if (is_array($param)) { $param = $this->_stripNamespace($param); } - $newparams[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; + $newparams[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param; } + return $newparams; } } /** - * Unlike other tasks, the installed file name is passed in instead of the file contents, - * because this task is handled post-installation - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file name + * Unlike other tasks, the installed file name is passed in instead of the + * file contents, because this task is handled post-installation + * + * @param mixed $pkg PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string $contents file name + * * @return bool|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError) + * (use $this->throwError) */ - function startSession($pkg, $contents) + public function startSession($pkg, $contents) { if ($this->installphase != PEAR_TASK_INSTALL) { return false; @@ -284,40 +304,46 @@ function startSession($pkg, $contents) // remove the tasks: namespace if present $this->_pkg = $pkg; $this->_stripNamespace(); - $this->logger->log(0, 'Including external post-installation script "' . - $contents . '" - any errors are in this script'); + $this->logger->log( + 0, 'Including external post-installation script "'. + $contents.'" - any errors are in this script' + ); include_once $contents; if (class_exists($this->_class)) { $this->logger->log(0, 'Inclusion succeeded'); } else { - return $this->throwError('init of post-install script class "' . $this->_class - . '" failed'); + return $this->throwError( + 'init of post-install script class "'.$this->_class + .'" failed' + ); } - $this->_obj = new $this->_class; - $this->logger->log(1, 'running post-install script "' . $this->_class . '->init()"'); + $this->_obj = new $this->_class(); + $this->logger->log(1, 'running post-install script "'.$this->_class.'->init()"'); PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $res = $this->_obj->init($this->config, $pkg, $this->_lastversion); PEAR::popErrorHandling(); if ($res) { $this->logger->log(0, 'init succeeded'); } else { - return $this->throwError('init of post-install script "' . $this->_class . - '->init()" failed'); + return $this->throwError( + 'init of post-install script "'.$this->_class. + '->init()" failed' + ); } $this->_contents = $contents; + return true; } /** * No longer used - * @see PEAR_PackageFile_v2::runPostinstallScripts() - * @param array an array of tasks - * @param string install or upgrade + * + * @see PEAR_PackageFile_v2::runPostinstallScripts() + * @param array an array of tasks + * @param string install or upgrade * @access protected - * @static */ - function run() + public static function run() { } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Postinstallscript/rw.php b/WEB-INF/lib/pear/PEAR/Task/Postinstallscript/rw.php index 8f358bf22..662960062 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Postinstallscript/rw.php +++ b/WEB-INF/lib/pear/PEAR/Task/Postinstallscript/rw.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 */ /** * Base class @@ -24,7 +23,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ @@ -35,30 +34,31 @@ class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript * * @var PEAR_PackageFile_v2_rw */ - var $_pkg; + public $_pkg; /** * Enter description here... * - * @param PEAR_PackageFile_v2_rw $pkg - * @param PEAR_Config $config - * @param PEAR_Frontend $logger - * @param array $fileXml + * @param PEAR_PackageFile_v2_rw $pkg Package + * @param PEAR_Config $config Config + * @param PEAR_Frontend $logger Logger + * @param array $fileXml XML + * * @return PEAR_Task_Postinstallscript_rw */ - function PEAR_Task_Postinstallscript_rw(&$pkg, &$config, &$logger, $fileXml) + function __construct(&$pkg, &$config, &$logger, $fileXml) { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + parent::__construct($config, $logger, PEAR_TASK_PACKAGE); $this->_contents = $fileXml; $this->_pkg = &$pkg; $this->_params = array(); } - function validate() + public function validate() { return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); } - function getName() + public function getName() { return 'postinstallscript'; } @@ -73,30 +73,31 @@ function getName() * * Use {@link addConditionTypeGroup()} to add a containing * a tag - * @param string $id id as seen by the script - * @param array|false $params array of getParam() calls, or false for no params + * + * @param string $id id as seen by the script + * @param array|false $params array of getParam() calls, or false for no params * @param string|false $instructions */ - function addParamGroup($id, $params = false, $instructions = false) + public function addParamGroup($id, $params = false, $instructions = false) { if ($params && isset($params[0]) && !isset($params[1])) { $params = $params[0]; } $stuff = array( - $this->_pkg->getTasksNs() . ':id' => $id, + $this->_pkg->getTasksNs().':id' => $id, ); if ($instructions) { - $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; + $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions; } if ($params) { - $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; + $stuff[$this->_pkg->getTasksNs().':param'] = $params; } - $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; + $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff; } /** - * add a complex to the post-install script with conditions + * Add a complex to the post-install script with conditions * * This inserts a with * @@ -107,63 +108,75 @@ function addParamGroup($id, $params = false, $instructions = false) * * Use {@link addParamGroup()} to add a simple * - * @param string $id id as seen by the script - * @param string $oldgroup id of the section referenced by - * - * @param string $param name of the from the older section referenced - * by - * @param string $value value to match of the parameter - * @param string $conditiontype one of '=', '!=', 'preg_match' - * @param array|false $params array of getParam() calls, or false for no params + * @param string $id id as seen by the script + * @param string $oldgroup id of the section referenced by + * + * @param string $param name of the from the older section referenced + * by + * @param string $value value to match of the parameter + * @param string $conditiontype one of '=', '!=', 'preg_match' + * @param array|false $params array of getParam() calls, or false for no params * @param string|false $instructions */ - function addConditionTypeGroup($id, $oldgroup, $param, $value, $conditiontype = '=', - $params = false, $instructions = false) - { + public function addConditionTypeGroup($id, + $oldgroup, + $param, + $value, + $conditiontype = '=', + $params = false, + $instructions = false + ) { if ($params && isset($params[0]) && !isset($params[1])) { $params = $params[0]; } $stuff = array( - $this->_pkg->getTasksNs() . ':id' => $id, + $this->_pkg->getTasksNs().':id' => $id, ); if ($instructions) { - $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; + $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions; } - $stuff[$this->_pkg->getTasksNs() . ':name'] = $oldgroup . '::' . $param; - $stuff[$this->_pkg->getTasksNs() . ':conditiontype'] = $conditiontype; - $stuff[$this->_pkg->getTasksNs() . ':value'] = $value; + $stuff[$this->_pkg->getTasksNs().':name'] = $oldgroup.'::'.$param; + $stuff[$this->_pkg->getTasksNs().':conditiontype'] = $conditiontype; + $stuff[$this->_pkg->getTasksNs().':value'] = $value; if ($params) { - $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; + $stuff[$this->_pkg->getTasksNs().':param'] = $params; } - $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; + $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff; } - function getXml() + public function getXml() { return $this->_params; } /** * Use to set up a param tag for use in creating a paramgroup - * @static + * + * @param mixed $name Name of parameter + * @param mixed $prompt Prompt + * @param string $type Type, defaults to 'string' + * @param mixed $default Default value + * + * @return array */ - function getParam($name, $prompt, $type = 'string', $default = null) - { + public static function getParam( + $name, $prompt, $type = 'string', $default = null + ) { if ($default !== null) { return array( - $this->_pkg->getTasksNs() . ':name' => $name, - $this->_pkg->getTasksNs() . ':prompt' => $prompt, - $this->_pkg->getTasksNs() . ':type' => $type, - $this->_pkg->getTasksNs() . ':default' => $default + $this->_pkg->getTasksNs().':name' => $name, + $this->_pkg->getTasksNs().':prompt' => $prompt, + $this->_pkg->getTasksNs().':type' => $type, + $this->_pkg->getTasksNs().':default' => $default, ); } + return array( - $this->_pkg->getTasksNs() . ':name' => $name, - $this->_pkg->getTasksNs() . ':prompt' => $prompt, - $this->_pkg->getTasksNs() . ':type' => $type, + $this->_pkg->getTasksNs().':name' => $name, + $this->_pkg->getTasksNs().':prompt' => $prompt, + $this->_pkg->getTasksNs().':type' => $type, ); } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Replace.php b/WEB-INF/lib/pear/PEAR/Task/Replace.php index 376df64df..7483282bb 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Replace.php +++ b/WEB-INF/lib/pear/PEAR/Task/Replace.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Replace.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 */ /** * Base class @@ -24,24 +23,24 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ class PEAR_Task_Replace extends PEAR_Task_Common { - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGEANDINSTALL; - var $_replacements; + public $type = 'simple'; + public $phase = PEAR_TASK_PACKAGEANDINSTALL; + public $_replacements; /** * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static + * + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config */ - function validateXml($pkg, $xml, $config, $fileXml) + public static function validateXml($pkg, $xml, $config, $fileXml) { if (!isset($xml['attribs'])) { return array(PEAR_TASK_ERROR_NOATTRIBS); @@ -58,33 +57,36 @@ function validateXml($pkg, $xml, $config, $fileXml) if ($xml['attribs']['type'] == 'pear-config') { if (!in_array($xml['attribs']['to'], $config->getKeys())) { return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], - $config->getKeys()); + $config->getKeys(), ); } } elseif ($xml['attribs']['type'] == 'php-const') { if (defined($xml['attribs']['to'])) { return true; } else { return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], - array('valid PHP constant')); + array('valid PHP constant'), ); } } elseif ($xml['attribs']['type'] == 'package-info') { - if (in_array($xml['attribs']['to'], + if (in_array( + $xml['attribs']['to'], array('name', 'summary', 'channel', 'notes', 'extends', 'description', 'release_notes', 'license', 'release-license', 'license-uri', 'version', 'api-version', 'state', 'api-state', 'release_date', - 'date', 'time'))) { + 'date', 'time', ) + )) { return true; } else { return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], array('name', 'summary', 'channel', 'notes', 'extends', 'description', 'release_notes', 'license', 'release-license', 'license-uri', 'version', 'api-version', 'state', 'api-state', 'release_date', - 'date', 'time')); + 'date', 'time', ), ); } } else { return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'], - array('pear-config', 'package-info', 'php-const')); + array('pear-config', 'package-info', 'php-const'), ); } + return true; } @@ -92,8 +94,9 @@ function validateXml($pkg, $xml, $config, $fileXml) * Initialize a task instance with the parameters * @param array raw, parsed xml * @param unused + * @param unused */ - function init($xml, $attribs) + public function init($xml, $attribs, $lastVersion = null) { $this->_replacements = isset($xml['attribs']) ? array($xml) : $xml; } @@ -102,13 +105,14 @@ function init($xml, $attribs) * Do a package.xml 1.0 replacement, with additional package-info fields available * * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) + * + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents + * (use $this->throwError), otherwise return the new contents */ - function startSession($pkg, $contents, $dest) + public function startSession($pkg, $contents, $dest) { $subst_from = $subst_to = array(); foreach ($this->_replacements as $a) { @@ -124,6 +128,7 @@ function startSession($pkg, $contents, $dest) $to = $chan->getServer(); } else { $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); + return false; } } else { @@ -140,6 +145,7 @@ function startSession($pkg, $contents, $dest) } if (is_null($to)) { $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); + return false; } } elseif ($a['type'] == 'php-const') { @@ -150,6 +156,7 @@ function startSession($pkg, $contents, $dest) $to = constant($a['to']); } else { $this->logger->log(0, "$dest: invalid php-const replacement: $a[to]"); + return false; } } else { @@ -157,6 +164,7 @@ function startSession($pkg, $contents, $dest) $to = $t; } else { $this->logger->log(0, "$dest: invalid package-info replacement: $a[to]"); + return false; } } @@ -165,12 +173,14 @@ function startSession($pkg, $contents, $dest) $subst_to[] = $to; } } - $this->logger->log(3, "doing " . sizeof($subst_from) . - " substitution(s) for $dest"); + $this->logger->log( + 3, "doing ".sizeof($subst_from). + " substitution(s) for $dest" + ); if (sizeof($subst_from)) { $contents = str_replace($subst_from, $subst_to, $contents); } + return $contents; } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Replace/rw.php b/WEB-INF/lib/pear/PEAR/Task/Replace/rw.php index 32dad5862..ace1e9ea2 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Replace/rw.php +++ b/WEB-INF/lib/pear/PEAR/Task/Replace/rw.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 */ /** * Base class @@ -24,38 +23,37 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ class PEAR_Task_Replace_rw extends PEAR_Task_Replace { - function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml) + public function __construct(&$pkg, &$config, &$logger, $fileXml) { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + parent::__construct($config, $logger, PEAR_TASK_PACKAGE); $this->_contents = $fileXml; $this->_pkg = &$pkg; $this->_params = array(); } - function validate() + public function validate() { return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); } - function setInfo($from, $to, $type) + public function setInfo($from, $to, $type) { $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type)); } - function getName() + public function getName() { return 'replace'; } - function getXml() + public function getXml() { return $this->_params; } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Unixeol.php b/WEB-INF/lib/pear/PEAR/Task/Unixeol.php index 89ca81be3..6ef7174bb 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Unixeol.php +++ b/WEB-INF/lib/pear/PEAR/Task/Unixeol.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Unixeol.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 */ /** * Base class @@ -24,28 +23,29 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ class PEAR_Task_Unixeol extends PEAR_Task_Common { - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGE; - var $_replacements; + public $type = 'simple'; + public $phase = PEAR_TASK_PACKAGE; + public $_replacements; /** * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static + * + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config */ - function validateXml($pkg, $xml, $config, $fileXml) + public static function validateXml($pkg, $xml, $config, $fileXml) { if ($xml != '') { return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); } + return true; } @@ -53,8 +53,9 @@ function validateXml($pkg, $xml, $config, $fileXml) * Initialize a task instance with the parameters * @param array raw, parsed xml * @param unused + * @param unused */ - function init($xml, $attribs) + public function init($xml, $attribs, $lastVersion = null) { } @@ -62,16 +63,17 @@ function init($xml, $attribs) * Replace all line endings with line endings customized for the current OS * * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) + * + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents + * (use $this->throwError), otherwise return the new contents */ - function startSession($pkg, $contents, $dest) + public function startSession($pkg, $contents, $dest) { $this->logger->log(3, "replacing all line endings with \\n in $dest"); + return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents); } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Unixeol/rw.php b/WEB-INF/lib/pear/PEAR/Task/Unixeol/rw.php index b2ae5fa5c..9134e2c93 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Unixeol/rw.php +++ b/WEB-INF/lib/pear/PEAR/Task/Unixeol/rw.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 */ /** * Base class @@ -24,33 +23,33 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol { - function PEAR_Task_Unixeol_rw(&$pkg, &$config, &$logger, $fileXml) + function __construct(&$pkg, &$config, &$logger, $fileXml) { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + parent::__construct($config, $logger, PEAR_TASK_PACKAGE); $this->_contents = $fileXml; $this->_pkg = &$pkg; $this->_params = array(); } - function validate() + public function validate() { return true; } - function getName() + public function getName() { return 'unixeol'; } - function getXml() + public function getXml() { return ''; } } -?> \ No newline at end of file +?> diff --git a/WEB-INF/lib/pear/PEAR/Task/Windowseol.php b/WEB-INF/lib/pear/PEAR/Task/Windowseol.php index 8ba417115..620c940fe 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Windowseol.php +++ b/WEB-INF/lib/pear/PEAR/Task/Windowseol.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Windowseol.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 */ /** * Base class @@ -19,33 +18,35 @@ require_once 'PEAR/Task/Common.php'; /** * Implements the windows line endsings file task. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.10.1 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 */ class PEAR_Task_Windowseol extends PEAR_Task_Common { - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGE; - var $_replacements; + public $type = 'simple'; + public $phase = PEAR_TASK_PACKAGE; + public $_replacements; /** * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static + * + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config */ - function validateXml($pkg, $xml, $config, $fileXml) + public static function validateXml($pkg, $xml, $config, $fileXml) { if ($xml != '') { return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); } + return true; } @@ -53,8 +54,9 @@ function validateXml($pkg, $xml, $config, $fileXml) * Initialize a task instance with the parameters * @param array raw, parsed xml * @param unused + * @param unused */ - function init($xml, $attribs) + public function init($xml, $attribs, $lastVersion = null) { } @@ -62,16 +64,17 @@ function init($xml, $attribs) * Replace all line endings with windows line endings * * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) + * + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents + * (use $this->throwError), otherwise return the new contents */ - function startSession($pkg, $contents, $dest) + public function startSession($pkg, $contents, $dest) { $this->logger->log(3, "replacing all line endings with \\r\\n in $dest"); + return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents); } } -?> \ No newline at end of file diff --git a/WEB-INF/lib/pear/PEAR/Task/Windowseol/rw.php b/WEB-INF/lib/pear/PEAR/Task/Windowseol/rw.php index f0f1149c8..e3cf0052b 100644 --- a/WEB-INF/lib/pear/PEAR/Task/Windowseol/rw.php +++ b/WEB-INF/lib/pear/PEAR/Task/Windowseol/rw.php @@ -4,14 +4,13 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 */ /** * Base class @@ -19,38 +18,39 @@ require_once 'PEAR/Task/Windowseol.php'; /** * Abstracts the windowseol task xml. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a10 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.10.1 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a10 */ class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol { - function PEAR_Task_Windowseol_rw(&$pkg, &$config, &$logger, $fileXml) + function __construct(&$pkg, &$config, &$logger, $fileXml) { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + parent::__construct($config, $logger, PEAR_TASK_PACKAGE); $this->_contents = $fileXml; $this->_pkg = &$pkg; $this->_params = array(); } - function validate() + public function validate() { return true; } - function getName() + public function getName() { return 'windowseol'; } - function getXml() + public function getXml() { return ''; } } -?> \ No newline at end of file +?> diff --git a/WEB-INF/lib/pear/PEAR/Validate.php b/WEB-INF/lib/pear/PEAR/Validate.php index 176560bc2..8e29b7cd2 100644 --- a/WEB-INF/lib/pear/PEAR/Validate.php +++ b/WEB-INF/lib/pear/PEAR/Validate.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Validate.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -32,7 +31,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -85,9 +84,8 @@ function validPackageName($name, $validatepackagename = false) * to the PEAR naming convention, so the method is final and static. * @param string * @final - * @static */ - function validGroupName($name) + public static function validGroupName($name) { return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name); } @@ -96,10 +94,9 @@ function validGroupName($name) * Determine whether $state represents a valid stability level * @param string * @return bool - * @static * @final */ - function validState($state) + public static function validState($state) { return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable')); } @@ -107,10 +104,9 @@ function validState($state) /** * Get a list of valid stability levels * @return array - * @static * @final */ - function getValidStates() + public static function getValidStates() { return array('snapshot', 'devel', 'alpha', 'beta', 'stable'); } @@ -120,10 +116,9 @@ function getValidStates() * by version_compare * @param string * @return bool - * @static * @final */ - function validVersion($ver) + public static function validVersion($ver) { return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); } @@ -207,7 +202,8 @@ function validatePackageName() $this->_packagexml->getExtends()) { $version = $this->_packagexml->getVersion() . ''; $name = $this->_packagexml->getPackage(); - $test = array_shift($a = explode('.', $version)); + $a = explode('.', $version); + $test = array_shift($a); if ($test == '0') { return true; } diff --git a/WEB-INF/lib/pear/PEAR/Validator/PECL.php b/WEB-INF/lib/pear/PEAR/Validator/PECL.php index 89b951f7b..830c8e9b2 100644 --- a/WEB-INF/lib/pear/PEAR/Validator/PECL.php +++ b/WEB-INF/lib/pear/PEAR/Validator/PECL.php @@ -9,7 +9,6 @@ * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PECL.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a5 */ @@ -24,7 +23,7 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a5 */ diff --git a/WEB-INF/lib/pear/PEAR/XMLParser.php b/WEB-INF/lib/pear/PEAR/XMLParser.php index 7f091c16f..619743bcd 100644 --- a/WEB-INF/lib/pear/PEAR/XMLParser.php +++ b/WEB-INF/lib/pear/PEAR/XMLParser.php @@ -10,7 +10,6 @@ * @author Stephan Schmidt (original XML_Unserializer code) * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license New BSD License - * @version CVS: $Id: XMLParser.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -23,7 +22,7 @@ * @author Stephan Schmidt (original XML_Unserializer code) * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -95,11 +94,6 @@ function parse($data) $this->encoding = 'UTF-8'; } - if (version_compare(phpversion(), '5.0.0', 'lt') && $this->encoding == 'UTF-8') { - $data = utf8_decode($data); - $this->encoding = 'ISO-8859-1'; - } - $xp = xml_parser_create($this->encoding); xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0); xml_set_object($xp, $this); diff --git a/WEB-INF/lib/pear/PEAR5.php b/WEB-INF/lib/pear/PEAR5.php deleted file mode 100644 index 428606780..000000000 --- a/WEB-INF/lib/pear/PEAR5.php +++ /dev/null @@ -1,33 +0,0 @@ - * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: System.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -51,7 +50,7 @@ * @author Tomas V.V. Cox * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License -* @version Release: 1.9.4 +* @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 * @static @@ -65,12 +64,27 @@ class System * @param string $short_options the allowed option short-tags * @param string $long_options the allowed option long-tags * @return array the given options and there values - * @static - * @access private */ - function _parseArgs($argv, $short_options, $long_options = null) + public static function _parseArgs($argv, $short_options, $long_options = null) { if (!is_array($argv) && $argv !== null) { + /* + // Quote all items that are a short option + $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((?getMessage(); @@ -124,10 +137,8 @@ function raiseError($error) * @param integer $aktinst starting deep of the lookup * @param bool $silent if true, do not emit errors. * @return array the structure of the dir - * @static - * @access private */ - function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false) + protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false) { $struct = array('dirs' => array(), 'files' => array()); if (($dir = @opendir($sPath)) === false) { @@ -170,7 +181,7 @@ function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false) * @static * @see System::_dirToStruct() */ - function _multipleToStruct($files) + protected static function _multipleToStruct($files) { $struct = array('dirs' => array(), 'files' => array()); settype($files, 'array'); @@ -196,7 +207,7 @@ function _multipleToStruct($files) * @static * @access public */ - function rm($args) + public static function rm($args) { $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-) if (PEAR::isError($opts)) { @@ -239,10 +250,8 @@ function rm($args) * The -p option will create parent directories * @param string $args the name of the director(y|ies) to create * @return bool True for success - * @static - * @access public */ - function mkDir($args) + public static function mkDir($args) { $opts = System::_parseArgs($args, 'pm:'); if (PEAR::isError($opts)) { @@ -310,10 +319,8 @@ function mkDir($args) * * @param string $args the arguments * @return boolean true on success - * @static - * @access public */ - function &cat($args) + public static function &cat($args) { $ret = null; $files = array(); @@ -384,10 +391,8 @@ function &cat($args) * @param string $args The arguments * @return mixed the full path of the created (file|dir) or false * @see System::tmpdir() - * @static - * @access public */ - function mktemp($args = null) + public static function mktemp($args = null) { static $first_time = true; $opts = System::_parseArgs($args, 't:d'); @@ -436,11 +441,8 @@ function mktemp($args = null) /** * Remove temporary files created my mkTemp. This function is executed * at script shutdown time - * - * @static - * @access private */ - function _removeTmpFiles() + public static function _removeTmpFiles() { if (count($GLOBALS['_System_temp_files'])) { $delete = $GLOBALS['_System_temp_files']; @@ -456,10 +458,9 @@ function _removeTmpFiles() * Note: php.ini-recommended removes the "E" from the variables_order setting, * making unavaible the $_ENV array, that s why we do tests with _ENV * - * @static * @return string The temporary directory on the system */ - function tmpdir() + public static function tmpdir() { if (OS_WINDOWS) { if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) { @@ -489,10 +490,9 @@ function tmpdir() * @param mixed $fallback Value to return if $program is not found * * @return mixed A string with the full path or false if not found - * @static * @author Stig Bakken */ - function which($program, $fallback = false) + public static function which($program, $fallback = false) { // enforce API if (!is_string($program) || '' == $program) { @@ -504,13 +504,11 @@ function which($program, $fallback = false) $path_elements[] = dirname($program); $program = basename($program); } else { - // Honor safe mode - if (!ini_get('safe_mode') || !$path = ini_get('safe_mode_exec_dir')) { - $path = getenv('PATH'); - if (!$path) { - $path = getenv('Path'); // some OSes are just stupid enough to do this - } + $path = getenv('PATH'); + if (!$path) { + $path = getenv('Path'); // some OSes are just stupid enough to do this } + $path_elements = explode(PATH_SEPARATOR, $path); } @@ -522,17 +520,14 @@ function which($program, $fallback = false) if (strpos($program, '.') !== false) { array_unshift($exe_suffixes, ''); } - // is_executable() is not available on windows for PHP4 - $pear_is_executable = (function_exists('is_executable')) ? 'is_executable' : 'is_file'; } else { $exe_suffixes = array(''); - $pear_is_executable = 'is_executable'; } foreach ($exe_suffixes as $suff) { foreach ($path_elements as $dir) { $file = $dir . DIRECTORY_SEPARATOR . $program . $suff; - if (@$pear_is_executable($file)) { + if (is_executable($file)) { return $file; } } @@ -561,10 +556,8 @@ function which($program, $fallback = false) * * @param mixed Either array or string with the command line * @return array Array of found files - * @static - * */ - function find($args) + public static function find($args) { if (!is_array($args)) { $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); diff --git a/WEB-INF/lib/pear/scripts/pear.bat b/WEB-INF/lib/pear/scripts/pear.bat index d7675bbfd..7f5837608 100644 --- a/WEB-INF/lib/pear/scripts/pear.bat +++ b/WEB-INF/lib/pear/scripts/pear.bat @@ -1,111 +1,111 @@ -@ECHO OFF - -REM ---------------------------------------------------------------------- -REM PHP version 5 -REM ---------------------------------------------------------------------- -REM Copyright (c) 1997-2010 The Authors -REM ---------------------------------------------------------------------- -REM http://opensource.org/licenses/bsd-license.php New BSD License -REM ---------------------------------------------------------------------- -REM Authors: Alexander Merz (alexmerz@php.net) -REM ---------------------------------------------------------------------- -REM -REM Last updated 12/29/2004 ($Id$ is not replaced if the file is binary) - -REM change this lines to match the paths of your system -REM ------------------- - - -REM Test to see if this is a raw pear.bat (uninstalled version) -SET TMPTMPTMPTMPT=@includ -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - -REM Check PEAR global ENV, set them if they do not exist -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" - -GOTO :INSTALLED - -:NOTINSTALLED -ECHO WARNING: This is a raw, uninstalled pear.bat - -REM Check to see if we can grab the directory of this file (Windows NT+) -IF %~n0 == pear ( -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" -"%PHP_PEAR_PHP_BIN%" -v -GOTO :NEXTTEST -)) -GOTO :FAILAUTODETECT -:NEXTTEST -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - -REM We can use this PHP to run a temporary php file to get the dirname of pear - -echo ^ > ~~getloc.php -"%PHP_PEAR_PHP_BIN%" ~~getloc.php -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a -DEL ~a.a -DEL ~~getloc.php -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - -REM Make sure there is a pearcmd.php at our disposal - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -) -) -GOTO :INSTALLED -) ELSE ( -REM Windows Me/98 cannot succeed, so allow the batch to fail -) -:FAILAUTODETECT -echo WARNING: failed to auto-detect pear information -:INSTALLED - -REM Check Folders and files -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR - -REM launch pearcmd -GOTO RUN -:PEAR_INSTALL_ERROR -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_INSTALL_ERROR2 -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO pearcmd.php could not be found there. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_BIN_ERROR -ECHO PHP_PEAR_BIN_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_BIN_DIR% -GOTO END -:PEAR_PHPBIN_ERROR -ECHO PHP_PEAR_PHP_BIN is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_PHP_BIN% -GOTO END -:RUN -"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 -:END +@ECHO OFF + +REM ---------------------------------------------------------------------- +REM PHP version 5 +REM ---------------------------------------------------------------------- +REM Copyright (c) 1997-2010 The Authors +REM ---------------------------------------------------------------------- +REM http://opensource.org/licenses/bsd-license.php New BSD License +REM ---------------------------------------------------------------------- +REM Authors: Alexander Merz (alexmerz@php.net) +REM ---------------------------------------------------------------------- +REM +REM Last updated 12/29/2004 ($Id$ is not replaced if the file is binary) + +REM change this lines to match the paths of your system +REM ------------------- + + +REM Test to see if this is a raw pear.bat (uninstalled version) +SET TMPTMPTMPTMPT=@includ +SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ +FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) + +REM Check PEAR global ENV, set them if they do not exist +IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" +IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" +IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" + +GOTO :INSTALLED + +:NOTINSTALLED +ECHO WARNING: This is a raw, uninstalled pear.bat + +REM Check to see if we can grab the directory of this file (Windows NT+) +IF %~n0 == pear ( +FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( +SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" +echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" +"%PHP_PEAR_PHP_BIN%" -v +GOTO :NEXTTEST +)) +GOTO :FAILAUTODETECT +:NEXTTEST +IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( + +REM We can use this PHP to run a temporary php file to get the dirname of pear + +echo ^ > ~~getloc.php +"%PHP_PEAR_PHP_BIN%" ~~getloc.php +set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a +DEL ~a.a +DEL ~~getloc.php +set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" + +REM Make sure there is a pearcmd.php at our disposal + +IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( +IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +) +) +GOTO :INSTALLED +) ELSE ( +REM Windows Me/98 cannot succeed, so allow the batch to fail +) +:FAILAUTODETECT +echo WARNING: failed to auto-detect pear information +:INSTALLED + +REM Check Folders and files +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 +IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR +IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR + +REM launch pearcmd +GOTO RUN +:PEAR_INSTALL_ERROR +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_INSTALL_ERROR2 +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO pearcmd.php could not be found there. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_BIN_ERROR +ECHO PHP_PEAR_BIN_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_BIN_DIR% +GOTO END +:PEAR_PHPBIN_ERROR +ECHO PHP_PEAR_PHP_BIN is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_PHP_BIN% +GOTO END +:RUN +"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 +:END @ECHO ON \ No newline at end of file diff --git a/WEB-INF/lib/pear/scripts/pearcmd.php b/WEB-INF/lib/pear/scripts/pearcmd.php index a3a928a3c..efc8a8dbb 100644 --- a/WEB-INF/lib/pear/scripts/pearcmd.php +++ b/WEB-INF/lib/pear/scripts/pearcmd.php @@ -6,17 +6,16 @@ * * PHP versions 4 and 5 * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V.Cox - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: pearcmd.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V.V.Cox + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR */ -ob_end_clean(); +@ob_end_clean(); if (!defined('PEAR_RUNTYPE')) { // this is defined in peclcmd.php as 'pecl' define('PEAR_RUNTYPE', 'pear'); @@ -25,21 +24,20 @@ /** * @nodep Gtk */ -if ('@include_path@' != '@'.'include_path'.'@') { - ini_set('include_path', '@include_path@'); +//the space is needed for windows include paths with trailing backslash +// http://pear.php.net/bugs/bug.php?id=19482 +if ('@include_path@ ' != '@'.'include_path'.'@ ') { + ini_set('include_path', trim('@include_path@ '). PATH_SEPARATOR . get_include_path()); $raw = false; } else { // this is a raw, uninstalled pear, either a cvs checkout, or php distro $raw = true; } @ini_set('allow_url_fopen', true); -if (!ini_get('safe_mode')) { - @set_time_limit(0); -} +@set_time_limit(0); ob_implicit_flush(true); @ini_set('track_errors', true); @ini_set('html_errors', false); -@ini_set('magic_quotes_runtime', false); $_PEAR_PHPDIR = '#$%^&*'; set_error_handler('error_handler'); @@ -57,7 +55,8 @@ // remove this next part when we stop supporting that crap-ass PHP 4.2 if (!isset($_SERVER['argv']) && !isset($argv) && !isset($HTTP_SERVER_VARS['argv'])) { - echo 'ERROR: either use the CLI php executable, or set register_argc_argv=On in php.ini'; + echo 'ERROR: either use the CLI php executable, ' . + 'or set register_argc_argv=On in php.ini'; exit(1); } @@ -78,18 +77,14 @@ $fetype = 'CLI'; if ($progname == 'gpear' || $progname == 'pear-gtk') { - $fetype = 'Gtk'; + $fetype = 'Gtk2'; } else { foreach ($opts as $opt) { if ($opt[0] == 'G') { - $fetype = 'Gtk'; + $fetype = 'Gtk2'; } } } -//Check if Gtk and PHP >= 5.1.0 -if ($fetype == 'Gtk' && version_compare(phpversion(), '5.1.0', '>=')) { - $fetype = 'Gtk2'; -} $pear_user_config = ''; $pear_system_config = ''; @@ -99,12 +94,12 @@ foreach ($opts as $opt) { switch ($opt[0]) { - case 'c': - $pear_user_config = $opt[1]; - break; - case 'C': - $pear_system_config = $opt[1]; - break; + case 'c': + $pear_user_config = $opt[1]; + break; + case 'C': + $pear_system_config = $opt[1]; + break; } } @@ -115,10 +110,10 @@ if (PEAR::isError($config)) { $_file = ''; if ($pear_user_config !== false) { - $_file .= $pear_user_config; + $_file .= $pear_user_config; } if ($pear_system_config !== false) { - $_file .= '/' . $pear_system_config; + $_file .= '/' . $pear_system_config; } if ($_file == '/') { $_file = 'The default config file'; @@ -133,11 +128,6 @@ $_PEAR_PHPDIR = $config->get('php_dir'); $ui->setConfig($config); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); -if (ini_get('safe_mode')) { - $ui->outputData('WARNING: running in safe mode requires that all files created ' . - 'be the same uid as the current script. PHP reports this script is uid: ' . - @getmyuid() . ', and current user is: ' . @get_current_user()); -} $verbose = $config->get("verbose"); $cmdopts = array(); @@ -147,17 +137,20 @@ $found = false; foreach ($opts as $opt) { if ($opt[0] == 'd' || $opt[0] == 'D') { - $found = true; // the user knows what they are doing, and are setting config values + // the user knows what they are doing, and are setting config values + $found = true; } } if (!$found) { // no prior runs, try to install PEAR - if (strpos(dirname(__FILE__), 'scripts')) { - $packagexml = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'package2.xml'; - $pearbase = dirname(dirname(__FILE__)); + $parent = dirname(__FILE__); + if (strpos($parent, 'scripts')) { + $grandparent = dirname($parent); + $packagexml = $grandparent . DIRECTORY_SEPARATOR . 'package2.xml'; + $pearbase = $grandparent; } else { - $packagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'package2.xml'; - $pearbase = dirname(__FILE__); + $packagexml = $parent . DIRECTORY_SEPARATOR . 'package2.xml'; + $pearbase = $parent; } if (file_exists($packagexml)) { $options[1] = array( @@ -168,7 +161,10 @@ $config->set('data_dir', $pearbase . DIRECTORY_SEPARATOR . 'data'); $config->set('doc_dir', $pearbase . DIRECTORY_SEPARATOR . 'docs'); $config->set('test_dir', $pearbase . DIRECTORY_SEPARATOR . 'tests'); - $config->set('ext_dir', $pearbase . DIRECTORY_SEPARATOR . 'extensions'); + $config->set( + 'ext_dir', + $pearbase . DIRECTORY_SEPARATOR . 'extensions' + ); $config->set('bin_dir', $pearbase); $config->mergeConfigFile($pearbase . 'pear.ini', false); $config->store(); @@ -180,56 +176,64 @@ foreach ($opts as $opt) { $param = !empty($opt[1]) ? $opt[1] : true; switch ($opt[0]) { - case 'd': - if ($param === true) { - die('Invalid usage of "-d" option, expected -d config_value=value, ' . - 'received "-d"' . "\n"); - } - $possible = explode('=', $param); - if (count($possible) != 2) { - die('Invalid usage of "-d" option, expected -d config_value=value, received "' . - $param . '"' . "\n"); - } - list($key, $value) = explode('=', $param); - $config->set($key, $value, 'user'); - break; - case 'D': - if ($param === true) { - die('Invalid usage of "-d" option, expected -d config_value=value, ' . - 'received "-d"' . "\n"); - } - $possible = explode('=', $param); - if (count($possible) != 2) { - die('Invalid usage of "-d" option, expected -d config_value=value, received "' . - $param . '"' . "\n"); - } - list($key, $value) = explode('=', $param); - $config->set($key, $value, 'system'); - break; - case 's': - $store_user_config = true; - break; - case 'S': - $store_system_config = true; - break; - case 'u': - $config->remove($param, 'user'); - break; - case 'v': - $config->set('verbose', $config->get('verbose') + 1); - break; - case 'q': - $config->set('verbose', $config->get('verbose') - 1); - break; - case 'V': - usage(null, 'version'); - case 'c': - case 'C': - break; - default: - // all non pear params goes to the command - $cmdopts[$opt[0]] = $param; - break; + case 'd': + if ($param === true) { + die( + 'Invalid usage of "-d" option, expected -d config_value=value, ' . + 'received "-d"' . "\n" + ); + } + $possible = explode('=', $param); + if (count($possible) != 2) { + die( + 'Invalid usage of "-d" option, expected ' . + '-d config_value=value, received "' . $param . '"' . "\n" + ); + } + list($key, $value) = explode('=', $param); + $config->set($key, $value, 'user'); + break; + case 'D': + if ($param === true) { + die( + 'Invalid usage of "-d" option, expected ' . + '-d config_value=value, received "-d"' . "\n" + ); + } + $possible = explode('=', $param); + if (count($possible) != 2) { + die( + 'Invalid usage of "-d" option, expected ' . + '-d config_value=value, received "' . $param . '"' . "\n" + ); + } + list($key, $value) = explode('=', $param); + $config->set($key, $value, 'system'); + break; + case 's': + $store_user_config = true; + break; + case 'S': + $store_system_config = true; + break; + case 'u': + $config->remove($param, 'user'); + break; + case 'v': + $config->set('verbose', $config->get('verbose') + 1); + break; + case 'q': + $config->set('verbose', $config->get('verbose') - 1); + break; + case 'V': + usage(null, 'version'); + case 'c': + case 'C': + break; + default: + // all non pear params goes to the command + $cmdopts[$opt[0]] = $param; + break; } } @@ -246,75 +250,93 @@ exit; } -if ($fetype == 'Gtk' || $fetype == 'Gtk2') { +if ($fetype == 'Gtk2') { if (!$config->validConfiguration()) { - PEAR::raiseError('CRITICAL ERROR: no existing valid configuration files found in files ' . - "'$pear_user_config' or '$pear_system_config', please copy an existing configuration" . - 'file to one of these locations, or use the -c and -s options to create one'); + PEAR::raiseError( + "CRITICAL ERROR: no existing valid configuration files found in " . + "files '$pear_user_config' or '$pear_system_config', " . + "please copy an existing configuration file to one of these " . + "locations, or use the -c and -s options to create one" + ); } Gtk::main(); -} else do { - if ($command == 'help') { - usage(null, @$options[1][1]); - } - - if (!$config->validConfiguration()) { - PEAR::raiseError('CRITICAL ERROR: no existing valid configuration files found in files ' . - "'$pear_user_config' or '$pear_system_config', please copy an existing configuration" . - 'file to one of these locations, or use the -c and -s options to create one'); - } +} else { + do { + if ($command == 'help') { + usage(null, isset($options[1][1]) ? $options[1][1] : null); + } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $cmd = PEAR_Command::factory($command, $config); - PEAR::popErrorHandling(); - if (PEAR::isError($cmd)) { - usage(null, @$options[1][0]); - } + if (!$config->validConfiguration()) { + PEAR::raiseError( + "CRITICAL ERROR: no existing valid configuration files found " . + "in files '$pear_user_config' or '$pear_system_config', " . + "please copy an existing configuration file to one of " . + "these locations, or use the -c and -s options to create one" + ); + } - $short_args = $long_args = null; - PEAR_Command::getGetoptArgs($command, $short_args, $long_args); - array_shift($options[1]); - $tmp = Console_Getopt::getopt2($options[1], $short_args, $long_args); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $cmd = PEAR_Command::factory($command, $config); + PEAR::popErrorHandling(); + if (PEAR::isError($cmd)) { + usage(null, isset($options[1][0]) ? $options[1][0] : null); + } - if (PEAR::isError($tmp)) { - break; - } + $short_args = $long_args = null; + PEAR_Command::getGetoptArgs($command, $short_args, $long_args); + array_shift($options[1]); + $tmp = Console_Getopt::getopt2($options[1], $short_args, $long_args); - list($tmpopt, $params) = $tmp; - $opts = array(); - foreach ($tmpopt as $foo => $tmp2) { - list($opt, $value) = $tmp2; - if ($value === null) { - $value = true; // options without args + if (PEAR::isError($tmp)) { + break; } - if (strlen($opt) == 1) { - $cmdoptions = $cmd->getOptions($command); - foreach ($cmdoptions as $o => $d) { - if (isset($d['shortopt']) && $d['shortopt'] == $opt) { - $opts[$o] = $value; - } + list($tmpopt, $params) = $tmp; + $opts = array(); + foreach ($tmpopt as $foo => $tmp2) { + list($opt, $value) = $tmp2; + if ($value === null) { + $value = true; // options without args } - } else { - if (substr($opt, 0, 2) == '--') { - $opts[substr($opt, 2)] = $value; + + if (strlen($opt) == 1) { + $cmdoptions = $cmd->getOptions($command); + foreach ($cmdoptions as $o => $d) { + if (isset($d['shortopt']) && $d['shortopt'] == $opt) { + $opts[$o] = $value; + } + } + } else { + if (substr($opt, 0, 2) == '--') { + $opts[substr($opt, 2)] = $value; + } } } - } - $ok = $cmd->run($command, $opts, $params); - if ($ok === false) { - PEAR::raiseError("unknown command `$command'"); - } + $ok = $cmd->run($command, $opts, $params); + if ($ok === false) { + PEAR::raiseError("unknown command `$command'"); + } - if (PEAR::isError($ok)) { - PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); - PEAR::raiseError($ok); - } -} while (false); + if (PEAR::isError($ok)) { + PEAR::setErrorHandling( + PEAR_ERROR_CALLBACK, array($ui, "displayFatalError") + ); + PEAR::raiseError($ok); + } + } while (false); +} // {{{ usage() +/** + * Display usage information + * + * @param mixed $error Optional error message + * @param mixed $helpsubject Optional subject/command to display help for + * + * @return void + */ function usage($error = null, $helpsubject = null) { global $progname, $all_commands; @@ -339,7 +361,10 @@ function usage($error = null, $helpsubject = null) "Usage: $progname [options] command [command-options] \n". "Type \"$progname help options\" to list all options.\n". "Type \"$progname help shortcuts\" to list all command shortcuts.\n". - "Type \"$progname help \" to get the help for the specified command."; + "Type \"$progname help version\" or ". + "\"$progname version\" to list version information.\n". + "Type \"$progname help \" to get the help ". + "for the specified command."; } fputs($stdout, "$put\n"); fclose($stdout); @@ -350,6 +375,13 @@ function usage($error = null, $helpsubject = null) exit(1); } +/** + * Return help string for specified command + * + * @param string $command Command to return help for + * + * @return void + */ function cmdHelp($command) { global $progname, $all_commands, $config; @@ -399,23 +431,40 @@ function cmdHelp($command) // }}} -function error_handler($errno, $errmsg, $file, $line, $vars) { - if ((defined('E_STRICT') && $errno & E_STRICT) || (defined('E_DEPRECATED') && - $errno & E_DEPRECATED) || !error_reporting()) { - if (defined('E_STRICT') && $errno & E_STRICT) { +/** + * error_handler + * + * @param mixed $errno Error number + * @param mixed $errmsg Message + * @param mixed $file Filename + * @param mixed $line Line number + * @param mixed $vars Variables + * + * @access public + * @return boolean + */ +function error_handler($errno, $errmsg, $file, $line, $vars) +{ + if ($errno & E_STRICT + || $errno & E_DEPRECATED + || !error_reporting() + ) { + if ($errno & E_STRICT) { return; // E_STRICT } - if (defined('E_DEPRECATED') && $errno & E_DEPRECATED) { + if ($errno & E_DEPRECATED) { return; // E_DEPRECATED } - if ($GLOBALS['config']->get('verbose') < 4) { + if (!error_reporting() && isset($GLOBALS['config']) && $GLOBALS['config']->get('verbose') < 4) { return false; // @silenced error, show all if debug is high enough } } $errortype = array ( + E_DEPRECATED => 'Deprecated Warning', E_ERROR => "Error", E_WARNING => "Warning", E_PARSE => "Parsing Error", + E_STRICT => 'Strict Warning', E_NOTICE => "Notice", E_CORE_ERROR => "Core Error", E_CORE_WARNING => "Core Warning", @@ -445,4 +494,4 @@ function error_handler($errno, $errmsg, $file, $line, $vars) { * mode: php * End: */ -// vim600:syn=php \ No newline at end of file +// vim600:syn=php diff --git a/WEB-INF/lib/pear/scripts/peardev.bat b/WEB-INF/lib/pear/scripts/peardev.bat index 8b67c7d9f..48e03872b 100644 --- a/WEB-INF/lib/pear/scripts/peardev.bat +++ b/WEB-INF/lib/pear/scripts/peardev.bat @@ -1,115 +1,115 @@ -@ECHO OFF - -REM ---------------------------------------------------------------------- -REM PHP version 5 -REM ---------------------------------------------------------------------- -REM Copyright (c) 1997-2004 The PHP Group -REM ---------------------------------------------------------------------- -REM This source file is subject to version 3.0 of the PHP license, -REM that is bundled with this package in the file LICENSE, and is -REM available at through the world-wide-web at -REM http://www.php.net/license/3_0.txt. -REM If you did not receive a copy of the PHP license and are unable to -REM obtain it through the world-wide-web, please send a note to -REM license@php.net so we can mail you a copy immediately. -REM ---------------------------------------------------------------------- -REM Authors: Alexander Merz (alexmerz@php.net) -REM ---------------------------------------------------------------------- -REM -REM $Id: peardev.bat,v 1.6 2007-09-03 03:00:17 cellog Exp $ - -REM change this lines to match the paths of your system -REM ------------------- - - -REM Test to see if this is a raw pear.bat (uninstalled version) -SET TMPTMPTMPTMPT=@includ -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - -REM Check PEAR global ENV, set them if they do not exist -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" -GOTO :INSTALLED - -:NOTINSTALLED -ECHO WARNING: This is a raw, uninstalled pear.bat - -REM Check to see if we can grab the directory of this file (Windows NT+) -IF %~n0 == pear ( -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" -"%PHP_PEAR_PHP_BIN%" -v -GOTO :NEXTTEST -)) -GOTO :FAILAUTODETECT -:NEXTTEST -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - -REM We can use this PHP to run a temporary php file to get the dirname of pear - -echo ^ > ~~getloc.php -"%PHP_PEAR_PHP_BIN%" ~~getloc.php -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a -DEL ~a.a -DEL ~~getloc.php -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - -REM Make sure there is a pearcmd.php at our disposal - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -) -) -GOTO :INSTALLED -) ELSE ( -REM Windows Me/98 cannot succeed, so allow the batch to fail -) -:FAILAUTODETECT -echo WARNING: failed to auto-detect pear information -:INSTALLED - -REM Check Folders and files -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR -REM launch pearcmd -GOTO RUN -:PEAR_INSTALL_ERROR -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_INSTALL_ERROR2 -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO pearcmd.php could not be found there. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_BIN_ERROR -ECHO PHP_PEAR_BIN_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_BIN_DIR% -GOTO END -:PEAR_PHPBIN_ERROR -ECHO PHP_PEAR_PHP_BIN is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_PHP_BIN% -GOTO END -:RUN -"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 -:END +@ECHO OFF + +REM ---------------------------------------------------------------------- +REM PHP version 5 +REM ---------------------------------------------------------------------- +REM Copyright (c) 1997-2004 The PHP Group +REM ---------------------------------------------------------------------- +REM This source file is subject to version 3.0 of the PHP license, +REM that is bundled with this package in the file LICENSE, and is +REM available at through the world-wide-web at +REM http://www.php.net/license/3_0.txt. +REM If you did not receive a copy of the PHP license and are unable to +REM obtain it through the world-wide-web, please send a note to +REM license@php.net so we can mail you a copy immediately. +REM ---------------------------------------------------------------------- +REM Authors: Alexander Merz (alexmerz@php.net) +REM ---------------------------------------------------------------------- +REM +REM $Id: peardev.bat,v 1.6 2007-09-03 03:00:17 cellog Exp $ + +REM change this lines to match the paths of your system +REM ------------------- + + +REM Test to see if this is a raw pear.bat (uninstalled version) +SET TMPTMPTMPTMPT=@includ +SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ +FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) + +REM Check PEAR global ENV, set them if they do not exist +IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" +IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" +IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" +GOTO :INSTALLED + +:NOTINSTALLED +ECHO WARNING: This is a raw, uninstalled pear.bat + +REM Check to see if we can grab the directory of this file (Windows NT+) +IF %~n0 == pear ( +FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( +SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" +echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" +"%PHP_PEAR_PHP_BIN%" -v +GOTO :NEXTTEST +)) +GOTO :FAILAUTODETECT +:NEXTTEST +IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( + +REM We can use this PHP to run a temporary php file to get the dirname of pear + +echo ^ > ~~getloc.php +"%PHP_PEAR_PHP_BIN%" ~~getloc.php +set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a +DEL ~a.a +DEL ~~getloc.php +set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" + +REM Make sure there is a pearcmd.php at our disposal + +IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( +IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +) +) +GOTO :INSTALLED +) ELSE ( +REM Windows Me/98 cannot succeed, so allow the batch to fail +) +:FAILAUTODETECT +echo WARNING: failed to auto-detect pear information +:INSTALLED + +REM Check Folders and files +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 +IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR +IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR +REM launch pearcmd +GOTO RUN +:PEAR_INSTALL_ERROR +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_INSTALL_ERROR2 +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO pearcmd.php could not be found there. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_BIN_ERROR +ECHO PHP_PEAR_BIN_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_BIN_DIR% +GOTO END +:PEAR_PHPBIN_ERROR +ECHO PHP_PEAR_PHP_BIN is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_PHP_BIN% +GOTO END +:RUN +"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 +:END @ECHO ON \ No newline at end of file diff --git a/WEB-INF/lib/pear/scripts/pecl.bat b/WEB-INF/lib/pear/scripts/pecl.bat index e7c823bc1..f604284de 100644 --- a/WEB-INF/lib/pear/scripts/pecl.bat +++ b/WEB-INF/lib/pear/scripts/pecl.bat @@ -1,115 +1,115 @@ -@ECHO OFF - -REM ---------------------------------------------------------------------- -REM PHP version 5 -REM ---------------------------------------------------------------------- -REM Copyright (c) 1997-2004 The PHP Group -REM ---------------------------------------------------------------------- -REM This source file is subject to version 3.0 of the PHP license, -REM that is bundled with this package in the file LICENSE, and is -REM available at through the world-wide-web at -REM http://www.php.net/license/3_0.txt. -REM If you did not receive a copy of the PHP license and are unable to -REM obtain it through the world-wide-web, please send a note to -REM license@php.net so we can mail you a copy immediately. -REM ---------------------------------------------------------------------- -REM Authors: Alexander Merz (alexmerz@php.net) -REM ---------------------------------------------------------------------- -REM -REM Last updated 02/08/2004 ($Id$ is not replaced if the file is binary) - -REM change this lines to match the paths of your system -REM ------------------- - - -REM Test to see if this is a raw pear.bat (uninstalled version) -SET TMPTMPTMPTMPT=@includ -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - -REM Check PEAR global ENV, set them if they do not exist -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" -GOTO :INSTALLED - -:NOTINSTALLED -ECHO WARNING: This is a raw, uninstalled pear.bat - -REM Check to see if we can grab the directory of this file (Windows NT+) -IF %~n0 == pear ( -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" -"%PHP_PEAR_PHP_BIN%" -v -GOTO :NEXTTEST -)) -GOTO :FAILAUTODETECT -:NEXTTEST -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - -REM We can use this PHP to run a temporary php file to get the dirname of pear - -echo ^ > ~~getloc.php -"%PHP_PEAR_PHP_BIN%" ~~getloc.php -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a -DEL ~a.a -DEL ~~getloc.php -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - -REM Make sure there is a pearcmd.php at our disposal - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -) -) -GOTO :INSTALLED -) ELSE ( -REM Windows Me/98 cannot succeed, so allow the batch to fail -) -:FAILAUTODETECT -echo WARNING: failed to auto-detect pear information -:INSTALLED - -REM Check Folders and files -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR -REM launch pearcmd -GOTO RUN -:PEAR_INSTALL_ERROR -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_INSTALL_ERROR2 -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO pearcmd.php could not be found there. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_BIN_ERROR -ECHO PHP_PEAR_BIN_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_BIN_DIR% -GOTO END -:PEAR_PHPBIN_ERROR -ECHO PHP_PEAR_PHP_BIN is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_PHP_BIN% -GOTO END -:RUN -"%PHP_PEAR_PHP_BIN%" -C -n -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 -:END +@ECHO OFF + +REM ---------------------------------------------------------------------- +REM PHP version 5 +REM ---------------------------------------------------------------------- +REM Copyright (c) 1997-2004 The PHP Group +REM ---------------------------------------------------------------------- +REM This source file is subject to version 3.0 of the PHP license, +REM that is bundled with this package in the file LICENSE, and is +REM available at through the world-wide-web at +REM http://www.php.net/license/3_0.txt. +REM If you did not receive a copy of the PHP license and are unable to +REM obtain it through the world-wide-web, please send a note to +REM license@php.net so we can mail you a copy immediately. +REM ---------------------------------------------------------------------- +REM Authors: Alexander Merz (alexmerz@php.net) +REM ---------------------------------------------------------------------- +REM +REM Last updated 02/08/2004 ($Id$ is not replaced if the file is binary) + +REM change this lines to match the paths of your system +REM ------------------- + + +REM Test to see if this is a raw pear.bat (uninstalled version) +SET TMPTMPTMPTMPT=@includ +SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ +FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) + +REM Check PEAR global ENV, set them if they do not exist +IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" +IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" +IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" +GOTO :INSTALLED + +:NOTINSTALLED +ECHO WARNING: This is a raw, uninstalled pear.bat + +REM Check to see if we can grab the directory of this file (Windows NT+) +IF %~n0 == pear ( +FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( +SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" +echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" +"%PHP_PEAR_PHP_BIN%" -v +GOTO :NEXTTEST +)) +GOTO :FAILAUTODETECT +:NEXTTEST +IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( + +REM We can use this PHP to run a temporary php file to get the dirname of pear + +echo ^ > ~~getloc.php +"%PHP_PEAR_PHP_BIN%" ~~getloc.php +set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a +DEL ~a.a +DEL ~~getloc.php +set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" + +REM Make sure there is a pearcmd.php at our disposal + +IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( +IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php +) +) +GOTO :INSTALLED +) ELSE ( +REM Windows Me/98 cannot succeed, so allow the batch to fail +) +:FAILAUTODETECT +echo WARNING: failed to auto-detect pear information +:INSTALLED + +REM Check Folders and files +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR +IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 +IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR +IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR +REM launch pearcmd +GOTO RUN +:PEAR_INSTALL_ERROR +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_INSTALL_ERROR2 +ECHO PHP_PEAR_INSTALL_DIR is not set correctly. +ECHO pearcmd.php could not be found there. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_INSTALL_DIR% +GOTO END +:PEAR_BIN_ERROR +ECHO PHP_PEAR_BIN_DIR is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_BIN_DIR% +GOTO END +:PEAR_PHPBIN_ERROR +ECHO PHP_PEAR_PHP_BIN is not set correctly. +ECHO Please fix it using your environment variable or modify +ECHO the default value in pear.bat +ECHO The current value is: +ECHO %PHP_PEAR_PHP_BIN% +GOTO END +:RUN +"%PHP_PEAR_PHP_BIN%" -C -n -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 +:END @ECHO ON \ No newline at end of file diff --git a/WEB-INF/lib/pear/scripts/peclcmd.php b/WEB-INF/lib/pear/scripts/peclcmd.php index 498caafd1..1c8bcb6bb 100644 --- a/WEB-INF/lib/pear/scripts/peclcmd.php +++ b/WEB-INF/lib/pear/scripts/peclcmd.php @@ -12,15 +12,16 @@ * @author Tomas V.V.Cox * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: peclcmd.php 313023 2011-07-06 19:17:11Z dufuz $ * @link http://pear.php.net/package/PEAR */ /** * @nodep Gtk */ -if ('@include_path@' != '@'.'include_path'.'@') { - ini_set('include_path', '@include_path@'); +//the space is needed for windows include paths with trailing backslash +// http://pear.php.net/bugs/bug.php?id=19482 +if ('@include_path@ ' != '@'.'include_path'.'@ ') { + ini_set('include_path', trim('@include_path@ '). PATH_SEPARATOR . get_include_path()); $raw = false; } else { // this is a raw, uninstalled pear, either a cvs checkout, or php distro diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2d0ded6a3..fd63ce69c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {if $active_users} {foreach $active_users as $u} - + {if $smarty.const.ROLE_MANAGER == $u.role} @@ -29,13 +38,6 @@ {elseif $smarty.const.ROLE_USER == $u.role} - {/if} - {if $user->isManager()} - - - {else} - - {/if} {/foreach} @@ -58,11 +60,16 @@ - {foreach $inactive_users as $u} - + {if $smarty.const.ROLE_MANAGER == $u.role} @@ -76,11 +83,9 @@ {if $user->isManager()} - {else} - {/if} {/foreach} From 5fdf8659516ad2b07458deba8eda234e8e07c554 Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 21 Sep 2016 01:52:33 +0000 Subject: [PATCH 0016/2515] Work in progress adding checks for enabled plugins for pages. --- WEB-INF/templates/charts.tpl | 2 -- WEB-INF/templates/header.tpl | 34 ++++++++++++++--------------- WEB-INF/templates/mobile/header.tpl | 20 ++++++++--------- charts.php | 2 +- clients.php | 2 +- expenses.php | 2 +- mobile/clients.php | 2 +- mobile/expenses.php | 2 +- 8 files changed, 32 insertions(+), 34 deletions(-) diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl index 22238715e..4c676147f 100644 --- a/WEB-INF/templates/charts.tpl +++ b/WEB-INF/templates/charts.tpl @@ -35,5 +35,3 @@
 Anuko Time Tracker 1.9.31.3531 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3532 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a07b6f8bccda226991ced6fe25f1c9c508e423e5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 12 Sep 2016 23:56:59 +0000 Subject: [PATCH 0007/2515] Getting rid of PHP Deprecated warnings. --- WEB-INF/lib/Period.class.php | 2 +- WEB-INF/lib/form/ActionErrors.class.php | 2 +- WEB-INF/lib/form/ActionForm.class.php | 2 +- WEB-INF/lib/form/Calendar.class.php | 2 +- WEB-INF/lib/form/Checkbox.class.php | 2 +- WEB-INF/lib/form/CheckboxGroup.class.php | 2 +- WEB-INF/lib/form/Combobox.class.php | 2 +- WEB-INF/lib/form/DateField.class.php | 2 +- WEB-INF/lib/form/FloatField.class.php | 2 +- WEB-INF/lib/form/Submit.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/WEB-INF/lib/Period.class.php b/WEB-INF/lib/Period.class.php index 492d864bb..c14f17d53 100644 --- a/WEB-INF/lib/Period.class.php +++ b/WEB-INF/lib/Period.class.php @@ -38,7 +38,7 @@ class Period { var $mBeginDate; var $mEndDate; - function Period($period_name=0, $date_point=null) { + function __construct($period_name=0, $date_point=null) { global $user; if (!$date_point || !($date_point instanceof DateAndTime)) { diff --git a/WEB-INF/lib/form/ActionErrors.class.php b/WEB-INF/lib/form/ActionErrors.class.php index a13104d73..1f8aceb3d 100644 --- a/WEB-INF/lib/form/ActionErrors.class.php +++ b/WEB-INF/lib/form/ActionErrors.class.php @@ -29,7 +29,7 @@ class ActionErrors { var $errors = array(); - function ActionErrors() { + function __construct() { } function no() { diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index 03994dd56..739cc3aa0 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -36,7 +36,7 @@ class ActionForm { var $mForm = null; var $mInitForm = false; - function ActionForm($name, &$form, $request=null) { + function __construct($name, &$form, $request=null) { $this->setName($name); $form->setRequest($request); $this->setForm($form); diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index dd6e83ab1..46fcd6eba 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -47,7 +47,7 @@ class Calendar extends FormElement { // var $mAllDays = true; var $cClassName = "Calendar"; - function Calendar($name) { + function __construct($name) { $this->controlName = $name; $this->mMonthNames = array('January','February','March','April','May','June','July','August','September','October','November','December'); $this->mWeekDayShortNames = array('Su','Mo','Tu','We','Th','Fr','Sa'); diff --git a/WEB-INF/lib/form/Checkbox.class.php b/WEB-INF/lib/form/Checkbox.class.php index 6cd80740d..5ba791651 100644 --- a/WEB-INF/lib/form/Checkbox.class.php +++ b/WEB-INF/lib/form/Checkbox.class.php @@ -33,7 +33,7 @@ class Checkbox extends FormElement { var $mOptions = null; var $cClassName = "Checkbox"; - function Checkbox($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index 46ea284bc..f9d850fc2 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -39,7 +39,7 @@ class CheckboxGroup extends FormElement { var $lSelAll = "All"; var $lSelNone = "None"; - function CheckboxGroup($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index 534c8a50b..dcb84a24c 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -46,7 +46,7 @@ class Combobox extends FormElement { var $mDataKeys = array(); var $cClassName = "Combobox"; - function Combobox($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 7fbbcbc53..7d3886954 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -39,7 +39,7 @@ class DateField extends TextField { var $lCalendarButtons = array('today'=>'Today', 'close'=>'Close'); - function DateField($name) { + function __construct($name) { $this->mName = $name; $this->mDateObj = new DateAndTime(); diff --git a/WEB-INF/lib/form/FloatField.class.php b/WEB-INF/lib/form/FloatField.class.php index 46bdb6d6f..14c30df24 100644 --- a/WEB-INF/lib/form/FloatField.class.php +++ b/WEB-INF/lib/form/FloatField.class.php @@ -33,7 +33,7 @@ class FloatField extends TextField { var $mFFormat; var $cClassName = "FloatField"; - function FloatField($name) { + function __construct($name) { $this->mName = $name; } diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index 2c65035e4..facfffc81 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -31,7 +31,7 @@ class Submit extends FormElement { var $cClassName = "Submit"; - function Submit($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fd63ce69c..bb47a00d4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {if $active_tasks} {foreach $active_tasks as $task} - + - {/foreach} {/if} @@ -40,13 +38,11 @@ - {foreach $inactive_tasks as $task} - + - {/foreach}
 Anuko Time Tracker 1.9.31.3532 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3533 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 466c7825f8313f5e3a11c63383537c8bb302a932 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Sep 2016 00:31:58 +0000 Subject: [PATCH 0008/2515] Getting rid of PHP Deprecated warnings. --- WEB-INF/lib/DateAndTime.class.php | 2 +- WEB-INF/lib/auth/Auth_ldap.class.php | 2 +- WEB-INF/lib/form/DefaultCellRenderer.class.php | 3 +-- WEB-INF/lib/form/Form.class.php | 2 +- WEB-INF/lib/form/FormElement.class.php | 2 +- WEB-INF/lib/form/Hidden.class.php | 2 +- WEB-INF/lib/form/Table.class.php | 2 +- WEB-INF/lib/form/TableColumn.class.php | 2 +- WEB-INF/lib/form/TextArea.class.php | 2 +- WEB-INF/lib/form/TextField.class.php | 2 +- WEB-INF/lib/form/UploadFile.class.php | 2 +- WEB-INF/lib/mail/Mailer.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php index f4e18becb..d960f008e 100644 --- a/WEB-INF/lib/DateAndTime.class.php +++ b/WEB-INF/lib/DateAndTime.class.php @@ -197,7 +197,7 @@ class DateAndTime { * @param String $strfDateTime * @return DateAndTime */ - function DateAndTime($format="",$strfDateTime="") { + function __construct($format="",$strfDateTime="") { $this->mLocalFormat = ($format ? $format : $this->mIntrFormat); $d = ($strfDateTime ? $strfDateTime : $this->do_strftime($this->mLocalFormat)); $this->parseVal($d); diff --git a/WEB-INF/lib/auth/Auth_ldap.class.php b/WEB-INF/lib/auth/Auth_ldap.class.php index b3f5d52a2..625c47828 100644 --- a/WEB-INF/lib/auth/Auth_ldap.class.php +++ b/WEB-INF/lib/auth/Auth_ldap.class.php @@ -51,7 +51,7 @@ class Auth_ldap extends Auth { var $params; - function Auth_ldap($params) + function __construct($params) { $this->params = $params; if (isset($GLOBALS['smarty'])) { diff --git a/WEB-INF/lib/form/DefaultCellRenderer.class.php b/WEB-INF/lib/form/DefaultCellRenderer.class.php index 2813a36de..1e36f79b5 100644 --- a/WEB-INF/lib/form/DefaultCellRenderer.class.php +++ b/WEB-INF/lib/form/DefaultCellRenderer.class.php @@ -32,8 +32,7 @@ class DefaultCellRenderer { var $mWidth = null; var $mOnChangeAdd = null; - function DefaultCellRenderer() { - + function __construct() { } function getValue() { return $this->mCellValue; } diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index 6fb6ce121..6b663a9e6 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -45,7 +45,7 @@ class Form { var $mRequest; // var $mFormBean; - function Form($formid) { + function __construct($formid) { $this->formName = $formid; } diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index c576451ce..bc41016f3 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -48,7 +48,7 @@ class FormElement { var $cClassName = "FormElement"; var $mI18n = null; - function FormElement() { + function __construct() { } function getClass() { return $this->cClassName; } diff --git a/WEB-INF/lib/form/Hidden.class.php b/WEB-INF/lib/form/Hidden.class.php index 3530f1baf..84837467c 100644 --- a/WEB-INF/lib/form/Hidden.class.php +++ b/WEB-INF/lib/form/Hidden.class.php @@ -32,7 +32,7 @@ class Hidden extends FormElement { var $mValue; var $cClassName = "Hidden"; - function Hidden($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 12b356a8c..b41a1f12c 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -47,7 +47,7 @@ class Table extends FormElement { var $mHeaderOptions = array(); var $mProccessed = false; - function Table($name, $value='') { + function __construct($name, $value='') { $this->mName = $name; $this->mValue = $value; } diff --git a/WEB-INF/lib/form/TableColumn.class.php b/WEB-INF/lib/form/TableColumn.class.php index aa1ec4b1f..06cad0514 100644 --- a/WEB-INF/lib/form/TableColumn.class.php +++ b/WEB-INF/lib/form/TableColumn.class.php @@ -37,7 +37,7 @@ class TableColumn { var $mBgColor = "#ffffff"; var $mFgColor = "#000000"; - function TableColumn($indexField, $title="",$renderer=null) { + function __construct($indexField, $title="",$renderer=null) { $this->mIndexField = $indexField; $this->mTitle = $title; if ($renderer!=null) { diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 887f8ad4c..be0c8caa2 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -35,7 +35,7 @@ class TextArea extends FormElement { var $mRows = ""; var $cClassName = "TextArea"; - function TextArea($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index fdd022a9b..a409410fb 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -33,7 +33,7 @@ class TextField extends FormElement { var $mPassword = false; var $cClassName = "TextField"; - function TextField($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index ad3f21fa4..1055125df 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -33,7 +33,7 @@ class UploadFile extends FormElement { var $cClassName = "UploadFile"; var $mMaxSize = 100000; // 100kb - function UploadFile($name,$value="") + function __construct($name,$value="") { $this->mName = $name; $this->mValue = $value; diff --git a/WEB-INF/lib/mail/Mailer.class.php b/WEB-INF/lib/mail/Mailer.class.php index 1b84e745d..eb4e7f9a6 100644 --- a/WEB-INF/lib/mail/Mailer.class.php +++ b/WEB-INF/lib/mail/Mailer.class.php @@ -9,7 +9,7 @@ class Mailer { var $mReceiver; var $mReceiverCC; - function Mailer($type='standard') { + function __construct($type='standard') { $this->mSendType = $type; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bb47a00d4..85297683d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {if $active_projects} {foreach $active_projects as $project} - + - {/foreach} {/if} @@ -40,13 +38,11 @@ - {foreach $inactive_projects as $project} - + - {/foreach}
 Anuko Time Tracker 1.9.31.3533 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3534 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 8e6668f56ba8611c86467daf1e6c099c062e7b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 14 Sep 2016 21:22:43 +0200 Subject: [PATCH 0009/2515] Fix new line symbol on Windows systems in dbinstall.php (#13) --- dbinstall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbinstall.php b/dbinstall.php index 46fc0fc74..0d32ab8ed 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -61,7 +61,7 @@ function setChange($sql) { // spit white space before output in some situations such as in PDF reports. $file = fopen(APP_DIR."/WEB-INF/config.php", "r"); $line = fgets($file); - if (strcmp("Error: WEB-INF/config.php file does not start with PHP opening tag.
'); } fclose($file); From ba351a163d5c02ded286fe695c46df6a5092a7c5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 14 Sep 2016 19:31:17 +0000 Subject: [PATCH 0010/2515] Version change for PR#13, spelling fix, cosmetic. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 85297683d..3bb9d415f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {foreach $expense_items as $item} @@ -150,9 +149,8 @@ function get_date() { {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {/if} - + - {/foreach}
 Anuko Time Tracker 1.9.31.3534 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3535 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 0d32ab8ed..6561649ee 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -57,11 +57,11 @@ function setChange($sql) { echo('WEB-INF/config.php file exists.
'); // Config file must start with the PHP opening tag. We are checking this because - // a Unicode editor may insert a byte order matk (BOM) before it. This is not good as it will + // a Unicode editor may insert a byte order mark (BOM) before it. This is not good as it will // spit white space before output in some situations such as in PDF reports. - $file = fopen(APP_DIR."/WEB-INF/config.php", "r"); + $file = fopen(APP_DIR.'/WEB-INF/config.php', 'r'); $line = fgets($file); - if (strcmp("Error: WEB-INF/config.php file does not start with PHP opening tag.
'); } fclose($file); From 5305983d1ea26da9859eb1d4b54cb9a334c4ca6b Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 14 Sep 2016 22:00:43 +0000 Subject: [PATCH 0011/2515] Fixed rate presentation. --- WEB-INF/lib/ttProjectHelper.class.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 19e01d35c..0a97de22d 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -67,6 +67,7 @@ static function getRates($user_id) $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { + $val['rate'] = str_replace('.', $user->decimal_mark, $val['rate']); $result[] = $val; } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3bb9d415f..d38b50a0d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {foreach $inactive_clients as $client} - + - {/foreach}
 Anuko Time Tracker 1.9.31.3535 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3536 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From f881f16363ce8c0fc8d4ed7b6565e7a82013256e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Thu, 15 Sep 2016 18:39:28 +0200 Subject: [PATCH 0012/2515] Update the Swedish translation (#15) * Update Swedish translation Redone from the current English translation. * Add safe-check for NOTE_INPUT_HEIGHT and a better comment description --- WEB-INF/config.php.dist | 4 +- WEB-INF/resources/sv.lang.php | 736 +++++++++++++++++----------------- time.php | 2 + 3 files changed, 367 insertions(+), 375 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index d2da367c3..9f53f9dff 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -220,5 +220,5 @@ define('AUTH_MODULE', 'db'); // define('MONTHLY_QUOTA_YEAR_START', 2010); // If nothing is specified, it falls back to 2015. // define('MONTHLY_QUOTA_YEAR_END', 2025); // If nothing is specified, it falls back to 2030. -// note input height in time.php -define('NOTE_INPUT_HEIGHT', '40'); +// Height in pixels for the note input field in time.php. Defaults to 40. +// define('NOTE_INPUT_HEIGHT', 100); diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index e75be6631..d29cbef7a 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -32,392 +32,382 @@ $i18n_language = 'Svenska'; $i18n_months = array('Januari', 'Februari', 'Mars', 'April', 'Maj', 'Juni', 'Juli', 'Augusti', 'September', 'Oktober', 'November', 'December'); $i18n_weekdays = array('Söndag', 'Måndag', 'Tisdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lördag'); -$i18n_weekdays_short = array('sön', 'mån', 'tis', 'ons', 'tor', 'fr', 'lör'); +$i18n_weekdays_short = array('sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'); // format mm/dd -$i18n_holidays = array('01/01', '01/06', '04/10', '04/12', '04/13', '05/01', '05/21', '05/31', '06/06', '06/20', '10/31', '11/01', '12/25', '12/26'); +$i18n_holidays = array('01/01', '01/06', '05/01', '06/06', '12/25', '12/26'); // OBS! Endast fasta helgdagar, då rörliga datum måste uppdateras varje år. $i18n_key_words = array( -// Menus. +// Menus - short selection strings that are displayed on the top of application web pages. +// Example: https://timetracker.anuko.com (black menu on top). 'menu.login' => 'Logga in', 'menu.logout' => 'Logga ut', -// TODO: translate the following: -// 'menu.forum' => 'Forum', +'menu.forum' => 'Forum', 'menu.help' => 'Hjälp', -// Note to translators: menu.create_team needs a more accurate translation. -'menu.create_team' => 'Skapa huvudkonto', +'menu.create_team' => 'Skapa arbetsgrupp', 'menu.profile' => 'Profil', -'menu.time' => 'Mina tider', // TODO: Improve this, used to be "My time", now just "Time". -// TODO: translate the following: -// 'menu.expenses' => 'Expenses', +'menu.time' => 'Tider', +'menu.expenses' => 'Kostnader', 'menu.reports' => 'Rapporter', -// TODO: translate the following: -// 'menu.charts' => 'Charts', -'menu.projects' => 'Projekt', // TODO: is this correct for plural "Projects" (many projects, not one). -// TODO: translate the following: -// 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', -// Note to translators: is menu.teams translated correctly? It's a list of teams in the system. -'menu.teams' => 'Team', -// TODO: translate the following: -// 'menu.export' => 'Export', +'menu.charts' => 'Diagram', +'menu.projects' => 'Projekt', +'menu.tasks' => 'Uppgifter', +'menu.users' => 'Användare', +'menu.teams' => 'Arbetsgrupper', +'menu.export' => 'Export', 'menu.clients' => 'Kunder', -'menu.options' => 'Inställningar', +'menu.options' => 'Alternativ', // Footer - strings on the bottom of most pages. -// TODO: translate the following: -// 'footer.contribute_msg' => 'You can contribute to Time Tracker in different ways.', -// 'footer.credits' => 'Credits', -// 'footer.license' => 'License', -//'footer.improve' => 'Contribute', // Translators: this could mean "Improve", if it makes better sense in your language. - // This is a link to a webpage that describes how to contribute to the project. +'footer.contribute_msg' => 'Det finns flera olika sätt att bidra till Anuko Time Tracker.', +'footer.credits' => 'Tack till', +'footer.license' => 'Licens', +'footer.improve' => 'Bidra', + // Error messages. -// TODO: translate the following: -// 'error.access_denied' => 'Access denied.', -// 'error.sys' => 'System error.', -'error.db' => 'Fel i databasen', -'error.field' => 'felaktig "{0}" data', -'error.empty' => 'fält "{0}" är tomt', -'error.not_equal' => 'fält "{0}" är inte lika med fält "{1}"', -'error.interval' => 'felaktig intervall', -'error.project' => 'välj projekt', -'error.activity' => 'välj aktivitet', -'error.auth' => 'felaktig login eller lösenord', -// Note to translators: this string needs to be translated. -// 'error.user_exists' => 'user with this login already exists', -'error.project_exists' => 'projektnamnet finns redan i databasen', -'error.activity_exists' => 'aktivitetsnamnet finns redan i databasen', -// TODO: translate error.client_exists. -// 'error.client_exists' => 'client with this name already exists', -// Note to translators: this string needs to be properly translated (e-mail replaced with login). -// 'error.no_login' => 'det finns ingen användare med denna e-postadress', -'error.upload' => 'felaktig filuppladdning', -// TODO: Translate the following: -// 'error.range_locked' => 'Date range is locked.', -// 'error.mail_send' => 'error sending mail', -// 'error.no_email' => 'no email associated with this login', -// 'error.uncompleted_exists' => 'uncompleted entry already exists. close or delete it.', -// 'error.goto_uncompleted' => 'go to uncompleted entry.', - -// labels for various buttons +'error.access_denied' => 'Åtkomst nekad.', +'error.sys' => 'Systemfel.', +'error.db' => 'Databasfel.', +'error.field' => 'Fältet för "{0}" innehåller ett felaktigt värde.', +'error.empty' => 'Fältet för "{0}" kan inte vara tomt.', +'error.not_equal' => 'Fältet för "{0}" matchar inte "{1}".', +'error.interval' => 'Fältet för "{0}" måste vara större än "{1}".', +'error.project' => 'Välj ett projekt.', +'error.task' => 'Välj en uppgift.', +'error.client' => 'Välj en kund.', +'error.report' => 'Välj en rapport.', +'error.auth' => 'Ogiltigt användarnamn eller lösenord.', +'error.user_exists' => 'Det finns redan en användare med det här användarnamnet.', +'error.project_exists' => 'Det finns redan ett projekt med det här namnet.', +'error.task_exists' => 'Det finns redan en uppgift med det här namnet.', +'error.client_exists' => 'Det finns redan en kund med det här namnet.', +'error.invoice_exists' => 'Det finns redan en faktura med det här numret.', +'error.no_invoiceable_items' => 'Det finns inga fakturerbara inlägg.', +'error.no_login' => 'Det finns ingen användare med det här användarnamnet.', +'error.no_teams' => 'Databasen är tom. Logga in som administratör och skapa en ny arbetsgrupp.', +'error.upload' => 'Ett fel uppstod när filen laddades upp.', +'error.range_locked' => 'Datumintervallet är låst.', +'error.mail_send' => 'Ett fel uppstod när när e-postmeddelandet skulle skickas.', +'error.no_email' => 'Ingen e-post associerad med det här användarnamnet.', +'error.uncompleted_exists' => 'Ett oavslutat inlägg existerar redan. Avsluta eller ta bort det.', +'error.goto_uncompleted' => 'Visa oavslutat inlägg.', +'error.overlap' => 'Tidsintervallet överlappar med ett redan existerande inlägg.', +'error.future_date' => 'Det går inte att registrera tider framåt i tiden.', + +// Labels for buttons. 'button.login' => 'Logga in', -'button.now' => 'nu', -// 'button.set' => 'använd', -'button.save' => 'spara', -'button.delete' => 'ta bort', -'button.cancel' => 'avbryt', -'button.submit' => 'skicka', -'button.add_user' => 'skapa användare', -'button.add_project' => 'skapa projekt', -'button.add_activity' => 'skapa aktivitet', -'button.add_client' => 'skapa kund', -'button.add' => 'lägg till', -'button.generate' => 'skapa', -// Note to translators: button.reset_password needs an improved translation. -'button.reset_password' => 'gå vidare', -'button.send' => 'skicka', -'button.send_by_email' => 'skicka e-post', -'button.save_as_new' => 'spara som nytt', -// TODO: improve translation of button.create_team. -'button.create_team' => 'skapa nytt team', -'button.export' => 'exportera team', -'button.import' => 'importera team', -'button.apply' => 'spara', - -// labels for controls on various forms -// TODO: translate label.team_name -// 'label.team_name' => 'team name', -'label.currency' => 'valuta', -// TODO: translate label.manager_name and label.manager_login. -// 'label.manager_name' => 'manager name', -// 'label.manager_login' => 'manager login', -'label.password' => 'lösenord', -'label.confirm_password' => 'bekräfta lösenord', -'label.email' => 'e-post', -'label.total' => 'total', -// Translate the following string. -// 'label.page' => 'Page', - -// Form titles. -// TODO: the entire title section is missing here. See the English file. - -"form.filter.project" => 'projekt', -"form.filter.filter" => 'favorit rapport', -"form.filter.filter_new" => 'spara som favorit', -// Note to translators: the string below is missing and must be added and translated -// "form.filter.filter_confirm_delete" => 'are you sure you want to delete this favorite report?', - -// login form attributes -"form.login.title" => 'logga in', -"form.login.login" => 'logga in', - -// password reminder form attributes -"form.fpass.title" => 'återställ lösenord', -"form.fpass.login" => 'logga in', -"form.fpass.send_pass_str" => 'begäran för återställning av lösenord har skickats', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker lösenordsåterställning', -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "Kära användare,\n\nSomeone, antagligen har du begärt återställning av lösenord för Anuko Time Tracker. Vänligen besök denna länk om du vill återställa ditt lösenord.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "skriv in ditt lösenord och tryck på spara för att ändra ditt lösenord", - -// administrator form -"form.admin.title" => 'administratör', -"form.admin.duty_text" => 'skapa ny team genom att skapa en teamledar konto.
du kan även importera team information från en xmlfil eller annan anuko time tracker server (inga e-post dubletter tillåts).', - -"form.admin.change_pass" => 'ändra lösenord för administratörs kontot', -"form.admin.profile.title" => 'team', -"form.admin.profile.noprofiles" => 'databasen är tom. logga in som admin och skapa ny team.', -"form.admin.profile.comment" => 'ta bort team', -"form.admin.profile.th.id" => 'id', -"form.admin.profile.th.name" => 'namn', -"form.admin.profile.th.edit" => 'redigera', -"form.admin.profile.th.del" => 'ta bort', -"form.admin.profile.th.active" => 'aktiverad', -"form.admin.options" => 'inställningar', -// Note to translators: the strings below are missing and must be added and translated -// "form.admin.custom_date_format" => "date format", -// "form.admin.custom_time_format" => "time format", -// "form.admin.start_week" => "first day of week", - -// my time form attributes -"form.mytime.title" => 'mina tider', -"form.mytime.edit_title" => 'ändra tidstämpel', -"form.mytime.del_str" => 'ta bort tidsstämpel', -"form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => 'datum', -"form.mytime.project" => 'projekt', -"form.mytime.activity" => 'aktivitet', -"form.mytime.start" => 'start', -"form.mytime.finish" => 'slut', -"form.mytime.duration" => 'varaktighet', -"form.mytime.note" => 'beskrivning', -"form.mytime.behalf" => 'daglig arbete för', -"form.mytime.daily" => 'daglig arbete', -"form.mytime.total" => 'total antal timmar: ', -"form.mytime.th.project" => 'projekt', -"form.mytime.th.activity" => 'aktivitet', -"form.mytime.th.start" => 'start', -"form.mytime.th.finish" => 'slut', -"form.mytime.th.duration" => 'längd', -"form.mytime.th.note" => 'beskrivning', -"form.mytime.th.edit" => 'ändra', -"form.mytime.th.delete" => 'ta bort', -"form.mytime.del_yes" => 'borttagning av tiddstämpel lyckades', -"form.mytime.no_finished_rec" => 'denna tidsstämpel var sparad med endast starttid. Det är inget fel. logga ut om du vill.', -"form.mytime.billable" => 'debiterbar', -"form.mytime.warn_tozero_rec" => 'denna tidsstämpel måste tas bort för att tidsperiden är låst', -// Note to translators: the string below is missing and must be added and translated -// "form.mytime.uncompleted" => 'uncompleted', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'skapa huvudkonto', -"form.profile.edit_title" => 'ändra profilen', -"form.profile.name" => 'namn', -"form.profile.login" => 'logga in', - -// Note to translators: the strings below are missing and must be added and translated -// "form.profile.showchart" => 'show pie charts', -// "form.profile.lang" => 'language', -// "form.profile.custom_date_format" => "date format", -// "form.profile.custom_time_format" => "time format", -// "form.profile.default_format" => "(default)", -// "form.profile.start_week" => "first day of week", - -// people form attributes -"form.people.ppl_str" => 'personal', -"form.people.createu_str" => 'skapa ny användare', -"form.people.edit_str" => 'ändra användare', -"form.people.del_str" => 'ta bort användare', -"form.people.th.name" => 'namn', -"form.people.th.login" => 'logga in', -"form.people.th.role" => 'roll', -"form.people.th.edit" => 'redigera', -"form.people.th.del" => 'ta bort', -"form.people.th.status" => 'status', -"form.people.th.project" => 'projekt', -"form.people.th.rate" => 'timpris', -"form.people.manager" => 'chef', -"form.people.comanager" => 'vicechef', -"form.people.empl" => 'användare', -"form.people.name" => 'namn', -"form.people.login" => 'logga in', - -"form.people.rate" => 'standard timpris', -"form.people.comanager" => 'vice-chef', -"form.people.projects" => 'projekt', - -// projects form attributes -"form.project.proj_title" => 'projekt', -"form.project.edit_str" => 'ändra projekt', -"form.project.add_str" => 'lägg till nytt projekt', -"form.project.del_str" => 'ta bort projekt', -"form.project.th.name" => 'namn', -"form.project.th.edit" => 'redigera', -"form.project.th.del" => 'ta bort', -"form.project.name" => 'namn', - -// activities form attributes -"form.activity.act_title" => 'aktiviteter', -"form.activity.add_title" => 'lägg till aktivitet', -"form.activity.edit_str" => 'ändra aktivitet', -"form.activity.del_str" => 'ta bort aktivitet', -"form.activity.name" => 'namn', -"form.activity.project" => 'projekt', -"form.activity.th.name" => 'namn', -"form.activity.th.project" => 'projekt', -"form.activity.th.edit" => 'redigera', -"form.activity.th.del" => 'ta bort', - -// report attributes -"form.report.title" => 'rapporter', -"form.report.from" => 'startdatum', -"form.report.to" => 'slutdatum', -"form.report.groupby_user" => 'användare', -"form.report.groupby_project" => 'projekt', -"form.report.groupby_activity" => 'aktivitet', -"form.report.duration" => 'varktighet', -"form.report.start" => 'start', -"form.report.activity" => 'aktivitet', -"form.report.show_idle" => 'visa passivitet', -"form.report.finish" => 'avsluta', -"form.report.note" => 'beskrivning', -"form.report.project" => 'projekt', -"form.report.totals_only" => 'endast totala', -"form.report.total" => 'totala timmar', -"form.report.th.empllist" => 'användare', -"form.report.th.date" => 'datum', -"form.report.th.project" => 'projekt', -"form.report.th.activity" => 'aktivitet', -"form.report.th.start" => 'start', -"form.report.th.finish" => 'slut', -"form.report.th.duration" => 'varaktiget', -"form.report.th.note" => 'beskrivning', - -// mail form attributes -"form.mail.from" => 'från', -"form.mail.to" => 'till', -"form.mail.cc" => 'cc', -"form.mail.subject" => 'ämne', -"form.mail.comment" => 'kommentarer', -"form.mail.above" => 'skicka rapporten med e-post', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'meddelandet skickat', - -// invoice attributes -"form.invoice.title" => 'faktura', -"form.invoice.caption" => 'faktura', -"form.invoice.above" => 'ytterligare information för fakturan', -"form.invoice.select_cust" => 'välj kund', -"form.invoice.fillform" => 'fyll i fälten', -"form.invoice.date" => 'datum', -"form.invoice.number" => 'fakturanummer', -"form.invoice.tax" => 'moms', -"form.invoice.comment" => 'kommentarer ', -"form.invoice.th.username" => 'person', -"form.invoice.th.time" => 'timmar', -"form.invoice.th.rate" => 'timpris', -"form.invoice.th.summ" => 'antal', -"form.invoice.subtotal" => 'subtotal', -"form.invoice.customer" => 'kund', -"form.invoice.mailinv_above" => 'skicka fakturan med e-post', -"form.invoice.sending_str" => 'fakturan skickades', - -"form.migration.zip" => 'komprimering', -"form.migration.file" => 'välj fil', -"form.migration.import.title" => 'importera information', -"form.migration.import.success" => 'importen lyckades', -"form.migration.import.text" => 'importera team information från en xml fil', -"form.migration.export.title" => 'exportera information', -"form.migration.export.success" => 'exporten lyckades', -"form.migration.export.text" => 'du kan exportera all team data i en xmlfil. detta kan vara användbar om du migrerar till en egen server.', -// Note to translators: the string below is missing and must be added and translated -// "form.migration.compression.none" => 'none', -"form.migration.compression.gzip" => 'gzip', -"form.migration.compression.bzip" => 'bzip', - -"form.client.title" => 'kunder', -"form.client.add_title" => 'lägg till kund', -"form.client.edit_title" => 'ändra kund', -"form.client.del_title" => 'ta bort kund', -"form.client.th.name" => 'namn', -"form.client.th.edit" => 'redigera', -"form.client.th.del" => 'ta bort', -"form.client.name" => 'namn', -"form.client.tax" => 'moms', -"form.client.comment" => 'kommentarer ', - -// miscellaneous strings -"forward.forgot_password" => 'glömt lösenord?', -"forward.edit" => 'redigera', -"forward.delete" => 'ta bort', -"forward.tocsvfile" => 'exportera data till .csv fil', -"forward.toxmlfile" => 'exportera data till .xml fil', -"forward.geninvoice" => 'skapa faktura', -"forward.change" => 'justera kunder', - -// strings inside contols on forms -"controls.select.project" => '--- välj projekt ---', -"controls.select.activity" => '--- välj aktivitet ---', -"controls.select.client" => '--- välj kund ---', -"controls.project_bind" => '--- alla ---', -"controls.all" => '--- alla ---', -"controls.notbind" => '--- nej ---', -"controls.per_tm" => 'denna månad', -"controls.per_lm" => 'förra månad', -"controls.per_tw" => 'denna vecka', -"controls.per_lw" => 'förra vecka', -"controls.per_td" => 'denna dag', -"controls.per_at" => 'hela perioden', -// Note to translators: the string below is missing and must be translated and added -// "controls.per_ty" => 'this year', -"controls.sel_period" => '--- välj tidsperiod ---', -"controls.sel_groupby" => '--- ingen gruppering ---', -"controls.inc_billable" => 'debiterbar', -"controls.inc_nbillable" => 'icke debiterbar', -// Note to translators: the string below is missing and must be translated and added -// "controls.default" => '--- default ---', - -// labels -"label.chart.title1" => 'användarens aktiviteter', -// Note to translators: the string below is missing and must be translated and added -// "label.chart.title2" => 'projects for user', -"label.chart.period" => 'graf för perioden', - -"label.pinfo" => '%s, %s', -"label.pinfo2" => '%s', -"label.pbehalf_info" => '%s %s genom %s', -"label.pminfo" => ' (chef)', -"label.pcminfo" => ' (vice-chef)', -"label.painfo" => ' (administratör)', -"label.time_noentry" => 'tomt', -"label.today" => 'idag', -"label.req_fields" => '* obligatoriska fält', -"label.sel_project" => 'välj projekt', -"label.sel_activity" => 'välj aktivitet', -"label.sel_tp" => 'välj tidsperiod', -"label.set_tp" => 'eller ange datum', -"label.fields" => 'visa fält', -"label.group_title" => 'grupperad som', -"label.include_title" => 'inkludera information', -"label.inv_str" => 'faktura', -"label.set_empl" => 'välj användare', -"label.sel_all" => 'markera alla', -"label.sel_none" => 'avmarkera alla', -"label.or" => 'eller', -"label.disable" => 'deaktiverad', -"label.enable" => 'aktiverad', -"label.filter" => 'filter', -"label.timeweek" => 'veckovis total', -// Note to translators: the strings below are missing and must be added and translated -// "label.hrs" => 'hrs', -// "label.errors" => 'errors', -// "label.ldap_hint" => 'Type your Windows login and password in the fields below.', -// "label.calendar_today" => 'today', -// "label.calendar_close" => 'close', - -// login hello text -// "login.hello.text" => "Anuko Time Tracker is a simple, easy to use, open source time tracking system.", +'button.now' => 'Nu', +'button.save' => 'Spara', +'button.copy' => 'Kopiera', +'button.cancel' => 'Avbryt', +'button.submit' => 'Skicka', +'button.add_user' => 'Lägg till användare', +'button.add_project' => 'Lägg till projekt', +'button.add_task' => 'Lägg till uppgift', +'button.add_client' => 'Lägg till kund', +'button.add_invoice' => 'Lägg till faktura', +'button.add_option' => 'Lägg till alternativ', +'button.add' => 'Lägg till', +'button.generate' => 'Generera', +'button.reset_password' => 'Återställ lösenord', +'button.send' => 'Skicka', +'button.send_by_email' => 'Skicka som e-post', +'button.create_team' => 'Skapa arbetsgrupp', +'button.export' => 'Exportera arbetsgrupp', +'button.import' => 'Importera arbetsgrupp', +'button.close' => 'Stäng', +'button.stop' => 'Avsluta', + +// Labels for controls on forms. Labels in this section are used on multiple forms. +'label.team_name' => 'Arbetsgruppsnamn', +'label.address' => 'Adress', +'label.currency' => 'Valuta', +'label.manager_name' => 'Namn på ansvarig', +'label.manager_login' => 'Användarnamn för ansvarig', +'label.person_name' => 'Namn', +'label.thing_name' => 'Namn', +'label.login' => 'Användarnamn', +'label.password' => 'Lösenord', +'label.confirm_password' => 'Bekräfta lösenord', +'label.email' => 'E-post', +'label.date' => 'Datum', +'label.start_date' => 'Startdatum', +'label.end_date' => 'Slutdatum', +'label.user' => 'Användare', +'label.users' => 'Användare', +'label.client' => 'Kund', +'label.clients' => 'Kunder', +'label.option' => 'Alternativ', +'label.invoice' => 'Faktura', +'label.project' => 'Projekt', +'label.projects' => 'Projekt', +'label.task' => 'Uppgift', +'label.tasks' => 'Uppgifter', +'label.description' => 'Beskrivning', +'label.start' => 'Starttid', +'label.finish' => 'Sluttid', +'label.duration' => 'Varaktighet', +'label.note' => 'Anteckning', +'label.item' => 'Utensilier', +'label.cost' => 'Kostnad', +'label.day_total' => 'Idag', +'label.week_total' => 'Denna veckan', +'label.month_total' => 'Denna månaden', +'label.today' => 'Idag', +'label.total_hours' => 'Totalt antal timmar', +'label.total_cost' => 'Total kostnad', +'label.view' => 'Visa', +'label.edit' => 'Redigera', +'label.delete' => 'Ta bort', +'label.configure' => 'Konfigurera', +'label.select_all' => 'Markera alla', +'label.select_none' => 'Avmarkera alla', +'label.id' => 'ID', +'label.language' => 'Språk', +'label.decimal_mark' => 'Decimaltecken', +'label.date_format' => 'Datumformat', +'label.time_format' => 'Tidsformat', +'label.week_start' => 'Första dagen på veckan', +'label.comment' => 'Kommentar', +'label.status' => 'Status', +'label.tax' => 'Skatt', // TODO: Eller är det moms? +'label.subtotal' => 'Delsumma', +'label.total' => 'Totalsumma', +'label.client_name' => 'Kundnamn', +'label.client_address' => 'Kundadress', +'label.or' => 'eller', +'label.error' => 'Fel', +'label.ldap_hint' => 'Fyll i ditt användarnamn och lösenord för Windows i fälten nedan.', +'label.required_fields' => '* - Obligatoriska fält', +'label.on_behalf' => 'agerar som', +'label.role_manager' => '(Ansvarig)', +'label.role_comanager' => '(Delansvarig)', +'label.role_admin' => '(Administratör)', +'label.page' => 'Sida', +// Labels for plugins (extensions to Time Tracker that provide additional features). +'label.custom_fields' => 'Egna fält', +'label.monthly_quotas' => 'Månadskvoter', +'label.type' => 'Typ', +'label.type_dropdown' => 'Rullgardinsmeny', +'label.type_text' => 'Text', +'label.required' => 'Obligatorisk', +'label.fav_report' => 'Sparade rapporter', +'label.cron_schedule' => 'CRON-schema', +'label.what_is_it' => 'Vad är det här?', + +// Rubriker för formulär +'title.login' => 'Logga in', +'title.teams' => 'Arbetsgrupper', +'title.create_team' => 'Skapa arbetsgrupp', +'title.edit_team' => 'Redigera arbetsgrupp', +'title.delete_team' => 'Ta bort arbetsgrupp', +'title.reset_password' => 'Återställ lösenord', +'title.change_password' => 'Ändra lösenord', +'title.time' => 'Tider', +'title.edit_time_record' => 'Redigera inlägg', +'title.delete_time_record' => 'Ta bort inlägg', +'title.expenses' => 'Kostnader', +'title.edit_expense' => 'Redigera kostnad', +'title.delete_expense' => 'Ta bort kostnad', +'title.reports' => 'Rapporter', +'title.report' => 'Rapport', +'title.send_report' => 'Skicka rapport', +'title.invoice' => 'Faktura', +'title.send_invoice' => 'Skicka faktura', +'title.charts' => 'Diagram', +'title.projects' => 'Projekt', +'title.add_project' => 'Lägg till projekt', +'title.edit_project' => 'Redigera projekt', +'title.delete_project' => 'Ta bort projekt', +'title.tasks' => 'Uppgifter', +'title.add_task' => 'Lägg till uppgift', +'title.edit_task' => 'Redigera uppgift', +'title.delete_task' => 'Ta bort uppgift', +'title.users' => 'Användare', +'title.add_user' => 'Lägg till användare', +'title.edit_user' => 'Redigera användare', +'title.delete_user' => 'Ta bort användare', +'title.clients' => 'Kunder', +'title.add_client' => 'Lägg till kund', +'title.edit_client' => 'Redigera kund', +'title.delete_client' => 'Ta bort kund', +'title.invoices' => 'Fakturor', +'title.add_invoice' => 'Lägg till faktura', +'title.view_invoice' => 'Visa faktura', +'title.delete_invoice' => 'Ta bort faktura', +'title.notifications' => 'Aviseringar', +'title.add_notification' => 'Lägg till avisering', +'title.edit_notification' => 'Redigera avisering', +'title.delete_notification' => 'Ta bort avisering', +'title.monthly_quotas' => 'Månadskvoter', +'title.export' => 'Exportera arbetsgrupp', +'title.import' => 'Importera arbetsgrupp', +'title.options' => 'Alternativ', +'title.profile' => 'Profil', +'title.cf_custom_fields' => 'Egna fält', +'title.cf_add_custom_field' => 'Lägg till fält', +'title.cf_edit_custom_field' => 'Redigera fält', +'title.cf_delete_custom_field' => 'Ta bort fält', +'title.cf_dropdown_options' => 'Alternativ för rullgardinsmeny', +'title.cf_add_dropdown_option' => 'Lägg till alternativ', +'title.cf_edit_dropdown_option' => 'Redigera alternativ', +'title.cf_delete_dropdown_option' => 'Ta bort alternativ', +// NOTE TO TRANSLATORS: Locking is a feature to lock records from modifications (ex: weekly on Mondays we lock all previous weeks). +// It is also a name for the Locking plugin on the Team profile page. +'title.locking' => 'Låsning', + +// Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. +// Strings that are used in a single form must go to the specific form section. +'dropdown.all' => '--- Alla ---', +'dropdown.no' => '--- Ingen ---', +// NOTE TO TRANSLATORS: dropdown.this_day does not necessarily means "today". It means a specific ("this") day selected on calendar. See Charts. +'dropdown.this_day' => 'Denna dagen', +'dropdown.this_week' => 'Denna veckan', +'dropdown.last_week' => 'Förra veckan', +'dropdown.this_month' => 'Denna månaden', +'dropdown.last_month' => 'Förra månaden', +'dropdown.this_year' => 'Detta året', +'dropdown.all_time' => 'Livstid', +'dropdown.projects' => 'Projekt', +'dropdown.tasks' => 'Uppgifter', +'dropdown.clients' => 'Kunder', +'dropdown.select' => '--- Välj ---', +'dropdown.select_invoice' => '--- Välj faktura ---', +'dropdown.status_active' => 'Aktiv', +'dropdown.status_inactive' => 'Inaktiv', +'dropdown.delete' => 'Ta bort', +'dropdown.do_not_delete' => 'Ta inte bort', + +// Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. +// One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases +// a string can be defined on the main form and used on related forms. The reasoning for this is to make translation effort easier. +// Strings that are used on multiple unrelated forms should be placed in shared sections such as label., etc. + +// Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Glömt lösenordet?', +'form.login.about' =>'Anuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider.', + +// Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => 'Begäran om att återställa lösenordet skickades via e-post.', +'form.reset_password.email_subject' => 'Återställning av lösenord för Anuko Time Tracker begärd', +'form.reset_password.email_body' => "Kära användare,\n\Någon, förmodligen du, begärde att ditt lösenord för Anuko Time Tracker skulle återställas. Vänligen besök den här länken ifall du vill återställa ditt lösenord.\n\n%s\n\nAnuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider. Besök https://www.anuko.com för mer information.\n\n", + +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +'form.change_password.tip' => 'Fyll i ett nytt lösenord och klicka på Spara.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +'form.time.duration_format' => '(hh:mm eller 0.0h)', +'form.time.billable' => 'Fakturerbar', +'form.time.uncompleted' => 'Oavslutad', +'form.time.remaining_quota' => 'Återstående kvot', +'form.time.over_quota' => 'Över kvoten', + +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +'form.time_edit.uncompleted' => 'Det här inlägget har sparats utan sluttid. Inget fel har uppstått.', + +// Reports form. See example at https://timetracker.anuko.com/reports.php +'form.reports.save_as_favorite' => 'Spara rapport som', +'form.reports.confirm_delete' => 'Är du säker på att du vill ta bort den här rapporten från dina favoriter?', +'form.reports.include_records' => 'Inkludera tidsinlägg', +'form.reports.include_billable' => 'Fakturerbara inlägg', +'form.reports.include_not_billable' => 'Inte fakturerbara inlägg', +'form.reports.include_invoiced' => 'Fakturerade', +'form.reports.include_not_invoiced' => 'Inte fakturerade', +'form.reports.select_period' => 'Välj intervall', +'form.reports.set_period' => 'eller ställ in datum', +'form.reports.show_fields' => 'Visa fält', +'form.reports.group_by' => 'Gruppera efter', +'form.reports.group_by_no' => '--- Ingen gruppering ---', +'form.reports.group_by_date' => 'Datum', +'form.reports.group_by_user' => 'Användare', +'form.reports.group_by_client' => 'Kund', +'form.reports.group_by_project' => 'Projekt', +'form.reports.group_by_task' => 'Uppgift', +'form.reports.totals_only' => 'Visa endast summeringar', + +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Exportera som', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +'form.invoice.number' => 'Fakturanummer', +'form.invoice.person' => 'Person', +'form.invoice.invoice_to_delete' => 'Fakturanummer', +'form.invoice.invoice_entries' => 'Kopplade inlägg', + +// Charts form. See example at https://timetracker.anuko.com/charts.php +'form.charts.interval' => 'Intervall', +'form.charts.chart' => 'Diagram', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +'form.projects.active_projects' => 'Aktiva projekt', +'form.projects.inactive_projects' => 'Inaktiva projekt', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +'form.tasks.active_tasks' => 'Aktiva uppgifter', +'form.tasks.inactive_tasks' => 'Inaktiva uppgifter', + +// Users form. See example at https://timetracker.anuko.com/users.php +'form.users.active_users' => 'Aktiva användare', +'form.users.inactive_users' => 'Inaktiva användare', +'form.users.role' => 'Roll', +'form.users.manager' => 'Ansvarig', +'form.users.comanager' => 'Delansvarig', +'form.users.rate' => 'Timtaxa', +'form.users.default_rate' => 'Standard timtaxa', + +// Client delete form. See example at https://timetracker.anuko.com/client_delete.php +'form.client.client_to_delete' => 'Kund som raderas', +'form.client.client_entries' => 'Kopplade inlägg', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +'form.clients.active_clients' => 'Aktiva kunder', +'form.clients.inactive_clients' => 'Inaktiva kunder', + +// Strings for Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +'form.export.hint' => 'Du kan exportera all information om arbetsgrupperna till en XML-fil. Det kan vara användbart när du migrerar till en egen server.', +'form.export.compression' => 'Komprimering', +'form.export.compression_none' => 'Ingen', +'form.export.compression_bzip' => 'B-zip', + +// Strings for Importing Team Data form. See example at https://timetracker.anuko.com/import.php (login as admin first). +'form.import.hint' => 'Importera arbetsgrupp från en XML-fil.', +'form.import.file' => 'Välj fil', +'form.import.success' => 'Importeringen lyckades utan problem.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +'form.teams.hint' => 'Skapa en ny arbetsgrupp genom att skapa ett konto för en ansvarig person. Du kan även importera arbetsgrupper från en tidigare installation av Anuko Time Tracker via en XML-fil. Se till att inga användarnamn krockar när filen importeras.', + +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +'form.profile.12_hours' => '12-timmars', +'form.profile.24_hours' => '24-timmars', +'form.profile.tracking_mode' => 'Spårningsmetod', +'form.profile.mode_time' => 'Endast tid', +'form.profile.mode_projects' => 'Projekt', +'form.profile.mode_projects_and_tasks' => 'Projekt och uppgifter', +'form.profile.record_type' => 'Inläggstyp', +'form.profile.type_all' => 'Alla', +'form.profile.type_start_finish' => 'Starttid och sluttid', +'form.profile.type_duration' => 'Varaktighet', +'form.profile.plugins' => 'Tillägg', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Från', +'form.mail.to' => 'Till', +'form.mail.cc' => 'Cc', +'form.mail.subject' => 'Ämne', +'form.mail.report_subject' => 'Tidsrapport', +'form.mail.footer' => 'Anuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider. Besök www.anuko.com för mer information.', +'form.mail.report_sent' => 'Rapporten skickades.', +'form.mail.invoice_sent' => 'Fakturan skickades.', + +// Quotas configuration form. +'form.quota.year' => 'År', +'form.quota.month' => 'Månad', +'form.quota.quota' => 'Kvot', +'form.quota.workday_hours' => 'Arbetstimmar per dag', +'form.quota.hint' => 'Om fälten lämnas tomma räknas kvoterna automatiskt ut baserat på arbetstimmar per dag och helgdagar.', + ); diff --git a/time.php b/time.php index 768a809da..47e06a14c 100644 --- a/time.php +++ b/time.php @@ -195,6 +195,8 @@ } if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); +if (!defined('NOTE_INPUT_HEIGHT')) + define('NOTE_INPUT_HEIGHT', 40); $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar if ($user->isPluginEnabled('iv')) From ca5499dc79c9604c7ccf8b29257a5f5b45a71645 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 15 Sep 2016 17:32:13 +0000 Subject: [PATCH 0013/2515] Version update for PR#15, some changes in Swedish file, hopefully correct. --- WEB-INF/resources/sv.lang.php | 7 +++---- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index d29cbef7a..99245f68c 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -32,7 +32,7 @@ $i18n_language = 'Svenska'; $i18n_months = array('Januari', 'Februari', 'Mars', 'April', 'Maj', 'Juni', 'Juli', 'Augusti', 'September', 'Oktober', 'November', 'December'); $i18n_weekdays = array('Söndag', 'Måndag', 'Tisdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lördag'); -$i18n_weekdays_short = array('sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'); +$i18n_weekdays_short = array('Sö', 'Må', 'Ti', 'On', 'To', 'Fr', 'Lö'); // format mm/dd $i18n_holidays = array('01/01', '01/06', '05/01', '06/06', '12/25', '12/26'); // OBS! Endast fasta helgdagar, då rörliga datum måste uppdateras varje år. @@ -50,9 +50,9 @@ 'menu.expenses' => 'Kostnader', 'menu.reports' => 'Rapporter', 'menu.charts' => 'Diagram', -'menu.projects' => 'Projekt', +'menu.projects' => 'Projekter', 'menu.tasks' => 'Uppgifter', -'menu.users' => 'Användare', +'menu.users' => 'Användarer', 'menu.teams' => 'Arbetsgrupper', 'menu.export' => 'Export', 'menu.clients' => 'Kunder', @@ -64,7 +64,6 @@ 'footer.license' => 'Licens', 'footer.improve' => 'Bidra', - // Error messages. 'error.access_denied' => 'Åtkomst nekad.', 'error.sys' => 'Systemfel.', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d38b50a0d..0dcf2c1c0 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {foreach $active_clients as $client} - + - {/foreach}
 Anuko Time Tracker 1.9.31.3536 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3537 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 277cd4221ae07e602212587904111d75cf349426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Fri, 16 Sep 2016 16:27:18 +0200 Subject: [PATCH 0014/2515] Update Swedish translation (#16) --- WEB-INF/resources/sv.lang.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 99245f68c..dc9eb0774 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -50,11 +50,11 @@ 'menu.expenses' => 'Kostnader', 'menu.reports' => 'Rapporter', 'menu.charts' => 'Diagram', -'menu.projects' => 'Projekter', +'menu.projects' => 'Projekt', 'menu.tasks' => 'Uppgifter', -'menu.users' => 'Användarer', +'menu.users' => 'Användare', 'menu.teams' => 'Arbetsgrupper', -'menu.export' => 'Export', +'menu.export' => 'Exportera', 'menu.clients' => 'Kunder', 'menu.options' => 'Alternativ', From 09bd3c14ba08e57c46fb53c66e9053d248682c06 Mon Sep 17 00:00:00 2001 From: Taylor Hurt Date: Tue, 20 Sep 2016 16:32:28 -0400 Subject: [PATCH 0015/2515] =?UTF-8?q?move=20edit=20link=20to=20a=20differe?= =?UTF-8?q?nt=20column=20in=20order=20to=20free=20up=20horizontal=20s?= =?UTF-8?q?=E2=80=A6=20(#11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * move edit link to a different column in order to free up horizontal space on mobile * fix missing manager name on mobile/users page when co-manager is logged in --- WEB-INF/templates/mobile/clients.tpl | 8 ++----- WEB-INF/templates/mobile/expenses.tpl | 4 +--- WEB-INF/templates/mobile/projects.tpl | 8 ++----- WEB-INF/templates/mobile/tasks.tpl | 8 ++----- WEB-INF/templates/mobile/users.tpl | 31 ++++++++++++++++----------- 5 files changed, 25 insertions(+), 34 deletions(-) diff --git a/WEB-INF/templates/mobile/clients.tpl b/WEB-INF/templates/mobile/clients.tpl index ded17ba92..a61320115 100644 --- a/WEB-INF/templates/mobile/clients.tpl +++ b/WEB-INF/templates/mobile/clients.tpl @@ -13,13 +13,11 @@
{$i18n.label.person_name} {$i18n.label.address}{$i18n.label.edit}
{$client.name|escape:'html'}{$client.name|escape:'html'} {$client.address|escape:'html'}{$i18n.label.edit}
@@ -34,13 +32,11 @@
{$i18n.label.person_name} {$i18n.label.address}{$i18n.label.edit}
{$client.name|escape:'html'}{$client.name|escape:'html'} {$client.address|escape:'html'}{$i18n.label.edit}
diff --git a/WEB-INF/templates/mobile/expenses.tpl b/WEB-INF/templates/mobile/expenses.tpl index bf99d801e..9aab9a85b 100644 --- a/WEB-INF/templates/mobile/expenses.tpl +++ b/WEB-INF/templates/mobile/expenses.tpl @@ -140,7 +140,6 @@ function get_date() { {/if}
{$i18n.label.item} {$i18n.label.cost}{$i18n.label.edit}
{$item.project|escape:'html'}{$item.item|escape:'html'}{if $item.invoice_id} {$item.item|escape:'html'} {else}{$item.item|escape:'html'}{/if} {$item.cost}{if $item.invoice_id} {else}{$i18n.label.edit}{/if}
diff --git a/WEB-INF/templates/mobile/projects.tpl b/WEB-INF/templates/mobile/projects.tpl index 45cd184a5..b371c8030 100644 --- a/WEB-INF/templates/mobile/projects.tpl +++ b/WEB-INF/templates/mobile/projects.tpl @@ -13,14 +13,12 @@
{$i18n.label.thing_name} {$i18n.label.description}{$i18n.label.edit}
{$project.name|escape:'html'}{$project.name|escape:'html'} {$project.description|escape:'html'}{$i18n.label.edit}
{$i18n.label.thing_name} {$i18n.label.description}{$i18n.label.edit}
{$project.name|escape:'html'}{$project.name|escape:'html'} {$project.description|escape:'html'}{$i18n.label.edit}
diff --git a/WEB-INF/templates/mobile/tasks.tpl b/WEB-INF/templates/mobile/tasks.tpl index 0a521073a..c877e9894 100644 --- a/WEB-INF/templates/mobile/tasks.tpl +++ b/WEB-INF/templates/mobile/tasks.tpl @@ -13,14 +13,12 @@
{$i18n.label.thing_name} {$i18n.label.description}{$i18n.label.edit}
{$task.name|escape:'html'}{$task.name|escape:'html'} {$task.description|escape:'html'}{$i18n.label.edit}
{$i18n.label.thing_name} {$i18n.label.description}{$i18n.label.edit}
{$task.name|escape:'html'}{$task.name|escape:'html'} {$task.description|escape:'html'}{$i18n.label.edit}
diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl index aab86d82f..38c96ae98 100644 --- a/WEB-INF/templates/mobile/users.tpl +++ b/WEB-INF/templates/mobile/users.tpl @@ -14,12 +14,21 @@
{$i18n.label.person_name} {$i18n.label.login} {$i18n.form.users.role}{$i18n.label.edit}
{$u.name|escape:'html'} + {if $user->isManager()} + {$u.name|escape:'html'} + {else} + {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)} + {$u.name|escape:'html'} + {else} + {$u.name|escape:'html'} + {/if} + {/if} + {$u.login|escape:'html'}{$i18n.form.users.manager}{$i18n.label.client}{$i18n.label.user}{$i18n.label.edit}{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.edit}{/if}
{$i18n.label.login} {$i18n.form.users.role} {$i18n.label.edit}{$i18n.label.delete}
{$u.name|escape:'html'} + {if $user->isManager()} + {$u.name|escape:'html'} + {else} + {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$u.name|escape:'html'}{/if} + {/if} + {$u.login|escape:'html'}{$i18n.form.users.manager} {$i18n.label.edit}{if $smarty.const.ROLE_MANAGER != $u.role || $can_delete_manager}{$i18n.label.delete}{/if} {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.edit}{/if}{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.delete}{/if}
{$forms.chartForm.date.control}
{$forms.chartForm.close} - - diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index ce8e229c5..b307f4c89 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -27,7 +27,7 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + {if $user->custom_logo} @@ -54,11 +54,11 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + {if $authenticated} {if $user->isAdmin()} - +
  @@ -68,9 +68,9 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + - +
  @@ -79,9 +79,9 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + {else} - +
  @@ -92,9 +92,9 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + - +
  @@ -130,10 +130,10 @@ With 101% height we essentially force the scrollbar to always appear. -->
- + {/if} {else} - +
  @@ -149,16 +149,16 @@ With 101% height we essentially force the scrollbar to always appear. --> {/if}
- + {if $title}
{$title}{if $timestring}: {$timestring}{/if}
{$user->name|escape:'html'}{if $user->isAdmin()} {$i18n.label.role_admin}{elseif $user->isManager()} {$i18n.label.role_manager}{elseif $user->canManageTeam()} {$i18n.label.role_comanager}{/if}{if $user->behalf_id > 0} {$i18n.label.on_behalf} {$user->behalf_name|escape:'html'}{/if}{if $user->team}, {$user->team|escape:'html'}{/if}
{/if} - + - + {if $err->yes()} @@ -170,9 +170,9 @@ With 101% height we essentially force the scrollbar to always appear. -->
{/if} - + - + {if $msg->yes()} @@ -184,4 +184,4 @@ With 101% height we essentially force the scrollbar to always appear. -->
{/if} - + diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index cd266aeb9..7a48f5e9a 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -25,7 +25,7 @@
- + {if $user->custom_logo} @@ -52,12 +52,12 @@
- + {if $authenticated} {if $user->isAdmin()} - +
  @@ -66,10 +66,10 @@
- + {else} - +
  @@ -94,11 +94,11 @@
- + {/if} {/if} - + {if $err->yes()} @@ -110,9 +110,9 @@
{/if} - + - + {if $msg->yes()} @@ -124,4 +124,4 @@
{/if} - + diff --git a/charts.php b/charts.php index 9dec840ae..3ef76e528 100644 --- a/charts.php +++ b/charts.php @@ -38,7 +38,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_view_charts)) { +if (!ttAccessCheck(right_view_charts) || !$user->isPluginEnabled('ch')) { header('Location: access_denied.php'); exit(); } diff --git a/clients.php b/clients.php index 6dcfe4a56..0a027b8bd 100644 --- a/clients.php +++ b/clients.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/expenses.php b/expenses.php index 4c2b7b27e..0f4265aa8 100644 --- a/expenses.php +++ b/expenses.php @@ -34,7 +34,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/clients.php b/mobile/clients.php index d6ebbe406..6312c2dd4 100644 --- a/mobile/clients.php +++ b/mobile/clients.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/expenses.php b/mobile/expenses.php index 4246f589e..fafe1373e 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -34,7 +34,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } From 67b89ee3cbf49278581c7e5f1252e56835e9a868 Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 21 Sep 2016 01:53:23 +0000 Subject: [PATCH 0017/2515] Version update. --- WEB-INF/templates/footer.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0dcf2c1c0..c4934a512 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.31.3537 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3538 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 8c7da3eb00661f94b51b0390ee0d56b8dfeeaeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Thu, 22 Sep 2016 15:26:01 +0200 Subject: [PATCH 0018/2515] Updates to the Swedish translation (#18) Refinements to the new translations after a week of using the application. --- WEB-INF/resources/sv.lang.php | 102 +++++++++++++++++----------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index dc9eb0774..363cbd903 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -51,7 +51,7 @@ 'menu.reports' => 'Rapporter', 'menu.charts' => 'Diagram', 'menu.projects' => 'Projekt', -'menu.tasks' => 'Uppgifter', +'menu.tasks' => 'Arbetsuppgifter', 'menu.users' => 'Användare', 'menu.teams' => 'Arbetsgrupper', 'menu.export' => 'Exportera', @@ -59,7 +59,7 @@ 'menu.options' => 'Alternativ', // Footer - strings on the bottom of most pages. -'footer.contribute_msg' => 'Det finns flera olika sätt att bidra till Anuko Time Tracker.', +'footer.contribute_msg' => 'Det finns många sätt du kan bidra till Anuko Time Tracker.', 'footer.credits' => 'Tack till', 'footer.license' => 'Licens', 'footer.improve' => 'Bidra', @@ -68,30 +68,30 @@ 'error.access_denied' => 'Åtkomst nekad.', 'error.sys' => 'Systemfel.', 'error.db' => 'Databasfel.', -'error.field' => 'Fältet för "{0}" innehåller ett felaktigt värde.', -'error.empty' => 'Fältet för "{0}" kan inte vara tomt.', -'error.not_equal' => 'Fältet för "{0}" matchar inte "{1}".', -'error.interval' => 'Fältet för "{0}" måste vara större än "{1}".', +'error.field' => '"{0}" innehåller ett felaktigt värde.', +'error.empty' => '"{0}" kan inte vara tomt.', +'error.not_equal' => '"{0}" matchar inte "{1}".', +'error.interval' => '"{0}" måste vara större än "{1}".', 'error.project' => 'Välj ett projekt.', -'error.task' => 'Välj en uppgift.', +'error.task' => 'Välj en arbetsuppgift.', 'error.client' => 'Välj en kund.', 'error.report' => 'Välj en rapport.', 'error.auth' => 'Ogiltigt användarnamn eller lösenord.', 'error.user_exists' => 'Det finns redan en användare med det här användarnamnet.', 'error.project_exists' => 'Det finns redan ett projekt med det här namnet.', -'error.task_exists' => 'Det finns redan en uppgift med det här namnet.', +'error.task_exists' => 'Det finns redan en arbetsuppgift med det här namnet.', 'error.client_exists' => 'Det finns redan en kund med det här namnet.', 'error.invoice_exists' => 'Det finns redan en faktura med det här numret.', -'error.no_invoiceable_items' => 'Det finns inga fakturerbara inlägg.', +'error.no_invoiceable_items' => 'Det finns inga debiterbara tidsregistreringar.', 'error.no_login' => 'Det finns ingen användare med det här användarnamnet.', 'error.no_teams' => 'Databasen är tom. Logga in som administratör och skapa en ny arbetsgrupp.', 'error.upload' => 'Ett fel uppstod när filen laddades upp.', 'error.range_locked' => 'Datumintervallet är låst.', 'error.mail_send' => 'Ett fel uppstod när när e-postmeddelandet skulle skickas.', -'error.no_email' => 'Ingen e-post associerad med det här användarnamnet.', -'error.uncompleted_exists' => 'Ett oavslutat inlägg existerar redan. Avsluta eller ta bort det.', -'error.goto_uncompleted' => 'Visa oavslutat inlägg.', -'error.overlap' => 'Tidsintervallet överlappar med ett redan existerande inlägg.', +'error.no_email' => 'Det finns ingen e-postadress kopplad till det här användarnamnet.', +'error.uncompleted_exists' => 'En oavslutad registrering existerar redan. Avsluta eller ta bort den.', +'error.goto_uncompleted' => 'Visa registrering.', +'error.overlap' => 'Tidsintervallet överlappar med en redan existerande tidsregistrering.', 'error.future_date' => 'Det går inte att registrera tider framåt i tiden.', // Labels for buttons. @@ -103,7 +103,7 @@ 'button.submit' => 'Skicka', 'button.add_user' => 'Lägg till användare', 'button.add_project' => 'Lägg till projekt', -'button.add_task' => 'Lägg till uppgift', +'button.add_task' => 'Lägg till arbetsuppgift', 'button.add_client' => 'Lägg till kund', 'button.add_invoice' => 'Lägg till faktura', 'button.add_option' => 'Lägg till alternativ', @@ -112,14 +112,14 @@ 'button.reset_password' => 'Återställ lösenord', 'button.send' => 'Skicka', 'button.send_by_email' => 'Skicka som e-post', -'button.create_team' => 'Skapa arbetsgrupp', +'button.create_team' => 'Skapa ny arbetsgrupp', 'button.export' => 'Exportera arbetsgrupp', 'button.import' => 'Importera arbetsgrupp', 'button.close' => 'Stäng', 'button.stop' => 'Avsluta', // Labels for controls on forms. Labels in this section are used on multiple forms. -'label.team_name' => 'Arbetsgruppsnamn', +'label.team_name' => 'Namn på arbetsgrupp', 'label.address' => 'Adress', 'label.currency' => 'Valuta', 'label.manager_name' => 'Namn på ansvarig', @@ -129,7 +129,7 @@ 'label.login' => 'Användarnamn', 'label.password' => 'Lösenord', 'label.confirm_password' => 'Bekräfta lösenord', -'label.email' => 'E-post', +'label.email' => 'E-postadress', 'label.date' => 'Datum', 'label.start_date' => 'Startdatum', 'label.end_date' => 'Slutdatum', @@ -141,18 +141,18 @@ 'label.invoice' => 'Faktura', 'label.project' => 'Projekt', 'label.projects' => 'Projekt', -'label.task' => 'Uppgift', -'label.tasks' => 'Uppgifter', +'label.task' => 'Arbetsuppgift', +'label.tasks' => 'Arbetsuppgifter', 'label.description' => 'Beskrivning', 'label.start' => 'Starttid', 'label.finish' => 'Sluttid', 'label.duration' => 'Varaktighet', 'label.note' => 'Anteckning', -'label.item' => 'Utensilier', +'label.item' => 'Utlägg för', 'label.cost' => 'Kostnad', -'label.day_total' => 'Idag', -'label.week_total' => 'Denna veckan', -'label.month_total' => 'Denna månaden', +'label.day_total' => 'Dagstotal', +'label.week_total' => 'Veckototal', +'label.month_total' => 'Månadstotal', 'label.today' => 'Idag', 'label.total_hours' => 'Totalt antal timmar', 'label.total_cost' => 'Total kostnad', @@ -170,7 +170,7 @@ 'label.week_start' => 'Första dagen på veckan', 'label.comment' => 'Kommentar', 'label.status' => 'Status', -'label.tax' => 'Skatt', // TODO: Eller är det moms? +'label.tax' => 'Moms', 'label.subtotal' => 'Delsumma', 'label.total' => 'Totalsumma', 'label.client_name' => 'Kundnamn', @@ -193,7 +193,7 @@ 'label.required' => 'Obligatorisk', 'label.fav_report' => 'Sparade rapporter', 'label.cron_schedule' => 'CRON-schema', -'label.what_is_it' => 'Vad är det här?', +'label.what_is_it' => 'Vad är detta?', // Rubriker för formulär 'title.login' => 'Logga in', @@ -204,8 +204,8 @@ 'title.reset_password' => 'Återställ lösenord', 'title.change_password' => 'Ändra lösenord', 'title.time' => 'Tider', -'title.edit_time_record' => 'Redigera inlägg', -'title.delete_time_record' => 'Ta bort inlägg', +'title.edit_time_record' => 'Redigera tidsregistrering', +'title.delete_time_record' => 'Ta bort tidsregistrering', 'title.expenses' => 'Kostnader', 'title.edit_expense' => 'Redigera kostnad', 'title.delete_expense' => 'Ta bort kostnad', @@ -219,10 +219,10 @@ 'title.add_project' => 'Lägg till projekt', 'title.edit_project' => 'Redigera projekt', 'title.delete_project' => 'Ta bort projekt', -'title.tasks' => 'Uppgifter', -'title.add_task' => 'Lägg till uppgift', -'title.edit_task' => 'Redigera uppgift', -'title.delete_task' => 'Ta bort uppgift', +'title.tasks' => 'Arbetsuppgifter', +'title.add_task' => 'Lägg till arbetsuppgift', +'title.edit_task' => 'Redigera arbetsuppgift', +'title.delete_task' => 'Ta bort arbetsuppgift', 'title.users' => 'Användare', 'title.add_user' => 'Lägg till användare', 'title.edit_user' => 'Redigera användare', @@ -269,7 +269,7 @@ 'dropdown.this_year' => 'Detta året', 'dropdown.all_time' => 'Livstid', 'dropdown.projects' => 'Projekt', -'dropdown.tasks' => 'Uppgifter', +'dropdown.tasks' => 'Arbetsuppgifter', 'dropdown.clients' => 'Kunder', 'dropdown.select' => '--- Välj ---', 'dropdown.select_invoice' => '--- Välj faktura ---', @@ -285,34 +285,34 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glömt lösenordet?', -'form.login.about' =>'Anuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider.', +'form.login.about' =>'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Begäran om att återställa lösenordet skickades via e-post.', 'form.reset_password.email_subject' => 'Återställning av lösenord för Anuko Time Tracker begärd', -'form.reset_password.email_body' => "Kära användare,\n\Någon, förmodligen du, begärde att ditt lösenord för Anuko Time Tracker skulle återställas. Vänligen besök den här länken ifall du vill återställa ditt lösenord.\n\n%s\n\nAnuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider. Besök https://www.anuko.com för mer information.\n\n", +'form.reset_password.email_body' => "Kära användare,\n\Någon, förmodligen du, begärde att ditt lösenord för Anuko Time Tracker skulle återställas. Vänligen besök den här länken ifall du vill återställa ditt lösenord.\n\n%s\n\nAnuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider. Besök https://www.anuko.com för mer information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Fyll i ett nytt lösenord och klicka på Spara.', // Time form. See example at https://timetracker.anuko.com/time.php. 'form.time.duration_format' => '(hh:mm eller 0.0h)', -'form.time.billable' => 'Fakturerbar', +'form.time.billable' => 'Debiterbar', 'form.time.uncompleted' => 'Oavslutad', 'form.time.remaining_quota' => 'Återstående kvot', -'form.time.over_quota' => 'Över kvoten', +'form.time.over_quota' => 'Kvoten överstigen', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -'form.time_edit.uncompleted' => 'Det här inlägget har sparats utan sluttid. Inget fel har uppstått.', +'form.time_edit.uncompleted' => 'Den här tidsregistreringen har sparats utan sluttid. Fyll i en sluttid och klicka på Spara för att avsluta.', // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Spara rapport som', 'form.reports.confirm_delete' => 'Är du säker på att du vill ta bort den här rapporten från dina favoriter?', -'form.reports.include_records' => 'Inkludera tidsinlägg', -'form.reports.include_billable' => 'Fakturerbara inlägg', -'form.reports.include_not_billable' => 'Inte fakturerbara inlägg', -'form.reports.include_invoiced' => 'Fakturerade', -'form.reports.include_not_invoiced' => 'Inte fakturerade', +'form.reports.include_records' => 'Inkludera tidsregistreringar', +'form.reports.include_billable' => 'Debiterbar tid', +'form.reports.include_not_billable' => 'Icke debiterbar tid', +'form.reports.include_invoiced' => 'Fakturerad tid', +'form.reports.include_not_invoiced' => 'Icke fakturerad tid', 'form.reports.select_period' => 'Välj intervall', 'form.reports.set_period' => 'eller ställ in datum', 'form.reports.show_fields' => 'Visa fält', @@ -322,7 +322,7 @@ 'form.reports.group_by_user' => 'Användare', 'form.reports.group_by_client' => 'Kund', 'form.reports.group_by_project' => 'Projekt', -'form.reports.group_by_task' => 'Uppgift', +'form.reports.group_by_task' => 'Arbetsuppgift', 'form.reports.totals_only' => 'Visa endast summeringar', // Report form. See example at https://timetracker.anuko.com/report.php @@ -334,7 +334,7 @@ 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', 'form.invoice.invoice_to_delete' => 'Fakturanummer', -'form.invoice.invoice_entries' => 'Kopplade inlägg', +'form.invoice.invoice_entries' => 'Relaterade tider och kostnader', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervall', @@ -345,8 +345,8 @@ 'form.projects.inactive_projects' => 'Inaktiva projekt', // Tasks form. See example at https://timetracker.anuko.com/tasks.php -'form.tasks.active_tasks' => 'Aktiva uppgifter', -'form.tasks.inactive_tasks' => 'Inaktiva uppgifter', +'form.tasks.active_tasks' => 'Aktiva arbetsuppgifter', +'form.tasks.inactive_tasks' => 'Inaktiva arbetsuppgifter', // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktiva användare', @@ -358,8 +358,8 @@ 'form.users.default_rate' => 'Standard timtaxa', // Client delete form. See example at https://timetracker.anuko.com/client_delete.php -'form.client.client_to_delete' => 'Kund som raderas', -'form.client.client_entries' => 'Kopplade inlägg', +'form.client.client_to_delete' => 'Kund', +'form.client.client_entries' => 'Relaterade tider och kostnader', // Clients form. See example at https://timetracker.anuko.com/clients.php 'form.clients.active_clients' => 'Aktiva kunder', @@ -385,8 +385,8 @@ 'form.profile.tracking_mode' => 'Spårningsmetod', 'form.profile.mode_time' => 'Endast tid', 'form.profile.mode_projects' => 'Projekt', -'form.profile.mode_projects_and_tasks' => 'Projekt och uppgifter', -'form.profile.record_type' => 'Inläggstyp', +'form.profile.mode_projects_and_tasks' => 'Projekt och arbetsuppgifter', +'form.profile.record_type' => 'Typ av tidsregistrering', 'form.profile.type_all' => 'Alla', 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', @@ -398,7 +398,7 @@ 'form.mail.cc' => 'Cc', 'form.mail.subject' => 'Ämne', 'form.mail.report_subject' => 'Tidsrapport', -'form.mail.footer' => 'Anuko Time Tracker är en lättanvänd applikation byggd på öppen källkod för att spåra och hålla koll på arbetstider. Besök www.anuko.com för mer information.', +'form.mail.footer' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod för att enkelt spåra och hålla koll på arbetstider. Besök www.anuko.com för mer information.', 'form.mail.report_sent' => 'Rapporten skickades.', 'form.mail.invoice_sent' => 'Fakturan skickades.', From 5a6a33edf0ec2ac012715e12c35c7285b64c099b Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 25 Sep 2016 19:33:08 +0000 Subject: [PATCH 0019/2515] Work in progress added more checks for access control. --- WEB-INF/templates/footer.tpl | 2 +- cf_custom_field_add.php | 2 +- cf_custom_field_delete.php | 2 +- cf_custom_field_edit.php | 2 +- cf_custom_fields.php | 2 +- cf_dropdown_option_add.php | 2 +- cf_dropdown_option_delete.php | 2 +- cf_dropdown_option_edit.php | 2 +- cf_dropdown_options.php | 2 +- client_add.php | 2 +- client_delete.php | 2 +- client_edit.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c4934a512..a62e521c4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.31.3538 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3539 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index 965c2aba1..1d293d377 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index 86fa7d871..88779bedb 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 196d85faf..b8e0f8ece 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_custom_fields.php b/cf_custom_fields.php index 33c8b5e7f..18de06059 100644 --- a/cf_custom_fields.php +++ b/cf_custom_fields.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index 20da6eefc..ecf4892d6 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index ed295920f..ec06b49fd 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index 78fc279c4..ba486ae98 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_options.php b/cf_dropdown_options.php index a7718fbe9..544eefdbe 100644 --- a/cf_dropdown_options.php +++ b/cf_dropdown_options.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cf')) { header('Location: access_denied.php'); exit(); } diff --git a/client_add.php b/client_add.php index 275a65eef..bd1516f16 100644 --- a/client_add.php +++ b/client_add.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/client_delete.php b/client_delete.php index 2340db03f..767a919e9 100644 --- a/client_delete.php +++ b/client_delete.php @@ -31,7 +31,7 @@ import('ttClientHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/client_edit.php b/client_edit.php index c7ad1581e..2b408c5da 100644 --- a/client_edit.php +++ b/client_edit.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } From 3ad790a3d4bc23cb23f7ee072171ca6ef987eb56 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 25 Sep 2016 20:35:09 +0000 Subject: [PATCH 0020/2515] Added more access control checks. --- expense_delete.php | 2 +- expense_edit.php | 2 +- invoice_add.php | 2 +- invoice_delete.php | 2 +- invoice_send.php | 2 +- invoice_view.php | 2 +- invoices.php | 2 +- locking.php | 2 +- notification_add.php | 2 +- notification_delete.php | 2 +- notification_edit.php | 2 +- notifications.php | 2 +- project_add.php | 2 +- project_delete.php | 2 +- project_edit.php | 2 +- projects.php | 2 +- quotas.php | 2 +- task_add.php | 2 +- task_delete.php | 2 +- task_edit.php | 2 +- tasks.php | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/expense_delete.php b/expense_delete.php index 38800b629..c5f53aa91 100644 --- a/expense_delete.php +++ b/expense_delete.php @@ -32,7 +32,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } diff --git a/expense_edit.php b/expense_edit.php index 213cfcba7..2f026917a 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -33,7 +33,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } diff --git a/invoice_add.php b/invoice_add.php index f68753fca..0e752dca3 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -32,7 +32,7 @@ import('ttInvoiceHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } diff --git a/invoice_delete.php b/invoice_delete.php index 7db539a53..41f7c1901 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -31,7 +31,7 @@ import('ttInvoiceHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } diff --git a/invoice_send.php b/invoice_send.php index e519132d6..b9e2a2932 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -32,7 +32,7 @@ import('ttSysConfig'); // Access check. -if (!ttAccessCheck(right_view_invoices)) { +if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } diff --git a/invoice_view.php b/invoice_view.php index 2bb987637..e94c04b72 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -32,7 +32,7 @@ import('ttClientHelper'); // Access check. -if (!ttAccessCheck(right_view_invoices)) { +if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } diff --git a/invoices.php b/invoices.php index ad0b28533..a014472f3 100644 --- a/invoices.php +++ b/invoices.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_view_invoices)) { +if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) { header('Location: access_denied.php'); exit(); } diff --git a/locking.php b/locking.php index dfdc2f2fc..8acdcd704 100644 --- a/locking.php +++ b/locking.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('lk')) { header('Location: access_denied.php'); exit(); } diff --git a/notification_add.php b/notification_add.php index 80f46bb2e..05b6ce0c3 100644 --- a/notification_add.php +++ b/notification_add.php @@ -34,7 +34,7 @@ import('ttNotificationHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) { header('Location: access_denied.php'); exit(); } diff --git a/notification_delete.php b/notification_delete.php index 50c33952c..834befbe3 100644 --- a/notification_delete.php +++ b/notification_delete.php @@ -31,7 +31,7 @@ import('ttNotificationHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) { header('Location: access_denied.php'); exit(); } diff --git a/notification_edit.php b/notification_edit.php index 30a9d8fe3..cd3f41bd1 100644 --- a/notification_edit.php +++ b/notification_edit.php @@ -34,7 +34,7 @@ import('ttNotificationHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) { header('Location: access_denied.php'); exit(); } diff --git a/notifications.php b/notifications.php index 6a66b2f75..68cdfff8b 100644 --- a/notifications.php +++ b/notifications.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('no')) { header('Location: access_denied.php'); exit(); } diff --git a/project_add.php b/project_add.php index 1c825d9fb..fe46a6bd4 100644 --- a/project_add.php +++ b/project_add.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/project_delete.php b/project_delete.php index b6f465593..832bf4f73 100644 --- a/project_delete.php +++ b/project_delete.php @@ -31,7 +31,7 @@ import('ttProjectHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/project_edit.php b/project_edit.php index 9cca73e55..11abccc83 100644 --- a/project_edit.php +++ b/project_edit.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/projects.php b/projects.php index cc79e4ab7..d9f368512 100644 --- a/projects.php +++ b/projects.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/quotas.php b/quotas.php index 68b8a6198..d846ae25d 100644 --- a/quotas.php +++ b/quotas.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('mq')) { header('Location: access_denied.php'); exit(); } diff --git a/task_add.php b/task_add.php index ff98c9777..5ef549bb1 100644 --- a/task_add.php +++ b/task_add.php @@ -33,7 +33,7 @@ import('ttTaskHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/task_delete.php b/task_delete.php index 3fd835018..ebc96e219 100644 --- a/task_delete.php +++ b/task_delete.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/task_edit.php b/task_edit.php index 943e9a920..077c7c6b3 100644 --- a/task_edit.php +++ b/task_edit.php @@ -32,7 +32,7 @@ import('ttTaskHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/tasks.php b/tasks.php index cf7f607cc..3ea2faaa0 100644 --- a/tasks.php +++ b/tasks.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } From e4fd9dd2dc0e3920d001b52e325b47fe0c9c65a3 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 25 Sep 2016 20:56:48 +0000 Subject: [PATCH 0021/2515] Added more access control checks to mobile pages. --- WEB-INF/templates/footer.tpl | 2 +- mobile/client_add.php | 2 +- mobile/client_delete.php | 2 +- mobile/client_edit.php | 2 +- mobile/expense_delete.php | 2 +- mobile/expense_edit.php | 2 +- mobile/project_add.php | 2 +- mobile/project_delete.php | 2 +- mobile/project_edit.php | 2 +- mobile/projects.php | 2 +- mobile/task_add.php | 2 +- mobile/task_delete.php | 2 +- mobile/task_edit.php | 2 +- mobile/tasks.php | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a62e521c4..466a65a60 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.31.3539 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3540 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/client_add.php b/mobile/client_add.php index 56f5d08a4..e48949627 100644 --- a/mobile/client_add.php +++ b/mobile/client_add.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/client_delete.php b/mobile/client_delete.php index a0caf4fe6..51e87b43e 100644 --- a/mobile/client_delete.php +++ b/mobile/client_delete.php @@ -31,7 +31,7 @@ import('ttClientHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/client_edit.php b/mobile/client_edit.php index cd6266dac..ac3e60c71 100644 --- a/mobile/client_edit.php +++ b/mobile/client_edit.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('cl')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/expense_delete.php b/mobile/expense_delete.php index b027bd941..8e89513fd 100644 --- a/mobile/expense_delete.php +++ b/mobile/expense_delete.php @@ -32,7 +32,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php index e14372eac..c2df1abb6 100644 --- a/mobile/expense_edit.php +++ b/mobile/expense_edit.php @@ -33,7 +33,7 @@ import('ttExpenseHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('ex')) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/project_add.php b/mobile/project_add.php index 4c9ad185a..1ae6b4dfa 100644 --- a/mobile/project_add.php +++ b/mobile/project_add.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/project_delete.php b/mobile/project_delete.php index 79ed438e8..eb5e04039 100644 --- a/mobile/project_delete.php +++ b/mobile/project_delete.php @@ -31,7 +31,7 @@ import('ttProjectHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/project_edit.php b/mobile/project_edit.php index 490a11e24..f7a37aaf5 100644 --- a/mobile/project_edit.php +++ b/mobile/project_edit.php @@ -32,7 +32,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/projects.php b/mobile/projects.php index 33d1d51b5..5dee3605d 100644 --- a/mobile/projects.php +++ b/mobile/projects.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || (MODE_PROJECTS != $user->tracking_mode && MODE_PROJECTS_AND_TASKS != $user->tracking_mode)) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/task_add.php b/mobile/task_add.php index 9319e2a91..700b91584 100644 --- a/mobile/task_add.php +++ b/mobile/task_add.php @@ -33,7 +33,7 @@ import('ttTaskHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/task_delete.php b/mobile/task_delete.php index aa74be1f0..1fea8e127 100644 --- a/mobile/task_delete.php +++ b/mobile/task_delete.php @@ -31,7 +31,7 @@ import('form.Form'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/task_edit.php b/mobile/task_edit.php index 248167ff5..e2dcc9908 100644 --- a/mobile/task_edit.php +++ b/mobile/task_edit.php @@ -32,7 +32,7 @@ import('ttTaskHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } diff --git a/mobile/tasks.php b/mobile/tasks.php index 9b778bbf4..8b828cfba 100644 --- a/mobile/tasks.php +++ b/mobile/tasks.php @@ -31,7 +31,7 @@ import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessCheck(right_manage_team) || MODE_PROJECTS_AND_TASKS != $user->tracking_mode) { header('Location: access_denied.php'); exit(); } From fb3ac3aef52d4ab63ab302443185be73eca4121e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 28 Sep 2016 05:38:34 +0200 Subject: [PATCH 0022/2515] Update .gitignore and add .editorconfig (#21) * Update .gitignore with compiled files and some OS specific files * Remove all files from templates_c (exept keepme file). * Remove some system files from Windows, Linux and macOS. * Add an .editorconfig file Makes it easier to contribute to the project --- .editorconfig | 11 +++++++++++ .gitignore | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..697c76fe8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +trim_trailing_whitespace = false +insert_new_final_line = false diff --git a/.gitignore b/.gitignore index 8f4d26991..9bfa047e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ config.php -WEB-INF/templates_c/*.php -WEB-INF/templates_c/*.png +WEB-INF/templates_c/*.* WEB-INF/lib/tcpdf/ nbproject/ upload/ .vscode/ +Thumbs.db +*.DS_Store +*~ From 600a2f9ba49efc6f40a2693306f4be69acabd6a0 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 4 Oct 2016 17:24:59 +0000 Subject: [PATCH 0023/2515] Changed expense item control presentation as per Kim Keown's PR#22. --- WEB-INF/templates/footer.tpl | 2 +- expense_edit.php | 2 +- expenses.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 466a65a60..0ffe57341 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + {if $smarty.const.ROLE_MANAGER == $u.role} diff --git a/default.css b/default.css index 7b305dab0..611d42557 100644 --- a/default.css +++ b/default.css @@ -144,6 +144,16 @@ table.divider { div#LoginAboutText { width:400px; } +.uncompleted-entry { + display: inline-block; + height: 8px; + width: 8px; + border: 1px solid rgba(0, 0, 0, .1); + border-radius: 50%; + background-color: rgba(0, 0, 0, .1); +} +.uncompleted-entry.active { background-color: red; } + /* Mobile styles */ .mobile-table { border: 0; diff --git a/mobile/users.php b/mobile/users.php index 71caa6ea6..c3c6a982a 100644 --- a/mobile/users.php +++ b/mobile/users.php @@ -29,6 +29,7 @@ require_once('../initialize.php'); import('form.Form'); import('ttTeamHelper'); +import('ttTimeHelper'); // Access check. if (!ttAccessCheck(right_data_entry)) { @@ -43,6 +44,14 @@ $inactive_users = ttTeamHelper::getInactiveUsers($user->team_id, true); } +// Check each active user if they have an uncompleted time entry. +foreach ($active_users as $key => $user) { + // Turn value from database into boolean. + $has_uncompleted_entry = boolval(ttTimeHelper::getUncompleted($user['id'])); + // Add to current user in $active_users array. + $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; +} + $smarty->assign('active_users', $active_users); $smarty->assign('inactive_users', $inactive_users); $smarty->assign('can_delete_manager', $can_delete_manager); diff --git a/users.php b/users.php index 3a3b146f6..a841818da 100644 --- a/users.php +++ b/users.php @@ -29,6 +29,7 @@ require_once('initialize.php'); import('form.Form'); import('ttTeamHelper'); +import('ttTimeHelper'); // Access check. if (!ttAccessCheck(right_data_entry)) { @@ -43,6 +44,14 @@ $inactive_users = ttTeamHelper::getInactiveUsers($user->team_id, true); } +// Check each active user if they have an uncompleted time entry. +foreach ($active_users as $key => $user) { + // Turn value from database into boolean. + $has_uncompleted_entry = boolval(ttTimeHelper::getUncompleted($user['id'])); + // Add to current user in $active_users array. + $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; +} + $smarty->assign('active_users', $active_users); $smarty->assign('inactive_users', $inactive_users); $smarty->assign('can_delete_manager', $can_delete_manager); From 23ab58c659b527891568a385d8762bf3e6561adf Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 16 Oct 2016 19:25:55 +0000 Subject: [PATCH 0025/2515] Replaced boolval calls to cast to bool so that the app works with PHP 5.2. --- mobile/users.php | 2 +- users.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/users.php b/mobile/users.php index c3c6a982a..2c6bf6eb9 100644 --- a/mobile/users.php +++ b/mobile/users.php @@ -47,7 +47,7 @@ // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { // Turn value from database into boolean. - $has_uncompleted_entry = boolval(ttTimeHelper::getUncompleted($user['id'])); + $has_uncompleted_entry = (bool) ttTimeHelper::getUncompleted($user['id']); // Add to current user in $active_users array. $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; } diff --git a/users.php b/users.php index a841818da..cd60b893b 100644 --- a/users.php +++ b/users.php @@ -47,7 +47,7 @@ // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { // Turn value from database into boolean. - $has_uncompleted_entry = boolval(ttTimeHelper::getUncompleted($user['id'])); + $has_uncompleted_entry = (bool) ttTimeHelper::getUncompleted($user['id']); // Add to current user in $active_users array. $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; } From 170717b62207bd2da1628959d55b691a2d6f95a3 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 16 Oct 2016 20:02:16 +0000 Subject: [PATCH 0026/2515] Some refactoring and version change for PR#20. --- WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/templates/footer.tpl | 2 +- mobile/users.php | 5 +---- users.php | 5 +---- 15 files changed, 24 insertions(+), 9 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 39b42eea0..17ccda93d 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -364,6 +364,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktive Nutzer', 'form.users.inactive_users' => 'Inaktive Nutzer', + // TODO: translate the following. + // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rolle', 'form.users.manager' => 'Manager', 'form.users.comanager' => 'Co-Manager', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 182d9a0eb..693c9c0a7 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -415,6 +415,7 @@ // TODO: translate the following strings. // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rol', 'form.users.manager' => 'Manejador', 'form.users.comanager' => 'Auxiliar del manejador', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 0e3b6161e..af3ff5498 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -377,6 +377,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'کاربران فعال', 'form.users.inactive_users' => 'کاربران غیرفعال', + // TODO: translate the following. + // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'سمت', 'form.users.manager' => 'مدیر', 'form.users.comanager' => 'دستیار مدیر', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 885bb84ee..293885fb7 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -350,6 +350,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktiiviset käyttäjät', 'form.users.inactive_users' => 'Ei-aktiiviset käyttäjät', + // TODO: translate the following. + // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rooli', 'form.users.manager' => 'Esimies', 'form.users.comanager' => 'Apuesimies', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 88c366fa0..9c61f2927 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -393,6 +393,7 @@ // TODO: translate the following strings. // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rôle', 'form.users.manager' => 'Responsable', 'form.users.comanager' => 'Co-responsable', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 6862b0c94..14e5a538c 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -380,6 +380,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'משתמשים פעילים', 'form.users.inactive_users' => 'משתמשים לא פעילים', +// TODO: translate the following. +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'תפקיד', 'form.users.manager' => 'מנהל', 'form.users.comanager' => 'מנהל משנה', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 2fe6874c7..69248ffbf 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -348,6 +348,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Actieve medewerkers', 'form.users.inactive_users' => 'Inactieve medewerkers', +// TODO: translate the following. +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rol', 'form.users.manager' => 'Manager', 'form.users.comanager' => 'Co-manager', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 176a14ded..9d18c2100 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -360,6 +360,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktywni użytkownicy', 'form.users.inactive_users' => 'Nieaktywni użytkownicy', + // TODO: translate the following. + // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rola', 'form.users.manager' => 'Manager', 'form.users.comanager' => 'Co-manager', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 15612ba3b..926b86b1b 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -351,6 +351,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Usuários ativos', 'form.users.inactive_users' => 'Usuários inativos', +// TODO: translate the following. +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Papel', 'form.users.manager' => 'Gerente', 'form.users.comanager' => 'Coordenador', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 31cc87b1e..10ff6e79e 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -349,6 +349,7 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Активные пользователи', 'form.users.inactive_users' => 'Неактивные пользователи', +'form.users.uncompleted_entry' => 'Пользователь имеет неоконченную запись', 'form.users.role' => 'Роль', 'form.users.manager' => 'Менеджер', 'form.users.comanager' => 'Ассистент менеджера', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index b9090ff89..18d6db9c9 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -378,6 +378,8 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktívny používatelia', 'form.users.inactive_users' => 'Neaktívny používatelia', +// TODO: translate the following. +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rola', 'form.users.manager' => 'Manažér', 'form.users.comanager' => 'Spolumanažér', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 957f43553..84dfa8030 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -355,6 +355,8 @@ // Korisnička forma. Pogledajte primer na https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktivni korisnik', 'form.users.inactive_users' => 'Neaktivni korisnik', +// TODO: translate the following. +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Funkcija', 'form.users.manager' => 'Menadžer', 'form.users.comanager' => 'Saradnik', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0ffe57341..e5c7e2bac 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.9.31.3540 | Copyright © Anuko | +  Anuko Time Tracker 1.9.31.3541 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/expense_edit.php b/expense_edit.php index 2f026917a..4a32afca5 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -119,7 +119,7 @@ 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'item_name','style'=>'width: 250px;','value'=>$cl_item_name)); +$form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); $form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); $form->addInput(array('type'=>'datefield','name'=>'date','maxlength'=>'20','value'=>$cl_date)); // Hidden control for record id. diff --git a/expenses.php b/expenses.php index 0f4265aa8..cea13e6b4 100644 --- a/expenses.php +++ b/expenses.php @@ -127,7 +127,7 @@ 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'item_name','style'=>'width: 250px;','value'=>$cl_item_name)); +$form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); $form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); $form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses','value'=>$cl_date)); // calendar $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. From 278a83090d6bf9d6351a449ba045323088f678aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Sun, 16 Oct 2016 21:06:56 +0200 Subject: [PATCH 0024/2515] Add indicator for uncompleted time entry in users.php (#20) * Add indicator for uncompleted time entry in users.php Roles that can manage team now see if a user has an uncompleted time entry from the Users screen. * Fix - White space --- WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/templates/mobile/users.tpl | 1 + WEB-INF/templates/users.tpl | 5 ++++- default.css | 10 ++++++++++ mobile/users.php | 9 +++++++++ users.php | 9 +++++++++ 7 files changed, 35 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1062b2bee..0a83a1ba0 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -352,6 +352,7 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Active Users', 'form.users.inactive_users' => 'Inactive Users', +'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Role', 'form.users.manager' => 'Manager', 'form.users.comanager' => 'Co-manager', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 363cbd903..2094860c0 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -351,6 +351,7 @@ // Users form. See example at https://timetracker.anuko.com/users.php 'form.users.active_users' => 'Aktiva användare', 'form.users.inactive_users' => 'Inaktiva användare', +'form.users.uncompleted_entry' => 'Användaren har en oavslutad tidsregistrering', 'form.users.role' => 'Roll', 'form.users.manager' => 'Ansvarig', 'form.users.comanager' => 'Delansvarig', diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl index 38c96ae98..fedfa8048 100644 --- a/WEB-INF/templates/mobile/users.tpl +++ b/WEB-INF/templates/mobile/users.tpl @@ -19,6 +19,7 @@ {foreach $active_users as $u}
+ {if $user->isManager()} {$u.name|escape:'html'} {else} diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl index 0b64b73ce..0eaa14967 100644 --- a/WEB-INF/templates/users.tpl +++ b/WEB-INF/templates/users.tpl @@ -20,7 +20,10 @@ {if $active_users} {foreach $active_users as $u}
{$u.name|escape:'html'} + + {$u.name|escape:'html'} + {$u.login|escape:'html'}{$i18n.form.users.manager}
-
 Anuko Time Tracker 1.9.31.3541 | Copyright © Anuko | +  Anuko Time Tracker 1.9.32.3542 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/users.php b/mobile/users.php index 2c6bf6eb9..b3d8ae7e8 100644 --- a/mobile/users.php +++ b/mobile/users.php @@ -46,10 +46,7 @@ // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { - // Turn value from database into boolean. - $has_uncompleted_entry = (bool) ttTimeHelper::getUncompleted($user['id']); - // Add to current user in $active_users array. - $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; + $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']); } $smarty->assign('active_users', $active_users); diff --git a/users.php b/users.php index cd60b893b..1233f114a 100644 --- a/users.php +++ b/users.php @@ -46,10 +46,7 @@ // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { - // Turn value from database into boolean. - $has_uncompleted_entry = (bool) ttTimeHelper::getUncompleted($user['id']); - // Add to current user in $active_users array. - $active_users[$key]['has_uncompleted_entry'] = $has_uncompleted_entry; + $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']); } $smarty->assign('active_users', $active_users); From f5e4c83ee35fdc404e029effdbb2274c41aca0ca Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 16 Oct 2016 21:19:06 +0000 Subject: [PATCH 0027/2515] A little bit of cleanup in ca.lang.php file. --- WEB-INF/resources/ca.lang.php | 55 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index d06a021ee..82f886c88 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -63,7 +63,7 @@ // 'menu.export' => 'Export', // 'menu.clients' => 'Clients', // 'menu.options' => 'Options', - + // Footer - strings on the bottom of most pages. // TODO: translate the following: // 'footer.contribute_msg' => 'You can contribute to Time Tracker in different ways.', @@ -86,50 +86,57 @@ // 'error.task' => 'Select task.', // 'error.client' => 'Select client.', // 'error.report' => 'Select report.' - -// Refactoring needs to be done down from here to sync with English file. 'error.auth' => 'Usuari o parula de pas incorrecta', -// Note to translators: this string needs to be translated. -// 'error.user_exists' => 'user with this login already exists', -'error.project_exists' => 'Ja existeix un projecte amb aquest nom', -'error.activity_exists' => 'Ja existeix una activitat amb aquest nom', -// TODO: translate error.client_exists. -// 'error.client_exists' => 'client with this name already exists', -// Note to translators: error.no_login needs to be properly translated (e-mail replaced with login). -// 'error.no_login' => 'No existeix cap usuari amb aquest e-mail', -'error.upload' => 'Error pujant l\\\'arxiu', -// TODO: Translate the following: +// TODO: translate the following: +// 'error.user_exists' => 'User with this login already exists.', +'error.project_exists' => 'Ja existeix un projecte amb aquest nom.', +// TODO: translate the following: +// 'error.task_exists' => 'Task with this name already exists.', +// 'error.client_exists' => 'Client with this name already exists.', +// 'error.invoice_exists' => 'Invoice with this number already exists.', +// 'error.no_invoiceable_items' => 'There are no invoiceable items.', +// 'error.no_login' => 'No user with this login.', +// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.upload' => 'Error pujant l\\\'arxiu.', +// TODO: translate the following: // 'error.range_locked' => 'Date range is locked.', -// 'error.mail_send' => 'Error sending mail', -// 'error.no_email' => 'No email associated with this login', +// 'error.mail_send' => 'Error sending mail.', +// 'error.no_email' => 'No email associated with this login.', // 'error.uncompleted_exists' => 'Uncompleted entry already exists. Close or delete it.', // 'error.goto_uncompleted' => 'Go to uncompleted entry.', // 'error.overlap' => 'Time interval overlaps with existing records.', // 'error.future_date' => 'Date is in future.', -// labels for various buttons +// Labels for buttons. 'button.login' => 'Iniciar sessió', 'button.now' => 'Ara', -// 'button.set' => 'Establir', 'button.save' => 'Guardar', -'button.delete' => 'Eliminar', +// TODO: translate the following: +// 'button.copy' => 'Copy', 'button.cancel' => 'Cancel·lar', 'button.submit' => 'Enviar', 'button.add_user' => 'Agregar usuari ', 'button.add_project' => 'Agregar projecte', -'button.add_activity' => 'Agregar activitat', +// TODO: translate the following: +// 'button.add_task' => 'Add task', 'button.add_client' => 'Agregar client', +// TODO: translate the folllowing: +// 'button.add_invoice' => 'Add invoice', +// 'button.add_option' => 'Add option', 'button.add' => 'Agregar', 'button.generate' => 'Generar', -// Note to translators: button.reset_password needs an improved translation. -'button.reset_password' => 'Anar', +// TODO: translate the following: +// 'button.reset_password' => 'Reset password', 'button.send' => 'Enviar', 'button.send_by_email' => 'Enviar per correu', -'button.save_as_new' => 'Guardar com a nou', 'button.create_team' => 'Crear grup', 'button.export' => 'Exportar grup', 'button.import' => 'Importar grup', -'button.apply' => 'Aplicar', +// TODO: translate the following: +// 'button.close' => 'Close', +// 'button.stop' => 'Stop', + +// TODO: the entrie section from here to bottom needs refactoring. // labels for controls on various forms // TODO: translate label.team_name. @@ -143,6 +150,8 @@ 'label.password' => 'Paraula de pas', 'label.confirm_password' => 'Confirmar paraula de pas', 'label.email' => 'E-mail', +'label.delete' => 'Eliminar', + // TODO: the entire label section needs re-translating. See the English file. // Form titles. From 55e76bcb802e12987d7afa9a79fcf37eaec0d746 Mon Sep 17 00:00:00 2001 From: Kim Keown Date: Sun, 16 Oct 2016 15:42:38 -0600 Subject: [PATCH 0028/2515] Expense Item description - Follow-up to pull request #22 (#23) * mysql.sql suggested revision Line 330 Follow-up for pull request #22: $cl_item_name for expenses.php and expense_edit.php was changed to textarea to allow a larger expense description input area. However, database input size had been overlooked and was fortunately noticed upon review. Updated revision of mysql.sql to replace varchar(255) with a text property to allow a detailed description of the expense. Line 330 `name` text NOT NULL, # expense item name (what is an expense for) * dbinstall.php revision Line 612 Follow-up to pull request #22: Previously expenses.php and expense_edit.php $cl_item_name field was revised to 'textarea' to provide a larger input box and longer description of the expense. However, database character allowance had been overlooked and was fortunately noticed upon review. - Update mysql.sql to replace varchar(255) with the 'text' property to increase allowable entry length. Limit character input via expenses.php and expense_edit.php $cl_item_name textarea 'maxlength'. - Update dbinstall.php with an identical revision. Line 612 Original: `name` varchar(255) NOT NULL, `name` text NOT NULL, * mysql.sql revision Line 330 Follow-up to pull request #22: Previously expenses.php and expense_edit.php $cl_item_name field was revised to 'textarea' to provide a larger input box and longer description of the expense. However, database character allowance had been overlooked and was fortunately noticed upon review. - Update mysql.sql to replace tt_expense_items 'name' property varchar(255) with the text property to increase allowable entry length. Limit character input via expenses.php and expense_edit.php $cl_item_name textarea 'maxlength'. Update dbinstall.php with an identical revision. Line 330 (Original: `name` varchar(255) NOT NULL,) `name` text NOT NULL, * expense_edit.php revision Line 122 Follow-up to pull request #22: Previously expenses.php and expense_edit.php $cl_item_name field was revised to 'textarea' to provide a larger input box and longer expense description. However, database character allowance had been overlooked and was fortunately noticed upon review. Accordingly, the textarea maxlength revision was removed. - Update mysql.sql to replace tt_expense_items 'name' property varchar(255) with the text property to increase allowable entry length. - Update dbinstall.php with an identical revision. - Update expenses.php and expense_edit.php $cl_item_name textarea to include a maxlength property of 800 characters. The expense record is useful for recording any added debit or fixed-rate charge, and a generous character limit will allow a detailed description that can be easily understood in billing logs and reports. Line 122 Original: $form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); Revised: $form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); * expenses.php revision Line 130 Follow-up to pull request #22: Previously expenses.php and expense_edit.php $cl_item_name field was revised to 'textarea' to provide a larger input box and longer expense description. However, database character allowance had been overlooked and was fortunately noticed upon review. Accordingly, the textarea maxlength revision was removed. - Update mysql.sql to replace tt_expense_items 'name' property varchar(255) with the text property to increase allowable entry length. - Update dbinstall.php with an identical revision. - Update expenses.php and expense_edit.php $cl_item_name textarea to include a maxlength property of 800 characters. The expense record is useful for recording any added debit or fixed-rate charge, and a generous character limit will allow for a detailed description that can be easily understood within billing logs and reports. Line 130 Original: $form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); Revised: $form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); --- dbinstall.php | 15 +++++++++++++-- expense_edit.php | 2 +- expenses.php | 2 +- mysql.sql | 6 +++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index 6561649ee..9f579947a 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -605,7 +605,18 @@ function setChange($sql) { setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL"); - setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY (`id`))"); + + setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, + `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, + + /* Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textarea. + Updated mysql.sql also. + Original: `name` varchar(255) NOT NULL, */ + `name` text NOT NULL, + + `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, + PRIMARY KEY (`id`))"); + setChange("create index date_idx on tt_expense_items(date)"); setChange("create index user_idx on tt_expense_items(user_id)"); setChange("create index client_idx on tt_expense_items(client_id)"); @@ -785,4 +796,4 @@ function setChange($sql) { - \ No newline at end of file + diff --git a/expense_edit.php b/expense_edit.php index 4a32afca5..db26f1b64 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -119,7 +119,7 @@ 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } -$form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); +$form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); $form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); $form->addInput(array('type'=>'datefield','name'=>'date','maxlength'=>'20','value'=>$cl_date)); // Hidden control for record id. diff --git a/expenses.php b/expenses.php index cea13e6b4..4cfc0ea55 100644 --- a/expenses.php +++ b/expenses.php @@ -127,7 +127,7 @@ 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } -$form->addInput(array('type'=>'textarea', 'name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); +$form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); $form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); $form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses','value'=>$cl_date)); // calendar $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. diff --git a/mysql.sql b/mysql.sql index a47737751..48a2b0d00 100644 --- a/mysql.sql +++ b/mysql.sql @@ -326,7 +326,11 @@ CREATE TABLE `tt_expense_items` ( `user_id` int(11) NOT NULL, # user id the expense item is reported by `client_id` int(11) default NULL, # client id `project_id` int(11) default NULL, # project id - `name` varchar(255) NOT NULL, # expense item name (what is an expense for) + +# Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textareas. +# Original: `name` varchar(255) NOT NULL, # expense item name (what is an expense for) + `name` text NOT NULL, # expense item name (what is an expense for) + `cost` decimal(10,2) default '0.00', # item cost (including taxes, etc.) `invoice_id` int(11) default NULL, # invoice id `status` tinyint(4) default '1', # item status From eeb825a7f9950c781528b99772ccdd327869b819 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 16 Oct 2016 21:55:15 +0000 Subject: [PATCH 0029/2515] Version change for PR#23, fixed dbinstall.php for it to work. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 14 ++------------ mysql.sql | 4 ---- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e5c7e2bac..33cf326aa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + {* initialize preview text *} +{include file="time_script.tpl"} + +{$forms.timeRecordForm.open} +
 Anuko Time Tracker 1.9.32.3542 | Copyright © Anuko | +  Anuko Time Tracker 1.9.33.3543 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 9f579947a..255f944ce 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -605,18 +605,7 @@ function setChange($sql) { setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL"); - - setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, - `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, - - /* Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textarea. - Updated mysql.sql also. - Original: `name` varchar(255) NOT NULL, */ - `name` text NOT NULL, - - `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, - PRIMARY KEY (`id`))"); - + setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY (`id`))"); setChange("create index date_idx on tt_expense_items(date)"); setChange("create index user_idx on tt_expense_items(user_id)"); setChange("create index client_idx on tt_expense_items(client_id)"); @@ -644,6 +633,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_monthly_quota` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE"); setChange("ALTER TABLE `tt_teams` ADD `workday_hours` SMALLINT NULL DEFAULT '8' AFTER `lock_spec`"); setChange("RENAME TABLE tt_monthly_quota TO tt_monthly_quotas"); + setChange("ALTER TABLE tt_expense_items modify `name` text NOT NULL"); } // The update_clients function updates projects field in tt_clients table. diff --git a/mysql.sql b/mysql.sql index 48a2b0d00..e373c3e90 100644 --- a/mysql.sql +++ b/mysql.sql @@ -326,11 +326,7 @@ CREATE TABLE `tt_expense_items` ( `user_id` int(11) NOT NULL, # user id the expense item is reported by `client_id` int(11) default NULL, # client id `project_id` int(11) default NULL, # project id - -# Kimberly Keown suggested revision to increase character length of expenses.php and expense_edit.php $cl_item_name textareas. -# Original: `name` varchar(255) NOT NULL, # expense item name (what is an expense for) `name` text NOT NULL, # expense item name (what is an expense for) - `cost` decimal(10,2) default '0.00', # item cost (including taxes, etc.) `invoice_id` int(11) default NULL, # invoice id `status` tinyint(4) default '1', # item status From 139889a67699143cce59a4f3136b3158058b9ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Sun, 23 Oct 2016 15:22:44 +0200 Subject: [PATCH 0030/2515] Add option to profile_edit.php to show/hide users uncompleted entries (#24) I'll try to do some renaming after this merge. --- WEB-INF/lib/ttTeamHelper.class.php | 17 ++++++++-- WEB-INF/lib/ttUser.class.php | 52 ++++++++++++++++-------------- WEB-INF/resources/en.lang.php | 3 ++ WEB-INF/resources/sv.lang.php | 3 ++ WEB-INF/templates/mobile/users.tpl | 4 ++- WEB-INF/templates/profile_edit.tpl | 4 +++ WEB-INF/templates/users.tpl | 2 ++ dbinstall.php | 1 + initialize.php | 4 +++ mobile/users.php | 9 ++++-- mysql.sql | 38 +++++++++++----------- profile_edit.php | 9 ++++++ users.php | 9 ++++-- 13 files changed, 102 insertions(+), 53 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 4c1af14ed..7b1fc245a 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -701,6 +701,15 @@ static function insert($fields) { $record_type_v = ''; } + $uncompleted_entries = $fields['uncompleted_entries']; + if ($uncompleted_entries !== null) { + $uncompleted_entries_f = ', uncompleted_entries'; + $uncompleted_entries_v = ', ' . (int)$uncompleted_entries; + } else { + $uncompleted_entries_f = ''; + $uncompleted_entries_v = ''; + } + $workday_hours = $fields['workday_hours']; if ($workday_hours !== null) { $workday_hours_f = ', workday_hours'; @@ -710,11 +719,11 @@ static function insert($fields) { $workday_hours_v = ''; } - $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f $workday_hours_f) + $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f $uncompleted_entries_f $workday_hours_f) values(".$mdb2->quote(trim($fields['name'])). ", ".$mdb2->quote(trim($fields['address'])). ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang). - "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $workday_hours_v)"; + "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $uncompleted_entries_v $workday_hours_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { @@ -742,6 +751,7 @@ static function update($team_id, $fields) $week_start_part = ''; $tracking_mode_part = ''; $record_type_part = ''; + $uncompleted_entries_part = ''; $plugins_part = ''; $lock_spec_part = ''; $workday_hours_part = ''; @@ -755,13 +765,14 @@ static function update($team_id, $fields) if (isset($fields['week_start'])) $week_start_part = ', week_start = '.intval($fields['week_start']); if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.intval($fields['tracking_mode']); if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']); + if (isset($fields['uncompleted_entries'])) $uncompleted_entries_part = ', uncompleted_entries = '.intval($fields['uncompleted_entries']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part - $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; + $uncompleted_entries_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 1566a4857..0d6482673 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -27,30 +27,31 @@ // +----------------------------------------------------------------------+ class ttUser { - var $login = null; // User login. - var $name = null; // User name. - var $id = null; // User id. - var $team_id = null; // Team id. - var $role = null; // User role (user, client, comanager, manager, admin). - var $client_id = null; // Client id for client user role. - var $behalf_id = null; // User id, on behalf of whom we are working. - var $behalf_name = null; // User name, on behalf of whom we are working. - var $email = null; // User email. - var $lang = null; // Language. - var $decimal_mark = null; // Decimal separator. - var $date_format = null; // Date format. - var $time_format = null; // Time format. - var $week_start = 0; // Week start day. - var $tracking_mode = 0; // Tracking mode. - var $record_type = 0; // Record type (duration vs start and finish, or both). - var $currency = null; // Currency. - var $plugins = null; // Comma-separated list of enabled plugins. - var $team = null; // Team name. - var $custom_logo = 0; // Whether to use a custom logo for team. - var $address = null; // Address for invoices. - var $lock_spec = null; // Cron specification for record locking. - var $workday_hours = 8; // Number of work hours in a regular day. - var $rights = 0; // A mask of user rights. + var $login = null; // User login. + var $name = null; // User name. + var $id = null; // User id. + var $team_id = null; // Team id. + var $role = null; // User role (user, client, comanager, manager, admin). + var $client_id = null; // Client id for client user role. + var $behalf_id = null; // User id, on behalf of whom we are working. + var $behalf_name = null; // User name, on behalf of whom we are working. + var $email = null; // User email. + var $lang = null; // Language. + var $decimal_mark = null; // Decimal separator. + var $date_format = null; // Date format. + var $time_format = null; // Time format. + var $week_start = 0; // Week start day. + var $tracking_mode = 0; // Tracking mode. + var $record_type = 0; // Record type (duration vs start and finish, or both). + var $uncompleted_entries = 0; // Uncompleted entries (show nowhere or on users page). + var $currency = null; // Currency. + var $plugins = null; // Comma-separated list of enabled plugins. + var $team = null; // Team name. + var $custom_logo = 0; // Whether to use a custom logo for team. + var $address = null; // Address for invoices. + var $lock_spec = null; // Cron specification for record locking. + var $workday_hours = 8; // Number of work hours in a regular day. + var $rights = 0; // A mask of user rights. // Constructor. function ttUser($login, $id = null) { @@ -63,7 +64,7 @@ function ttUser($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, t.address, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, - t.tracking_mode, t.record_type, t.plugins, t.lock_spec, t.workday_hours, t.custom_logo + t.tracking_mode, t.record_type, t.uncompleted_entries, t.plugins, t.lock_spec, t.workday_hours, t.custom_logo FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE "; if ($id) $sql .= "u.id = $id"; @@ -92,6 +93,7 @@ function ttUser($login, $id = null) { $this->week_start = $val['week_start']; $this->tracking_mode = $val['tracking_mode']; $this->record_type = $val['record_type']; + $this->uncompleted_entries = $val['uncompleted_entries']; $this->team = $val['team_name']; $this->address = $val['address']; $this->currency = $val['currency']; diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 0a83a1ba0..5b7266913 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -389,6 +389,9 @@ 'form.profile.mode_projects' => 'projects', 'form.profile.mode_projects_and_tasks' => 'projects and tasks', 'form.profile.record_type' => 'Record type', +'form.profile.uncompleted_entries' => 'Uncompleted entries', +'form.profile.entries_none' => 'Do not show', +'form.profile.entries_users_page' => 'Show on Users page', 'form.profile.type_all' => 'all', 'form.profile.type_start_finish' => 'start and finish', 'form.profile.type_duration' => 'duration', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 2094860c0..b40f10765 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -388,6 +388,9 @@ 'form.profile.mode_projects' => 'Projekt', 'form.profile.mode_projects_and_tasks' => 'Projekt och arbetsuppgifter', 'form.profile.record_type' => 'Typ av tidsregistrering', +'form.profile.uncompleted_entries' => 'Oavslutade tidsregistreringar', +'form.profile.entries_none' => 'Visa inte', +'form.profile.entries_users_page' => 'Visa på sidan Användare', 'form.profile.type_all' => 'Alla', 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl index fedfa8048..bd2f0f4f3 100644 --- a/WEB-INF/templates/mobile/users.tpl +++ b/WEB-INF/templates/mobile/users.tpl @@ -19,7 +19,9 @@ {foreach $active_users as $u}
- + {if $smarty.const.ENTRIES_USERS_PAGE == $user->uncompleted_entries} + + {/if} {if $user->isManager()} {$u.name|escape:'html'} {else} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index e463ca68b..d13e08711 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -139,6 +139,10 @@ function handlePluginCheckboxes() { {$i18n.form.profile.record_type}: {$forms.profileForm.record_type.control}
{$i18n.form.profile.uncompleted_entries}:{$forms.profileForm.uncompleted_entries.control}
+{if defined(WEEK_VIEW_DEBUG)} + + + +{/if} + + + + +
+ {$i18n.label.day_view} / {$i18n.label.week_view} +
+ +{if $on_behalf_control} + + + + +{/if} +
{$i18n.label.user}:{$forms.timeRecordForm.onBehalfUser.control}
+
+ + +
{$forms.timeRecordForm.date.control}
+
+ + + + + +
+{if $time_records} + + + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + + + + + + + + + {foreach $time_records as $record} + + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + + + + {/foreach} +
{$i18n.label.project}{$i18n.label.task}{$day_header_0}{$day_header_1}{$day_header_2}{$day_header_3}{$day_header_4}{$day_header_5}{$day_header_6}
{$record.project|escape}{$record.task|escape}{$record.date}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}
+{/if} +
+ + + + + +
{$forms.timeRecordForm.btn_submit.control}
+{$forms.timeRecordForm.close} diff --git a/time.php b/time.php index fe3a8e3d0..c001f21f6 100644 --- a/time.php +++ b/time.php @@ -88,7 +88,7 @@ if ($request->isPost()) { $cl_billable = $request->getParameter('billable'); $_SESSION['billable'] = (int) $cl_billable; - } else + } else if (isset($_SESSION['billable'])) $cl_billable = $_SESSION['billable']; } @@ -146,7 +146,7 @@ // Dropdown for clients if the clients plugin is enabled. if ($user->isPluginEnabled('cl')) { $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); - // We need an array of assigned project ids to do some trimming. + // We need an array of assigned project ids to do some trimming. foreach($project_list as $project) $projects_assigned_to_user[] = $project['id']; @@ -196,7 +196,7 @@ if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); + define('NOTE_INPUT_HEIGHT', 40); $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar if ($user->isPluginEnabled('iv')) diff --git a/week.php b/week.php new file mode 100644 index 000000000..c2e85161b --- /dev/null +++ b/week.php @@ -0,0 +1,397 @@ +getParameter('date', @$_SESSION['date']); +$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); +if($selected_date->isError()) + $selected_date = new DateAndTime(DB_DATEFORMAT); +if(!$cl_date) + $cl_date = $selected_date->toString(DB_DATEFORMAT); +$_SESSION['date'] = $cl_date; + +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields($user->team_id); + $smarty->assign('custom_fields', $custom_fields); +} + +// TODO: how is this plugin supposed to work for week view? +if ($user->isPluginEnabled('mq')){ + require_once('plugins/MonthlyQuota.class.php'); + $quota = new MonthlyQuota(); + $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); + $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); + $minutes_left = ttTimeHelper::toMinutes($month_quota) - ttTimeHelper::toMinutes($month_total); + + $smarty->assign('month_total', $month_total); + $smarty->assign('over_quota', $minutes_left < 0); + $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); +} + +// Initialize variables. +$cl_start = trim($request->getParameter('start')); +$cl_finish = trim($request->getParameter('finish')); +$cl_duration = trim($request->getParameter('duration')); +$cl_note = trim($request->getParameter('note')); +// Custom field. +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$_SESSION['cf_1'] = $cl_cf_1; +$cl_billable = 1; +if ($user->isPluginEnabled('iv')) { + if ($request->isPost()) { + $cl_billable = $request->getParameter('billable'); + $_SESSION['billable'] = (int) $cl_billable; + } else + if (isset($_SESSION['billable'])) + $cl_billable = $_SESSION['billable']; +} +$on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); +$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); +$_SESSION['client'] = $cl_client; +$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); +$_SESSION['project'] = $cl_project; +$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); +$_SESSION['task'] = $cl_task; + +// Elements of timeRecordForm. +$form = new Form('timeRecordForm'); + +if ($user->canManageTeam()) { + $user_list = ttTeamHelper::getActiveUsers(array('putSelfFirst'=>true)); + if (count($user_list) > 1) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'this.form.submit();', + 'name'=>'onBehalfUser', + 'style'=>'width: 250px;', + 'value'=>$on_behalf_id, + 'data'=>$user_list, + 'datakeys'=>array('id','name'))); + $smarty->assign('on_behalf_control', 1); + } +} + +// Dropdown for clients in MODE_TIME. Use all active clients. +if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) { + $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'style'=>'width: 250px;', + 'value'=>$cl_client, + 'data'=>$active_clients, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); + // Note: in other modes the client list is filtered to relevant clients only. See below. +} + +if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { + // Dropdown for projects assigned to user. + $project_list = $user->getAssignedProjects(); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillTaskDropdown(this.value);', + 'name'=>'project', + 'style'=>'width: 250px;', + 'value'=>$cl_project, + 'data'=>$project_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); + + // Dropdown for clients if the clients plugin is enabled. + if ($user->isPluginEnabled('cl')) { + $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); + // We need an array of assigned project ids to do some trimming. + foreach($project_list as $project) + $projects_assigned_to_user[] = $project['id']; + + // Build a client list out of active clients. Use only clients that are relevant to user. + // Also trim their associated project list to only assigned projects (to user). + foreach($active_clients as $client) { + $projects_assigned_to_client = explode(',', $client['projects']); + if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) + $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); + if ($intersection) { + $client['projects'] = implode(',', $intersection); + $client_list[] = $client; + } + } + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'style'=>'width: 250px;', + 'value'=>$cl_client, + 'data'=>$client_list, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); + } +} + +if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { + $task_list = ttTeamHelper::getActiveTasks($user->team_id); + $form->addInput(array('type'=>'combobox', + 'name'=>'task', + 'style'=>'width: 250px;', + 'value'=>$cl_task, + 'data'=>$task_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); +} + +// Add other controls. +if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { + $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); + $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); + if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + // Make the start and finish fields read-only. + $form->getElement('start')->setEnabled(false); + $form->getElement('finish')->setEnabled(false); + } +} +if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) + $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); +if (!defined('NOTE_INPUT_HEIGHT')) + define('NOTE_INPUT_HEIGHT', 40); +$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); +$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar +if ($user->isPluginEnabled('iv')) + $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); +$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'))); + +// If we have custom fields - add controls for them. +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)); + } elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>'cf_1', + 'style'=>'width: 250px;', + 'value'=>$cl_cf_1, + 'data'=>$custom_fields->options, + 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); + } +} + +// Submit. +if ($request->isPost()) { + if ($request->getParameter('btn_submit')) { + + // Validate user input. + if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) + $err->add($i18n->getKey('error.client')); + if ($custom_fields) { + if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']); + } + if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { + if (!$cl_project) $err->add($i18n->getKey('error.project')); + } + if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode && $user->task_required) { + if (!$cl_task) $err->add($i18n->getKey('error.task')); + } + if (strlen($cl_duration) == 0) { + if ($cl_start || $cl_finish) { + if (!ttTimeHelper::isValidTime($cl_start)) + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.start')); + if ($cl_finish) { + if (!ttTimeHelper::isValidTime($cl_finish)) + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.finish')); + if (!ttTimeHelper::isValidInterval($cl_start, $cl_finish)) + $err->add($i18n->getKey('error.interval'), $i18n->getKey('label.finish'), $i18n->getKey('label.start')); + } + } else { + if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { + $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.start')); + $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.finish')); + } + if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) + $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); + } + } else { + if (!ttTimeHelper::isValidDuration($cl_duration)) + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + } + if (!ttValidString($cl_note, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.note')); + // Finished validating user input. + + // Prohibit creating entries in future. + if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); + if ($selected_date->after($browser_today)) + $err->add($i18n->getKey('error.future_date')); + } + + // Prohibit creating entries in locked range. + if ($user->isDateLocked($selected_date)) + $err->add($i18n->getKey('error.range_locked')); + + // Prohibit creating another uncompleted record. + if ($err->no()) { + if (($not_completed_rec = ttTimeHelper::getUncompleted($user->getActiveUser())) && (($cl_finish == '') && ($cl_duration == ''))) + $err->add($i18n->getKey('error.uncompleted_exists')." ".$i18n->getKey('error.goto_uncompleted').""); + } + + // Prohibit creating an overlapping record. + if ($err->no()) { + if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) + $err->add($i18n->getKey('error.overlap')); + } + + // Insert record. + if ($err->no()) { + $id = ttTimeHelper::insert(array( + 'date' => $cl_date, + 'user_id' => $user->getActiveUser(), + 'client' => $cl_client, + 'project' => $cl_project, + 'task' => $cl_task, + 'start' => $cl_start, + 'finish' => $cl_finish, + 'duration' => $cl_duration, + 'note' => $cl_note, + 'billable' => $cl_billable)); + + // Insert a custom field if we have it. + $result = true; + if ($id && $custom_fields && $cl_cf_1) { + if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cl_cf_1); + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cl_cf_1, null); + } + if ($id && $result) { + header('Location: time.php'); + exit(); + } + $err->add($i18n->getKey('error.db')); + } + } elseif ($request->getParameter('btn_stop')) { + // Stop button pressed to finish an uncompleted record. + $record_id = $request->getParameter('record_id'); + $record = ttTimeHelper::getRecord($record_id, $user->getActiveUser()); + $browser_date = $request->getParameter('browser_date'); + $browser_time = $request->getParameter('browser_time'); + + // Can we complete this record? + if ($record['date'] == $browser_date // closing today's record + && ttTimeHelper::isValidInterval($record['start'], $browser_time) // finish time is greater than start time + && !ttTimeHelper::overlaps($user->getActiveUser(), $browser_date, $record['start'], $browser_time)) { // no overlap + $res = ttTimeHelper::update(array( + 'id'=>$record['id'], + 'date'=>$record['date'], + 'user_id'=>$user->getActiveUser(), + 'client'=>$record['client_id'], + 'project'=>$record['project_id'], + 'task'=>$record['task_id'], + 'start'=>$record['start'], + 'finish'=>$browser_time, + 'note'=>$record['comment'], + 'billable'=>$record['billable'])); + if (!$res) + $err->add($i18n->getKey('error.db')); + } else { + // Cannot complete, redirect for manual edit. + header('Location: time_edit.php?id='.$record_id); + exit(); + } + } + elseif ($request->getParameter('onBehalfUser')) { + if($user->canManageTeam()) { + unset($_SESSION['behalf_id']); + unset($_SESSION['behalf_name']); + + if($on_behalf_id != $user->id) { + $_SESSION['behalf_id'] = $on_behalf_id; + $_SESSION['behalf_name'] = ttUserHelper::getUserName($on_behalf_id); + } + header('Location: week.php'); + exit(); + } + } +} // isPost + +$week_total = ttTimeHelper::getTimeForWeek($user->getActiveUser(), $selected_date); + +// Determine selected week start and end dates. +$weekStartDay = $user->week_start; +$t_arr = localtime($selected_date->getTimestamp()); +$t_arr[5] = $t_arr[5] + 1900; +if ($t_arr[6] < $weekStartDay) + $startWeekBias = $weekStartDay - 7; +else + $startWeekBias = $weekStartDay; +$startDate = new DateAndTime(); +$startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); +$endDate = new DateAndTime(); +$endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); +// The above is needed to set date range (timestring) in page title. Consider refactoring, possibly moving into a function. + +$smarty->assign('selected_date', $selected_date); +$smarty->assign('week_total', $week_total); +$smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); +$smarty->assign('time_records', ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT))); +$smarty->assign('client_list', $client_list); +$smarty->assign('project_list', $project_list); +$smarty->assign('task_list', $task_list); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('onload', 'onLoad="fillDropdowns()"'); +$smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); + +// Prepare and assign date headers. Note how startDate moves to the end of the week, so it no longer holds correct start week value. +$smarty->assign('day_header_0', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_1', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_2', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_3', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_4', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_5', $startDate->toString($user->date_format)); +$startDate->incDay(); +$smarty->assign('day_header_6', $startDate->toString($user->date_format)); + +$smarty->assign('title', $i18n->getKey('title.time')); +$smarty->assign('content_page_name', 'week.tpl'); +$smarty->display('index.tpl'); From f9c733be2744ccc1264291760aa9b02a3c861193 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 24 Dec 2017 22:34:33 +0000 Subject: [PATCH 0213/2515] Some more work done on week view. --- WEB-INF/lib/ttTimeHelper.class.php | 67 ++++++++++++++++++++++-------- WEB-INF/templates/week.tpl | 29 +++++++------ week.php | 2 +- 3 files changed, 68 insertions(+), 30 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index ec05537f9..50904886b 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -689,17 +689,34 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { $client_field = null; if ($user->isPluginEnabled('cl')) - $client_field = ", c.id as client_id, c.name as client"; + $client_field = ', c.id as client_id, c.name as client'; + + $custom_field_1 = null; + if ($user->isPluginEnabled('cf')) { + $custom_fields = new CustomFields($user->team_id); + $cf_1_type = $custom_fields->fields[0]['type']; + if ($cf_1_type == CustomFields::TYPE_TEXT) { + $custom_field_1 = ', cfl.value as cf_1_value'; + } elseif ($cf_1_type == CustomFields::TYPE_DROPDOWN) { + $custom_field_1 = ', cfo.id as cf_1_id, cfo.value as cf_1_value'; + } + } $left_joins = " left join tt_projects p on (l.project_id = p.id)". " left join tt_tasks t on (l.task_id = t.id)"; if ($user->isPluginEnabled('cl')) $left_joins .= " left join tt_clients c on (l.client_id = c.id)"; + if ($user->isPluginEnabled('cf')) { + if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) + $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.value = cfo.id) '; + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.option_id = cfo.id) '; + } $sql = "select l.id as id, l.date as date, TIME_FORMAT(l.start, $sql_time_format) as start, TIME_FORMAT(sec_to_time(time_to_sec(l.start) + time_to_sec(l.duration)), $sql_time_format) as finish, TIME_FORMAT(l.duration, '%k:%i') as duration, p.id as project_id, p.name as project, - t.id as task_id, t.name as task, l.comment, l.billable, l.invoice_id $client_field + t.id as task_id, t.name as task, l.comment, l.billable, l.invoice_id $client_field $custom_field_1 from tt_log l $left_joins where l.date >= '$start_date' and l.date <= '$end_date' and l.user_id = $user_id and l.status = 1 @@ -719,22 +736,36 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // getGroupedRecordsForInterval - returns time records for a user for a given interval of dates grouped in an array of dates. // Example: for a week view we want one row representing the same attributes to have 7 values for each day of week. // We identify simlar records by a combination of client, billable, project, task, and custom field values. + // This will allow us to extend the feature when more custom fields are added. // - // "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" - // The above means client 546, billable, project 23456, task 27464, custom field value: example text. + // "cl:546,bl:1,pr:23456,ts:27464,cf_1:example text" + // The above means client 546, billable, project 23456, task 27464, custom field text "example text". // - // "cl:546,bl:1,pr:23456,ts:27464,cf_1:7623" - // The above means client 546, not billable, project 23456, task 27464, custom field option value 7623. - // This will allow us to extend the feature when more custom fields are added. + // "cl:546,bl:0,pr:23456,ts:27464,cf_1:7623" + // The above means client 546, not billable, project 23456, task 27464, custom field option id 7623. static function getGroupedRecordsForInterval($user_id, $start_date, $end_date) { // Start by obtaining all records in interval. // Then, iterate through them to build an array. $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); + $groupedRecords = array(); foreach ($records as $record) { - $record_identifier = ttTimeHelper::makeRecordIdentifier($record); + $record_identifier_no_suffix = ttTimeHelper::makeRecordIdentifier($record); + // Handle potential multiple records with the same attributes by using a numerical suffix. + $suffix = 0; + $record_identifier = $record_identifier_no_suffix.'_'.$suffix; + while (!empty($groupedRecords[$record_identifier][$record['date']])) { + $suffix++; + $record_identifier = $record_identifier_no_suffix.'_'.$suffix; + } + $groupedRecords[$record_identifier][$record['date']] = array('id'=>$record['id'], 'duration'=>$record['duration']); + $groupedRecords[$record_identifier]['client'] = $record['client']; + $groupedRecords[$record_identifier]['cf_1_value'] = $record['cf_1_value']; + $groupedRecords[$record_identifier]['project'] = $record['project']; + $groupedRecords[$record_identifier]['task'] = $record['task']; + $groupedRecords[$record_identifier]['billable'] = $record['billable']; } - return null; // Work in progress, not implemented. + return $groupedRecords; } // makeRecordIdentifier - builds a string identifying a record for a grouped display (such as a week view). @@ -745,20 +776,22 @@ static function getGroupedRecordsForInterval($user_id, $start_date, $end_date) { static function makeRecordIdentifier($record) { global $user; // Start with client. - if ($user->isPluginEnabled('cl')) { - $record_identifier = 'cl:'; - $record_identifier .= $record['client_id'] ? $record['client_id'] : '0'; - } + if ($user->isPluginEnabled('cl')) + $record_identifier = $record['client_id'] ? 'cl'.$record['client_id'] : ''; // Add billable flag. if (!empty($record_identifier)) $record_identifier .= ','; $record_identifier .= 'bl:'.$record['billable']; // Add project. - $record_identifier .= ',pr:'; - $record_identifier .= $record['project_id'] ? $record['project_id'] : '0'; + $record_identifier .= $record['project_id'] ? ',pr:'.$record['project_id'] : ''; // Add task. - $record_identifier .= ',ts:'; - $record_identifier .= $record['task_id'] ? $record['task_id'] : '0'; + $record_identifier .= $record['task_id'] ? ',ts:'.$record['task_id'] : ''; // Add custom field 1. This requires modifying the query to get the data we need. + if ($user->isPluginEnabled('cf')) { + if ($record['cf_1_id']) + $record_identifier .= ',cf_1:'.$record['cf_1_id']; + else if ($record['cf_1_value']) + $record_identifier .= ',cf_1:'.$record['cf_1_value']; + } return $record_identifier; } diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index fff4bfa4b..d919fd143 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -37,14 +37,14 @@ diff --git a/week.php b/week.php index dea27e33b..fd7af524c 100644 --- a/week.php +++ b/week.php @@ -369,7 +369,10 @@ $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); -$smarty->assign('grouped_records', ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT))); +$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +$smarty->assign('grouped_records', $groupedRecords); +$smarty->assign('grouped_records_totals', ttTimeHelper::getGroupedRecordsTotals($groupedRecords)); + $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list); @@ -378,19 +381,26 @@ $smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); // Prepare and assign date headers. Note how startDate moves to the end of the week, so it no longer holds correct start week value. -$smarty->assign('day_header_0', $startDate->toString($user->date_format)); +$smarty->assign('date_0', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_0', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_1', $startDate->toString($user->date_format)); +$smarty->assign('date_1', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_1', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_2', $startDate->toString($user->date_format)); +$smarty->assign('date_2', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_2', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_3', $startDate->toString($user->date_format)); +$smarty->assign('date_3', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_3', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_4', $startDate->toString($user->date_format)); +$smarty->assign('date_4', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_4', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_5', $startDate->toString($user->date_format)); +$smarty->assign('date_5', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_5', $startDate->getDate()); $startDate->incDay(); -$smarty->assign('day_header_6', $startDate->toString($user->date_format)); +$smarty->assign('date_6', $startDate->toString(DB_DATEFORMAT)); +$smarty->assign('day_header_6', $startDate->getDate()); $smarty->assign('title', $i18n->getKey('title.time')); $smarty->assign('content_page_name', 'week.tpl'); From 5d1ba7b0e49a18115a754b9e64415940a56d7b1b Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 25 Dec 2017 13:51:09 +0000 Subject: [PATCH 0215/2515] A little formatting fix to keep totals on week view nicer. --- WEB-INF/lib/ttTimeHelper.class.php | 4 +--- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 48ebdc918..f5edc5fa7 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -160,13 +160,11 @@ static function toMinutes($value) { return (int)@$time_a[1] + ((int)@$time_a[0]) * 60; } - // toAbsDuration - converts a number of minutes to format 00:00 + // toAbsDuration - converts a number of minutes to format 0:00 // even if $minutes is negative. static function toAbsDuration($minutes){ $hours = (string)((int)abs($minutes / 60)); $mins = (string)(abs($minutes % 60)); - if (strlen($hours) == 1) - $hours = '0'.$hours; if (strlen($mins) == 1) $mins = '0' . $mins; return $hours.':'.$mins; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 04af17ed8..254636250 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-{if $time_records} +{if $grouped_records} - {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - + {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} + {/if} - {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - + {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} @@ -54,16 +54,21 @@ - {foreach $time_records as $record} + {foreach $grouped_records as $record} - {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - + {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} + {/if} - {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - + {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} - - + + + + + + + {/foreach}
{$i18n.label.project}{$i18n.label.task}{$day_header_0} {$day_header_1}{$day_header_5} {$day_header_6}
{$record.project|escape}{$record.project|escape}

{$record.client|escape}

{$record.task|escape}{$record.task|escape}

{$record.cf_1_value|escape}

{$record.date}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{$record.$day_header_0.duration}{$record.$day_header_1.duration}{$record.$day_header_2.duration}{$record.$day_header_3.duration}{$record.$day_header_4.duration}{$record.$day_header_5.duration}{$record.$day_header_6.duration}
diff --git a/week.php b/week.php index c2e85161b..dea27e33b 100644 --- a/week.php +++ b/week.php @@ -369,7 +369,7 @@ $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); -$smarty->assign('time_records', ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT))); +$smarty->assign('grouped_records', ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT))); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list); From 26f9b4e344163cc2a843f48c3163653b94b32911 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 25 Dec 2017 00:37:11 +0000 Subject: [PATCH 0214/2515] Improved week view slightly. --- WEB-INF/lib/ttTimeHelper.class.php | 19 +++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 29 ++++++++++++++++++++++------- week.php | 26 ++++++++++++++++++-------- 4 files changed, 60 insertions(+), 16 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 50904886b..48ebdc918 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -795,4 +795,23 @@ static function makeRecordIdentifier($record) { return $record_identifier; } + + // getGroupedRecordsTotals - returns day totals for grouped records. + static function getGroupedRecordsTotals($groupedRecords) { + $groupedRecordsTotals = array(); + foreach ($groupedRecords as $groupedRecord) { + foreach($groupedRecord as $key => $dayEntry) { + if ($dayEntry['duration']) { + $minutes = ttTimeHelper::toMinutes($dayEntry['duration']); + $groupedRecordsTotals[$key] += $minutes; + } + } + } + // Convert minutes to hh:mm for display. + foreach ($groupedRecordsTotals as $key => $single_total) { + $groupedRecordsTotals[$key] = ttTimeHelper::toAbsDuration($single_total); + } + + return $groupedRecordsTotals; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index be7b43fec..04af17ed8 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - - - - - - - + + + + + + + {/foreach} + + {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} + + {/if} + {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + + + + + + + +
 Anuko Time Tracker 1.12.3.3687 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3688 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index d919fd143..b120c49b4 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -62,15 +62,30 @@ {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {$record.task|escape}

{$record.cf_1_value|escape}

{$record.$day_header_0.duration}{$record.$day_header_1.duration}{$record.$day_header_2.duration}{$record.$day_header_3.duration}{$record.$day_header_4.duration}{$record.$day_header_5.duration}{$record.$day_header_6.duration}{$record.$date_0.duration}{$record.$date_1.duration}{$record.$date_2.duration}{$record.$date_3.duration}{$record.$date_4.duration}{$record.$date_5.duration}{$record.$date_6.duration}
{$grouped_records_totals.$date_0}{$grouped_records_totals.$date_1}{$grouped_records_totals.$date_2}{$grouped_records_totals.$date_3}{$grouped_records_totals.$date_4}{$grouped_records_totals.$date_5}{$grouped_records_totals.$date_6}
{/if}
- \n"; } + // Print footers. + if (($this->mInteractive && (count($this->mFooters) > 1)) || (!$this->mInteractive && (count($this->mFooters) > 0))) { + $html .= "mRowOptions) > 0) { + foreach ($this->mRowOptions as $k=>$v) { + $html .= " $k=\"$v\""; + } + } + $html .= ">\n"; + foreach ($this->mFooters as $footer) { + $html .= "mHeaderOptions) > 0) { + foreach ($this->mHeaderOptions as $k=>$v) { + $html .= " $k=\"$v\""; + } + } + $html .= ">$footer\n"; + } + $html .= "\n"; + } + $html .= "
 Anuko Time Tracker 1.12.3.3688 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3689 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6612729419c6637b8f962ba8621c2c2a2179cbcd Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 25 Dec 2017 15:39:21 +0000 Subject: [PATCH 0216/2515] Cosmetic, whitespace. --- WEB-INF/lib/form/Table.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 78fddf504..64df89051 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -88,7 +88,7 @@ function getValueAt($rowindex, $colindex) { return @$this->mData[$rowindex][$this->mColumnFields[$colindex]]; } - function getValueAtName($rowindex,$fieldname) { + function getValueAtName($rowindex, $fieldname) { if (!$this->mProccessed) $this->_process(); return @$this->mData[$rowindex][$fieldname]; } From a54eb1d17cccdf772ee46a2c1447b580cd532368 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 25 Dec 2017 16:07:38 +0000 Subject: [PATCH 0217/2515] Cosmetic. Whitespace. --- WEB-INF/lib/form/Table.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 64df89051..fa58b7869 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -131,7 +131,7 @@ function getHtml() { $html .= ">\n"; // Print headers. - if (($this->mInteractive && (count($this->mHeaders) > 1)) || (!$this->mInteractive && (count($this->mHeaders) > 0))) { + if (($this->mInteractive && (count($this->mHeaders) > 1)) || (!$this->mInteractive && (count($this->mHeaders) > 0))) { $html .= "mRowOptions) > 0) { foreach ($this->mRowOptions as $k=>$v) { From f4647b2cf4e71f6427d6a0c2886fe747d5aed098 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 14:17:19 +0000 Subject: [PATCH 0218/2515] Added an optional column footer to tables. --- WEB-INF/lib/form/Table.class.php | 23 +++++++++++++++++++++++ WEB-INF/lib/form/TableColumn.class.php | 17 ++++++++++++----- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index fa58b7869..e5aed81dc 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -34,6 +34,7 @@ class Table extends FormElement { var $mColumns = array(); // array of columns in table var $mData = null; // array of rows with data for column cells var $mHeaders = array(); // column headers + var $mFooters = array(); // column footers var $mInteractive = true; // adds a clickable checkbox column to table var $mIAScript = null; // sctipt to execute when a checkbox is clicked var $mKeyField = ''; // identifies a column used as key to access row data @@ -110,6 +111,7 @@ function _process() { foreach ($this->mColumns as $column) { $this->mColumnFields[] = $column->getField(); $this->mHeaders[] = $column->getHeader(); + $this->mFooters[] = $column->getFooter(); } } @@ -176,6 +178,27 @@ function getHtml() { $html .= "
"; return $html; } diff --git a/WEB-INF/lib/form/TableColumn.class.php b/WEB-INF/lib/form/TableColumn.class.php index 06cad0514..cb4bebf1b 100644 --- a/WEB-INF/lib/form/TableColumn.class.php +++ b/WEB-INF/lib/form/TableColumn.class.php @@ -28,8 +28,13 @@ import('form.DefaultCellRenderer'); +// TableColumn class represents a single column in a table. class TableColumn { - var $mTitle = ""; + var $colHeader = ''; // Column header. + var $colFooter = ''; // Column footer, example: totals in week view. + +// TODO: refactoring ongoing down from here. + var $mIndexField = ""; var $mRenderer = null; var $mWidth = ""; @@ -37,9 +42,10 @@ class TableColumn { var $mBgColor = "#ffffff"; var $mFgColor = "#000000"; - function __construct($indexField, $title="",$renderer=null) { + function __construct($indexField, $header = '', $renderer = null, $footer = '') { $this->mIndexField = $indexField; - $this->mTitle = $title; + $this->colHeader = $header; + $this->colFooter = $footer; if ($renderer!=null) { $this->mRenderer = $renderer; } else { @@ -47,8 +53,9 @@ function __construct($indexField, $title="",$renderer=null) { } } - function getHeader() { return $this->mTitle; } - + function getHeader() { return $this->colHeader; } + function getFooter() { return $this->colFooter; } + function getField() { return $this->mIndexField; } function setTable(&$table) { $this->mTable = &$table; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 254636250..345ef3793 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.12.3.3689 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3690 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b363b0ad58a3671563975206704a4d9aa354a92f Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 14:21:06 +0000 Subject: [PATCH 0219/2515] Added a couple of test files for experimentation with rendering of tables. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/table_test.tpl | 12 ++++ table_test.php | 118 +++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/templates/table_test.tpl create mode 100644 table_test.php diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 345ef3793..7c5de9581 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.12.3.3690 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3691 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/table_test.tpl b/WEB-INF/templates/table_test.tpl new file mode 100644 index 000000000..cf7e4b2ba --- /dev/null +++ b/WEB-INF/templates/table_test.tpl @@ -0,0 +1,12 @@ +{$forms.weekTimeForm.open} + + + + +
{$forms.weekTimeForm.week_durations.control}
+ + + + +
{$forms.weekTimeForm.btn_submit.control}
+{$forms.weekTimeForm.close} diff --git a/table_test.php b/table_test.php new file mode 100644 index 000000000..d4b21c74c --- /dev/null +++ b/table_test.php @@ -0,0 +1,118 @@ + 'something goes here too', // Row ideentifier. + 'label' => 'This is a label for row 0', + 'day_0' => array('id' => '0_0', 'duration' => '00:00'), + 'day_1' => array('id' => '0_1', 'duration' => '01:00'), + 'day_2' => array('id' => '0_2', 'duration' => '02:00'), + 'day_3' => array('id' => '0_3', 'duration' => null), + 'day_4' => array('id' => '0_4', 'duration' => '04:00') + ), + array( // Row 1. + 'label' => 'This is a label for row 1', + 'day_0' => array('id' => '1_0', 'duration' => '00:30'), + 'day_1' => array('id' => '1_1', 'duration' => '01:30'), + 'day_2' => array('id' => '1_2', 'duration' => '02:30'), + ) +); + +$totals = array( + 'label' => 'Total:', + 'day_0' => '00:30', + 'day_1' => '02:30', + 'day_2' => '04:30', + 'day_3' => null, + 'day_4' => '04:00', + 'day_5' => null, + 'day_6' => null +); + +// Define rendering class for a label field to the left of durations. +class LabelCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + $this->setOptions(array('width'=>200,'valign'=>'middle')); + $this->setValue(htmlspecialchars($value)); + return $this->toString(); + } +} + +// Define rendering class for a single cell for time entry in week view table. +class TimeCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + $field_name = $table->getValueAtName($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). + $field = new TextField($field_name); + $field->setFormName($table->getFormName()); + $field->setSize(2); + $field->setValue($table->getValueAt($row,$column)['duration']); + $this->setValue($field->getHtml()); + return $this->toString(); + } +} + +// Elements of weekTimeForm. +$form = new Form('weekTimeForm'); + +// Create week_durations table. +$table = new Table('week_durations'); +// $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. +$table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); +$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); +$table->setData($durations_with_labels); +// Add columns to table. +$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $totals['label'])); +$table->addColumn(new TableColumn('day_0', 'day 0', new TimeCellRenderer(), $totals['day_0'])); +$table->addColumn(new TableColumn('day_1', 'day 1', new TimeCellRenderer(), $totals['day_1'])); +$table->addColumn(new TableColumn('day_2', 'day 2', new TimeCellRenderer(), $totals['day_2'])); +$table->addColumn(new TableColumn('day_3', 'day 3', new TimeCellRenderer(), $totals['day_3'])); +$table->addColumn(new TableColumn('day_4', 'day 4', new TimeCellRenderer(), $totals['day_4'])); +$table->addColumn(new TableColumn('day_5', 'day 5', new TimeCellRenderer())); +$table->addColumn(new TableColumn('day_6', 'day 6', new TimeCellRenderer())); +$table->setInteractive(false); +$form->addInputElement($table); + +$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit'))); + +// Submit. +if ($request->isPost()) { + if ($request->getParameter('btn_submit')) { + } +} + +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('title', $i18n->getKey('title.time')); +$smarty->assign('content_page_name', 'table_test.tpl'); +$smarty->display('index.tpl'); From 9df2c85d1cd3337978dcb72d5f12c602f2588cb7 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 14:37:56 +0000 Subject: [PATCH 0220/2515] Added a helper function to build an array of day headears for week view. --- WEB-INF/lib/ttTimeHelper.class.php | 47 ++++++++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index f5edc5fa7..d186696de 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -766,6 +766,32 @@ static function getGroupedRecordsForInterval($user_id, $start_date, $end_date) { return $groupedRecords; } + /* This is work in progress, not working properly. + static function getDurationsForWeek($user_id, $start_date, $end_date) { + // Start by obtaining all records in interval. + // Then, iterate through them to build an array. + $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); + $durations_with_labels = array(); + + foreach ($records as $record) { + $record_id_no_suffix = ttTimeHelper::makeRecordIdentifier($record); + // Handle potential multiple records with the same attributes by using a numerical suffix. + $suffix = 0; + $record_id = $record_id_no_suffix.'_'.$suffix; + while (!empty($durations_with_labels[$record_id][$record['date']])) { + $suffix++; + $record_id = $record_id_no_suffix.'_'.$suffix; + } + $groupedRecords[$record_identifier][$record['date']] = array('id'=>$record['id'], 'duration'=>$record['duration']); + $groupedRecords[$record_identifier]['client'] = $record['client']; + $groupedRecords[$record_identifier]['cf_1_value'] = $record['cf_1_value']; + $groupedRecords[$record_identifier]['project'] = $record['project']; + $groupedRecords[$record_identifier]['task'] = $record['task']; + $groupedRecords[$record_identifier]['billable'] = $record['billable']; + } + } + */ + // makeRecordIdentifier - builds a string identifying a record for a grouped display (such as a week view). // For example: // "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" @@ -812,4 +838,25 @@ static function getGroupedRecordsTotals($groupedRecords) { return $groupedRecordsTotals; } + + // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. + static function getDayHeadersForWeek($start_date) { + $dayHeaders = array(); + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + $dayHeaders['day_header_0'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_1'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_2'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_3'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_4'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_5'] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders['day_header_6'] = $objDate->getDate(); + unset($objDate); + return $dayHeaders; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7c5de9581..7f933a095 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.12.3.3691 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3692 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From bdbadef4880db22d573cc3f154af3eb833942d56 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 14:49:47 +0000 Subject: [PATCH 0221/2515] Checking in work in progress on week view for safe keep. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 15 ++-- week.php | 128 ++++++++++++++++++++++++++++++----- 3 files changed, 122 insertions(+), 23 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7f933a095..d94d66249 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.12.3.3692 | Copyright © Anuko | +  Anuko Time Tracker 1.12.3.3693 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index b120c49b4..0d279ec6b 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -6,7 +6,7 @@ } -{$forms.timeRecordForm.open} +{$forms.weekTimeForm.open} {if defined(WEEK_VIEW_DEBUG)} @@ -21,18 +21,23 @@ {if $on_behalf_control} - + {/if}
{$i18n.label.user}:{$forms.timeRecordForm.onBehalfUser.control}{$forms.weekTimeForm.onBehalfUser.control}
- +
{$forms.timeRecordForm.date.control}
{$forms.weekTimeForm.date.control}
+ + + + +
{$forms.weekTimeForm.week_durations.control}
@@ -113,7 +118,7 @@ -->
- +
{$forms.timeRecordForm.btn_submit.control}{$forms.weekTimeForm.btn_submit.control}
-{$forms.timeRecordForm.close} +{$forms.weekTimeForm.close} diff --git a/week.php b/week.php index fd7af524c..9e1d51805 100644 --- a/week.php +++ b/week.php @@ -28,6 +28,8 @@ require_once('initialize.php'); import('form.Form'); +import('form.DefaultCellRenderer'); +import('form.Table'); import('ttUserHelper'); import('ttTeamHelper'); import('ttClientHelper'); @@ -40,7 +42,6 @@ exit(); } -// TODO: redo this block to use week start date instead. // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); $selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); @@ -50,6 +51,92 @@ $cl_date = $selected_date->toString(DB_DATEFORMAT); $_SESSION['date'] = $cl_date; +// Determine selected week start and end dates. +$weekStartDay = $user->week_start; +$t_arr = localtime($selected_date->getTimestamp()); +$t_arr[5] = $t_arr[5] + 1900; +if ($t_arr[6] < $weekStartDay) + $startWeekBias = $weekStartDay - 7; +else + $startWeekBias = $weekStartDay; +$startDate = new DateAndTime(); +$startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); +$endDate = new DateAndTime(); +$endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); +// The above is needed to set date range (timestring) in page title. + +// Get column headers. +$dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); + +// TODO: replace these two sample arrays with real data. +$durations_with_labels = array( + array( // Row 0. + 'id' => 'something goes here too', // Row identifier. + 'label' => 'This is a label for row 0', + 'day_0' => array('id' => '0_0', 'duration' => '00:00'), + 'day_1' => array('id' => '0_1', 'duration' => '01:00'), + 'day_2' => array('id' => '0_2', 'duration' => '02:00'), + 'day_3' => array('id' => '0_3', 'duration' => null), + 'day_4' => array('id' => '0_4', 'duration' => '04:00') + ), + array( // Row 1. + 'label' => 'This is a label for row 1', + 'day_0' => array('id' => '1_0', 'duration' => '00:30'), + 'day_1' => array('id' => '1_1', 'duration' => '01:30'), + 'day_2' => array('id' => '1_2', 'duration' => '02:30'), + ) +); + +$totals = array( + 'label' => 'Total:', + 'day_0' => '00:30', + 'day_1' => '02:30', + 'day_2' => '04:30', + 'day_3' => null, + 'day_4' => '04:00', + 'day_5' => null, + 'day_6' => null +); + +// Define rendering class for a label field to the left of durations. +class LabelCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + $this->setOptions(array('width'=>200,'valign'=>'middle')); + $this->setValue(htmlspecialchars($value)); + return $this->toString(); + } +} + +// Define rendering class for a single cell for time entry in week view table. +class TimeCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + $field_name = $table->getValueAtName($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). + $field = new TextField($field_name); + $field->setFormName($table->getFormName()); + $field->setSize(2); + $field->setValue($table->getValueAt($row,$column)['duration']); + $this->setValue($field->getHtml()); + return $this->toString(); + } +} + + + + + + +//$durations = ttTimeHelper::getDurationsForWeek($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); + + + +$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); + + + + + +$dayTotals = ttTimeHelper::getGroupedRecordsTotals($groupedRecords); + // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); @@ -95,8 +182,8 @@ $cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -// Elements of timeRecordForm. -$form = new Form('timeRecordForm'); +// Elements of weekTimeForm. +$form = new Form('weekTimeForm'); if ($user->canManageTeam()) { $user_list = ttTeamHelper::getActiveUsers(array('putSelfFirst'=>true)); @@ -112,6 +199,25 @@ } } +// Create week_durations table. +$table = new Table('week_durations'); +// $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. +$table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); +$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); +$table->setData($durations_with_labels); +// Add columns to table. +$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $totals['label'])); +$table->addColumn(new TableColumn('day_0', $dayHeaders['day_header_0'], new TimeCellRenderer(), $totals['day_0'])); +$table->addColumn(new TableColumn('day_1', $dayHeaders['day_header_1'], new TimeCellRenderer(), $totals['day_1'])); +$table->addColumn(new TableColumn('day_2', $dayHeaders['day_header_2'], new TimeCellRenderer(), $totals['day_2'])); +$table->addColumn(new TableColumn('day_3', $dayHeaders['day_header_3'], new TimeCellRenderer(), $totals['day_3'])); +$table->addColumn(new TableColumn('day_4', $dayHeaders['day_header_4'], new TimeCellRenderer(), $totals['day_4'])); +$table->addColumn(new TableColumn('day_5', $dayHeaders['day_header_5'], new TimeCellRenderer())); +$table->addColumn(new TableColumn('day_6', $dayHeaders['day_header_6'], new TimeCellRenderer())); +$table->setInteractive(false); +$form->addInputElement($table); + + // Dropdown for clients in MODE_TIME. Use all active clients. if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) { $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); @@ -352,24 +458,12 @@ $week_total = ttTimeHelper::getTimeForWeek($user->getActiveUser(), $selected_date); -// Determine selected week start and end dates. -$weekStartDay = $user->week_start; -$t_arr = localtime($selected_date->getTimestamp()); -$t_arr[5] = $t_arr[5] + 1900; -if ($t_arr[6] < $weekStartDay) - $startWeekBias = $weekStartDay - 7; -else - $startWeekBias = $weekStartDay; -$startDate = new DateAndTime(); -$startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); -$endDate = new DateAndTime(); -$endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); -// The above is needed to set date range (timestring) in page title. Consider refactoring, possibly moving into a function. + $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); -$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +//$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); $smarty->assign('grouped_records', $groupedRecords); $smarty->assign('grouped_records_totals', ttTimeHelper::getGroupedRecordsTotals($groupedRecords)); From 7df94ddee8feb9bc19b681f2b58fc547df622c9b Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 19:22:56 +0000 Subject: [PATCH 0222/2515] Initial implementation of a simple week view. --- WEB-INF/lib/ttTimeHelper.class.php | 109 +++++++++++++++++++++--- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/time.tpl | 2 - WEB-INF/templates/week.tpl | 78 +---------------- table_test.php | 2 +- week.php | 132 +++++++++++++++-------------- 6 files changed, 168 insertions(+), 157 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index d186696de..ff3399ca5 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -766,31 +766,57 @@ static function getGroupedRecordsForInterval($user_id, $start_date, $end_date) { return $groupedRecords; } - /* This is work in progress, not working properly. - static function getDurationsForWeek($user_id, $start_date, $end_date) { + // getDataForWeekView - builds an array to render a table of durations for week view. + static function getDataForWeekView($user_id, $start_date, $end_date) { // Start by obtaining all records in interval. - // Then, iterate through them to build an array. $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); - $durations_with_labels = array(); + $dataArray = array(); + + // Iterate through records and build $dataArray cell by cell. foreach ($records as $record) { + // Create record id without suffix. $record_id_no_suffix = ttTimeHelper::makeRecordIdentifier($record); // Handle potential multiple records with the same attributes by using a numerical suffix. $suffix = 0; $record_id = $record_id_no_suffix.'_'.$suffix; - while (!empty($durations_with_labels[$record_id][$record['date']])) { + $day_header = substr($record['date'], 8); // Day number in month. + while (ttTimeHelper::cellExists($record_id, $day_header, $dataArray)) { $suffix++; $record_id = $record_id_no_suffix.'_'.$suffix; } - $groupedRecords[$record_identifier][$record['date']] = array('id'=>$record['id'], 'duration'=>$record['duration']); - $groupedRecords[$record_identifier]['client'] = $record['client']; - $groupedRecords[$record_identifier]['cf_1_value'] = $record['cf_1_value']; - $groupedRecords[$record_identifier]['project'] = $record['project']; - $groupedRecords[$record_identifier]['task'] = $record['task']; - $groupedRecords[$record_identifier]['billable'] = $record['billable']; + // Find row. + $pos = ttTimeHelper::findRow($record_id, $dataArray); + if ($pos < 0) { + $dataArray[] = array('id' => $record_id,'label' => ttTimeHelper::makeRecordLabel($record)); // Insert row. + $pos = ttTimeHelper::findRow($record_id, $dataArray); + } + // Insert cell data from $record. + $dataArray[$pos][$day_header] = array('id' => $record['id'],'duration' => $record['duration']); } + return $dataArray; + } + + // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label + // and a day header already exists. + static function cellExists($record_id, $day_header, $dataArray) { + foreach($dataArray as $row) { + if ($row['id'] == $record_id && !empty($row[$day_header]['duration'])) + return true; + } + return false; + } + + // findRow returns an existing row position in $dataArray, -1 otherwise. + static function findRow($record_id, $dataArray) { + $pos = 0; // Row position in array. + foreach($dataArray as $row) { + if ($row['id'] == $record_id) + return $pos; + $pos++; // Increment for search. + } + return -1; // Row not found. } - */ // makeRecordIdentifier - builds a string identifying a record for a grouped display (such as a week view). // For example: @@ -820,6 +846,39 @@ static function makeRecordIdentifier($record) { return $record_identifier; } + // makeRecordLabel - builds a human readable label for a row in week view, + // which is a combination ot record properties. + // Client - Project - Task - Custom field 1. + // Note that billable property is not part of the label. Instead, we intend to + // identify such records with a different color in week view. + static function makeRecordLabel($record) { + // TODO: debug this function. + global $user; + // Start with client. + if ($user->isPluginEnabled('cl')) + $label = $record['client']; + + // Add project. + $project = $record['project'] ? $record['project'] : ''; + if (!empty($label)) $label .= ' - '; + $label .= $project; + + // Add task. + $task = $record['task'] ? $record['task'] : ''; + if (!empty($label)) $label .= ' - '; + $label .= $task; + + // Add custom field 1. + if ($user->isPluginEnabled('cf')) { + if ($record['cf_1_value']) { + if (!empty($label)) $label .= ' - '; + $label .= $record['cf_1_value']; + } + } + + return $label; + } + // getGroupedRecordsTotals - returns day totals for grouped records. static function getGroupedRecordsTotals($groupedRecords) { $groupedRecordsTotals = array(); @@ -843,7 +902,7 @@ static function getGroupedRecordsTotals($groupedRecords) { static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $dayHeaders['day_header_0'] = $objDate->getDate(); + $dayHeaders['day_header_0'] = (string)$objDate->getDate(); // It returns an int on first call. Why? $objDate->incDay(); $dayHeaders['day_header_1'] = $objDate->getDate(); $objDate->incDay(); @@ -859,4 +918,28 @@ static function getDayHeadersForWeek($start_date) { unset($objDate); return $dayHeaders; } + + // getDayTotals calculates total durations for each day from the existing data in $dataArray. + static function getDayTotals($dataArray, $dayHeaders) { + $dayTotals = array(); + + // Insert label. + global $i18n; + $dayTotals['label'] = $i18n->getKey('label.total'); + + foreach ($dataArray as $row) { + foreach($dayHeaders as $dayHeader) { + if (array_key_exists($dayHeader, $row)) { + $minutes = ttTimeHelper::toMinutes($row[$dayHeader]['duration']); + $dayTotals[$dayHeader] += $minutes; + } + } + } + // Convert minutes to hh:mm for display. + foreach($dayHeaders as $dayHeader) { + $dayTotals[$dayHeader] = ttTimeHelper::toAbsDuration($dayTotals[$dayHeader]); + } + return $dayTotals; + } } + diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d94d66249..aafa107ba 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.12.3.3693 | Copyright © Anuko | +  Anuko Time Tracker 1.13.3.3694 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index d5db36a0c..182f0127b 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -8,13 +8,11 @@ {$forms.timeRecordForm.open} -{if defined(WEEK_VIEW_DEBUG)} -{/if}
{$i18n.label.day_view} / {$i18n.label.week_view}
diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 0d279ec6b..4abfa3799 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -38,87 +38,11 @@
{$forms.weekTimeForm.week_durations.control}
- - - - - -
-{if $grouped_records} - - - {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} - - {/if} - {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - {/if} - - - - - - - - - {foreach $grouped_records as $record} - - {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} - - {/if} - {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - {/if} - - - - - - - - - {/foreach} - - {if ($user->isPluginEnabled('cl') || ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode))} - - {/if} - {if ($user->isPluginEnabled('cf') || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - - {/if} - - - - - - - - -
{$day_header_0}{$day_header_1}{$day_header_2}{$day_header_3}{$day_header_4}{$day_header_5}{$day_header_6}
{$record.project|escape}

{$record.client|escape}

{$record.task|escape}

{$record.cf_1_value|escape}

{$record.$date_0.duration}{$record.$date_1.duration}{$record.$date_2.duration}{$record.$date_3.duration}{$record.$date_4.duration}{$record.$date_5.duration}{$record.$date_6.duration}
{$grouped_records_totals.$date_0}{$grouped_records_totals.$date_1}{$grouped_records_totals.$date_2}{$grouped_records_totals.$date_3}{$grouped_records_totals.$date_4}{$grouped_records_totals.$date_5}{$grouped_records_totals.$date_6}
-{/if} -
{$forms.weekTimeForm.btn_submit.control}
+--> {$forms.weekTimeForm.close} diff --git a/table_test.php b/table_test.php index d4b21c74c..f8b4c7251 100644 --- a/table_test.php +++ b/table_test.php @@ -73,7 +73,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Define rendering class for a single cell for time entry in week view table. class TimeCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - $field_name = $table->getValueAtName($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). + $field_name = $table->getValueAt($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); $field->setFormName($table->getFormName()); $field->setSize(2); diff --git a/week.php b/week.php index 9e1d51805..a3f30cbc4 100644 --- a/week.php +++ b/week.php @@ -65,8 +65,64 @@ $endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); // The above is needed to set date range (timestring) in page title. +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields($user->team_id); + $smarty->assign('custom_fields', $custom_fields); +} + +// TODO: how is this plugin supposed to work for week view? +if ($user->isPluginEnabled('mq')){ + require_once('plugins/MonthlyQuota.class.php'); + $quota = new MonthlyQuota(); + $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); + $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); + $minutes_left = ttTimeHelper::toMinutes($month_quota) - ttTimeHelper::toMinutes($month_total); + + $smarty->assign('month_total', $month_total); + $smarty->assign('over_quota', $minutes_left < 0); + $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); +} + +// Initialize variables. +// Custom field. +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$_SESSION['cf_1'] = $cl_cf_1; +$cl_billable = 1; +if ($user->isPluginEnabled('iv')) { + if ($request->isPost()) { + $cl_billable = $request->getParameter('billable'); + $_SESSION['billable'] = (int) $cl_billable; + } else + if (isset($_SESSION['billable'])) + $cl_billable = $_SESSION['billable']; +} +$on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); +$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); +$_SESSION['client'] = $cl_client; +$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); +$_SESSION['project'] = $cl_project; +$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); +$_SESSION['task'] = $cl_task; + + + + + + + + + + + + // Get column headers. $dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); +// Build data array for the table. +$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +// Build day totals. +$dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); // TODO: replace these two sample arrays with real data. $durations_with_labels = array( @@ -120,67 +176,17 @@ function render(&$table, $value, $row, $column, $selected = false) { } } - - - - - //$durations = ttTimeHelper::getDurationsForWeek($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); - +//$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +//$dayTotals = ttTimeHelper::getGroupedRecordsTotals($groupedRecords); -$dayTotals = ttTimeHelper::getGroupedRecordsTotals($groupedRecords); -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields($user->team_id); - $smarty->assign('custom_fields', $custom_fields); -} - -// TODO: how is this plugin supposed to work for week view? -if ($user->isPluginEnabled('mq')){ - require_once('plugins/MonthlyQuota.class.php'); - $quota = new MonthlyQuota(); - $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); - $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); - $minutes_left = ttTimeHelper::toMinutes($month_quota) - ttTimeHelper::toMinutes($month_total); - - $smarty->assign('month_total', $month_total); - $smarty->assign('over_quota', $minutes_left < 0); - $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); -} - -// Initialize variables. -$cl_start = trim($request->getParameter('start')); -$cl_finish = trim($request->getParameter('finish')); -$cl_duration = trim($request->getParameter('duration')); -$cl_note = trim($request->getParameter('note')); -// Custom field. -$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); -$_SESSION['cf_1'] = $cl_cf_1; -$cl_billable = 1; -if ($user->isPluginEnabled('iv')) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; -} -$on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); -$_SESSION['task'] = $cl_task; // Elements of weekTimeForm. $form = new Form('weekTimeForm'); @@ -204,16 +210,16 @@ function render(&$table, $value, $row, $column, $selected = false) { // $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); -$table->setData($durations_with_labels); +$table->setData($dataArray); // $durations_with_labels); // Add columns to table. -$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $totals['label'])); -$table->addColumn(new TableColumn('day_0', $dayHeaders['day_header_0'], new TimeCellRenderer(), $totals['day_0'])); -$table->addColumn(new TableColumn('day_1', $dayHeaders['day_header_1'], new TimeCellRenderer(), $totals['day_1'])); -$table->addColumn(new TableColumn('day_2', $dayHeaders['day_header_2'], new TimeCellRenderer(), $totals['day_2'])); -$table->addColumn(new TableColumn('day_3', $dayHeaders['day_header_3'], new TimeCellRenderer(), $totals['day_3'])); -$table->addColumn(new TableColumn('day_4', $dayHeaders['day_header_4'], new TimeCellRenderer(), $totals['day_4'])); -$table->addColumn(new TableColumn('day_5', $dayHeaders['day_header_5'], new TimeCellRenderer())); -$table->addColumn(new TableColumn('day_6', $dayHeaders['day_header_6'], new TimeCellRenderer())); +$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); +$table->addColumn(new TableColumn($dayHeaders['day_header_0'], $dayHeaders['day_header_0'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_0']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_1'], $dayHeaders['day_header_1'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_1']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_2'], $dayHeaders['day_header_2'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_2']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_3'], $dayHeaders['day_header_3'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_3']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_4'], $dayHeaders['day_header_4'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_4']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_5'], $dayHeaders['day_header_5'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_5']])); +$table->addColumn(new TableColumn($dayHeaders['day_header_6'], $dayHeaders['day_header_6'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_6']])); $table->setInteractive(false); $form->addInputElement($table); @@ -464,8 +470,8 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); //$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -$smarty->assign('grouped_records', $groupedRecords); -$smarty->assign('grouped_records_totals', ttTimeHelper::getGroupedRecordsTotals($groupedRecords)); +//$smarty->assign('grouped_records', $groupedRecords); +//$smarty->assign('grouped_records_totals', ttTimeHelper::getGroupedRecordsTotals($groupedRecords)); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); From 6578f26181e52e55c0e5451dfb1b802673289b9f Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 19:36:20 +0000 Subject: [PATCH 0223/2515] Fixed labels for week view. --- WEB-INF/lib/ttTimeHelper.class.php | 17 ++++++----------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index ff3399ca5..489595629 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -852,28 +852,23 @@ static function makeRecordIdentifier($record) { // Note that billable property is not part of the label. Instead, we intend to // identify such records with a different color in week view. static function makeRecordLabel($record) { - // TODO: debug this function. global $user; // Start with client. if ($user->isPluginEnabled('cl')) $label = $record['client']; // Add project. - $project = $record['project'] ? $record['project'] : ''; - if (!empty($label)) $label .= ' - '; - $label .= $project; + if (!empty($label) && !empty($record['project'])) $label .= ' - '; + $label .= $record['project']; // Add task. - $task = $record['task'] ? $record['task'] : ''; - if (!empty($label)) $label .= ' - '; - $label .= $task; + if (!empty($label) && !empty($record['task'])) $label .= ' - '; + $label .= $record['task']; // Add custom field 1. if ($user->isPluginEnabled('cf')) { - if ($record['cf_1_value']) { - if (!empty($label)) $label .= ' - '; - $label .= $record['cf_1_value']; - } + if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - '; + $label .= $record['cf_1_value']; } return $label; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index aafa107ba..3f894c72c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.3.3694 | Copyright © Anuko | +  Anuko Time Tracker 1.13.3.3695 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 94b8b32ce9a0578c7c3f365b744174000a6f378b Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 20:03:43 +0000 Subject: [PATCH 0224/2515] Alignment fix. --- week.php | 1 + 1 file changed, 1 insertion(+) diff --git a/week.php b/week.php index a3f30cbc4..e237bc710 100644 --- a/week.php +++ b/week.php @@ -209,6 +209,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $table = new Table('week_durations'); // $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); +$table->setHeaderOptions(array('align'=>'center')); // TODO: use a class and CSS instead, perhaps a separate class for footer. $table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); $table->setData($dataArray); // $durations_with_labels); // Add columns to table. From 0e6a98c88343858e870765390e9d802eda764604 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 26 Dec 2017 23:32:17 +0000 Subject: [PATCH 0225/2515] Fixed week view headers for single digit days. --- WEB-INF/lib/ttTimeHelper.class.php | 6 ++++-- WEB-INF/templates/footer.tpl | 2 +- week.php | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 489595629..da7688270 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -897,9 +897,11 @@ static function getGroupedRecordsTotals($groupedRecords) { static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $dayHeaders['day_header_0'] = (string)$objDate->getDate(); // It returns an int on first call. Why? + $dayHeaders['day_header_0'] = (string) $objDate->getDate(); // It returns an int on first call. + if (strlen($dayHeaders['day_header_0']) == 1) // Which is an implementation detail of DateAndTime class. + $dayHeaders['day_header_0'] = '0'.$dayHeaders['day_header_0']; // Add a 0 for single digit day. $objDate->incDay(); - $dayHeaders['day_header_1'] = $objDate->getDate(); + $dayHeaders['day_header_1'] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. $objDate->incDay(); $dayHeaders['day_header_2'] = $objDate->getDate(); $objDate->incDay(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3f894c72c..1002303b6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.3.3695 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3696 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index e237bc710..c6841f80a 100644 --- a/week.php +++ b/week.php @@ -209,8 +209,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $table = new Table('week_durations'); // $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setHeaderOptions(array('align'=>'center')); // TODO: use a class and CSS instead, perhaps a separate class for footer. -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); +$table->setRowOptions(array('class'=>'tableHeaderCentered')); $table->setData($dataArray); // $durations_with_labels); // Add columns to table. $table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); From 1a9924b363fec9c044f8198ccad589ab8f5f112c Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 00:18:01 +0000 Subject: [PATCH 0226/2515] A bit of cleanup in week view. --- WEB-INF/lib/ttTimeHelper.class.php | 69 +++++++--------------- WEB-INF/templates/footer.tpl | 2 +- week.php | 94 +++++------------------------- 3 files changed, 37 insertions(+), 128 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index da7688270..5e2cdf531 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -731,8 +731,8 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { return $result; } - // getGroupedRecordsForInterval - returns time records for a user for a given interval of dates grouped in an array of dates. - // Example: for a week view we want one row representing the same attributes to have 7 values for each day of week. + // getDataForWeekView - builds an array to render a table of durations for week view. + // In a week view we want one row representing the same attributes to have 7 values for each day of week. // We identify simlar records by a combination of client, billable, project, task, and custom field values. // This will allow us to extend the feature when more custom fields are added. // @@ -741,32 +741,26 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // // "cl:546,bl:0,pr:23456,ts:27464,cf_1:7623" // The above means client 546, not billable, project 23456, task 27464, custom field option id 7623. - static function getGroupedRecordsForInterval($user_id, $start_date, $end_date) { - // Start by obtaining all records in interval. - // Then, iterate through them to build an array. - $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); - $groupedRecords = array(); - foreach ($records as $record) { - $record_identifier_no_suffix = ttTimeHelper::makeRecordIdentifier($record); - // Handle potential multiple records with the same attributes by using a numerical suffix. - $suffix = 0; - $record_identifier = $record_identifier_no_suffix.'_'.$suffix; - while (!empty($groupedRecords[$record_identifier][$record['date']])) { - $suffix++; - $record_identifier = $record_identifier_no_suffix.'_'.$suffix; - } - $groupedRecords[$record_identifier][$record['date']] = array('id'=>$record['id'], 'duration'=>$record['duration']); - $groupedRecords[$record_identifier]['client'] = $record['client']; - $groupedRecords[$record_identifier]['cf_1_value'] = $record['cf_1_value']; - $groupedRecords[$record_identifier]['project'] = $record['project']; - $groupedRecords[$record_identifier]['task'] = $record['task']; - $groupedRecords[$record_identifier]['billable'] = $record['billable']; - } - - return $groupedRecords; - } - - // getDataForWeekView - builds an array to render a table of durations for week view. + // + // Description of $dataArray format that the function returns. + // $dataArray = array( + // array( // Row 0. + // 'id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623', // Record identifier. See ttTimeHelper::makeRecordIdentifier(). + // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('id' => '0_0', 'duration' => '00:00'), + // 'day_1' => array('id' => '0_1', 'duration' => '01:00'), + // 'day_2' => array('id' => '0_2', 'duration' => '02:00'), + // 'day_3' => array('id' => '0_3', 'duration' => null), + // 'day_4' => array('id' => '0_4', 'duration' => '04:00') + // ), + // array( // Row 1. + // 'id' => 'bl:0', + // 'label' => '', // In this case the label is empty as we don't have anything to put in, only not billable flag. + // 'day_0' => array('id' => '1_0', 'duration' => '00:30'), + // 'day_1' => array('id' => '1_1', 'duration' => '01:30'), + // 'day_2' => array('id' => '1_2', 'duration' => '02:30'), + // ) + // ); static function getDataForWeekView($user_id, $start_date, $end_date) { // Start by obtaining all records in interval. $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); @@ -874,25 +868,6 @@ static function makeRecordLabel($record) { return $label; } - // getGroupedRecordsTotals - returns day totals for grouped records. - static function getGroupedRecordsTotals($groupedRecords) { - $groupedRecordsTotals = array(); - foreach ($groupedRecords as $groupedRecord) { - foreach($groupedRecord as $key => $dayEntry) { - if ($dayEntry['duration']) { - $minutes = ttTimeHelper::toMinutes($dayEntry['duration']); - $groupedRecordsTotals[$key] += $minutes; - } - } - } - // Convert minutes to hh:mm for display. - foreach ($groupedRecordsTotals as $key => $single_total) { - $groupedRecordsTotals[$key] = ttTimeHelper::toAbsDuration($single_total); - } - - return $groupedRecordsTotals; - } - // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1002303b6..7ec43abc2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3696 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3697 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index c6841f80a..c6c194f30 100644 --- a/week.php +++ b/week.php @@ -106,7 +106,15 @@ $cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; +// Get the data we need to display week view. +// Get column headers, which are day numbers in month. +$dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); +// Build data array for the table. Format is described in the function.. +$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +// Build day totals (total durations for each day in week). +$dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); +// TODO: refactoring ongoing down from here. @@ -114,45 +122,12 @@ +// Actually this is work in progress at this point, even documenting the array, as we still miss control IDs, and +// editing entries is not yet implemented. When this is done, we will have to re-document the above. - - -// Get column headers. -$dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); -// Build data array for the table. -$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -// Build day totals. -$dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); - -// TODO: replace these two sample arrays with real data. -$durations_with_labels = array( - array( // Row 0. - 'id' => 'something goes here too', // Row identifier. - 'label' => 'This is a label for row 0', - 'day_0' => array('id' => '0_0', 'duration' => '00:00'), - 'day_1' => array('id' => '0_1', 'duration' => '01:00'), - 'day_2' => array('id' => '0_2', 'duration' => '02:00'), - 'day_3' => array('id' => '0_3', 'duration' => null), - 'day_4' => array('id' => '0_4', 'duration' => '04:00') - ), - array( // Row 1. - 'label' => 'This is a label for row 1', - 'day_0' => array('id' => '1_0', 'duration' => '00:30'), - 'day_1' => array('id' => '1_1', 'duration' => '01:30'), - 'day_2' => array('id' => '1_2', 'duration' => '02:30'), - ) -); - -$totals = array( - 'label' => 'Total:', - 'day_0' => '00:30', - 'day_1' => '02:30', - 'day_2' => '04:30', - 'day_3' => null, - 'day_4' => '04:00', - 'day_5' => null, - 'day_6' => null -); +// TODO: +// 1) escape cf_1 values in record identifiers as this may come from user for text fields. +// 2) make sure we have IDs for cells, which are now missing. // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { @@ -176,18 +151,6 @@ function render(&$table, $value, $row, $column, $selected = false) { } } -//$durations = ttTimeHelper::getDurationsForWeek($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); - - - -//$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -//$dayTotals = ttTimeHelper::getGroupedRecordsTotals($groupedRecords); - - - - - - // Elements of weekTimeForm. $form = new Form('weekTimeForm'); @@ -210,7 +173,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('class'=>'tableHeaderCentered')); -$table->setData($dataArray); // $durations_with_labels); +$table->setData($dataArray); // Add columns to table. $table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); $table->addColumn(new TableColumn($dayHeaders['day_header_0'], $dayHeaders['day_header_0'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_0']])); @@ -223,7 +186,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $table->setInteractive(false); $form->addInputElement($table); - // Dropdown for clients in MODE_TIME. Use all active clients. if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) { $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); @@ -464,14 +426,8 @@ function render(&$table, $value, $row, $column, $selected = false) { $week_total = ttTimeHelper::getTimeForWeek($user->getActiveUser(), $selected_date); - - $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getActiveUser(), $cl_date)); -//$groupedRecords = ttTimeHelper::getGroupedRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -//$smarty->assign('grouped_records', $groupedRecords); -//$smarty->assign('grouped_records_totals', ttTimeHelper::getGroupedRecordsTotals($groupedRecords)); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); @@ -480,28 +436,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); -// Prepare and assign date headers. Note how startDate moves to the end of the week, so it no longer holds correct start week value. -$smarty->assign('date_0', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_0', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_1', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_1', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_2', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_2', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_3', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_3', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_4', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_4', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_5', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_5', $startDate->getDate()); -$startDate->incDay(); -$smarty->assign('date_6', $startDate->toString(DB_DATEFORMAT)); -$smarty->assign('day_header_6', $startDate->getDate()); - $smarty->assign('title', $i18n->getKey('title.time')); $smarty->assign('content_page_name', 'week.tpl'); $smarty->display('index.tpl'); From dbe98ff29b8471e9f43079f702fa43a2110d72aa Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 01:44:24 +0000 Subject: [PATCH 0227/2515] Put link to day view on week.php. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7ec43abc2..3febef8e7 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3697 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3698 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 4abfa3799..67bafd513 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -8,13 +8,11 @@ {$forms.weekTimeForm.open} -{if defined(WEEK_VIEW_DEBUG)} -{/if}
{$i18n.label.day_view} / {$i18n.label.week_view}
From bf9eb7c11616a10f948c4c9ad620c9694bbefa9b Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 15:13:02 +0000 Subject: [PATCH 0228/2515] Corrected a comment as escaping already occurs. --- week.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/week.php b/week.php index c6c194f30..b808724f2 100644 --- a/week.php +++ b/week.php @@ -116,18 +116,11 @@ // TODO: refactoring ongoing down from here. - - - - - - // Actually this is work in progress at this point, even documenting the array, as we still miss control IDs, and // editing entries is not yet implemented. When this is done, we will have to re-document the above. // TODO: -// 1) escape cf_1 values in record identifiers as this may come from user for text fields. -// 2) make sure we have IDs for cells, which are now missing. +// 1) make sure we have IDs for cells, which are now missing. // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { From 7845326d2e9638f9cf4f57b06bcd6cac5ff5758f Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 16:02:10 +0000 Subject: [PATCH 0229/2515] A bit of refactoring of week view related code for clarity. --- WEB-INF/lib/ttTimeHelper.class.php | 40 +++++++++++++++++------------- week.php | 2 +- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 5e2cdf531..67590c158 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -745,20 +745,26 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // Description of $dataArray format that the function returns. // $dataArray = array( // array( // Row 0. - // 'id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623', // Record identifier. See ttTimeHelper::makeRecordIdentifier(). - // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('id' => '0_0', 'duration' => '00:00'), - // 'day_1' => array('id' => '0_1', 'duration' => '01:00'), - // 'day_2' => array('id' => '0_2', 'duration' => '02:00'), - // 'day_3' => array('id' => '0_3', 'duration' => null), - // 'day_4' => array('id' => '0_4', 'duration' => '04:00') + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). + // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('control_id' => '0_day_0', 'duration' => '00:00'), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '0_day_1', 'duration' => '01:00'), + // 'day_2' => array('control_id' => '0_day_2', 'duration' => '02:00'), + // 'day_3' => array('control_id' => '0_day_3', 'duration' => null), + // 'day_4' => array('control_id' => '0_day_4', 'duration' => '04:00'), + // 'day_5' => array('control_id' => '0_day_5', 'duration' => '04:00'), + // 'day_6' => array('control_id' => '0_day_6', 'duration' => null) // ), // array( // Row 1. - // 'id' => 'bl:0', - // 'label' => '', // In this case the label is empty as we don't have anything to put in, only not billable flag. - // 'day_0' => array('id' => '1_0', 'duration' => '00:30'), - // 'day_1' => array('id' => '1_1', 'duration' => '01:30'), - // 'day_2' => array('id' => '1_2', 'duration' => '02:30'), + // 'row_id' => 'bl:0_0', + // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. + // 'day_0' => array('control_id' => '1_day_0', 'duration' => null), + // 'day_1' => array('control_id' => '1_day_1', 'duration' => '01:30'), + // 'day_2' => array('control_id' => '1_day_2', 'duration' => null), + // 'day_3' => array('control_id' => '1_day_3', 'duration' => '02:30'), + // 'day_4' => array('control_id' => '1_day_4', 'duration' => '04:00'), + // 'day_5' => array('control_id' => '1_day_5', 'duration' => null), + // 'day_6' => array('control_id' => '1_day_6', 'duration' => null) // ) // ); static function getDataForWeekView($user_id, $start_date, $end_date) { @@ -782,7 +788,7 @@ static function getDataForWeekView($user_id, $start_date, $end_date) { // Find row. $pos = ttTimeHelper::findRow($record_id, $dataArray); if ($pos < 0) { - $dataArray[] = array('id' => $record_id,'label' => ttTimeHelper::makeRecordLabel($record)); // Insert row. + $dataArray[] = array('row_id' => $record_id,'label' => ttTimeHelper::makeRecordLabel($record)); // Insert row. $pos = ttTimeHelper::findRow($record_id, $dataArray); } // Insert cell data from $record. @@ -793,19 +799,19 @@ static function getDataForWeekView($user_id, $start_date, $end_date) { // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label // and a day header already exists. - static function cellExists($record_id, $day_header, $dataArray) { + static function cellExists($row_id, $day_header, $dataArray) { foreach($dataArray as $row) { - if ($row['id'] == $record_id && !empty($row[$day_header]['duration'])) + if ($row['row_id'] == $row_id && !empty($row[$day_header]['duration'])) return true; } return false; } // findRow returns an existing row position in $dataArray, -1 otherwise. - static function findRow($record_id, $dataArray) { + static function findRow($row_id, $dataArray) { $pos = 0; // Row position in array. foreach($dataArray as $row) { - if ($row['id'] == $record_id) + if ($row['row_id'] == $row_id) return $pos; $pos++; // Increment for search. } diff --git a/week.php b/week.php index b808724f2..f7f42f7c7 100644 --- a/week.php +++ b/week.php @@ -134,7 +134,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Define rendering class for a single cell for time entry in week view table. class TimeCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - $field_name = $table->getValueAtName($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). + $field_name = $table->getValueAt($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); $field->setFormName($table->getFormName()); $field->setSize(2); From 7e9b290b40c6f9f2efe6a7e28fae630bdffeca1e Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 17:06:35 +0000 Subject: [PATCH 0230/2515] Added proper IDs to week view controls. --- WEB-INF/lib/ttTimeHelper.class.php | 29 +++++++++++++++++------------ WEB-INF/templates/footer.tpl | 2 +- week.php | 23 ++++++++++------------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 67590c158..60ebe446d 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -767,7 +767,7 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_6' => array('control_id' => '1_day_6', 'duration' => null) // ) // ); - static function getDataForWeekView($user_id, $start_date, $end_date) { + static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { // Start by obtaining all records in interval. $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); @@ -790,9 +790,14 @@ static function getDataForWeekView($user_id, $start_date, $end_date) { if ($pos < 0) { $dataArray[] = array('row_id' => $record_id,'label' => ttTimeHelper::makeRecordLabel($record)); // Insert row. $pos = ttTimeHelper::findRow($record_id, $dataArray); + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } } - // Insert cell data from $record. - $dataArray[$pos][$day_header] = array('id' => $record['id'],'duration' => $record['duration']); + // Insert actual cell data from $record (one cell only). + $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'duration' => $record['duration']); } return $dataArray; } @@ -878,21 +883,21 @@ static function makeRecordLabel($record) { static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $dayHeaders['day_header_0'] = (string) $objDate->getDate(); // It returns an int on first call. - if (strlen($dayHeaders['day_header_0']) == 1) // Which is an implementation detail of DateAndTime class. - $dayHeaders['day_header_0'] = '0'.$dayHeaders['day_header_0']; // Add a 0 for single digit day. + $dayHeaders[] = (string) $objDate->getDate(); // It returns an int on first call. + if (strlen($dayHeaders[0]) == 1) // Which is an implementation detail of DateAndTime class. + $dayHeaders[0] = '0'.$dayHeaders[0]; // Add a 0 for single digit day. $objDate->incDay(); - $dayHeaders['day_header_1'] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. + $dayHeaders[] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. $objDate->incDay(); - $dayHeaders['day_header_2'] = $objDate->getDate(); + $dayHeaders[] = $objDate->getDate(); $objDate->incDay(); - $dayHeaders['day_header_3'] = $objDate->getDate(); + $dayHeaders[] = $objDate->getDate(); $objDate->incDay(); - $dayHeaders['day_header_4'] = $objDate->getDate(); + $dayHeaders[] = $objDate->getDate(); $objDate->incDay(); - $dayHeaders['day_header_5'] = $objDate->getDate(); + $dayHeaders[] = $objDate->getDate(); $objDate->incDay(); - $dayHeaders['day_header_6'] = $objDate->getDate(); + $dayHeaders[] = $objDate->getDate(); unset($objDate); return $dayHeaders; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3febef8e7..494880d01 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3698 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3699 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index f7f42f7c7..fa7915045 100644 --- a/week.php +++ b/week.php @@ -110,23 +110,24 @@ // Get column headers, which are day numbers in month. $dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); // Build data array for the table. Format is described in the function.. -$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); // Build day totals (total durations for each day in week). $dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); // TODO: refactoring ongoing down from here. +// 1) Start coding modification of existing records. +// 2) Then adding new records for existing rows. +// 3) Then add code and UI for adding a new row. + // Actually this is work in progress at this point, even documenting the array, as we still miss control IDs, and // editing entries is not yet implemented. When this is done, we will have to re-document the above. -// TODO: -// 1) make sure we have IDs for cells, which are now missing. - // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $this->setOptions(array('width'=>200,'valign'=>'middle')); - $this->setValue(htmlspecialchars($value)); + $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. return $this->toString(); } } @@ -134,7 +135,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Define rendering class for a single cell for time entry in week view table. class TimeCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - $field_name = $table->getValueAt($row,$column)['id']; // Our text field names (and ids) are like x_y (row_column). + $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); $field->setFormName($table->getFormName()); $field->setSize(2); @@ -169,13 +170,9 @@ function render(&$table, $value, $row, $column, $selected = false) { $table->setData($dataArray); // Add columns to table. $table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); -$table->addColumn(new TableColumn($dayHeaders['day_header_0'], $dayHeaders['day_header_0'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_0']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_1'], $dayHeaders['day_header_1'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_1']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_2'], $dayHeaders['day_header_2'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_2']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_3'], $dayHeaders['day_header_3'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_3']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_4'], $dayHeaders['day_header_4'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_4']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_5'], $dayHeaders['day_header_5'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_5']])); -$table->addColumn(new TableColumn($dayHeaders['day_header_6'], $dayHeaders['day_header_6'], new TimeCellRenderer(), $dayTotals[$dayHeaders['day_header_6']])); +for ($i = 0; $i < 7; $i++) { + $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new TimeCellRenderer(), $dayTotals[$dayHeaders[$i]])); +} $table->setInteractive(false); $form->addInputElement($table); From 6b4d39a350249fb3f71d49706d242e6d341c2200 Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 27 Dec 2017 19:10:29 +0000 Subject: [PATCH 0231/2515] Made week view controls read-only for locked days. --- WEB-INF/lib/form/TextField.class.php | 45 ++++++++++--------------- WEB-INF/lib/ttTimeHelper.class.php | 50 ++++++++++++++++++++-------- WEB-INF/templates/footer.tpl | 2 +- week.php | 12 +++++-- 4 files changed, 63 insertions(+), 46 deletions(-) diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index 4904e2481..db29a0c7e 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -36,33 +36,22 @@ function __construct($name) $this->name = $name; } - // TODO: refactoring ongoing down from here. - function getHtml() { - if (!$this->isEnabled()) { - $html = "name\" value=\"".htmlspecialchars($this->getValue())."\" readonly>\n"; - } else { - - if ($this->id=="") $this->id = $this->name; - - $html = "\n\tname\" id=\"$this->id\""; - - if ($this->size!="") - $html .= " size=\"$this->size\""; - - if ($this->style!="") - $html .= " style=\"$this->style\""; - - if ($this->max_length!="") - $html .= " maxlength=\"$this->max_length\""; - - if ($this->on_change!="") - $html .= " onchange=\"$this->on_change\""; + function getHtml() { + if (empty($this->id)) $this->id = $this->name; + $html = "\n\tid\" name=\"$this->name\""; + if (!empty($this->size)) $html .= " size=\"$this->size\""; + if (!empty($this->style)) $html .= " style=\"$this->style\""; - $html .= " value=\"".htmlspecialchars($this->getValue())."\""; - $html .= ">"; - } - - return $html; - } + if($this->isEnabled()) { + if (!empty($this->max_length)) $html .= " maxlength=\"$this->max_length\""; + if (!empty($this->on_change)) $html .= " onchange=\"$this->on_change\""; + } + + $html .= " value=\"".htmlspecialchars($this->getValue())."\""; + + if(!$this->isEnabled()) $html .= " readonly"; + $html .= ">\n"; + return $html; + } } diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 60ebe446d..354bd2b24 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -747,24 +747,24 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // array( // Row 0. // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('control_id' => '0_day_0', 'duration' => '00:00'), // control_id is row_id plus day header for column. - // 'day_1' => array('control_id' => '0_day_1', 'duration' => '01:00'), - // 'day_2' => array('control_id' => '0_day_2', 'duration' => '02:00'), - // 'day_3' => array('control_id' => '0_day_3', 'duration' => null), - // 'day_4' => array('control_id' => '0_day_4', 'duration' => '04:00'), - // 'day_5' => array('control_id' => '0_day_5', 'duration' => '04:00'), - // 'day_6' => array('control_id' => '0_day_6', 'duration' => null) + // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), + // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), + // 'day_3' => array('control_id' => '0_day_3', 'tt_log_id' => null, 'duration' => null), + // 'day_4' => array('control_id' => '0_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), + // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) // ), // array( // Row 1. // 'row_id' => 'bl:0_0', // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. - // 'day_0' => array('control_id' => '1_day_0', 'duration' => null), - // 'day_1' => array('control_id' => '1_day_1', 'duration' => '01:30'), - // 'day_2' => array('control_id' => '1_day_2', 'duration' => null), - // 'day_3' => array('control_id' => '1_day_3', 'duration' => '02:30'), - // 'day_4' => array('control_id' => '1_day_4', 'duration' => '04:00'), - // 'day_5' => array('control_id' => '1_day_5', 'duration' => null), - // 'day_6' => array('control_id' => '1_day_6', 'duration' => null) + // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => null, 'duration' => null), + // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), + // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => null, 'duration' => null), + // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), + // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => null, 'duration' => null), + // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) // ) // ); static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { @@ -902,6 +902,28 @@ static function getDayHeadersForWeek($start_date) { return $dayHeaders; } + // getLockedDaysForWeek - builds an arrays of locked days in week. + static function getLockedDaysForWeek($start_date) { + global $user; + $lockedDays = array(); + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + $lockedDays[] = $user->isDateLocked($objDate); + unset($objDate); + return $lockedDays; + } + // getDayTotals calculates total durations for each day from the existing data in $dataArray. static function getDayTotals($dataArray, $dayHeaders) { $dayTotals = array(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 494880d01..a3ab15e0e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3699 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3700 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index fa7915045..8d3e2ba35 100644 --- a/week.php +++ b/week.php @@ -109,6 +109,7 @@ // Get the data we need to display week view. // Get column headers, which are day numbers in month. $dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); +$lockedDays = ttTimeHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); // Build data array for the table. Format is described in the function.. $dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); // Build day totals (total durations for each day in week). @@ -116,9 +117,10 @@ // TODO: refactoring ongoing down from here. -// 1) Start coding modification of existing records. -// 2) Then adding new records for existing rows. -// 3) Then add code and UI for adding a new row. +// 1) Handle editable - not editable records properly meaning that UI should reflect this. +// 2) Start coding modification of existing records. +// 3) Then adding new records for existing rows. +// 4) Then add code and UI for adding a new row. // Actually this is work in progress at this point, even documenting the array, as we still miss control IDs, and // editing entries is not yet implemented. When this is done, we will have to re-document the above. @@ -137,6 +139,10 @@ class TimeCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); + // Disable control if the date is locked. + global $lockedDays; + if ($lockedDays[$column-1]) + $field->setEnabled(false); $field->setFormName($table->getFormName()); $field->setSize(2); $field->setValue($table->getValueAt($row,$column)['duration']); From aad90b9cf0d58c784171189c0ccec3c15e947c23 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 28 Dec 2017 14:23:09 +0000 Subject: [PATCH 0232/2515] Updated labels on dbinstall.php to reflect current version. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a3ab15e0e..f7e660c18 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.13.0.3700 | Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3701| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index cb5f1c630..6195c3961 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -598,7 +598,7 @@ function setChange($sql) { setChange("ALTER TABLE tt_invoices DROP end_date"); } - if ($_POST["convert1600to1900"]) { + if ($_POST["convert1600to11300"]) { setChange("DROP TABLE IF EXISTS tt_invoice_headers"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL"); @@ -748,7 +748,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.9.30) + Create database structure (v1.13.0)
(applies only to new installations, do not execute when updating)
@@ -780,8 +780,8 @@ function setChange($sql) {



Update database structure (v1.6 to v1.9)
Update database structure (v1.6 to v1.13)
From 532ab62cfa2895753eb599ab3b35c104ca344602 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 28 Dec 2017 17:21:11 +0000 Subject: [PATCH 0233/2515] Implemented deleting of records from week view. --- WEB-INF/lib/ttTimeHelper.class.php | 57 +++++++++++++++++++++--- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 2 - week.php | 69 ++++++++++++++++++++++++++++-- 4 files changed, 119 insertions(+), 11 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 354bd2b24..0e27c729e 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -103,7 +103,7 @@ static function isValidDuration($value) { } // normalizeDuration - converts a valid time duration string to format 00:00. - static function normalizeDuration($value) { + static function normalizeDuration($value, $leadingZero = true) { $time_value = $value; // If we have a decimal format - convert to time format 00:00. @@ -116,7 +116,7 @@ static function normalizeDuration($value) { $mins = round($val * 60); $hours = (string)((int)($mins / 60)); $mins = (string)($mins % 60); - if (strlen($hours) == 1) + if ($leadingZero && strlen($hours) == 1) $hours = '0'.$hours; if (strlen($mins) == 1) $mins = '0' . $mins; @@ -129,7 +129,7 @@ static function normalizeDuration($value) { // 0-99 if ((strlen($time_value) >= 1) && (strlen($time_value) <= 2) && !isset($time_a[1])) { $hours = $time_a[0]; - if (strlen($hours) == 1) + if ($leadingZero && strlen($hours) == 1) $hours = '0'.$hours; return $hours.':00'; } @@ -138,7 +138,7 @@ static function normalizeDuration($value) { if ((strlen($time_value) >= 3) && (strlen($time_value) <= 4) && !isset($time_a[1])) { if (strlen($time_value)==3) $time_value = '0'.$time_value; $hours = substr($time_value,0,2); - if (strlen($hours) == 1) + if ($leadingZero && strlen($hours) == 1) $hours = '0'.$hours; return $hours.':'.substr($time_value,2,2); } @@ -146,7 +146,7 @@ static function normalizeDuration($value) { // 0:00-23:59 (24:00) if ((strlen($time_value) >= 4) && (strlen($time_value) <= 5) && isset($time_a[1])) { $hours = $time_a[0]; - if (strlen($hours) == 1) + if ($leadingZero && strlen($hours) == 1) $hours = '0'.$hours; return $hours.':'.$time_a[1]; } @@ -946,5 +946,52 @@ static function getDayTotals($dataArray, $dayHeaders) { } return $dayTotals; } + + // insertDurationFromWeekView - inserts a new record in log tables from a week view post. + static function insertDurationFromWeekView($fields, $err) { + $err->add("Week view is work in progress. Inserting records is not yet implemented. Try again later."); + // $row_id, $day_header, $posted_duration, $start_date) { // TODO: potential fields? + + return false; // Not implemented. + } + + + // modifyFromWeekView - modifies a duration of an existing record from a week view post. + static function modifyDurationFromWeekView($fields, $err) { + $err->add("Week view is work in progress. Editing records is not yet implemented. Try again later."); + return false; + + // static function modifyDurationFromWeekView($tt_log_id, $new_duration, $user_id) { + + // TODO: handle overlaps and potential other error conditions such as going beyond 24 hr mark. Other errors? + // If the entry has start time, check if new duration goes beyond the existing day. + + // Future entries. Possibly do this check out of this function. + /* + * // Prohibit creating entries in future. + if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); + if ($selected_date->after($browser_today)) + $err->add($i18n->getKey('error.future_date')); + } + */ + + /* + * // Prohibit creating an overlapping record. + if ($err->no()) { + if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) + $err->add($i18n->getKey('error.overlap')); + } + */ + + $mdb2 = getConnection(); + + $sql = "update tt_log set duration = '$new_duration' where id = $tt_log_id and user_id = $user_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + + return true; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f7e660c18..8f4820932 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3701| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3702| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 67bafd513..6b35a621e 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -36,11 +36,9 @@ {$forms.weekTimeForm.week_durations.control}
- {$forms.weekTimeForm.close} diff --git a/week.php b/week.php index 8d3e2ba35..a015e85dd 100644 --- a/week.php +++ b/week.php @@ -282,11 +282,14 @@ function render(&$table, $value, $row, $column, $selected = false) { 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } +// TODO: the above needs to be refactored for week view. + + // Submit. if ($request->isPost()) { if ($request->getParameter('btn_submit')) { - +/* // Validate user input. if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) $err->add($i18n->getKey('error.client')); @@ -346,7 +349,67 @@ function render(&$table, $value, $row, $column, $selected = false) { if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) $err->add($i18n->getKey('error.overlap')); } - +// TODO: refactor the above. +*/ + // Obtain values. Perhaps, it's best to iterate throigh posted parameters one by one, + // see if anything changed, and apply one change at a time until we see an error. + // TODO: check for locked days just in case. + $result = true; + $rowNumber = 0; + // Iterate through existing rows. + foreach ($dataArray as $row) { + // Iterate through days. + foreach ($dayHeaders as $key => $dayHeader) { + // Do not process locked days. + if ($lockedDays[$key]) continue; + // Make control id for the cell. + $control_id = $rowNumber.'_'.$dayHeader; + // Optain existing and posted durations. + $postedDuration = $request->getParameter($control_id); + $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; + // If posted value is not null, check and normalize it. + if ($postedDuration) { + if (ttTimeHelper::isValidDuration($postedDuration)) { + $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. + } else { + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + $result = false; break; // Break out. Stop any further processing. + } + } + // Do not process if value has not changed. + if ($postedDuration == $existingDuration) + continue; + // Posted value is different. + if ($existingDuration == null) { + // Insert a new record here. + $fields = array(); + $result = ttTimeHelper::insertDurationFromWeekView($fields, $err); + //$dataArray[$rowNumber]['row_id'], + //$dayHeader, + //$postedDuration, + //$startDate->toString(DB_DATEFORMAT)); + } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { + // Delete an already existing record here. + $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); + } else { + $fields = array(); + $result = ttTimeHelper::modifyDurationFromWeekView($fields, $err); + //$result = ttTimeHelper::modifyDurationFromWeekView($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $postedDuration, $user->getActiveUser()); + } + if (!$result) break; // Break out of the loop in case of first error. + } + if (!$result) break; // Break out of the loop in case of first error. + $rowNumber++; + } + if ($result) { + header('Location: week.php'); // Normal exit. + exit(); + } + $err->add($i18n->getKey('error.db')); + /* + // + // + // // Insert record. if ($err->no()) { $id = ttTimeHelper::insert(array( @@ -403,7 +466,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Cannot complete, redirect for manual edit. header('Location: time_edit.php?id='.$record_id); exit(); - } + }*/ } elseif ($request->getParameter('onBehalfUser')) { if($user->canManageTeam()) { From 759621718acb3321e844381f94704e585a964cd4 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 28 Dec 2017 17:50:22 +0000 Subject: [PATCH 0234/2515] Disabled controls in week view with null values for TYPE_START_FINISH entry mode. --- WEB-INF/templates/footer.tpl | 2 +- week.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8f4820932..ab87268af 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3702| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3703| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index a015e85dd..d6fb6a3b5 100644 --- a/week.php +++ b/week.php @@ -146,6 +146,12 @@ function render(&$table, $value, $row, $column, $selected = false) { $field->setFormName($table->getFormName()); $field->setSize(2); $field->setValue($table->getValueAt($row,$column)['duration']); + // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control + // because we can't supply start and finish times in week view - there are no fields for them. + global $user; + if (!$field->getValue() && TYPE_START_FINISH == $user->record_type) { + $field->setEnabled(false); + } $this->setValue($field->getHtml()); return $this->toString(); } From 88134e6891875e698d71e06806e9c0ddde5c03bd Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 28 Dec 2017 21:36:07 +0000 Subject: [PATCH 0235/2515] More progress on week view. Implemented adding records to existing rows without custom fields. --- WEB-INF/lib/ttTimeHelper.class.php | 101 ++++++++++++++++++++++++----- WEB-INF/lib/ttUser.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- week.php | 11 ++-- 4 files changed, 91 insertions(+), 25 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 0e27c729e..c88ed6a90 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -832,7 +832,7 @@ static function makeRecordIdentifier($record) { global $user; // Start with client. if ($user->isPluginEnabled('cl')) - $record_identifier = $record['client_id'] ? 'cl'.$record['client_id'] : ''; + $record_identifier = $record['client_id'] ? 'cl:'.$record['client_id'] : ''; // Add billable flag. if (!empty($record_identifier)) $record_identifier .= ','; $record_identifier .= 'bl:'.$record['billable']; @@ -851,6 +851,28 @@ static function makeRecordIdentifier($record) { return $record_identifier; } + // parseFromWeekViewRow - obtains field value encoded in row identifier. + // For example, for a row id like "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" + // requesting a client "cl" should return 546. + static function parseFromWeekViewRow($row_id, $field_label) { + // Find beginning of label. + $pos = strpos($row_id, $field_label); + if ($pos === false) return null; // Not found. + + // Strip suffix from row id. + $suffixPos = strrpos($row_id, '_'); + if ($suffixPos) + $remaninder = substr($row_id, 0, $suffixPos); + + // Find beginning of value. + $posBegin = 1 + strpos($remaninder, ':', $pos); + // Find end of value. + $posEnd = strpos($remaninder, ',', $posBegin); + if ($posEnd === false) $posEnd = strlen($remaninder); + // Return value. + return substr($remaninder, $posBegin, $posEnd - $posBegin); + } + // makeRecordLabel - builds a human readable label for a row in week view, // which is a combination ot record properties. // Client - Project - Task - Custom field 1. @@ -902,24 +924,15 @@ static function getDayHeadersForWeek($start_date) { return $dayHeaders; } - // getLockedDaysForWeek - builds an arrays of locked days in week. + // getLockedDaysForWeek - builds an array of locked days in week. static function getLockedDaysForWeek($start_date) { global $user; $lockedDays = array(); $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - $lockedDays[] = $user->isDateLocked($objDate); + for ($i = 0; $i < 7; $i++) { + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + } unset($objDate); return $lockedDays; } @@ -947,12 +960,64 @@ static function getDayTotals($dataArray, $dayHeaders) { return $dayTotals; } + // dateFromDayHeader calculates date from start date and day header in week view. + static function dateFromDayHeader($start_date, $day_header) { + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + $currentDayHeader = (string) $objDate->getDate(); // It returns an int on first call. + if (strlen($currentDayHeader) == 1) // Which is an implementation detail of DateAndTime class. + $currentDayHeader = '0'.$currentDayHeader; // Add a 0 for single digit day. + $i = 1; + while ($currentDayHeader != $day_header && $i < 7) { + // Iterate through remaining days to find a match. + $objDate->incDay(); + $currentDayHeader = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. + $i++; + } + return $objDate->toString(DB_DATEFORMAT); + } + // insertDurationFromWeekView - inserts a new record in log tables from a week view post. static function insertDurationFromWeekView($fields, $err) { - $err->add("Week view is work in progress. Inserting records is not yet implemented. Try again later."); - // $row_id, $day_header, $posted_duration, $start_date) { // TODO: potential fields? + global $i18n; + global $user; + + // Determine date for a new entry. + $entry_date = ttTimeHelper::dateFromDayHeader($fields['start_date'], $fields['day_header']); + $objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date); + + // Prohibit creating entries in future. + if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES) && $fields['browser_today']) { + $objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']); + if ($objEntryDate->after($objBrowserToday)) { + $err->add($i18n->getKey('error.future_date')); + return false; + } + } + + // Temporary check for custom field and exit if one is found, as this is not yet implemented. + $temp = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); + if ($temp) { + $err->add("Week view is work in progress. Inserting records with custom fields is not yet implemented. Try again later."); + return false; + } + + // Prepare an array of fields for regular insert function. + $fields4insert = array(); + $fields4insert['user_id'] = $user->getActiveUser(); + $fields4insert['date'] = $entry_date; + $fields4insert['duration'] = $fields['duration']; + $fields4insert['client'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cl'); + $fields4insert['billable'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); + $fields4insert['project'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); + $fields4insert['task'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); + + // Try to insert a record. + $id = ttTimeHelper::insert($fields4insert); + if (!$id) return false; // Something failed. + + // TODO: Deal with custom fieeld log here. Currently not implemented. - return false; // Not implemented. + return true; // Not implemented. } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 7ace196a2..20efe2595 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -196,7 +196,7 @@ function isDateLocked($date) require_once(LIBRARY_DIR.'/tdcron/class.tdcron.entry.php'); // Calculate the last occurrence of a lock. - $last = tdCron::getLastOccurrence($this->lock_spec, mktime()); + $last = tdCron::getLastOccurrence($this->lock_spec, time()); $lockdate = new DateAndTime(DB_DATEFORMAT, strftime('%Y-%m-%d', $last)); if ($date->before($lockdate)) { return true; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ab87268af..5b00397aa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3703| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3704| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index d6fb6a3b5..34efd56e5 100644 --- a/week.php +++ b/week.php @@ -272,7 +272,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar if ($user->isPluginEnabled('iv')) $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'get_date()')); // 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'))); // If we have custom fields - add controls for them. @@ -389,11 +389,12 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($existingDuration == null) { // Insert a new record here. $fields = array(); + $fields['row_id'] = $dataArray[$rowNumber]['row_id']; + $fields['day_header'] = $dayHeader; + $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. + $fields['duration'] = $postedDuration; + $fields['browser_today'] = $request->getParameter('browser_today', null); $result = ttTimeHelper::insertDurationFromWeekView($fields, $err); - //$dataArray[$rowNumber]['row_id'], - //$dayHeader, - //$postedDuration, - //$startDate->toString(DB_DATEFORMAT)); } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { // Delete an already existing record here. $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); From a9e7850820183fc39ef4541d3485cbcb077aca34 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 28 Dec 2017 23:05:57 +0000 Subject: [PATCH 0236/2515] Inserting new cells from already existing week view rows should now work with custom field. --- WEB-INF/lib/ttTimeHelper.class.php | 26 +++++++++++++++----------- WEB-INF/templates/footer.tpl | 2 +- week.php | 7 ++++--- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index c88ed6a90..81a5ccf78 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -977,7 +977,7 @@ static function dateFromDayHeader($start_date, $day_header) { } // insertDurationFromWeekView - inserts a new record in log tables from a week view post. - static function insertDurationFromWeekView($fields, $err) { + static function insertDurationFromWeekView($fields, $custom_fields, $err) { global $i18n; global $user; @@ -994,13 +994,6 @@ static function insertDurationFromWeekView($fields, $err) { } } - // Temporary check for custom field and exit if one is found, as this is not yet implemented. - $temp = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); - if ($temp) { - $err->add("Week view is work in progress. Inserting records with custom fields is not yet implemented. Try again later."); - return false; - } - // Prepare an array of fields for regular insert function. $fields4insert = array(); $fields4insert['user_id'] = $user->getActiveUser(); @@ -1015,15 +1008,26 @@ static function insertDurationFromWeekView($fields, $err) { $id = ttTimeHelper::insert($fields4insert); if (!$id) return false; // Something failed. - // TODO: Deal with custom fieeld log here. Currently not implemented. + // Insert custom field if we have it. + $result = true; + $cf_1 = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); + if ($custom_fields && $cf_1) { + if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cf_1); + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cf_1, null); + } - return true; // Not implemented. + return $result; } // modifyFromWeekView - modifies a duration of an existing record from a week view post. static function modifyDurationFromWeekView($fields, $err) { - $err->add("Week view is work in progress. Editing records is not yet implemented. Try again later."); + + // Possible error conditions. Overlap? What else? + + $err->add("Week view is work in progress. Editing records is not yet implemented. Try deleting and then inserting a record instead."); return false; // static function modifyDurationFromWeekView($tt_log_id, $new_duration, $user_id) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5b00397aa..825f144bc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3704| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3705| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 34efd56e5..7cf1c945b 100644 --- a/week.php +++ b/week.php @@ -394,14 +394,15 @@ function render(&$table, $value, $row, $column, $selected = false) { $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. $fields['duration'] = $postedDuration; $fields['browser_today'] = $request->getParameter('browser_today', null); - $result = ttTimeHelper::insertDurationFromWeekView($fields, $err); + $result = ttTimeHelper::insertDurationFromWeekView($fields, $custom_fields, $err); } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { // Delete an already existing record here. $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); } else { $fields = array(); + $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; + $fields['duration'] = $postedDuration; $result = ttTimeHelper::modifyDurationFromWeekView($fields, $err); - //$result = ttTimeHelper::modifyDurationFromWeekView($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $postedDuration, $user->getActiveUser()); } if (!$result) break; // Break out of the loop in case of first error. } @@ -412,7 +413,7 @@ function render(&$table, $value, $row, $column, $selected = false) { header('Location: week.php'); // Normal exit. exit(); } - $err->add($i18n->getKey('error.db')); + // $err->add($i18n->getKey('error.db')); /* // // From 90bad70543aac26a31b913c0c81d54433c125559 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 02:04:47 +0000 Subject: [PATCH 0237/2515] A bit more progress with week view - some editing now works. --- WEB-INF/lib/ttTimeHelper.class.php | 73 ++++++++++++++++++------------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 81a5ccf78..8f20f373c 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -587,6 +587,39 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { return false; } + // ovelapsWithNewDuration - determines if an already existing tt_log record will overlap others + // if we were to change its duration to a new value. + // + // Another error condition we check for is whether new duration puts the existing record beyond the 24:00 day boundary. + static function ovelapsWithNewDuration($tt_log_id, $new_duration, $err) { + global $i18n; + $mdb2 = getConnection(); + + // Determine if we have start time in record, as checking does not makes sense otherwise. + $sql = "select start from tt_log where id = $tt_log_id"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + if (!$res->numRows()) { + $err->add($i18n->getKey('error.db')); // This is not expected. + return true; + } + $val = $res->fetchRow(); + if (!$val['start']) + return false; // No start time, therefore no overlap. + } + + // TODO: Determine finish based on the existing record start and $new_duration. + // By probably using PHP time functions or toMinutes(). + + // Then check whether new duration puts the existing records beyond 24:00 boundary. + // and call the existing overlaps function. + + // For now return an error, until we implement the above. + + $err->add("Week view is work in progress. Editing records with existing start times is currently not supported in week view. Try day view instead."); + return true; + } + // getRecord - retrieves a time record identified by its id. static function getRecord($id, $user_id) { global $user; @@ -1024,38 +1057,22 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { // modifyFromWeekView - modifies a duration of an existing record from a week view post. static function modifyDurationFromWeekView($fields, $err) { + global $i18n; + global $user; - // Possible error conditions. Overlap? What else? - - $err->add("Week view is work in progress. Editing records is not yet implemented. Try deleting and then inserting a record instead."); - return false; - - // static function modifyDurationFromWeekView($tt_log_id, $new_duration, $user_id) { - - // TODO: handle overlaps and potential other error conditions such as going beyond 24 hr mark. Other errors? - // If the entry has start time, check if new duration goes beyond the existing day. - - // Future entries. Possibly do this check out of this function. - /* - * // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->getKey('error.future_date')); - } - */ - - /* - * // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) - $err->add($i18n->getKey('error.overlap')); + // Possible errors: 1) Overlap if the existing record has start time. 2) Going beyond 24 hour boundary. + // TODO: rename this function. + // Handle different errors with specific error messages. + if (ttTimeHelper::ovelapsWithNewDuration($fields['tt_log_id'], $fields['duration'], $err)) { + // $err->add($i18n->getKey('error.overlap')); + return false; } - */ $mdb2 = getConnection(); - - $sql = "update tt_log set duration = '$new_duration' where id = $tt_log_id and user_id = $user_id"; + $duration = $fields['duration']; + $tt_log_id = $fields['tt_log_id']; + $user_id = $user->getActiveUser(); + $sql = "update tt_log set duration = '$duration' where id = $tt_log_id and user_id = $user_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 825f144bc..74654c2df 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3705| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3706| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 12c2bacca0456e13f9e43f290b2d607f92782969 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 15:27:37 +0000 Subject: [PATCH 0238/2515] More work on week view done. Editing of existing records is now working. --- WEB-INF/lib/ttTimeHelper.class.php | 53 ++++++++++++++++++++---------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 8f20f373c..45a60b43b 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -587,37 +587,54 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { return false; } - // ovelapsWithNewDuration - determines if an already existing tt_log record will overlap others - // if we were to change its duration to a new value. - // - // Another error condition we check for is whether new duration puts the existing record beyond the 24:00 day boundary. - static function ovelapsWithNewDuration($tt_log_id, $new_duration, $err) { + // wvCanModify (weekViewCanModify) - determines if an already existing tt_log record + // can be modified with a new user-provided duration. + static function wvCanModify($tt_log_id, $new_duration, $err) { global $i18n; $mdb2 = getConnection(); - // Determine if we have start time in record, as checking does not makes sense otherwise. - $sql = "select start from tt_log where id = $tt_log_id"; + // Determine if we have start time in record, as further checking does not makes sense otherwise. + $sql = "select user_id, date, start, duration from tt_log where id = $tt_log_id"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { if (!$res->numRows()) { $err->add($i18n->getKey('error.db')); // This is not expected. - return true; + return false; } $val = $res->fetchRow(); + $oldDuration = $val['duration']; if (!$val['start']) - return false; // No start time, therefore no overlap. + return true; // There is no start time in the record, therefore safe to modify. } - // TODO: Determine finish based on the existing record start and $new_duration. - // By probably using PHP time functions or toMinutes(). - - // Then check whether new duration puts the existing records beyond 24:00 boundary. - // and call the existing overlaps function. + // We do have start time. + // Quick test if new duration is less then already existing. + $newMinutes = ttTimeHelper::toMinutes($new_duration); + $oldMinutes = ttTimeHelper::toMinutes($oldDuration); + if ($newMinutes < $oldMinutes) + return true; // Safe to modify. + + // Does the new duration put the record beyond 24:00 boundary? + $startMinutes = ttTimeHelper::toMinutes($val['start']); + $newEndMinutes = $startMinutes + $newMinutes; + if ($newEndMinutes > 1440) { + // Invalid duration, as new duration puts the record beyond current day. + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + return false; + } - // For now return an error, until we implement the above. + // Does the new duration causes the record to overlap with others? + $user_id = $val['user_id']; + $date = $val['date']; + $startMinutes = ttTimeHelper::toMinutes($val['start']); + $start = ttTimeHelper::toAbsDuration($startMinutes); + $finish = ttTimeHelper::toAbsDuration($newEndMinutes); + if (ttTimeHelper::overlaps($user_id, $date, $start, $finish, $tt_log_id)) { + $err->add($i18n->getKey('error.overlap')); + return false; + } - $err->add("Week view is work in progress. Editing records with existing start times is currently not supported in week view. Try day view instead."); - return true; + return true; // There are no conflicts, safe to modify. } // getRecord - retrieves a time record identified by its id. @@ -1063,7 +1080,7 @@ static function modifyDurationFromWeekView($fields, $err) { // Possible errors: 1) Overlap if the existing record has start time. 2) Going beyond 24 hour boundary. // TODO: rename this function. // Handle different errors with specific error messages. - if (ttTimeHelper::ovelapsWithNewDuration($fields['tt_log_id'], $fields['duration'], $err)) { + if (!ttTimeHelper::wvCanModify($fields['tt_log_id'], $fields['duration'], $err)) { // $err->add($i18n->getKey('error.overlap')); return false; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 74654c2df..ac9cd89a6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3706| Copyright © Anuko | +  Anuko Time Tracker 1.13.1.3707| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From c6ebb0657fa010dc5724ad1ddf4f8866ea9013e0 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 16:08:08 +0000 Subject: [PATCH 0239/2515] Added a new localization string for week view. --- WEB-INF/resources/ca.lang.php | 3 +++ WEB-INF/resources/da.lang.php | 4 ++++ WEB-INF/resources/de.lang.php | 4 ++++ WEB-INF/resources/en.lang.php | 3 +++ WEB-INF/resources/es.lang.php | 4 ++++ WEB-INF/resources/fa.lang.php | 4 ++++ WEB-INF/resources/fi.lang.php | 4 ++++ WEB-INF/resources/fr.lang.php | 4 ++++ WEB-INF/resources/he.lang.php | 4 ++++ WEB-INF/resources/nl.lang.php | 4 ++++ WEB-INF/resources/pl.lang.php | 4 ++++ WEB-INF/resources/pt-br.lang.php | 4 ++++ WEB-INF/resources/ru.lang.php | 3 +++ WEB-INF/resources/sk.lang.php | 4 ++++ WEB-INF/resources/sr.lang.php | 4 ++++ WEB-INF/resources/sv.lang.php | 4 ++++ WEB-INF/templates/footer.tpl | 2 +- 17 files changed, 62 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 84d7765d8..c134ce03a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -342,6 +342,9 @@ // TODO: translate the following. // 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar com a favorit', // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 43b8dd66d..64ebe8657 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -320,6 +320,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Denne post blev kun gemt med starttidspunkt. Det er ikke en fejl.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Gem som favorit', 'form.reports.confirm_delete' => 'Er du sikker på at du vil slette denne favorit rapport?', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 348cb5b14..c4939356c 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -318,6 +318,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Dieser Eintrag wurde ohne Startzeit gespeichert. Dies ist kein Fehler.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Als bevorzugt speichern', 'form.reports.confirm_delete' => 'Sind Sie sicher, dass der bevorzugte Report gelöscht werden soll?', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index b6d132573..fb8082020 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -323,6 +323,9 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index a64fe1cd2..b32695f40 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -375,6 +375,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Este historial fue guardado solamente con la hora de Inicio. Esto no es un error.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar como favorito', // TODO: translate form.reports.confirm_delete. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 56ea959c6..6e8f02b3d 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -347,6 +347,10 @@ // TODO: translate form.time_edit.uncompleted. 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'ذخیره به عنوان برگزیده', 'form.reports.confirm_delete' => 'آیا می خواهید گزارش برگزیده حذف شود؟', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 56ba6db42..20853bcfe 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -321,6 +321,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Vain aloitusaika tallennettiin tietueeseen. Kyseessä ei ole virhe.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Tallenna raporttipohjaksi', 'form.reports.confirm_delete' => 'Haluatko varmasti poistaa tämän raporttipohjan?', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 498158749..3f7646563 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -312,6 +312,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Cet enregistrement a été sauvegardé avec une heure de début seulement. Il ne s\\\'agit pas d\\\'une erreur.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Enregistrer comme favori', 'form.reports.confirm_delete' => 'Êtes-vous certain de vouloir supprimer ce rapport des favoris?', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 2751dbda8..aa75ff574 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -347,6 +347,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'רישום זה נשמר עם שעת התחלה בלבד. זאת איננה טעות.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'שמור כמועדף', 'form.reports.confirm_delete' => 'האם ברצונך למחוק את הדוח המועדף הזה ?', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 323a64c52..06b60a303 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -321,6 +321,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Dit tijdrecord is opgeslagen met alleen een starttijd. Dit is geen fout.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Bewaren als standaard', 'form.reports.confirm_delete' => 'Weet u zeker dat u deze favoriete rapportage wilt verwijderen?', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index bd4c6bc93..94c308743 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -329,6 +329,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Ten wpis ma określony jedynie czas rozpoczęcia. To nie jest błąd.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Zapisz jako ulubiony', 'form.reports.confirm_delete' => 'Czy na pewno chcesz usunąć ten ulubiony raport?', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 89bd95a5a..4617d570e 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -322,6 +322,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Eesta entrada foi salva somente com hora de início. Não é um erro.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar como favorito', 'form.reports.confirm_delete' => 'Tem certeza que deseja remover este relatório dos favoritos?', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index b5d93026b..d837d0a17 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -321,6 +321,9 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Эта запись сохранена только со временем начала. Это не ошибка.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +'form.week.new_entry' => 'Новая запись', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Сохранить как стандартный отчёт', 'form.reports.confirm_delete' => 'Удалить стандартный отчёт?', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e9249132a..4ef634a90 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -345,6 +345,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Tento záznam bol uložený iba s časom začiatku. Nie je to chyba.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Uložiť ako obľúbenú zostavu', 'form.reports.confirm_delete' => 'Ste si istý, že chcete vymazať túto obľúbenú zostavu?', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 15d7b0ac2..178e626f0 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -326,6 +326,10 @@ // Izmena vremenske forme. Pogledajte primer na https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Ovaj zapis je sačuvan sa početnim vremenom i nije greška.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Forma izveštaja. Pogledajte primer na https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Sačuvaj u omiljenima', 'form.reports.confirm_delete' => 'Da li ste sigurni da želite obrisati omiljene izveštaje?', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 951e4bbfe..338dde993 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -324,6 +324,10 @@ // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Den här tidsregistreringen har sparats utan sluttid. Fyll i en sluttid och klicka på Spara för att avsluta.', +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Spara rapport som', 'form.reports.confirm_delete' => 'Är du säker på att du vill ta bort den här rapporten från dina favoriter?', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ac9cd89a6..b57861912 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- diff --git a/week.php b/week.php index 7cf1c945b..68193f56d 100644 --- a/week.php +++ b/week.php @@ -30,6 +30,7 @@ import('form.Form'); import('form.DefaultCellRenderer'); import('form.Table'); +import('form.TextField'); import('ttUserHelper'); import('ttTeamHelper'); import('ttClientHelper'); @@ -115,20 +116,23 @@ // Build day totals (total durations for each day in week). $dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); -// TODO: refactoring ongoing down from here. - -// 1) Handle editable - not editable records properly meaning that UI should reflect this. -// 2) Start coding modification of existing records. -// 3) Then adding new records for existing rows. -// 4) Then add code and UI for adding a new row. - -// Actually this is work in progress at this point, even documenting the array, as we still miss control IDs, and -// editing entries is not yet implemented. When this is done, we will have to re-document the above. - // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $this->setOptions(array('width'=>200,'valign'=>'middle')); + // Special handling for row 0, which represents a new week entry. + if (0 == $row) { + $this->setOptions(array('style'=>'text-align: center; font-weight: bold;')); + } + // Special handling for not billable entries. + /* // TODO: this does not work and should be coded properly. + if ($row > 0) { + $row_id = $table->getValueAt($row,1+$column)['row_id']; + $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl'); + if (!$billable) { + $this->setOptions(array('class'=>'not_billable')); // TODO: Should not we add options instead? How does it work exactly? + } + }*/ $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. return $this->toString(); } @@ -255,20 +259,6 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Add other controls. -if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { - $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); - $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); - } -} -if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) - $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); -if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); -$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar if ($user->isPluginEnabled('iv')) $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); @@ -288,193 +278,103 @@ function render(&$table, $value, $row, $column, $selected = false) { 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } } -// TODO: the above needs to be refactored for week view. - - // Submit. if ($request->isPost()) { if ($request->getParameter('btn_submit')) { -/* - // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) - $err->add($i18n->getKey('error.client')); - if ($custom_fields) { - if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']); - } - if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { - if (!$cl_project) $err->add($i18n->getKey('error.project')); - } - if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode && $user->task_required) { - if (!$cl_task) $err->add($i18n->getKey('error.task')); - } - if (strlen($cl_duration) == 0) { - if ($cl_start || $cl_finish) { - if (!ttTimeHelper::isValidTime($cl_start)) - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.start')); - if ($cl_finish) { - if (!ttTimeHelper::isValidTime($cl_finish)) - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.finish')); - if (!ttTimeHelper::isValidInterval($cl_start, $cl_finish)) - $err->add($i18n->getKey('error.interval'), $i18n->getKey('label.finish'), $i18n->getKey('label.start')); - } - } else { - if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { - $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.start')); - $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.finish')); - } - if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type)) - $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); + // Validate user input for row 0. + // Determine if a new entry was posted. + $newEntryPosted = false; + foreach($dayHeaders as $dayHeader) { + $control_id = '0_'.$dayHeader; + if ($request->getParameter($control_id)) { + $newEntryPosted = true; + break; } - } else { - if (!ttTimeHelper::isValidDuration($cl_duration)) - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); } - if (!ttValidString($cl_note, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.note')); - // Finished validating user input. - - // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->getKey('error.future_date')); + if ($newEntryPosted) { + if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) + $err->add($i18n->getKey('error.client')); + if ($custom_fields) { + if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']); + } + if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { + if (!$cl_project) $err->add($i18n->getKey('error.project')); + } + if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode && $user->task_required) { + if (!$cl_task) $err->add($i18n->getKey('error.task')); + } } - // Prohibit creating entries in locked range. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->getKey('error.range_locked')); - - // Prohibit creating another uncompleted record. + // Process the table of values. if ($err->no()) { - if (($not_completed_rec = ttTimeHelper::getUncompleted($user->getActiveUser())) && (($cl_finish == '') && ($cl_duration == ''))) - $err->add($i18n->getKey('error.uncompleted_exists')." ".$i18n->getKey('error.goto_uncompleted').""); - } - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) - $err->add($i18n->getKey('error.overlap')); - } -// TODO: refactor the above. -*/ - // Obtain values. Perhaps, it's best to iterate throigh posted parameters one by one, - // see if anything changed, and apply one change at a time until we see an error. - // TODO: check for locked days just in case. - $result = true; - $rowNumber = 0; - // Iterate through existing rows. - foreach ($dataArray as $row) { - // Iterate through days. - foreach ($dayHeaders as $key => $dayHeader) { - // Do not process locked days. - if ($lockedDays[$key]) continue; - // Make control id for the cell. - $control_id = $rowNumber.'_'.$dayHeader; - // Optain existing and posted durations. - $postedDuration = $request->getParameter($control_id); - $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; - // If posted value is not null, check and normalize it. - if ($postedDuration) { - if (ttTimeHelper::isValidDuration($postedDuration)) { - $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. + // Obtain values. Perhaps, it's best to iterate throigh posted parameters one by one, + // see if anything changed, and apply one change at a time until we see an error. + $result = true; + $rowNumber = 0; + // Iterate through existing rows. + foreach ($dataArray as $row) { + // Iterate through days. + foreach ($dayHeaders as $key => $dayHeader) { + // Do not process locked days. + if ($lockedDays[$key]) continue; + // Make control id for the cell. + $control_id = $rowNumber.'_'.$dayHeader; + // Optain existing and posted durations. + $postedDuration = $request->getParameter($control_id); + $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; + // If posted value is not null, check and normalize it. + if ($postedDuration) { + if (ttTimeHelper::isValidDuration($postedDuration)) { + $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. + } else { + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + $result = false; break; // Break out. Stop any further processing. + } + } + // Do not process if value has not changed. + if ($postedDuration == $existingDuration) + continue; + // Posted value is different. + if ($existingDuration == null) { + // Insert a new record here. + $fields = array(); + $fields['row_id'] = $dataArray[$rowNumber]['row_id']; + if (!$fields['row_id']) { + // Special handling for row 0, a new entry. Need to construct row_id. + $record = array(); + $record['client_id'] = $cl_client; + $record['billable'] = $cl_billable ? '1' : '0'; + $record['project_id'] = $cl_project; + $record['task_id'] = $cl_task; + $record['cf_1_value'] = $cl_cf_1; + $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; + } + $fields['day_header'] = $dayHeader; + $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. + $fields['duration'] = $postedDuration; + $fields['browser_today'] = $request->getParameter('browser_today', null); + $result = ttTimeHelper::insertDurationFromWeekView($fields, $custom_fields, $err); + } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { + // Delete an already existing record here. + $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); } else { - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); - $result = false; break; // Break out. Stop any further processing. + $fields = array(); + $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; + $fields['duration'] = $postedDuration; + $result = ttTimeHelper::modifyDurationFromWeekView($fields, $err); } - } - // Do not process if value has not changed. - if ($postedDuration == $existingDuration) - continue; - // Posted value is different. - if ($existingDuration == null) { - // Insert a new record here. - $fields = array(); - $fields['row_id'] = $dataArray[$rowNumber]['row_id']; - $fields['day_header'] = $dayHeader; - $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. - $fields['duration'] = $postedDuration; - $fields['browser_today'] = $request->getParameter('browser_today', null); - $result = ttTimeHelper::insertDurationFromWeekView($fields, $custom_fields, $err); - } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { - // Delete an already existing record here. - $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); - } else { - $fields = array(); - $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; - $fields['duration'] = $postedDuration; - $result = ttTimeHelper::modifyDurationFromWeekView($fields, $err); + if (!$result) break; // Break out of the loop in case of first error. } if (!$result) break; // Break out of the loop in case of first error. + $rowNumber++; } - if (!$result) break; // Break out of the loop in case of first error. - $rowNumber++; - } - if ($result) { - header('Location: week.php'); // Normal exit. - exit(); - } - // $err->add($i18n->getKey('error.db')); - /* - // - // - // - // Insert record. - if ($err->no()) { - $id = ttTimeHelper::insert(array( - 'date' => $cl_date, - 'user_id' => $user->getActiveUser(), - 'client' => $cl_client, - 'project' => $cl_project, - 'task' => $cl_task, - 'start' => $cl_start, - 'finish' => $cl_finish, - 'duration' => $cl_duration, - 'note' => $cl_note, - 'billable' => $cl_billable)); - - // Insert a custom field if we have it. - $result = true; - if ($id && $custom_fields && $cl_cf_1) { - if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) - $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cl_cf_1); - elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) - $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cl_cf_1, null); - } - if ($id && $result) { - header('Location: time.php'); + if ($result) { + header('Location: week.php'); // Normal exit. exit(); } - $err->add($i18n->getKey('error.db')); } - } elseif ($request->getParameter('btn_stop')) { - // Stop button pressed to finish an uncompleted record. - $record_id = $request->getParameter('record_id'); - $record = ttTimeHelper::getRecord($record_id, $user->getActiveUser()); - $browser_date = $request->getParameter('browser_date'); - $browser_time = $request->getParameter('browser_time'); - - // Can we complete this record? - if ($record['date'] == $browser_date // closing today's record - && ttTimeHelper::isValidInterval($record['start'], $browser_time) // finish time is greater than start time - && !ttTimeHelper::overlaps($user->getActiveUser(), $browser_date, $record['start'], $browser_time)) { // no overlap - $res = ttTimeHelper::update(array( - 'id'=>$record['id'], - 'date'=>$record['date'], - 'user_id'=>$user->getActiveUser(), - 'client'=>$record['client_id'], - 'project'=>$record['project_id'], - 'task'=>$record['task_id'], - 'start'=>$record['start'], - 'finish'=>$browser_time, - 'note'=>$record['comment'], - 'billable'=>$record['billable'])); - if (!$res) - $err->add($i18n->getKey('error.db')); - } else { - // Cannot complete, redirect for manual edit. - header('Location: time_edit.php?id='.$record_id); - exit(); - }*/ } elseif ($request->getParameter('onBehalfUser')) { if($user->canManageTeam()) { From 9c4ab146c232549bc5276189be3eb2daf82a3169 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 23:14:56 +0000 Subject: [PATCH 0241/2515] Fixed a problem with inserting values with 0 duration from week view. --- WEB-INF/templates/footer.tpl | 2 +- week.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7b92e1634..44ffd6c7f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.13.1.3707| Copyright © Anuko | +  Anuko Time Tracker 1.13.1.3708| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e84f77ca5b0a5470425cac47aa90563508793699 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 18:47:26 +0000 Subject: [PATCH 0240/2515] Added a capability to add new records from week view. --- WEB-INF/lib/ttTimeHelper.class.php | 51 +++-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 29 +++ week.php | 286 ++++++++++------------------- 4 files changed, 159 insertions(+), 209 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 45a60b43b..cf521b604 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -794,35 +794,56 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // // Description of $dataArray format that the function returns. // $dataArray = array( - // array( // Row 0. - // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). - // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. - // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), - // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), + // array( // Row 0. This is a special, one-off row for a new week entry with empty values. + // 'row_id' => null', // Row identifier. Null for a new entry. + // 'label' => 'New entry', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => null, 'duration' => null), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => null, 'duration' => null), + // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => null, 'duration' => null), // 'day_3' => array('control_id' => '0_day_3', 'tt_log_id' => null, 'duration' => null), - // 'day_4' => array('control_id' => '0_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), + // 'day_4' => array('control_id' => '0_day_4', 'tt_log_id' => null, 'duration' => null), + // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => null, 'duration' => null), // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) // ), // array( // Row 1. + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). + // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), + // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), + // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => null, 'duration' => null), + // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), + // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) + // ), + // array( // Row 2. // 'row_id' => 'bl:0_0', // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. - // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => null, 'duration' => null), - // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), - // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => null, 'duration' => null), - // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), - // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => null, 'duration' => null), - // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) + // 'day_0' => array('control_id' => '2_day_0', 'tt_log_id' => null, 'duration' => null), + // 'day_1' => array('control_id' => '2_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), + // 'day_2' => array('control_id' => '2_day_2', 'tt_log_id' => null, 'duration' => null), + // 'day_3' => array('control_id' => '2_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), + // 'day_4' => array('control_id' => '2_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '2_day_5', 'tt_log_id' => null, 'duration' => null), + // 'day_6' => array('control_id' => '2_day_6', 'tt_log_id' => null, 'duration' => null) // ) // ); static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { + global $i18n; + // Start by obtaining all records in interval. $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); $dataArray = array(); + // Construct the first row for a brand new entry. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry')); // Insert row. + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + // Iterate through records and build $dataArray cell by cell. foreach ($records as $record) { // Create record id without suffix. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b57861912..7b92e1634 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{/if} +{if $user->isPluginEnabled('cl')} + + + + +{/if} +{if $user->isPluginEnabled('iv')} + + + + +{/if} +{if ($custom_fields && $custom_fields->fields[0])} + + + +{/if} +{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + + + +{/if} +{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + + + {/if}
 Anuko Time Tracker 1.13.1.3708| Copyright © Anuko | +  Anuko Time Tracker 1.13.2.3709| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 6b35a621e..74d14419d 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -21,6 +21,35 @@ {$i18n.label.user}: {$forms.weekTimeForm.onBehalfUser.control}
{$i18n.label.client}{if $user->isPluginEnabled('cm')} (*){/if}:{$forms.weekTimeForm.client.control}
 
{$custom_fields->fields[0]['label']|escape}{if $custom_fields->fields[0]['required']} (*){/if}:{$forms.weekTimeForm.cf_1.control}
{$i18n.label.project} (*):{$forms.weekTimeForm.project.control}
{$i18n.label.task}:{$forms.weekTimeForm.task.control}
-
 Anuko Time Tracker 1.13.2.3709| Copyright © Anuko | +  Anuko Time Tracker 1.13.2.3710| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 68193f56d..d457837b5 100644 --- a/week.php +++ b/week.php @@ -338,7 +338,10 @@ function render(&$table, $value, $row, $column, $selected = false) { continue; // Posted value is different. if ($existingDuration == null) { - // Insert a new record here. + // Skip inserting 0 duration values. + if (0 == ttTimeHelper::toMinutes($postedDuration)) + continue; + // Insert a new record. $fields = array(); $fields['row_id'] = $dataArray[$rowNumber]['row_id']; if (!$fields['row_id']) { From 038ab62759618b89578ba78d127337319ae37695 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 30 Dec 2017 13:54:49 +0000 Subject: [PATCH 0242/2515] Added a field for note value in week view to apply to new entries. --- WEB-INF/lib/ttTimeHelper.class.php | 1 + WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 4 ++++ week.php | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index cf521b604..8bc2012e8 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -1074,6 +1074,7 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { $fields4insert['billable'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); $fields4insert['project'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); $fields4insert['task'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); + $fields4insert['note'] = $fields['note']; // Try to insert a record. $id = ttTimeHelper::insert($fields4insert); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 44ffd6c7f..c7cbc49f1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} + + + +
 Anuko Time Tracker 1.13.2.3710| Copyright © Anuko | +  Anuko Time Tracker 1.13.2.3711| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 74d14419d..97a5a3028 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -51,6 +51,10 @@ {$forms.weekTimeForm.task.control}
{$i18n.label.note}:{$forms.weekTimeForm.note.control}
diff --git a/week.php b/week.php index d457837b5..3cb4ea73e 100644 --- a/week.php +++ b/week.php @@ -106,6 +106,7 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; +$cl_note = trim($request->getParameter('note')); // Get the data we need to display week view. // Get column headers, which are day numbers in month. @@ -257,6 +258,7 @@ function render(&$table, $value, $row, $column, $selected = false) { 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } +$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); // Add other controls. $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar @@ -353,6 +355,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $record['task_id'] = $cl_task; $record['cf_1_value'] = $cl_cf_1; $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; + $fields['note'] = $cl_note; } $fields['day_header'] = $dayHeader; $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. From 31f452155587fed077f8233b00882b865e08fecb Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 31 Dec 2017 14:48:57 +0000 Subject: [PATCH 0243/2515] Added week total and monthly quotas plugin output to week view. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c7cbc49f1..1d0b382e8 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.2.3711| Copyright © Anuko | +  Anuko Time Tracker 1.13.3.3712| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 97a5a3028..34edf9201 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -69,6 +69,22 @@ {$forms.weekTimeForm.week_durations.control}
+ + + + + + {if $user->isPluginEnabled('mq')} + + + {if $over_quota} + + {else} + + {/if} + + {/if} +
{$i18n.label.week_total}: {$week_total}
{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}
From 88a1f19a4593e960d7f15225d446f6dcada26dbc Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 31 Dec 2017 16:07:24 +0000 Subject: [PATCH 0244/2515] Temporary fix for not billable entries in week view. --- WEB-INF/lib/form/Table.class.php | 4 ++-- WEB-INF/lib/ttTeamHelper.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- week.php | 7 +++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index e5aed81dc..1e692c316 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -53,11 +53,11 @@ function __construct($name) { } function setKeyField($value) { - $this->mKeyField = $value; + $this->mKeyField = $value; } function setData($data) { - if (is_array($data) && isset($data[0]) && is_array($data[0])) + if (is_array($data) && isset($data[0]) && is_array($data[0])) $this->mData = &$data; } diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index e726b92fb..ba678fcbc 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -810,9 +810,9 @@ static function getInactiveTeams() { $inactive_teams = array(); $mdb2 = getConnection(); - // Get all team ids for teams created or modified more than 1 year ago. + // Get all team ids for teams created or modified more than 6 months ago. // $ts = date('Y-m-d', strtotime('-1 year')); - $ts = date('Y-m-d', strtotime('-4 month')); + $ts = date('Y-m-d', strtotime('-6 month')); $sql = "select id from tt_teams where timestamp < '$ts' order by id"; $res = $mdb2->query($sql); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1d0b382e8..da58a09bf 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
{$forms.weekTimeForm.btn_submit.control}
-
 Anuko Time Tracker 1.13.3.3712| Copyright © Anuko | +  Anuko Time Tracker 1.13.4.3713| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 3cb4ea73e..bc1e4717c 100644 --- a/week.php +++ b/week.php @@ -126,14 +126,13 @@ function render(&$table, $value, $row, $column, $selected = false) { $this->setOptions(array('style'=>'text-align: center; font-weight: bold;')); } // Special handling for not billable entries. - /* // TODO: this does not work and should be coded properly. if ($row > 0) { - $row_id = $table->getValueAt($row,1+$column)['row_id']; + $row_id = $table->getValueAtName($row,'row_id'); $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl'); if (!$billable) { - $this->setOptions(array('class'=>'not_billable')); // TODO: Should not we add options instead? How does it work exactly? + $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. } - }*/ + } $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. return $this->toString(); } From b0af7568a521ff78699bff7770bea622372adacd Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 31 Dec 2017 16:09:54 +0000 Subject: [PATCH 0245/2515] Recovered a lost space in footer. --- WEB-INF/templates/footer.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index da58a09bf..27f2f4b0e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.4.3713| Copyright © Anuko | +  Anuko Time Tracker 1.13.4.3713 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b4088c1f6c708e0a8e39fff1c2826d91cef13cd5 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 1 Jan 2018 19:34:37 +0000 Subject: [PATCH 0246/2515] Allowed including items with 0 cost in invoices. --- WEB-INF/lib/ttInvoiceHelper.class.php | 24 ++++++++++++++++++------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 3980b8fb5..b7d2cc280 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -211,8 +211,8 @@ static function invoiceableItemsExist($fields) { $sql = "select count(*) as num from tt_log l, tt_users u where l.status = 1 and l.client_id = $client_id and l.invoice_id is NULL and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end)." - and l.billable * u.rate * time_to_sec(l.duration)/3600 > 0 - and l.user_id = u.id"; + and l.user_id = u.id + and l.billable = 1"; // l.billable * u.rate * time_to_sec(l.duration)/3600 > 0 // See explanation below. } else { // sql part for project id. if ($project_id) $project_part = " and l.project_id = $project_id"; @@ -221,8 +221,14 @@ static function invoiceableItemsExist($fields) { $sql = "select count(*) as num from tt_log l, tt_user_project_binds upb where l.status = 1 and l.client_id = $client_id $project_part and l.invoice_id is NULL and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end)." - and l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0 - and upb.user_id = l.user_id and upb.project_id = l.project_id"; + and upb.user_id = l.user_id and upb.project_id = l.project_id + and l.billable = 1"; // l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0 + // Users with a lot of clients and projects (Jaro) may forget to set user rates properly. + // Specifically, user rate may be set to 0 on a project, by mistake. This leads to error.no_invoiceable_items + // and increased support cost. Commenting out allows us to include 0 cost items in invoices so that + // the problem becomes obvious. + + // TODO: If the above turns out useful, rework the query to simplify it by removing left join. } $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { @@ -293,7 +299,7 @@ static function createInvoice($fields) { set l.invoice_id = $last_id where l.status = 1 and l.client_id = $client_id and l.invoice_id is NULL and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end)." - and l.billable * u.rate * time_to_sec(l.duration)/3600 > 0"; + and l.billable = 1"; // l.billable * u.rate * time_to_sec(l.duration)/3600 > 0"; // See explanation below. } else { // sql part for project id. if ($project_id) $project_part = " and l.project_id = $project_id"; @@ -304,7 +310,13 @@ static function createInvoice($fields) { set l.invoice_id = $last_id where l.status = 1 and l.client_id = $client_id $project_part and l.invoice_id is NULL and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end)." - and l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0"; + and l.billable = 1"; // l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0"; + // Users with a lot of clients and projects (Jaro) may forget to set user rates properly. + // Specifically, user rate may be set to 0 on a project, by mistake. This leads to error.no_invoiceable_items + // and increased support cost. Commenting out allows us to include 0 cost items in invoices so that + // the problem becomes obvious. + + // TODO: If the above turns out useful, rework the query to simplify it by removing left join. } $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 27f2f4b0e..7321b8789 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.4.3713 | Copyright © Anuko | +  Anuko Time Tracker 1.13.5.3714 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From fc0eb9d0e457236fc7a588b8be95a6829354dd25 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 2 Jan 2018 23:41:22 +0000 Subject: [PATCH 0247/2515] Style fix for week view. --- WEB-INF/templates/footer.tpl | 2 +- week.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7321b8789..d6541b242 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.5.3714 | Copyright © Anuko | +  Anuko Time Tracker 1.13.6.3715 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index bc1e4717c..4de08c992 100644 --- a/week.php +++ b/week.php @@ -148,7 +148,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($lockedDays[$column-1]) $field->setEnabled(false); $field->setFormName($table->getFormName()); - $field->setSize(2); + $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. $field->setValue($table->getValueAt($row,$column)['duration']); // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control // because we can't supply start and finish times in week view - there are no fields for them. From aa27657255fc93dafff0be41c823a7b3bfbe0e39 Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 3 Jan 2018 17:16:36 +0000 Subject: [PATCH 0248/2515] Provided an example in .htaccess how to restrict access by IP. --- .htaccess | 15 +++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index c91ca1c3e..7c4d0aff1 100644 --- a/.htaccess +++ b/.htaccess @@ -1 +1,16 @@ AddDefaultCharset utf-8 + +# Restrict access to Time Tracker only from certain IPs. +# +# See https://www.anuko.com/time_tracker/faq/restrict_access_by_ip.htm +# For this to work make sure AllowOverride is set to All in web server config file. +# Uncomment 3 lines below and set your IP accordingly. +# +# Order Deny,Allow +# Deny from all +# Allow from 127.0.0.1 +# +# An example for an entire subnet 192.168.1.0 - 192.168.1.255 +# Order Deny,Allow +# Deny from all +# Allow from 192.168.1 diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d6541b242..398e5e4e3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.6.3715 | Copyright © Anuko | +  Anuko Time Tracker 1.13.6.3716 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 54c38578b32dad370d707ef0530dd0a9bea2273c Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 3 Jan 2018 17:19:33 +0000 Subject: [PATCH 0249/2515] Cosmetic. --- .htaccess | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 7c4d0aff1..189e6b4b8 100644 --- a/.htaccess +++ b/.htaccess @@ -2,7 +2,7 @@ AddDefaultCharset utf-8 # Restrict access to Time Tracker only from certain IPs. # -# See https://www.anuko.com/time_tracker/faq/restrict_access_by_ip.htm +# See https://www.anuko.com/time_tracker/faq/restrict_access_by_ip.htm for help. # For this to work make sure AllowOverride is set to All in web server config file. # Uncomment 3 lines below and set your IP accordingly. # @@ -10,7 +10,7 @@ AddDefaultCharset utf-8 # Deny from all # Allow from 127.0.0.1 # -# An example for an entire subnet 192.168.1.0 - 192.168.1.255 +# An example for an entire subnet 192.168.1.0 - 192.168.1.255. # Order Deny,Allow # Deny from all # Allow from 192.168.1 From e01c6ea472dc5cce5986bee569e53a4031eaf883 Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 4 Jan 2018 13:51:07 +0000 Subject: [PATCH 0250/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 8 +++----- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 06b60a303..0ea7673cd 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -165,9 +165,8 @@ 'label.configure' => 'Stel in', 'label.select_all' => 'Selecteer alle', 'label.select_none' => 'Selecteer niets', -// TODO: translate the following. -// 'label.day_view' => 'Day view', -// 'label.week_view' => 'Week view', +'label.day_view' => 'Dag overzicht', +'label.week_view' => 'Week overzicht', 'label.id' => 'ID', 'label.language' => 'Taal', 'label.decimal_mark' => 'Decimaal teken', @@ -322,8 +321,7 @@ 'form.time_edit.uncompleted' => 'Dit tijdrecord is opgeslagen met alleen een starttijd. Dit is geen fout.', // Week view form. See example at https://timetracker.anuko.com/week.php. -// TODO: translate the following. -// 'form.week.new_entry' => 'New entry', +'form.week.new_entry' => 'Nieuwe toevoeging', // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Bewaren als standaard', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 398e5e4e3..ed229d5ce 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.6.3716 | Copyright © Anuko | +  Anuko Time Tracker 1.13.6.3717 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6d39778a39a1ac2441b00150ca8ecdb049d655fe Mon Sep 17 00:00:00 2001 From: anuko Date: Thu, 4 Jan 2018 14:12:41 +0000 Subject: [PATCH 0251/2515] Changed the label on week view for clarity. --- WEB-INF/lib/ttTimeHelper.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 8bc2012e8..35900f875 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -1014,7 +1014,7 @@ static function getDayTotals($dataArray, $dayHeaders) { // Insert label. global $i18n; - $dayTotals['label'] = $i18n->getKey('label.total'); + $dayTotals['label'] = $i18n->getKey('label.day_total'); foreach ($dataArray as $row) { foreach($dayHeaders as $dayHeader) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ed229d5ce..abc0e45dc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.6.3717 | Copyright © Anuko | +  Anuko Time Tracker 1.13.6.3718 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 58d005dd74e63575f7dc1e9f79e54be2f314651b Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 5 Jan 2018 17:46:01 +0000 Subject: [PATCH 0252/2515] Improved handling of old_password() function not found situation. --- WEB-INF/lib/auth/Auth_db.class.php | 5 ++++- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/auth/Auth_db.class.php b/WEB-INF/lib/auth/Auth_db.class.php index 4861552c7..dccc98236 100644 --- a/WEB-INF/lib/auth/Auth_db.class.php +++ b/WEB-INF/lib/auth/Auth_db.class.php @@ -71,7 +71,10 @@ function authenticate($login, $password) WHERE login = ".$mdb2->quote($login)." AND password = old_password(".$mdb2->quote($password).") AND status = 1"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) { - die($res->getMessage()); + return false; // Simply return false for a meaningful error message on screen, see the comment below. + // die($res->getMessage()); // old_password() function is removed in MySQL 5.7.5. + // We are getting a confusing "MDB2 Error: not found" in this case if we die. + // TODO: perhaps it's time to simplify things and remove handling of old passwords completely. } $val = $res->fetchRow(); if ($val['id'] > 0) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index abc0e45dc..ab9fbcc7c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.6.3718 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3719 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From d3b45bbcfa1a91751660a384939938f419f7a045 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 14:55:08 +0000 Subject: [PATCH 0253/2515] Work in progress enhancing week view. --- WEB-INF/lib/form/FormElement.class.php | 5 ++++- WEB-INF/lib/form/Table.class.php | 6 +++++- WEB-INF/templates/footer.tpl | 2 +- week.php | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index 799abf7b1..ff7b3b28a 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -39,13 +39,16 @@ class FormElement { var $label = ''; // Optional label for control. var $style = ''; // Control style. var $enabled = true; // Whether the control is enabled. - var $class = 'FormElement'; // Class name for the element. + var $class = 'FormElement'; // PHP class name for the element. + var $cssClass = null; // CSS class name for the element. function __construct() { } function getName() { return $this->name; } function getClass() { return $this->class; } + function getCssClass() { return $this->cssClass; } + function setCssClass($cssClass) { $this->cssClass = $cssClass; } function setFormName($name) { $this->form_name = $name; } function getFormName() { return $this->form_name; } diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 1e692c316..7bcd78be8 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -47,9 +47,10 @@ class Table extends FormElement { var $mHeaderOptions = array(); var $mProccessed = false; - function __construct($name) { + function __construct($name, $cssClass = null) { $this->class = 'Table'; $this->name = $name; + $this->cssClass = $cssClass; } function setKeyField($value) { @@ -122,6 +123,9 @@ function getHtml() { if ($this->mInteractive) $html .= $this->_addJavaScript(); $html .= "cssClass) { + $html .= " class=\"".$this->cssClass."\""; + } if (count($this->mTableOptions) > 0) { foreach ($this->mTableOptions as $k=>$v) { $html .= " $k=\"$v\""; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ab9fbcc7c..8c04b71de 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3719 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3720 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 4de08c992..1b014d2bf 100644 --- a/week.php +++ b/week.php @@ -179,7 +179,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Create week_durations table. -$table = new Table('week_durations'); +$table = new Table('week_durations', 'week_view_table'); // $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('class'=>'tableHeaderCentered')); From 9d56e5c5cce354a50c1a7b3279e387baab919e09 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 15:05:49 +0000 Subject: [PATCH 0254/2515] Improved comments. --- week.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/week.php b/week.php index 1b014d2bf..5d1e29ff8 100644 --- a/week.php +++ b/week.php @@ -73,7 +73,7 @@ $smarty->assign('custom_fields', $custom_fields); } -// TODO: how is this plugin supposed to work for week view? +// Use Monthly Quotas plugin, if applicable. if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); @@ -180,7 +180,6 @@ function render(&$table, $value, $row, $column, $selected = false) { // Create week_durations table. $table = new Table('week_durations', 'week_view_table'); -// $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('class'=>'tableHeaderCentered')); $table->setData($dataArray); @@ -310,8 +309,8 @@ function render(&$table, $value, $row, $column, $selected = false) { // Process the table of values. if ($err->no()) { - // Obtain values. Perhaps, it's best to iterate throigh posted parameters one by one, - // see if anything changed, and apply one change at a time until we see an error. + // Obtain values. Iterate through posted parameters one by one, + // see if value changed, apply one change at a time until we see an error. $result = true; $rowNumber = 0; // Iterate through existing rows. @@ -346,14 +345,15 @@ function render(&$table, $value, $row, $column, $selected = false) { $fields = array(); $fields['row_id'] = $dataArray[$rowNumber]['row_id']; if (!$fields['row_id']) { - // Special handling for row 0, a new entry. Need to construct row_id. + // Special handling for row 0, a new entry. Need to construct new row_id. $record = array(); $record['client_id'] = $cl_client; $record['billable'] = $cl_billable ? '1' : '0'; $record['project_id'] = $cl_project; $record['task_id'] = $cl_task; $record['cf_1_value'] = $cl_cf_1; - $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; + $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row... + // We may have to increment the suffix here. $fields['note'] = $cl_note; } $fields['day_header'] = $dayHeader; From 821f166344d7ca9d61bc1a04f08ad46a156e251a Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 15:40:53 +0000 Subject: [PATCH 0255/2515] Refactoring ongoing on week view functions. --- WEB-INF/lib/ttTimeHelper.class.php | 32 +++------------- WEB-INF/lib/ttWeekViewHelper.class.php | 53 ++++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- week.php | 3 +- 4 files changed, 61 insertions(+), 29 deletions(-) create mode 100644 WEB-INF/lib/ttWeekViewHelper.class.php diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 35900f875..f1c003754 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -922,28 +922,6 @@ static function makeRecordIdentifier($record) { return $record_identifier; } - // parseFromWeekViewRow - obtains field value encoded in row identifier. - // For example, for a row id like "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" - // requesting a client "cl" should return 546. - static function parseFromWeekViewRow($row_id, $field_label) { - // Find beginning of label. - $pos = strpos($row_id, $field_label); - if ($pos === false) return null; // Not found. - - // Strip suffix from row id. - $suffixPos = strrpos($row_id, '_'); - if ($suffixPos) - $remaninder = substr($row_id, 0, $suffixPos); - - // Find beginning of value. - $posBegin = 1 + strpos($remaninder, ':', $pos); - // Find end of value. - $posEnd = strpos($remaninder, ',', $posBegin); - if ($posEnd === false) $posEnd = strlen($remaninder); - // Return value. - return substr($remaninder, $posBegin, $posEnd - $posBegin); - } - // makeRecordLabel - builds a human readable label for a row in week view, // which is a combination ot record properties. // Client - Project - Task - Custom field 1. @@ -1070,10 +1048,10 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { $fields4insert['user_id'] = $user->getActiveUser(); $fields4insert['date'] = $entry_date; $fields4insert['duration'] = $fields['duration']; - $fields4insert['client'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cl'); - $fields4insert['billable'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); - $fields4insert['project'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); - $fields4insert['task'] = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); + $fields4insert['client'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cl'); + $fields4insert['billable'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); + $fields4insert['project'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); + $fields4insert['task'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); $fields4insert['note'] = $fields['note']; // Try to insert a record. @@ -1082,7 +1060,7 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { // Insert custom field if we have it. $result = true; - $cf_1 = ttTimeHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); + $cf_1 = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); if ($custom_fields && $cf_1) { if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cf_1); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php new file mode 100644 index 000000000..7b9537f99 --- /dev/null +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -0,0 +1,53 @@ + -
 Anuko Time Tracker 1.13.7.3720 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3721 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 5d1e29ff8..b88310729 100644 --- a/week.php +++ b/week.php @@ -33,6 +33,7 @@ import('form.TextField'); import('ttUserHelper'); import('ttTeamHelper'); +import('ttWeekViewHelper'); import('ttClientHelper'); import('ttTimeHelper'); import('DateAndTime'); @@ -128,7 +129,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Special handling for not billable entries. if ($row > 0) { $row_id = $table->getValueAtName($row,'row_id'); - $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl'); + $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl'); if (!$billable) { $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. } From 0d4a0c7b9c3486e590c311273bc78109340263dd Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 15:47:10 +0000 Subject: [PATCH 0256/2515] Refactoring in progress. Moved one more function to ttWeekViewHelper class. --- WEB-INF/lib/ttTimeHelper.class.php | 30 +------------------------- WEB-INF/lib/ttWeekViewHelper.class.php | 28 ++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index f1c003754..bf0b2e170 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -859,7 +859,7 @@ static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders // Find row. $pos = ttTimeHelper::findRow($record_id, $dataArray); if ($pos < 0) { - $dataArray[] = array('row_id' => $record_id,'label' => ttTimeHelper::makeRecordLabel($record)); // Insert row. + $dataArray[] = array('row_id' => $record_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. $pos = ttTimeHelper::findRow($record_id, $dataArray); // Insert empty cells with proper control ids. for ($i = 0; $i < 7; $i++) { @@ -922,34 +922,6 @@ static function makeRecordIdentifier($record) { return $record_identifier; } - // makeRecordLabel - builds a human readable label for a row in week view, - // which is a combination ot record properties. - // Client - Project - Task - Custom field 1. - // Note that billable property is not part of the label. Instead, we intend to - // identify such records with a different color in week view. - static function makeRecordLabel($record) { - global $user; - // Start with client. - if ($user->isPluginEnabled('cl')) - $label = $record['client']; - - // Add project. - if (!empty($label) && !empty($record['project'])) $label .= ' - '; - $label .= $record['project']; - - // Add task. - if (!empty($label) && !empty($record['task'])) $label .= ' - '; - $label .= $record['task']; - - // Add custom field 1. - if ($user->isPluginEnabled('cf')) { - if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - '; - $label .= $record['cf_1_value']; - } - - return $label; - } - // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 7b9537f99..e74a3de1b 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -29,6 +29,34 @@ // ttWeekViewHelper class groups together functions used in week view. class ttWeekViewHelper { + // makeRowLabel - builds a human readable label for a row in week view, + // which is a combination ot record properties. + // Client - Project - Task - Custom field 1. + // Note that billable property is not part of the label. Instead, + // we identify such records with a different color in week view. + static function makeRowLabel($record) { + global $user; + // Start with client. + if ($user->isPluginEnabled('cl')) + $label = $record['client']; + + // Add project. + if (!empty($label) && !empty($record['project'])) $label .= ' - '; + $label .= $record['project']; + + // Add task. + if (!empty($label) && !empty($record['task'])) $label .= ' - '; + $label .= $record['task']; + + // Add custom field 1. + if ($user->isPluginEnabled('cf')) { + if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - '; + $label .= $record['cf_1_value']; + } + + return $label; + } + // parseFromWeekViewRow - obtains field value encoded in row identifier. // For example, for a row id like "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" // requesting a client "cl" should return 546. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index cbdf9c618..c3a622972 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3721 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3722 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 621c2592fb3db0dfdea6be497381d847938f708c Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 16:05:51 +0000 Subject: [PATCH 0257/2515] Refactoring. Moved 2 more functions to ttWeekViewHelper class. --- WEB-INF/lib/ttTimeHelper.class.php | 36 -------------------------- WEB-INF/lib/ttWeekViewHelper.class.php | 36 ++++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- week.php | 4 +-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index bf0b2e170..3cc2f15da 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -922,42 +922,6 @@ static function makeRecordIdentifier($record) { return $record_identifier; } - // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. - static function getDayHeadersForWeek($start_date) { - $dayHeaders = array(); - $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $dayHeaders[] = (string) $objDate->getDate(); // It returns an int on first call. - if (strlen($dayHeaders[0]) == 1) // Which is an implementation detail of DateAndTime class. - $dayHeaders[0] = '0'.$dayHeaders[0]; // Add a 0 for single digit day. - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); - $objDate->incDay(); - $dayHeaders[] = $objDate->getDate(); - unset($objDate); - return $dayHeaders; - } - - // getLockedDaysForWeek - builds an array of locked days in week. - static function getLockedDaysForWeek($start_date) { - global $user; - $lockedDays = array(); - $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - for ($i = 0; $i < 7; $i++) { - $lockedDays[] = $user->isDateLocked($objDate); - $objDate->incDay(); - } - unset($objDate); - return $lockedDays; - } - // getDayTotals calculates total durations for each day from the existing data in $dataArray. static function getDayTotals($dataArray, $dayHeaders) { $dayTotals = array(); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index e74a3de1b..b6dfdd73e 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -29,6 +29,42 @@ // ttWeekViewHelper class groups together functions used in week view. class ttWeekViewHelper { + // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. + static function getDayHeadersForWeek($start_date) { + $dayHeaders = array(); + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + $dayHeaders[] = (string) $objDate->getDate(); // It returns an int on first call. + if (strlen($dayHeaders[0]) == 1) // Which is an implementation detail of DateAndTime class. + $dayHeaders[0] = '0'.$dayHeaders[0]; // Add a 0 for single digit day. + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); + $objDate->incDay(); + $dayHeaders[] = $objDate->getDate(); + unset($objDate); + return $dayHeaders; + } + + // getLockedDaysForWeek - builds an array of locked days in week. + static function getLockedDaysForWeek($start_date) { + global $user; + $lockedDays = array(); + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + for ($i = 0; $i < 7; $i++) { + $lockedDays[] = $user->isDateLocked($objDate); + $objDate->incDay(); + } + unset($objDate); + return $lockedDays; + } + // makeRowLabel - builds a human readable label for a row in week view, // which is a combination ot record properties. // Client - Project - Task - Custom field 1. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c3a622972..50c4b1261 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3722 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3723 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index b88310729..0a69d58e3 100644 --- a/week.php +++ b/week.php @@ -111,8 +111,8 @@ // Get the data we need to display week view. // Get column headers, which are day numbers in month. -$dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); -$lockedDays = ttTimeHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); +$dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); +$lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); // Build data array for the table. Format is described in the function.. $dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); // Build day totals (total durations for each day in week). From 14304210865aab4372e8e726f64d830c0a077de5 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 16:22:54 +0000 Subject: [PATCH 0258/2515] Refactoring ongoing on week view. --- WEB-INF/lib/ttTimeHelper.class.php | 148 ------------------------- WEB-INF/lib/ttWeekViewHelper.class.php | 148 +++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- week.php | 2 +- 4 files changed, 150 insertions(+), 150 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 3cc2f15da..5a868364e 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -725,154 +725,6 @@ static function getRecords($user_id, $date) { return $result; } - // getRecordsForInterval - returns time records for a user for a given interval of dates. - static function getRecordsForInterval($user_id, $start_date, $end_date) { - global $user; - $sql_time_format = "'%k:%i'"; // 24 hour format. - if ('%I:%M %p' == $user->time_format) - $sql_time_format = "'%h:%i %p'"; // 12 hour format for MySQL TIME_FORMAT function. - - $result = array(); - $mdb2 = getConnection(); - - $client_field = null; - if ($user->isPluginEnabled('cl')) - $client_field = ', c.id as client_id, c.name as client'; - - $custom_field_1 = null; - if ($user->isPluginEnabled('cf')) { - $custom_fields = new CustomFields($user->team_id); - $cf_1_type = $custom_fields->fields[0]['type']; - if ($cf_1_type == CustomFields::TYPE_TEXT) { - $custom_field_1 = ', cfl.value as cf_1_value'; - } elseif ($cf_1_type == CustomFields::TYPE_DROPDOWN) { - $custom_field_1 = ', cfo.id as cf_1_id, cfo.value as cf_1_value'; - } - } - - $left_joins = " left join tt_projects p on (l.project_id = p.id)". - " left join tt_tasks t on (l.task_id = t.id)"; - if ($user->isPluginEnabled('cl')) - $left_joins .= " left join tt_clients c on (l.client_id = c.id)"; - if ($user->isPluginEnabled('cf')) { - if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) - $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.value = cfo.id) '; - elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) - $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.option_id = cfo.id) '; - } - - $sql = "select l.id as id, l.date as date, TIME_FORMAT(l.start, $sql_time_format) as start, - TIME_FORMAT(sec_to_time(time_to_sec(l.start) + time_to_sec(l.duration)), $sql_time_format) as finish, - TIME_FORMAT(l.duration, '%k:%i') as duration, p.id as project_id, p.name as project, - t.id as task_id, t.name as task, l.comment, l.billable, l.invoice_id $client_field $custom_field_1 - from tt_log l - $left_joins - where l.date >= '$start_date' and l.date <= '$end_date' and l.user_id = $user_id and l.status = 1 - order by p.name, t.name, l.date, l.start, l.id"; - $res = $mdb2->query($sql); - if (!is_a($res, 'PEAR_Error')) { - while ($val = $res->fetchRow()) { - if($val['duration']=='0:00') - $val['finish'] = ''; - $result[] = $val; - } - } else return false; - - return $result; - } - - // getDataForWeekView - builds an array to render a table of durations for week view. - // In a week view we want one row representing the same attributes to have 7 values for each day of week. - // We identify simlar records by a combination of client, billable, project, task, and custom field values. - // This will allow us to extend the feature when more custom fields are added. - // - // "cl:546,bl:1,pr:23456,ts:27464,cf_1:example text" - // The above means client 546, billable, project 23456, task 27464, custom field text "example text". - // - // "cl:546,bl:0,pr:23456,ts:27464,cf_1:7623" - // The above means client 546, not billable, project 23456, task 27464, custom field option id 7623. - // - // Description of $dataArray format that the function returns. - // $dataArray = array( - // array( // Row 0. This is a special, one-off row for a new week entry with empty values. - // 'row_id' => null', // Row identifier. Null for a new entry. - // 'label' => 'New entry', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => null, 'duration' => null), // control_id is row_id plus day header for column. - // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => null, 'duration' => null), - // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => null, 'duration' => null), - // 'day_3' => array('control_id' => '0_day_3', 'tt_log_id' => null, 'duration' => null), - // 'day_4' => array('control_id' => '0_day_4', 'tt_log_id' => null, 'duration' => null), - // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => null, 'duration' => null), - // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) - // ), - // array( // Row 1. - // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). - // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. - // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), - // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), - // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => null, 'duration' => null), - // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), - // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) - // ), - // array( // Row 2. - // 'row_id' => 'bl:0_0', - // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. - // 'day_0' => array('control_id' => '2_day_0', 'tt_log_id' => null, 'duration' => null), - // 'day_1' => array('control_id' => '2_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), - // 'day_2' => array('control_id' => '2_day_2', 'tt_log_id' => null, 'duration' => null), - // 'day_3' => array('control_id' => '2_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), - // 'day_4' => array('control_id' => '2_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '2_day_5', 'tt_log_id' => null, 'duration' => null), - // 'day_6' => array('control_id' => '2_day_6', 'tt_log_id' => null, 'duration' => null) - // ) - // ); - static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { - global $i18n; - - // Start by obtaining all records in interval. - $records = ttTimeHelper::getRecordsForInterval($user_id, $start_date, $end_date); - - $dataArray = array(); - - // Construct the first row for a brand new entry. - $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry')); // Insert row. - // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = '0_'. $dayHeaders[$i]; - $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); - } - - // Iterate through records and build $dataArray cell by cell. - foreach ($records as $record) { - // Create record id without suffix. - $record_id_no_suffix = ttTimeHelper::makeRecordIdentifier($record); - // Handle potential multiple records with the same attributes by using a numerical suffix. - $suffix = 0; - $record_id = $record_id_no_suffix.'_'.$suffix; - $day_header = substr($record['date'], 8); // Day number in month. - while (ttTimeHelper::cellExists($record_id, $day_header, $dataArray)) { - $suffix++; - $record_id = $record_id_no_suffix.'_'.$suffix; - } - // Find row. - $pos = ttTimeHelper::findRow($record_id, $dataArray); - if ($pos < 0) { - $dataArray[] = array('row_id' => $record_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. - $pos = ttTimeHelper::findRow($record_id, $dataArray); - // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = $pos.'_'. $dayHeaders[$i]; - $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); - } - } - // Insert actual cell data from $record (one cell only). - $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'duration' => $record['duration']); - } - return $dataArray; - } - // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label // and a day header already exists. static function cellExists($row_id, $day_header, $dataArray) { diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index b6dfdd73e..488097032 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -29,6 +29,154 @@ // ttWeekViewHelper class groups together functions used in week view. class ttWeekViewHelper { + // getRecordsForInterval - returns time records for a user for a given interval of dates. + static function getRecordsForInterval($user_id, $start_date, $end_date) { + global $user; + $sql_time_format = "'%k:%i'"; // 24 hour format. + if ('%I:%M %p' == $user->time_format) + $sql_time_format = "'%h:%i %p'"; // 12 hour format for MySQL TIME_FORMAT function. + + $result = array(); + $mdb2 = getConnection(); + + $client_field = null; + if ($user->isPluginEnabled('cl')) + $client_field = ', c.id as client_id, c.name as client'; + + $custom_field_1 = null; + if ($user->isPluginEnabled('cf')) { + $custom_fields = new CustomFields($user->team_id); + $cf_1_type = $custom_fields->fields[0]['type']; + if ($cf_1_type == CustomFields::TYPE_TEXT) { + $custom_field_1 = ', cfl.value as cf_1_value'; + } elseif ($cf_1_type == CustomFields::TYPE_DROPDOWN) { + $custom_field_1 = ', cfo.id as cf_1_id, cfo.value as cf_1_value'; + } + } + + $left_joins = " left join tt_projects p on (l.project_id = p.id)". + " left join tt_tasks t on (l.task_id = t.id)"; + if ($user->isPluginEnabled('cl')) + $left_joins .= " left join tt_clients c on (l.client_id = c.id)"; + if ($user->isPluginEnabled('cf')) { + if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) + $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.value = cfo.id) '; + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + $left_joins .= 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.option_id = cfo.id) '; + } + + $sql = "select l.id as id, l.date as date, TIME_FORMAT(l.start, $sql_time_format) as start, + TIME_FORMAT(sec_to_time(time_to_sec(l.start) + time_to_sec(l.duration)), $sql_time_format) as finish, + TIME_FORMAT(l.duration, '%k:%i') as duration, p.id as project_id, p.name as project, + t.id as task_id, t.name as task, l.comment, l.billable, l.invoice_id $client_field $custom_field_1 + from tt_log l + $left_joins + where l.date >= '$start_date' and l.date <= '$end_date' and l.user_id = $user_id and l.status = 1 + order by p.name, t.name, l.date, l.start, l.id"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + if($val['duration']=='0:00') + $val['finish'] = ''; + $result[] = $val; + } + } else return false; + + return $result; + } + + // getDataForWeekView - builds an array to render a table of durations for week view. + // In a week view we want one row representing the same attributes to have 7 values for each day of week. + // We identify simlar records by a combination of client, billable, project, task, and custom field values. + // This will allow us to extend the feature when more custom fields are added. + // + // "cl:546,bl:1,pr:23456,ts:27464,cf_1:example text" + // The above means client 546, billable, project 23456, task 27464, custom field text "example text". + // + // "cl:546,bl:0,pr:23456,ts:27464,cf_1:7623" + // The above means client 546, not billable, project 23456, task 27464, custom field option id 7623. + // + // Description of $dataArray format that the function returns. + // $dataArray = array( + // array( // Row 0. This is a special, one-off row for a new week entry with empty values. + // 'row_id' => null', // Row identifier. Null for a new entry. + // 'label' => 'New entry', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => null, 'duration' => null), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => null, 'duration' => null), + // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => null, 'duration' => null), + // 'day_3' => array('control_id' => '0_day_3', 'tt_log_id' => null, 'duration' => null), + // 'day_4' => array('control_id' => '0_day_4', 'tt_log_id' => null, 'duration' => null), + // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => null, 'duration' => null), + // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) + // ), + // array( // Row 1. + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). + // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. + // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. + // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), + // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), + // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => null, 'duration' => null), + // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), + // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) + // ), + // array( // Row 2. + // 'row_id' => 'bl:0_0', + // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. + // 'day_0' => array('control_id' => '2_day_0', 'tt_log_id' => null, 'duration' => null), + // 'day_1' => array('control_id' => '2_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), + // 'day_2' => array('control_id' => '2_day_2', 'tt_log_id' => null, 'duration' => null), + // 'day_3' => array('control_id' => '2_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), + // 'day_4' => array('control_id' => '2_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '2_day_5', 'tt_log_id' => null, 'duration' => null), + // 'day_6' => array('control_id' => '2_day_6', 'tt_log_id' => null, 'duration' => null) + // ) + // ); + static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { + global $i18n; + + // Start by obtaining all records in interval. + $records = ttWeekViewHelper::getRecordsForInterval($user_id, $start_date, $end_date); + + $dataArray = array(); + + // Construct the first row for a brand new entry. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry')); // Insert row. + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + + // Iterate through records and build $dataArray cell by cell. + foreach ($records as $record) { + // Create record id without suffix. + $record_id_no_suffix = ttTimeHelper::makeRecordIdentifier($record); + // Handle potential multiple records with the same attributes by using a numerical suffix. + $suffix = 0; + $record_id = $record_id_no_suffix.'_'.$suffix; + $day_header = substr($record['date'], 8); // Day number in month. + while (ttTimeHelper::cellExists($record_id, $day_header, $dataArray)) { + $suffix++; + $record_id = $record_id_no_suffix.'_'.$suffix; + } + // Find row. + $pos = ttTimeHelper::findRow($record_id, $dataArray); + if ($pos < 0) { + $dataArray[] = array('row_id' => $record_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. + $pos = ttTimeHelper::findRow($record_id, $dataArray); + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + } + // Insert actual cell data from $record (one cell only). + $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'duration' => $record['duration']); + } + return $dataArray; + } + // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 50c4b1261..e74722495 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3723 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3724 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 0a69d58e3..c10dfca02 100644 --- a/week.php +++ b/week.php @@ -114,7 +114,7 @@ $dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); $lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); // Build data array for the table. Format is described in the function.. -$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); +$dataArray = ttWeekViewHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); // Build day totals (total durations for each day in week). $dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); From ee5e708bbc30bbca24d77c4e3b0e75214c1296f8 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 16:36:04 +0000 Subject: [PATCH 0259/2515] More refactoring of week view related stuff. --- WEB-INF/lib/ttTimeHelper.class.php | 28 ---------------- WEB-INF/lib/ttWeekViewHelper.class.php | 44 +++++++++++++++++++++----- WEB-INF/templates/footer.tpl | 2 +- week.php | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 5a868364e..e74919043 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -746,34 +746,6 @@ static function findRow($row_id, $dataArray) { return -1; // Row not found. } - // makeRecordIdentifier - builds a string identifying a record for a grouped display (such as a week view). - // For example: - // "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" - // "cl:546,bl:1,pr:23456,ts:27464,cf_1:7623" - // See comment for getGroupedRecordsForInterval. - static function makeRecordIdentifier($record) { - global $user; - // Start with client. - if ($user->isPluginEnabled('cl')) - $record_identifier = $record['client_id'] ? 'cl:'.$record['client_id'] : ''; - // Add billable flag. - if (!empty($record_identifier)) $record_identifier .= ','; - $record_identifier .= 'bl:'.$record['billable']; - // Add project. - $record_identifier .= $record['project_id'] ? ',pr:'.$record['project_id'] : ''; - // Add task. - $record_identifier .= $record['task_id'] ? ',ts:'.$record['task_id'] : ''; - // Add custom field 1. This requires modifying the query to get the data we need. - if ($user->isPluginEnabled('cf')) { - if ($record['cf_1_id']) - $record_identifier .= ',cf_1:'.$record['cf_1_id']; - else if ($record['cf_1_value']) - $record_identifier .= ',cf_1:'.$record['cf_1_value']; - } - - return $record_identifier; - } - // getDayTotals calculates total durations for each day from the existing data in $dataArray. static function getDayTotals($dataArray, $dayHeaders) { $dayTotals = array(); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 488097032..7031dab73 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -110,7 +110,7 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) // ), // array( // Row 1. - // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttTimeHelper::makeRecordIdentifier(). + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttWeekViewHelper::makeRowIdentifier(). // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), @@ -151,20 +151,20 @@ static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders // Iterate through records and build $dataArray cell by cell. foreach ($records as $record) { // Create record id without suffix. - $record_id_no_suffix = ttTimeHelper::makeRecordIdentifier($record); + $row_id_no_suffix = ttWeekViewHelper::makeRowIdentifier($record); // Handle potential multiple records with the same attributes by using a numerical suffix. $suffix = 0; - $record_id = $record_id_no_suffix.'_'.$suffix; + $row_id = $row_id_no_suffix.'_'.$suffix; $day_header = substr($record['date'], 8); // Day number in month. - while (ttTimeHelper::cellExists($record_id, $day_header, $dataArray)) { + while (ttTimeHelper::cellExists($row_id, $day_header, $dataArray)) { $suffix++; - $record_id = $record_id_no_suffix.'_'.$suffix; + $row_id = $row_id_no_suffix.'_'.$suffix; } // Find row. - $pos = ttTimeHelper::findRow($record_id, $dataArray); + $pos = ttTimeHelper::findRow($row_id, $dataArray); if ($pos < 0) { - $dataArray[] = array('row_id' => $record_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. - $pos = ttTimeHelper::findRow($record_id, $dataArray); + $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. + $pos = ttTimeHelper::findRow($row_id, $dataArray); // Insert empty cells with proper control ids. for ($i = 0; $i < 7; $i++) { $control_id = $pos.'_'. $dayHeaders[$i]; @@ -213,6 +213,34 @@ static function getLockedDaysForWeek($start_date) { return $lockedDays; } + // makeRowIdentifier - builds a string identifying a row for a week view from a single record properties. + // Note that the return value is without a suffix. + // For example: + // "cl:546,bl:0,pr:23456,ts:27464,cf_1:example text" + // "cl:546,bl:1,pr:23456,ts:27464,cf_1:7623" + static function makeRowIdentifier($record) { + global $user; + // Start with client. + if ($user->isPluginEnabled('cl')) + $row_identifier = $record['client_id'] ? 'cl:'.$record['client_id'] : ''; + // Add billable flag. + if (!empty($row_identifier)) $row_identifier .= ','; + $row_identifier .= 'bl:'.$record['billable']; + // Add project. + $row_identifier .= $record['project_id'] ? ',pr:'.$record['project_id'] : ''; + // Add task. + $row_identifier .= $record['task_id'] ? ',ts:'.$record['task_id'] : ''; + // Add custom field 1. + if ($user->isPluginEnabled('cf')) { + if ($record['cf_1_id']) + $row_identifier .= ',cf_1:'.$record['cf_1_id']; + else if ($record['cf_1_value']) + $row_identifier .= ',cf_1:'.$record['cf_1_value']; + } + + return $row_identifier; + } + // makeRowLabel - builds a human readable label for a row in week view, // which is a combination ot record properties. // Client - Project - Task - Custom field 1. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e74722495..cb4b19b3a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3724 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3725 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index c10dfca02..f4bde2945 100644 --- a/week.php +++ b/week.php @@ -353,7 +353,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $record['project_id'] = $cl_project; $record['task_id'] = $cl_task; $record['cf_1_value'] = $cl_cf_1; - $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row... + $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row... // We may have to increment the suffix here. $fields['note'] = $cl_note; } From 0cc1dc50345b052d65274c4e686bf3b4cd621c4d Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 17:12:06 +0000 Subject: [PATCH 0260/2515] Moved week view related functions in ttWeekViewHelper class. --- WEB-INF/lib/ttTimeHelper.class.php | 183 ------------------------ WEB-INF/lib/ttWeekViewHelper.class.php | 187 ++++++++++++++++++++++++- WEB-INF/templates/footer.tpl | 2 +- week.php | 6 +- 4 files changed, 188 insertions(+), 190 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index e74919043..9d3f8bbe2 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -587,56 +587,6 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { return false; } - // wvCanModify (weekViewCanModify) - determines if an already existing tt_log record - // can be modified with a new user-provided duration. - static function wvCanModify($tt_log_id, $new_duration, $err) { - global $i18n; - $mdb2 = getConnection(); - - // Determine if we have start time in record, as further checking does not makes sense otherwise. - $sql = "select user_id, date, start, duration from tt_log where id = $tt_log_id"; - $res = $mdb2->query($sql); - if (!is_a($res, 'PEAR_Error')) { - if (!$res->numRows()) { - $err->add($i18n->getKey('error.db')); // This is not expected. - return false; - } - $val = $res->fetchRow(); - $oldDuration = $val['duration']; - if (!$val['start']) - return true; // There is no start time in the record, therefore safe to modify. - } - - // We do have start time. - // Quick test if new duration is less then already existing. - $newMinutes = ttTimeHelper::toMinutes($new_duration); - $oldMinutes = ttTimeHelper::toMinutes($oldDuration); - if ($newMinutes < $oldMinutes) - return true; // Safe to modify. - - // Does the new duration put the record beyond 24:00 boundary? - $startMinutes = ttTimeHelper::toMinutes($val['start']); - $newEndMinutes = $startMinutes + $newMinutes; - if ($newEndMinutes > 1440) { - // Invalid duration, as new duration puts the record beyond current day. - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); - return false; - } - - // Does the new duration causes the record to overlap with others? - $user_id = $val['user_id']; - $date = $val['date']; - $startMinutes = ttTimeHelper::toMinutes($val['start']); - $start = ttTimeHelper::toAbsDuration($startMinutes); - $finish = ttTimeHelper::toAbsDuration($newEndMinutes); - if (ttTimeHelper::overlaps($user_id, $date, $start, $finish, $tt_log_id)) { - $err->add($i18n->getKey('error.overlap')); - return false; - } - - return true; // There are no conflicts, safe to modify. - } - // getRecord - retrieves a time record identified by its id. static function getRecord($id, $user_id) { global $user; @@ -724,137 +674,4 @@ static function getRecords($user_id, $date) { return $result; } - - // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label - // and a day header already exists. - static function cellExists($row_id, $day_header, $dataArray) { - foreach($dataArray as $row) { - if ($row['row_id'] == $row_id && !empty($row[$day_header]['duration'])) - return true; - } - return false; - } - - // findRow returns an existing row position in $dataArray, -1 otherwise. - static function findRow($row_id, $dataArray) { - $pos = 0; // Row position in array. - foreach($dataArray as $row) { - if ($row['row_id'] == $row_id) - return $pos; - $pos++; // Increment for search. - } - return -1; // Row not found. - } - - // getDayTotals calculates total durations for each day from the existing data in $dataArray. - static function getDayTotals($dataArray, $dayHeaders) { - $dayTotals = array(); - - // Insert label. - global $i18n; - $dayTotals['label'] = $i18n->getKey('label.day_total'); - - foreach ($dataArray as $row) { - foreach($dayHeaders as $dayHeader) { - if (array_key_exists($dayHeader, $row)) { - $minutes = ttTimeHelper::toMinutes($row[$dayHeader]['duration']); - $dayTotals[$dayHeader] += $minutes; - } - } - } - // Convert minutes to hh:mm for display. - foreach($dayHeaders as $dayHeader) { - $dayTotals[$dayHeader] = ttTimeHelper::toAbsDuration($dayTotals[$dayHeader]); - } - return $dayTotals; - } - - // dateFromDayHeader calculates date from start date and day header in week view. - static function dateFromDayHeader($start_date, $day_header) { - $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); - $currentDayHeader = (string) $objDate->getDate(); // It returns an int on first call. - if (strlen($currentDayHeader) == 1) // Which is an implementation detail of DateAndTime class. - $currentDayHeader = '0'.$currentDayHeader; // Add a 0 for single digit day. - $i = 1; - while ($currentDayHeader != $day_header && $i < 7) { - // Iterate through remaining days to find a match. - $objDate->incDay(); - $currentDayHeader = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. - $i++; - } - return $objDate->toString(DB_DATEFORMAT); - } - - // insertDurationFromWeekView - inserts a new record in log tables from a week view post. - static function insertDurationFromWeekView($fields, $custom_fields, $err) { - global $i18n; - global $user; - - // Determine date for a new entry. - $entry_date = ttTimeHelper::dateFromDayHeader($fields['start_date'], $fields['day_header']); - $objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date); - - // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES) && $fields['browser_today']) { - $objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']); - if ($objEntryDate->after($objBrowserToday)) { - $err->add($i18n->getKey('error.future_date')); - return false; - } - } - - // Prepare an array of fields for regular insert function. - $fields4insert = array(); - $fields4insert['user_id'] = $user->getActiveUser(); - $fields4insert['date'] = $entry_date; - $fields4insert['duration'] = $fields['duration']; - $fields4insert['client'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cl'); - $fields4insert['billable'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); - $fields4insert['project'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); - $fields4insert['task'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); - $fields4insert['note'] = $fields['note']; - - // Try to insert a record. - $id = ttTimeHelper::insert($fields4insert); - if (!$id) return false; // Something failed. - - // Insert custom field if we have it. - $result = true; - $cf_1 = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); - if ($custom_fields && $cf_1) { - if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) - $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cf_1); - elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) - $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cf_1, null); - } - - return $result; - } - - - // modifyFromWeekView - modifies a duration of an existing record from a week view post. - static function modifyDurationFromWeekView($fields, $err) { - global $i18n; - global $user; - - // Possible errors: 1) Overlap if the existing record has start time. 2) Going beyond 24 hour boundary. - // TODO: rename this function. - // Handle different errors with specific error messages. - if (!ttTimeHelper::wvCanModify($fields['tt_log_id'], $fields['duration'], $err)) { - // $err->add($i18n->getKey('error.overlap')); - return false; - } - - $mdb2 = getConnection(); - $duration = $fields['duration']; - $tt_log_id = $fields['tt_log_id']; - $user_id = $user->getActiveUser(); - $sql = "update tt_log set duration = '$duration' where id = $tt_log_id and user_id = $user_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) - return false; - - return true; - } } - diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 7031dab73..ad21be00c 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -156,15 +156,15 @@ static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders $suffix = 0; $row_id = $row_id_no_suffix.'_'.$suffix; $day_header = substr($record['date'], 8); // Day number in month. - while (ttTimeHelper::cellExists($row_id, $day_header, $dataArray)) { + while (ttWeekViewHelper::cellExists($row_id, $day_header, $dataArray)) { $suffix++; $row_id = $row_id_no_suffix.'_'.$suffix; } // Find row. - $pos = ttTimeHelper::findRow($row_id, $dataArray); + $pos = ttWeekViewHelper::findRow($row_id, $dataArray); if ($pos < 0) { $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. - $pos = ttTimeHelper::findRow($row_id, $dataArray); + $pos = ttWeekViewHelper::findRow($row_id, $dataArray); // Insert empty cells with proper control ids. for ($i = 0; $i < 7; $i++) { $control_id = $pos.'_'. $dayHeaders[$i]; @@ -177,6 +177,50 @@ static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders return $dataArray; } + // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label + // and a day header already exists. + static function cellExists($row_id, $day_header, $dataArray) { + foreach($dataArray as $row) { + if ($row['row_id'] == $row_id && !empty($row[$day_header]['duration'])) + return true; + } + return false; + } + + // findRow returns an existing row position in $dataArray, -1 otherwise. + static function findRow($row_id, $dataArray) { + $pos = 0; // Row position in array. + foreach($dataArray as $row) { + if ($row['row_id'] == $row_id) + return $pos; + $pos++; // Increment for search. + } + return -1; // Row not found. + } + + // getDayTotals calculates total durations for each day from the existing data in $dataArray. + static function getDayTotals($dataArray, $dayHeaders) { + $dayTotals = array(); + + // Insert label. + global $i18n; + $dayTotals['label'] = $i18n->getKey('label.day_total'); + + foreach ($dataArray as $row) { + foreach($dayHeaders as $dayHeader) { + if (array_key_exists($dayHeader, $row)) { + $minutes = ttTimeHelper::toMinutes($row[$dayHeader]['duration']); + $dayTotals[$dayHeader] += $minutes; + } + } + } + // Convert minutes to hh:mm for display. + foreach($dayHeaders as $dayHeader) { + $dayTotals[$dayHeader] = ttTimeHelper::toAbsDuration($dayTotals[$dayHeader]); + } + return $dayTotals; + } + // getDayHeadersForWeek - obtains day column headers for week view, which are simply day numbers in month. static function getDayHeadersForWeek($start_date) { $dayHeaders = array(); @@ -290,4 +334,141 @@ static function parseFromWeekViewRow($row_id, $field_label) { // Return value. return substr($remaninder, $posBegin, $posEnd - $posBegin); } + + // dateFromDayHeader calculates date from start date and day header in week view. + static function dateFromDayHeader($start_date, $day_header) { + $objDate = new DateAndTime(DB_DATEFORMAT, $start_date); + $currentDayHeader = (string) $objDate->getDate(); // It returns an int on first call. + if (strlen($currentDayHeader) == 1) // Which is an implementation detail of DateAndTime class. + $currentDayHeader = '0'.$currentDayHeader; // Add a 0 for single digit day. + $i = 1; + while ($currentDayHeader != $day_header && $i < 7) { + // Iterate through remaining days to find a match. + $objDate->incDay(); + $currentDayHeader = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary. + $i++; + } + return $objDate->toString(DB_DATEFORMAT); + } + + // insertDurationFromWeekView - inserts a new record in log tables from a week view post. + static function insertDurationFromWeekView($fields, $custom_fields, $err) { + global $i18n; + global $user; + + // Determine date for a new entry. + $entry_date = ttWeekViewHelper::dateFromDayHeader($fields['start_date'], $fields['day_header']); + $objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date); + + // Prohibit creating entries in future. + if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES) && $fields['browser_today']) { + $objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']); + if ($objEntryDate->after($objBrowserToday)) { + $err->add($i18n->getKey('error.future_date')); + return false; + } + } + + // Prepare an array of fields for regular insert function. + $fields4insert = array(); + $fields4insert['user_id'] = $user->getActiveUser(); + $fields4insert['date'] = $entry_date; + $fields4insert['duration'] = $fields['duration']; + $fields4insert['client'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cl'); + $fields4insert['billable'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'bl'); + $fields4insert['project'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'pr'); + $fields4insert['task'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'ts'); + $fields4insert['note'] = $fields['note']; + + // Try to insert a record. + $id = ttTimeHelper::insert($fields4insert); + if (!$id) return false; // Something failed. + + // Insert custom field if we have it. + $result = true; + $cf_1 = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cf_1'); + if ($custom_fields && $cf_1) { + if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], null, $cf_1); + elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) + $result = $custom_fields->insert($id, $custom_fields->fields[0]['id'], $cf_1, null); + } + + return $result; + } + + // modifyDurationFromWeekView - modifies a duration of an existing record from a week view post. + static function modifyDurationFromWeekView($fields, $err) { + global $i18n; + global $user; + + // Possible errors: 1) Overlap if the existing record has start time. 2) Going beyond 24 hour boundary. + // TODO: rename this function. + // Handle different errors with specific error messages. + if (!ttWeekViewHelper::canModify($fields['tt_log_id'], $fields['duration'], $err)) { + // $err->add($i18n->getKey('error.overlap')); + return false; + } + + $mdb2 = getConnection(); + $duration = $fields['duration']; + $tt_log_id = $fields['tt_log_id']; + $user_id = $user->getActiveUser(); + $sql = "update tt_log set duration = '$duration' where id = $tt_log_id and user_id = $user_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + + return true; + } + + // canModify - determines if an already existing tt_log record + // can be modified with a new user-provided duration. + static function canModify($tt_log_id, $new_duration, $err) { + global $i18n; + $mdb2 = getConnection(); + + // Determine if we have start time in record, as further checking does not makes sense otherwise. + $sql = "select user_id, date, start, duration from tt_log where id = $tt_log_id"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + if (!$res->numRows()) { + $err->add($i18n->getKey('error.db')); // This is not expected. + return false; + } + $val = $res->fetchRow(); + $oldDuration = $val['duration']; + if (!$val['start']) + return true; // There is no start time in the record, therefore safe to modify. + } + + // We do have start time. + // Quick test if new duration is less then already existing. + $newMinutes = ttTimeHelper::toMinutes($new_duration); + $oldMinutes = ttTimeHelper::toMinutes($oldDuration); + if ($newMinutes < $oldMinutes) + return true; // Safe to modify. + + // Does the new duration put the record beyond 24:00 boundary? + $startMinutes = ttTimeHelper::toMinutes($val['start']); + $newEndMinutes = $startMinutes + $newMinutes; + if ($newEndMinutes > 1440) { + // Invalid duration, as new duration puts the record beyond current day. + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + return false; + } + + // Does the new duration causes the record to overlap with others? + $user_id = $val['user_id']; + $date = $val['date']; + $startMinutes = ttTimeHelper::toMinutes($val['start']); + $start = ttTimeHelper::toAbsDuration($startMinutes); + $finish = ttTimeHelper::toAbsDuration($newEndMinutes); + if (ttTimeHelper::overlaps($user_id, $date, $start, $finish, $tt_log_id)) { + $err->add($i18n->getKey('error.overlap')); + return false; + } + + return true; // There are no conflicts, safe to modify. + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index cb4b19b3a..a18ab1e0a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3725 | Copyright © Anuko | +  Anuko Time Tracker 1.13.7.3726 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index f4bde2945..7afcb4016 100644 --- a/week.php +++ b/week.php @@ -116,7 +116,7 @@ // Build data array for the table. Format is described in the function.. $dataArray = ttWeekViewHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); // Build day totals (total durations for each day in week). -$dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders); +$dayTotals = ttWeekViewHelper::getDayTotals($dataArray, $dayHeaders); // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { @@ -361,7 +361,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. $fields['duration'] = $postedDuration; $fields['browser_today'] = $request->getParameter('browser_today', null); - $result = ttTimeHelper::insertDurationFromWeekView($fields, $custom_fields, $err); + $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { // Delete an already existing record here. $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); @@ -369,7 +369,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $fields = array(); $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; $fields['duration'] = $postedDuration; - $result = ttTimeHelper::modifyDurationFromWeekView($fields, $err); + $result = ttWeekViewHelper::modifyDurationFromWeekView($fields, $err); } if (!$result) break; // Break out of the loop in case of first error. } From a1bcddb8eac5b2a60f907a8614ca2000bc9ebe42 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 17:25:29 +0000 Subject: [PATCH 0261/2515] Improved a comment to clarify a point. --- week.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/week.php b/week.php index 7afcb4016..19476c8bc 100644 --- a/week.php +++ b/week.php @@ -353,8 +353,10 @@ function render(&$table, $value, $row, $column, $selected = false) { $record['project_id'] = $cl_project; $record['task_id'] = $cl_task; $record['cf_1_value'] = $cl_cf_1; - $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row... - // We may have to increment the suffix here. + $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; + // Note: no need to check for a possible conflict with an already existing row + // because we are doing an insert that does not affect already existing data. + $fields['note'] = $cl_note; } $fields['day_header'] = $dayHeader; From 85910e4038e5f54d82a29ceafc32b8e14e18628e Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 6 Jan 2018 18:42:15 +0000 Subject: [PATCH 0262/2515] Enhanced week view ith a list of editable records. --- WEB-INF/lib/ttWeekViewHelper.class.php | 7 +-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 77 ++++++++++++++++++++++++-- week.php | 7 ++- 4 files changed, 80 insertions(+), 13 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index ad21be00c..5c03a373a 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -72,7 +72,7 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { from tt_log l $left_joins where l.date >= '$start_date' and l.date <= '$end_date' and l.user_id = $user_id and l.status = 1 - order by p.name, t.name, l.date, l.start, l.id"; + order by l.date, p.name, t.name, l.start, l.id"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { @@ -132,12 +132,9 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_6' => array('control_id' => '2_day_6', 'tt_log_id' => null, 'duration' => null) // ) // ); - static function getDataForWeekView($user_id, $start_date, $end_date, $dayHeaders) { + static function getDataForWeekView($records, $dayHeaders) { global $i18n; - // Start by obtaining all records in interval. - $records = ttWeekViewHelper::getRecordsForInterval($user_id, $start_date, $end_date); - $dataArray = array(); // Construct the first row for a brand new entry. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a18ab1e0a..3d14fea22 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.7.3726 | Copyright © Anuko | +  Anuko Time Tracker 1.13.8.3727 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 34edf9201..42f24f165 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -69,6 +69,77 @@ {$forms.weekTimeForm.week_durations.control}
+ + + + + + +
{$forms.weekTimeForm.btn_submit.control}
 
+ + + + + +
+{if $time_records} + + + + {if $user->isPluginEnabled('cl')} + + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} + + + {/if} + + + + + {foreach $time_records as $record} + + + {if $user->isPluginEnabled('cl')} + + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + + {/if} + {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} + + + {/if} + + + + + {/foreach} +
{$i18n.label.date}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.note}{$i18n.label.edit}
{$record.date}{$record.client|escape}{$record.project|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if} + {if $record.invoice_id} +   + {else} + {$i18n.label.edit} + {if ($record.duration == '0:00' && $record.start <> '')} + + + + + {/if} + {/if} +
+{/if} +
+{if $time_records} @@ -85,9 +156,5 @@ {/if}
{$i18n.label.week_total}: {$week_total}
- - - - -
{$forms.weekTimeForm.btn_submit.control}
+{/if} {$forms.weekTimeForm.close} diff --git a/week.php b/week.php index 19476c8bc..fb2dcaa6a 100644 --- a/week.php +++ b/week.php @@ -113,8 +113,10 @@ // Get column headers, which are day numbers in month. $dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); $lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); -// Build data array for the table. Format is described in the function.. -$dataArray = ttWeekViewHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders); +// Get already existing records. +$records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); +// Build data array for the table. Format is described in the function. +$dataArray = ttWeekViewHelper::getDataForWeekView($records, $dayHeaders); // Build day totals (total durations for each day in week). $dayTotals = ttWeekViewHelper::getDayTotals($dataArray, $dayHeaders); @@ -410,6 +412,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); +$smarty->assign('time_records', $records); $smarty->assign('title', $i18n->getKey('title.time')); $smarty->assign('content_page_name', 'week.tpl'); From 741660d57d2e740b472c10a9763d535a74cff09c Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 7 Jan 2018 19:08:10 +0000 Subject: [PATCH 0263/2515] A bit of refactoring. --- WEB-INF/lib/form/Form.class.php | 22 +++++++++--------- WEB-INF/lib/form/Submit.class.php | 37 ++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index cb2f5203a..a67c0c370 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -87,6 +87,16 @@ function addInput($params) { $el = new Checkbox($params['name']); break; + case 'hidden': + import('form.Hidden'); + $el = new Hidden($params['name']); + break; + + case 'submit': + import('form.Submit'); + $el = new Submit($params['name']); + break; + // TODO: refactoring ongoing down from here. case "checkboxgroup": import('form.CheckboxGroup'); @@ -104,17 +114,7 @@ function addInput($params) { $el->setDataDefault(@$params["empty"]); if (isset($params["datakeys"])) $el->setDataKeys($params["datakeys"]); break; - - case "hidden": - import('form.Hidden'); - $el = new Hidden($params["name"]); - break; - - case "submit": - import('form.Submit'); - $el = new Submit($params["name"]); - break; - + case "calendar": import('form.Calendar'); $el = new Calendar($params["name"]); diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index 35eb6df3d..5f8da37e5 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -27,34 +27,25 @@ // +----------------------------------------------------------------------+ import('form.FormElement'); - + class Submit extends FormElement { - function __construct($name) - { + function __construct($name) { $this->class = 'Submit'; $this->name = $name; } function getHtml() { - - if ($this->id=="") $this->id = $this->name; - - $html = "\n\tname\" id=\"$this->id\""; - - if (!$this->isEnabled()) { - $html .= " disabled=\"true\""; - } - - $html .= " value=\"$this->value\""; - - if ($this->on_click) { - $html .= " onclick=\"".$this->on_click."\""; - } - - $html .= ">"; - - return $html; - } + if (empty($this->id)) + $this->id = $this->name; + + // Output HTML. + $html = "\n\tname\" id=\"$this->id\""; + $html .= " value=\"$this->value\""; + if ($this->on_click) $html .= " onclick=\"".$this->on_click."\""; + if (!$this->isEnabled()) $html .= " disabled"; + $html .= ">"; + + return $html; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3d14fea22..1772b100d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.8.3727 | Copyright © Anuko | +  Anuko Time Tracker 1.13.8.3728 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7e31ec9db2a079cb231416b8243a8efc52a92ad9 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 7 Jan 2018 19:54:55 +0000 Subject: [PATCH 0264/2515] Added confirmation dialog to avoid accidental delete of invoice entries. --- WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 3 ++- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/invoice_delete.tpl | 11 +++++++++++ invoice_delete.php | 2 +- 18 files changed, 38 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 64ebe8657..e25f3f7db 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -354,6 +354,8 @@ 'form.invoice.person' => 'Person', 'form.invoice.invoice_to_delete' => 'Faktura der skal slettes', 'form.invoice.invoice_entries' => 'Faktura emner', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Interval', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index c4939356c..ba1e5f0dc 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -359,6 +359,8 @@ // The settings tells whether we are deleting invoiced items when deleting an invoice. // If we select "do not delete" then the items stay, and can be included in another invoice. 'form.invoice.invoice_entries' => 'Rechnungseintrag', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Zeitraum', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index fb8082020..4e2ac42a3 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -356,6 +356,7 @@ 'form.invoice.person' => 'Person', 'form.invoice.invoice_to_delete' => 'Invoice to delete', 'form.invoice.invoice_entries' => 'Invoice entries', +'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Interval', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b32695f40..279804507 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -415,6 +415,7 @@ // TODO: translate the following stings. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php // TODO: translate form.charts.interval and form.charts.chart. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 6e8f02b3d..59109c8e8 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -382,6 +382,7 @@ // TODO: translate the following stings. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'بازه', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 20853bcfe..f0e373201 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -355,6 +355,8 @@ 'form.invoice.person' => 'Henkilö', 'form.invoice.invoice_to_delete' => 'Poistettava lasku', 'form.invoice.invoice_entries' => 'Laskurivit', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Ajalta', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 3f7646563..309e150b5 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -346,6 +346,8 @@ 'form.invoice.person' => 'Personne', 'form.invoice.invoice_to_delete' => 'Facture à supprimer', 'form.invoice.invoice_entries' => 'Entrées de facture', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervalle', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index aa75ff574..001143bf4 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -384,6 +384,7 @@ // TODO: translate the following stings. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'טווח', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 0ea7673cd..70331e077 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -353,6 +353,8 @@ 'form.invoice.person' => 'Medewerker', 'form.invoice.invoice_to_delete' => 'Te verwijderen factuur', 'form.invoice.invoice_entries' => 'Factuur gegevens', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Periode', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 94c308743..a5065e5bc 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -363,6 +363,8 @@ 'form.invoice.person' => 'Osoba', 'form.invoice.invoice_to_delete' => 'Faktura do usunięcia', 'form.invoice.invoice_entries' => 'Wpisy dot. faktury', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.phpp 'form.charts.interval' => 'Okres', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 4617d570e..472470604 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -356,6 +356,8 @@ 'form.invoice.person' => 'Pessoa', 'form.invoice.invoice_to_delete' => 'Fatura a ser apagada', 'form.invoice.invoice_entries' => 'Entradas de fatura', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervalo', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index d837d0a17..bd6b6fdb3 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -354,6 +354,7 @@ 'form.invoice.person' => 'Работник', 'form.invoice.invoice_to_delete' => 'Счёт для удаления', 'form.invoice.invoice_entries' => 'Записи счёта', +'form.invoice.confirm_deleting_entries' => 'Подтвердите удаление записей из Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Интервал', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 4ef634a90..5d179fc24 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -379,9 +379,10 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Číslo faktúry', 'form.invoice.person' => 'Osoba', -// TODO: translate the following stings. +// TODO: translate the following. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Interval', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 178e626f0..1db2ad6f7 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -360,6 +360,8 @@ 'form.invoice.person' => 'Osoba', 'form.invoice.invoice_to_delete' => 'Račun za brisanje', 'form.invoice.invoice_entries' => 'Unos u račun', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Forma grafikona. Pogledajte primer na https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervali', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 338dde993..a0899465b 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -358,6 +358,8 @@ 'form.invoice.person' => 'Person', 'form.invoice.invoice_to_delete' => 'Fakturanummer', 'form.invoice.invoice_entries' => 'Relaterade tider och kostnader', +// TODO: translate the following. +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervall', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1772b100d..b2bbbf6dc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.8.3728 | Copyright © Anuko | +  Anuko Time Tracker 1.13.9.3729 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/invoice_delete.tpl b/WEB-INF/templates/invoice_delete.tpl index 0f539377a..3e0c0700d 100644 --- a/WEB-INF/templates/invoice_delete.tpl +++ b/WEB-INF/templates/invoice_delete.tpl @@ -1,3 +1,14 @@ + + {$forms.invoiceDeleteForm.open} diff --git a/invoice_delete.php b/invoice_delete.php index 41f7c1901..175889e27 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -46,7 +46,7 @@ 'name'=>'delete_invoice_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_delete','value'=>$i18n->getKey('label.delete'),'onclick'=>'return confirm_deleting_entries();')); $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel'))); if ($request->isPost()) { From ecd15819788a42f6dfe46949475e45ddb66df436 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 7 Jan 2018 23:08:34 +0000 Subject: [PATCH 0265/2515] Fixed a problem with predefined expenses. --- WEB-INF/lib/form/TextArea.class.php | 3 ++- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 5d4846685..a9c0c8008 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -47,7 +47,8 @@ function getRows() { return $this->mRows; } function getHtml() { - if ($this->id=="") $this->id = $this->mName; + if (empty($this->id)) + $this->id = $this->name; $js_maxlen = ""; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b2bbbf6dc..08f1afa93 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.9.3729 | Copyright © Anuko | +  Anuko Time Tracker 1.13.10.3730 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From f270b1e143509303e32f65c3dda3fbecaee56c6b Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 8 Jan 2018 14:58:18 +0000 Subject: [PATCH 0266/2515] Fixed predefined expenses logic for comma as decimal mark. --- WEB-INF/lib/ttPredefinedExpenseHelper.class.php | 14 +++++++++++++- WEB-INF/lib/ttProjectHelper.class.php | 6 +++--- WEB-INF/lib/ttTeamHelper.class.php | 5 +++++ WEB-INF/templates/expense_edit.tpl | 12 ++++++++++-- WEB-INF/templates/expenses.tpl | 12 ++++++++++-- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php index 4c33c4273..556bc42f6 100644 --- a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php +++ b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php @@ -34,6 +34,7 @@ class ttPredefinedExpenseHelper { static function get($id) { global $user; + $replaceDecimalMark = ('.' != $user->decimal_mark); $mdb2 = getConnection(); @@ -42,8 +43,11 @@ static function get($id) $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - if ($val && $val['id']) + if ($val && $val['id']) { + if ($replaceDecimalMark) + $val['cost'] = str_replace('.', $user->decimal_mark, $val['cost']); return $val; + } } return false; } @@ -65,11 +69,15 @@ static function delete($id) { // insert function inserts a new predefined expense into database. static function insert($fields) { + global $user; + $mdb2 = getConnection(); $team_id = (int) $fields['team_id']; $name = $fields['name']; $cost = $fields['cost']; + if ('.' != $user->decimal_mark) + $cost = str_replace($user->decimal_mark, '.', $cost); $sql = "insert into tt_predefined_expenses (team_id, name, cost) values ($team_id, ".$mdb2->quote($name).", ".$mdb2->quote($cost).")"; @@ -83,12 +91,16 @@ static function insert($fields) // update function - updates a predefined expense in database. static function update($fields) { + global $user; + $mdb2 = getConnection(); $predefined_expense_id = (int) $fields['id']; $team_id = (int) $fields['team_id']; $name = $fields['name']; $cost = $fields['cost']; + if ('.' != $user->decimal_mark) + $cost = str_replace($user->decimal_mark, '.', $cost); $sql = "update tt_predefined_expenses set name = ".$mdb2->quote($name).", cost = ".$mdb2->quote($cost). " where id = $predefined_expense_id and team_id = $team_id"; diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 0a97de22d..06605c76a 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -77,9 +77,9 @@ static function getRates($user_id) // getProjects - returns an array of active and inactive projects in a team. static function getProjects() { - global $user; - - $result = array(); + global $user; + + $result = array(); $mdb2 = getConnection(); $sql = "select id, name, tasks from tt_projects diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index ba678fcbc..6f716f587 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -500,6 +500,9 @@ static function getExpenseItems($team_id) { // getPredefinedExpenses - obtains predefined expenses for team. static function getPredefinedExpenses($team_id) { + global $user; + $replaceDecimalMark = ('.' != $user->decimal_mark); + $mdb2 = getConnection(); $result = array(); @@ -508,6 +511,8 @@ static function getPredefinedExpenses($team_id) { $result = array(); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { + if ($replaceDecimalMark) + $val['cost'] = str_replace('.', $user->decimal_mark, $val['cost']); $result[] = $val; } return $result; diff --git a/WEB-INF/templates/expense_edit.tpl b/WEB-INF/templates/expense_edit.tpl index 00b1ae539..bcd393a5a 100644 --- a/WEB-INF/templates/expense_edit.tpl +++ b/WEB-INF/templates/expense_edit.tpl @@ -86,6 +86,7 @@ function recalculateCost() { var comment_control = document.getElementById("item_name"); var cost_control = document.getElementById("cost"); + var replaceDecimalMark = ("." != "{$user->decimal_mark}"); // Calculate cost. var dropdown = document.getElementById("predefined_expense"); @@ -98,8 +99,15 @@ function recalculateCost() { var quantity = quantity_control.value; if (isNaN(quantity)) cost_control.value = ""; - else - cost_control.value = (quantity_control.value * defined_expenses[dropdown.selectedIndex - 1][2]).toFixed(2); + else { + var expenseCost = defined_expenses[dropdown.selectedIndex - 1][2]; + if (replaceDecimalMark) + expenseCost = expenseCost.replace("{$user->decimal_mark}", "."); + var newCost = (quantity_control.value * expenseCost).toFixed(2); + if (replaceDecimalMark) + newCost = newCost.replace(".", "{$user->decimal_mark}"); + cost_control.value = newCost; + } } } diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl index 85d27eaec..8a3ae4c78 100644 --- a/WEB-INF/templates/expenses.tpl +++ b/WEB-INF/templates/expenses.tpl @@ -86,6 +86,7 @@ function recalculateCost() { var comment_control = document.getElementById("item_name"); var cost_control = document.getElementById("cost"); + var replaceDecimalMark = ("." != "{$user->decimal_mark}"); // Calculate cost. var dropdown = document.getElementById("predefined_expense"); @@ -98,8 +99,15 @@ function recalculateCost() { var quantity = quantity_control.value; if (isNaN(quantity)) cost_control.value = ""; - else - cost_control.value = (quantity_control.value * defined_expenses[dropdown.selectedIndex - 1][2]).toFixed(2); + else { + var expenseCost = defined_expenses[dropdown.selectedIndex - 1][2]; + if (replaceDecimalMark) + expenseCost = expenseCost.replace("{$user->decimal_mark}", "."); + var newCost = (quantity_control.value * expenseCost).toFixed(2); + if (replaceDecimalMark) + newCost = newCost.replace(".", "{$user->decimal_mark}"); + cost_control.value = newCost; + } } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 08f1afa93..b62eb7daa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.10.3730 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3731 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7fec9e24e61b856bd67ed58421445a0eb878e446 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 8 Jan 2018 18:19:09 +0000 Subject: [PATCH 0267/2515] Removed obsolete code. --- WEB-INF/lib/form/TextArea.class.php | 22 ---------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index a9c0c8008..9e8515f94 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -50,8 +50,6 @@ function getHtml() { if (empty($this->id)) $this->id = $this->name; - $js_maxlen = ""; - $html = "\n\tname\" id=\"$this->id\""; @@ -64,7 +62,6 @@ function getHtml() { if ($this->max_length!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; - $js_maxlen = $this->getExtraScript(); $html .= " maxlength=\"$this->max_length\""; } @@ -76,26 +73,7 @@ function getHtml() { } $html .= ">".htmlspecialchars($this->getValue()).""; - if ($js_maxlen) $html = $js_maxlen."\n".$html; return $html; } - - function getExtraScript() { - $s = "\n"; - return $s; - } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b62eb7daa..e35be9044 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3731 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3732 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From f037a5416ac13e73d775f3c997afe8dfc4917339 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 8 Jan 2018 19:16:08 +0000 Subject: [PATCH 0268/2515] Removed unused functions. --- WEB-INF/lib/form/TextArea.class.php | 3 --- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 9e8515f94..c6e8d1ff8 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -40,10 +40,7 @@ function __construct($name) } function setColumns($value) { $this->mColumns = $value; } - function getColumns() { return $this->mColumns; } - function setRows($value) { $this->mRows = $value; } - function getRows() { return $this->mRows; } function getHtml() { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e35be9044..1c89ba476 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3732 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3733 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 34d2d3c1537f844bc386d75751180db2848c99b3 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 8 Jan 2018 19:34:12 +0000 Subject: [PATCH 0269/2515] Refactoring textarea element. --- WEB-INF/templates/footer.tpl | 2 +- client_add.php | 2 +- client_edit.php | 2 +- profile_edit.php | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1c89ba476..8db99ce5f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3733 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3734 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/client_add.php b/client_add.php index bd1516f16..cc8bd8a7e 100644 --- a/client_add.php +++ b/client_add.php @@ -52,7 +52,7 @@ $form = new Form('clientForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','cols'=>'55','rows'=>'5','value'=>$cl_address)); +$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address)); $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects)); diff --git a/client_edit.php b/client_edit.php index 2b408c5da..87116cdf0 100644 --- a/client_edit.php +++ b/client_edit.php @@ -62,7 +62,7 @@ $form = new Form('clientForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); $form->addInput(array('type'=>'text','name'=>'name','maxlength'=>'100','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','cols'=>'55','rows'=>'5','value'=>$cl_address)); +$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address)); $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->getKey('dropdown.status_active'),INACTIVE=>$i18n->getKey('dropdown.status_inactive')))); diff --git a/profile_edit.php b/profile_edit.php index d4036ec5c..97192c375 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -120,7 +120,6 @@ $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email,'enable'=>$can_change_login)); if ($user->canManageTeam()) { $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','value'=>$cl_team)); - $form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','cols'=>'55','rows'=>'4','value'=>$cl_address)); $form->addInput(array('type'=>'text','maxlength'=>'7','name'=>'currency','value'=>$cl_currency)); $DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>',')); $form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, From e7ecc20f1789ce0adda175aa0f70177b0f7fdb22 Mon Sep 17 00:00:00 2001 From: anuko Date: Mon, 8 Jan 2018 19:47:12 +0000 Subject: [PATCH 0270/2515] A bit more refactoring of textarea element. --- WEB-INF/lib/form/Form.class.php | 2 -- WEB-INF/lib/form/TextArea.class.php | 13 +------------ WEB-INF/templates/footer.tpl | 2 +- client_add.php | 2 +- client_edit.php | 2 +- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index a67c0c370..cf7890c60 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -77,8 +77,6 @@ function addInput($params) { case 'textarea': import('form.TextArea'); $el = new TextArea($params['name']); - if (isset($params['cols'])) $el->setColumns($params['cols']); - if (isset($params['rows'])) $el->setRows($params['rows']); if (isset($params['maxlength'])) $el->setMaxLength($params['maxlength']); break; diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index c6e8d1ff8..be884f0d8 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -29,8 +29,6 @@ import('form.FormElement'); class TextArea extends FormElement { - var $mColumns = ""; - var $mRows = ""; var $mOnKeyPress = ""; function __construct($name) @@ -39,9 +37,6 @@ function __construct($name) $this->name = $name; } - function setColumns($value) { $this->mColumns = $value; } - function setRows($value) { $this->mRows = $value; } - function getHtml() { if (empty($this->id)) @@ -49,13 +44,7 @@ function getHtml() { $html = "\n\tname\" id=\"$this->id\""; - - if ($this->mColumns!="") - $html .= " cols=\"$this->mColumns\""; - - if ($this->mRows!="") - $html .= " rows=\"$this->mRows\""; - + if ($this->max_length!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8db99ce5f..3946f41f1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3734 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3735 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/client_add.php b/client_add.php index cc8bd8a7e..d3ca5aa9e 100644 --- a/client_add.php +++ b/client_add.php @@ -52,7 +52,7 @@ $form = new Form('clientForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address)); +$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address)); $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects)); diff --git a/client_edit.php b/client_edit.php index 87116cdf0..cf4d15416 100644 --- a/client_edit.php +++ b/client_edit.php @@ -62,7 +62,7 @@ $form = new Form('clientForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); $form->addInput(array('type'=>'text','name'=>'name','maxlength'=>'100','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','rows'=>'5','value'=>$cl_address)); +$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address)); $form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->getKey('dropdown.status_active'),INACTIVE=>$i18n->getKey('dropdown.status_inactive')))); From 448d23b94dbd84f8e7b626b143501fabd1c1a02a Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 9 Jan 2018 15:00:16 +0000 Subject: [PATCH 0271/2515] Included info for developers link in readme. --- README.md | 1 + WEB-INF/templates/footer.tpl | 2 +- readme.txt | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4173727e1..239809895 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,5 @@ Anuko [Time Tracker](https://www.anuko.com/time_tracker/index.htm) is a simple, ## Resources * Project home page: https://www.anuko.com/time_tracker/index.htm * Forum: https://www.anuko.com/forum/viewforum.php?f=4 +* Info for developers: https://www.anuko.com/time_tracker/info_for_developers.htm * How to contribute: https://www.anuko.com/time_tracker/contribute.htm diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3946f41f1..d219a64ab 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3735 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3736 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/readme.txt b/readme.txt index 3cc124cf5..82bda0263 100644 --- a/readme.txt +++ b/readme.txt @@ -2,6 +2,8 @@ Anuko Time Tracker Copyright (c) Anuko (https://www.anuko.com) Project home page: https://www.anuko.com/time_tracker/index.htm +Forum: https://www.anuko.com/forum/viewforum.php?f=4 +Info for developers: https://www.anuko.com/time_tracker/info_for_developers.htm Free hosting of Time Tracker for individuals and small teams is available at https://timetracker.anuko.com Unless otherwise noted, files in this archive are protected by the LIBERAL FREEWARE LICENSE. From cd4a4543cf8dd3d0534cf7e51032aea1605d0304 Mon Sep 17 00:00:00 2001 From: anuko Date: Tue, 9 Jan 2018 18:06:05 +0000 Subject: [PATCH 0272/2515] Increased required PHP version to 5.4 because of week view issue. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d219a64ab..3cff2af87 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3736 | Copyright © Anuko | +  Anuko Time Tracker 1.13.11.3737 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 6195c3961..2b0d896ca 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -78,7 +78,9 @@ function setChange($sql) { } // Check if PHP version is good enough. - $required_version = '5.2.1'; // Something in TCPDF library does not work below this one. + // $required_version = '5.2.1'; // Something in TCPDF library does not work below this one. + $required_version = '5.4.0'; // Week view (week.php) requires 5.4 because of []-way of referencing arrays. + // This needs further investigation as we use [] elsewhere without obvious problems. if (version_compare(phpversion(), $required_version, '>=')) { echo('PHP version: '.phpversion().', good enough.
'); } else { From 98f86b438c91861eed8d384a7e9ab27e97d7d8b7 Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 10 Jan 2018 14:49:42 +0000 Subject: [PATCH 0273/2515] Provided default value for parameter as per issue #47. --- WEB-INF/templates/footer.tpl | 2 +- plugins/MonthlyQuota.class.php | 3 ++- quotas.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3cff2af87..a6a31a1db 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.11.3737 | Copyright © Anuko | +  Anuko Time Tracker 1.13.12.3738 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index a42b78242..8fff596b1 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -53,7 +53,8 @@ public function update($year, $month, $quota) { } // get - obtains either a single month quota or an array of quotas for an entire year. - public function get($year, $month) { + // Month starts with 1 for January, not 0. + public function get($year, $month = null) { if (is_null($month)){ return $this->getMany($year); } diff --git a/quotas.php b/quotas.php index d846ae25d..ac0998c5e 100644 --- a/quotas.php +++ b/quotas.php @@ -93,7 +93,7 @@ } } -// Returns monthly quotas where January is month 1, not 0. +// Get monthly quotas where for the entire year. $monthsData = $quota->get($selectedYear); $form = new Form('monthlyQuotasForm'); From 8164670fafb4306285df2707921741cb9d925385 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 12 Jan 2018 13:20:10 +0000 Subject: [PATCH 0274/2515] Work in progress improving week view. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 3 ++- WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 3 ++- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 3 ++- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 19 files changed, 32 insertions(+), 4 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index c134ce03a..696f02d36 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -173,6 +173,7 @@ // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', // 'label.note' => 'Note', +// 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index e25f3f7db..95f3c2131 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -153,6 +153,8 @@ 'label.finish' => 'Slut', 'label.duration' => 'Varighed', 'label.note' => 'Notat', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Emne', 'label.cost' => 'Pris', 'label.day_total' => 'Dagens total', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index ba1e5f0dc..1ce0510dc 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -149,6 +149,8 @@ 'label.finish' => 'Ende', 'label.duration' => 'Dauer', 'label.note' => 'Beschreibung', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Position', 'label.cost' => 'Kosten', 'label.day_total' => 'Summe (Tag)', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 4e2ac42a3..51a16b005 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -152,6 +152,7 @@ 'label.finish' => 'Finish', 'label.duration' => 'Duration', 'label.note' => 'Note', +'label.note' => 'Notes', 'label.item' => 'Item', 'label.cost' => 'Cost', 'label.day_total' => 'Day total', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 279804507..01ff997f1 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -177,7 +177,8 @@ 'label.finish' => 'Fin', 'label.duration' => 'Duración', 'label.note' => 'Nota', -// TODO: translate the following strings. +// TODO: translate the following. +// 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index f53015c06..a22add160 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -175,6 +175,7 @@ // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', // 'label.note' => 'Note', +// 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 59109c8e8..15b15281c 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -162,6 +162,8 @@ 'label.finish' => 'اتمام', 'label.duration' => 'مدت زمان', 'label.note' => 'توضیح', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'آیتم', 'label.cost' => 'هزینه', 'label.day_total' => 'کل روز', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index f0e373201..67229682f 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -151,6 +151,8 @@ 'label.finish' => 'Lopetus', 'label.duration' => 'Kesto', 'label.note' => 'Huom', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Syöte', 'label.cost' => 'Hinta', 'label.day_total' => 'Päivä yhteensä', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 309e150b5..5c2ee98f5 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -148,6 +148,8 @@ 'label.finish' => 'Fin', 'label.duration' => 'Durée', 'label.note' => 'Note', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Item', 'label.cost' => 'Coût', 'label.day_total' => 'Total quotidien', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 001143bf4..dedd88e99 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -166,7 +166,8 @@ 'label.finish' => 'סיום', 'label.duration' => 'משך זמן', 'label.note' => 'הערה', -// TODO: translate label.item +// TODO: translate the following. +// 'label.notes' => 'Notes', // 'label.item' => 'Item', 'label.cost' => 'עלות', 'label.day_total' => 'סיכום יומי', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 70331e077..44139d9f1 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -151,6 +151,8 @@ 'label.finish' => 'Einde', 'label.duration' => 'Tijdsduur', 'label.note' => 'Opmerking', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Artikel', 'label.cost' => 'Kosten', 'label.day_total' => 'Dag totaal', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index a5065e5bc..1114d0e01 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -156,6 +156,8 @@ 'label.finish' => 'Koniec', 'label.duration' => 'Czas trwania', 'label.note' => 'Uwagi', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Pozycja', 'label.cost' => 'Koszt', 'label.day_total' => 'Dziś', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 472470604..c50e8f848 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -151,6 +151,8 @@ 'label.finish' => 'Fim', 'label.duration' => 'Duração', 'label.note' => 'Anotação', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Item', 'label.cost' => 'Custo', 'label.day_total' => 'Total diário', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index bd6b6fdb3..94431907b 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -152,6 +152,7 @@ 'label.finish' => 'Окончание', 'label.duration' => 'Длительность', 'label.note' => 'Комментарий', +'label.notes' => 'Комментарии', 'label.item' => 'Предмет', 'label.cost' => 'Стоимость', 'label.day_total' => 'Итог за день', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 5d179fc24..38b25f62c 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -162,7 +162,8 @@ 'label.finish' => 'Koniec', 'label.duration' => 'Dĺžka', 'label.note' => 'Poznámka', -// TODO: translate label.item +// TODO: translate the following. +// 'label.notes' => 'Notes', // 'label.item' => 'Item', 'label.cost' => 'Náklady', // TODO: translate the following string. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 1db2ad6f7..f72175066 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -153,6 +153,8 @@ 'label.finish' => 'Završetak', 'label.duration' => 'Trajanje', 'label.note' => 'Napomena', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Stavka', 'label.cost' => 'Cena', 'label.day_total' => 'Zbir časova dnevno', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index a0899465b..679db6e33 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -152,6 +152,8 @@ 'label.finish' => 'Sluttid', 'label.duration' => 'Varaktighet', 'label.note' => 'Anteckning', +// TODO: translate the following. +// 'label.notes' => 'Notes', 'label.item' => 'Utlägg för', 'label.cost' => 'Kostnad', 'label.day_total' => 'Dagstotal', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index cbdacae0b..28d485735 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -168,6 +168,7 @@ // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', // 'label.note' => 'Note', +// 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a6a31a1db..e5b179702 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.12.3738 | Copyright © Anuko | +  Anuko Time Tracker 1.13.12.3739 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 16b12b986b03d54187662046e4a0a3c7a8c2393e Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 12 Jan 2018 13:39:39 +0000 Subject: [PATCH 0275/2515] Fixed a problem with English label introduced in previous commit. --- WEB-INF/resources/en.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 51a16b005..d8c1f5519 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -152,7 +152,7 @@ 'label.finish' => 'Finish', 'label.duration' => 'Duration', 'label.note' => 'Note', -'label.note' => 'Notes', +'label.notes' => 'Notes', 'label.item' => 'Item', 'label.cost' => 'Cost', 'label.day_total' => 'Day total', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e5b179702..5c5d50c7e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.12.3739 | Copyright © Anuko | +  Anuko Time Tracker 1.13.12.3740 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 19e183c61f684ff92f5b7c95f09a0a6ca7d7bffe Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 12 Jan 2018 16:55:03 +0000 Subject: [PATCH 0276/2515] Added editable comment fields on week view. --- WEB-INF/lib/ttWeekViewHelper.class.php | 73 +++++++++++-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 4 - week.php | 137 ++++++++++++++++--------- 4 files changed, 151 insertions(+), 65 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 5c03a373a..4a8ce4e73 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -85,7 +85,7 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { return $result; } - // getDataForWeekView - builds an array to render a table of durations for week view. + // getDataForWeekView - builds an array to render a table of durations and comments for week view. // In a week view we want one row representing the same attributes to have 7 values for each day of week. // We identify simlar records by a combination of client, billable, project, task, and custom field values. // This will allow us to extend the feature when more custom fields are added. @@ -96,10 +96,14 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // "cl:546,bl:0,pr:23456,ts:27464,cf_1:7623" // The above means client 546, not billable, project 23456, task 27464, custom field option id 7623. // + // Daily comments are implemented as alternate rows following week durations. + // For example: row_0 - new entry durations, row_1 - new entry daily comments, + // row_2 - existing entry durations, row_3 - existing entry comments, etc. + // // Description of $dataArray format that the function returns. // $dataArray = array( // array( // Row 0. This is a special, one-off row for a new week entry with empty values. - // 'row_id' => null', // Row identifier. Null for a new entry. + // 'row_id' => null, // Row identifier. Null for a new entry. // 'label' => 'New entry', // Human readable label for the row describing what this time entry is for. // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => null, 'duration' => null), // control_id is row_id plus day header for column. // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => null, 'duration' => null), @@ -109,6 +113,21 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_5' => array('control_id' => '0_day_5', 'tt_log_id' => null, 'duration' => null), // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) // ), + // + // TODO: work in progress re-documenting the array for improved week view. Trying to implement this now. + // array( // Row 1. This row represents daily comments for a new entry in row above (row 0). + // 'row_id' => null, // Row identifier. See ttWeekViewHelper::makeRowIdentifier(). + // 'label' => 'Notes', // Human readable label. + // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => null, 'note' => null), + // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => null, 'note' => null), + // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => null, 'note' => null), + // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => null, 'note' => null), + // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => null, 'note' => null), + // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => null, 'note' => null), + // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'note' => null) + // ), + // TODO: work in progress... + // // array( // Row 1. // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttWeekViewHelper::makeRowIdentifier(). // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. @@ -138,16 +157,23 @@ static function getDataForWeekView($records, $dayHeaders) { $dataArray = array(); // Construct the first row for a brand new entry. - $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry')); // Insert row. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry').':'); // Insert row. // Insert empty cells with proper control ids. for ($i = 0; $i < 7; $i++) { $control_id = '0_'. $dayHeaders[$i]; $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); } + // Construct the second row for daily comments for a brand new entry. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('label.notes').':'); // Insert row. + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } // Iterate through records and build $dataArray cell by cell. foreach ($records as $record) { - // Create record id without suffix. + // Create row id without suffix. $row_id_no_suffix = ttWeekViewHelper::makeRowIdentifier($record); // Handle potential multiple records with the same attributes by using a numerical suffix. $suffix = 0; @@ -160,16 +186,29 @@ static function getDataForWeekView($records, $dayHeaders) { // Find row. $pos = ttWeekViewHelper::findRow($row_id, $dataArray); if ($pos < 0) { - $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); // Insert row. + // Insert row for durations. + $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); $pos = ttWeekViewHelper::findRow($row_id, $dataArray); // Insert empty cells with proper control ids. for ($i = 0; $i < 7; $i++) { $control_id = $pos.'_'. $dayHeaders[$i]; $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); } + // Insert row for comments. + $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->getKey('label.notes').':'); + $pos++; + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + $pos--; } // Insert actual cell data from $record (one cell only). $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'duration' => $record['duration']); + // Insert existing comment from $record into the duration cell. + $pos++; + $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'note' => $record['comment']); } return $dataArray; } @@ -201,7 +240,7 @@ static function getDayTotals($dataArray, $dayHeaders) { // Insert label. global $i18n; - $dayTotals['label'] = $i18n->getKey('label.day_total'); + $dayTotals['label'] = $i18n->getKey('label.day_total').':'; foreach ($dataArray as $row) { foreach($dayHeaders as $dayHeader) { @@ -400,12 +439,8 @@ static function modifyDurationFromWeekView($fields, $err) { global $user; // Possible errors: 1) Overlap if the existing record has start time. 2) Going beyond 24 hour boundary. - // TODO: rename this function. - // Handle different errors with specific error messages. - if (!ttWeekViewHelper::canModify($fields['tt_log_id'], $fields['duration'], $err)) { - // $err->add($i18n->getKey('error.overlap')); + if (!ttWeekViewHelper::canModify($fields['tt_log_id'], $fields['duration'], $err)) return false; - } $mdb2 = getConnection(); $duration = $fields['duration']; @@ -468,4 +503,20 @@ static function canModify($tt_log_id, $new_duration, $err) { return true; // There are no conflicts, safe to modify. } + + // modifyCommentFromWeekView - modifies a comment in an existing record from a week view post. + static function modifyCommentFromWeekView($fields) { + global $user; + + $mdb2 = getConnection(); + $tt_log_id = $fields['tt_log_id']; + $comment = $fields['comment']; + $user_id = $user->getActiveUser(); + $sql = "update tt_log set comment = ".$mdb2->quote($fields['comment'])." where id = $tt_log_id and user_id = $user_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + + return true; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5c5d50c7e..734c15867 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - - - -
 Anuko Time Tracker 1.13.12.3740 | Copyright © Anuko | +  Anuko Time Tracker 1.13.13.3741 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 42f24f165..f51447547 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -51,10 +51,6 @@ {$forms.weekTimeForm.task.control}
{$i18n.label.note}:{$forms.weekTimeForm.note.control}
diff --git a/week.php b/week.php index fb2dcaa6a..1fb904ebc 100644 --- a/week.php +++ b/week.php @@ -107,7 +107,6 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -$cl_note = trim($request->getParameter('note')); // Get the data we need to display week view. // Get column headers, which are day numbers in month. @@ -127,9 +126,11 @@ function render(&$table, $value, $row, $column, $selected = false) { // Special handling for row 0, which represents a new week entry. if (0 == $row) { $this->setOptions(array('style'=>'text-align: center; font-weight: bold;')); + } else if (0 != $row % 2) { + $this->setOptions(array('style'=>'text-align: right;')); } // Special handling for not billable entries. - if ($row > 0) { + if ($row > 1 && 0 == $row % 2) { $row_id = $table->getValueAtName($row,'row_id'); $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl'); if (!$billable) { @@ -142,6 +143,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Define rendering class for a single cell for time entry in week view table. +// TODO: Refactor the class name, as we now handle both durations and comments in these cells. class TimeCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). @@ -152,7 +154,10 @@ function render(&$table, $value, $row, $column, $selected = false) { $field->setEnabled(false); $field->setFormName($table->getFormName()); $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. - $field->setValue($table->getValueAt($row,$column)['duration']); + if (0 == $row % 2) + $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. + else + $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control // because we can't supply start and finish times in week view - there are no fields for them. global $user; @@ -259,7 +264,6 @@ function render(&$table, $value, $row, $column, $selected = false) { 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } -$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); // Add other controls. $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar @@ -324,58 +328,93 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($lockedDays[$key]) continue; // Make control id for the cell. $control_id = $rowNumber.'_'.$dayHeader; - // Optain existing and posted durations. - $postedDuration = $request->getParameter($control_id); - $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; - // If posted value is not null, check and normalize it. - if ($postedDuration) { - if (ttTimeHelper::isValidDuration($postedDuration)) { - $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. - } else { - $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); - $result = false; break; // Break out. Stop any further processing. + + // Handle durations and comments in separate blocks of code. + if (0 == $rowNumber % 2) { + // Handle durations row here. + + // Obtain existing and posted durations. + $postedDuration = $request->getParameter($control_id); + $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; + // If posted value is not null, check and normalize it. + if ($postedDuration) { + if (ttTimeHelper::isValidDuration($postedDuration)) { + $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. + } else { + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); + $result = false; break; // Break out. Stop any further processing. + } } - } - // Do not process if value has not changed. - if ($postedDuration == $existingDuration) - continue; - // Posted value is different. - if ($existingDuration == null) { - // Skip inserting 0 duration values. - if (0 == ttTimeHelper::toMinutes($postedDuration)) + // Do not process if value has not changed. + if ($postedDuration == $existingDuration) continue; - // Insert a new record. - $fields = array(); - $fields['row_id'] = $dataArray[$rowNumber]['row_id']; - if (!$fields['row_id']) { - // Special handling for row 0, a new entry. Need to construct new row_id. - $record = array(); - $record['client_id'] = $cl_client; - $record['billable'] = $cl_billable ? '1' : '0'; - $record['project_id'] = $cl_project; - $record['task_id'] = $cl_task; - $record['cf_1_value'] = $cl_cf_1; - $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; - // Note: no need to check for a possible conflict with an already existing row - // because we are doing an insert that does not affect already existing data. - - $fields['note'] = $cl_note; + // Posted value is different. + if ($existingDuration == null) { + // Skip inserting 0 duration values. + if (0 == ttTimeHelper::toMinutes($postedDuration)) + continue; + // Insert a new record. + $fields = array(); + $fields['row_id'] = $dataArray[$rowNumber]['row_id']; + if (!$fields['row_id']) { + // Special handling for row 0, a new entry. Need to construct new row_id. + $record = array(); + $record['client_id'] = $cl_client; + $record['billable'] = $cl_billable ? '1' : '0'; + $record['project_id'] = $cl_project; + $record['task_id'] = $cl_task; + $record['cf_1_value'] = $cl_cf_1; + $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; + // Note: no need to check for a possible conflict with an already existing row + // because we are doing an insert that does not affect already existing data. + } + $fields['day_header'] = $dayHeader; + $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. + $fields['duration'] = $postedDuration; + $fields['browser_today'] = $request->getParameter('browser_today', null); + // Take note value from the control below duration. + $noteRowNumber = $rowNumber + 1; + $note_control_id = $noteRowNumber.'_'.$dayHeader; + $fields['note'] = $request->getParameter($note_control_id); + $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); + } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { + // Delete an already existing record here. + $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); + } else { + $fields = array(); + $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; + $fields['duration'] = $postedDuration; + $result = ttWeekViewHelper::modifyDurationFromWeekView($fields, $err); } - $fields['day_header'] = $dayHeader; - $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. - $fields['duration'] = $postedDuration; - $fields['browser_today'] = $request->getParameter('browser_today', null); - $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); - } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { - // Delete an already existing record here. - $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id'], $user->getActiveUser()); + if (!$result) break; // Break out of the loop in case of first error. + } else { + // Handle commments row here. + + // Obtain existing and posted comments. + $postedComment = $request->getParameter($control_id); + $existingComment = $dataArray[$rowNumber][$dayHeader]['note']; + // If posted value is not null, check it. + if ($postedComment && !ttValidString($postedComment, true)) { + $err->add($i18n->getKey('error.field'), $i18n->getKey('label.note')); + $result = false; break; // Break out. Stop any further processing. + } + // Do not process if value has not changed. + if ($postedComment == $existingComment) + continue; + + // Posted value is different. + // TODO: handle new entries separately in the durations block above. + + // Here, only update the comment on an already existing record. $fields = array(); $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; - $fields['duration'] = $postedDuration; - $result = ttWeekViewHelper::modifyDurationFromWeekView($fields, $err); + if ($fields['tt_log_id']) { + $fields['comment'] = $postedComment; + $result = ttWeekViewHelper::modifyCommentFromWeekView($fields); + } + if (!$result) break; // Break out of the loop in case of first error. } - if (!$result) break; // Break out of the loop in case of first error. } if (!$result) break; // Break out of the loop in case of first error. $rowNumber++; From d2c6224504e91f7f7ddbc0b97277d87d2cad744f Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 12 Jan 2018 17:52:59 +0000 Subject: [PATCH 0277/2515] Added toltips to editable comment fields to help view the entire comment. --- WEB-INF/lib/form/TextField.class.php | 5 +++++ WEB-INF/templates/footer.tpl | 2 +- week.php | 11 ++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index db29a0c7e..6b745a2af 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -30,18 +30,23 @@ class TextField extends FormElement { + var $title = null; // Control title (ex: to display a tooltip). + function __construct($name) { $this->class = 'TextField'; $this->name = $name; } + function setTitle($title) { $this->title = $title; } + function getHtml() { if (empty($this->id)) $this->id = $this->name; $html = "\n\tid\" name=\"$this->name\""; if (!empty($this->size)) $html .= " size=\"$this->size\""; if (!empty($this->style)) $html .= " style=\"$this->style\""; + if (!empty($this->title)) $html .= " title=\"$this->title\""; if($this->isEnabled()) { if (!empty($this->max_length)) $html .= " maxlength=\"$this->max_length\""; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 734c15867..7ad200440 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.13.3741 | Copyright © Anuko | +  Anuko Time Tracker 1.13.14.3742 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 1fb904ebc..bb75bdf51 100644 --- a/week.php +++ b/week.php @@ -142,9 +142,8 @@ function render(&$table, $value, $row, $column, $selected = false) { } } -// Define rendering class for a single cell for time entry in week view table. -// TODO: Refactor the class name, as we now handle both durations and comments in these cells. -class TimeCellRenderer extends DefaultCellRenderer { +// Define rendering class for a single cell for a time or a comment entry in week view table. +class WeekViewCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); @@ -156,8 +155,10 @@ function render(&$table, $value, $row, $column, $selected = false) { $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. if (0 == $row % 2) $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. - else + else { $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. + $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to help view the entire comment. + } // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control // because we can't supply start and finish times in week view - there are no fields for them. global $user; @@ -194,7 +195,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Add columns to table. $table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); for ($i = 0; $i < 7; $i++) { - $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new TimeCellRenderer(), $dayTotals[$dayHeaders[$i]])); + $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); } $table->setInteractive(false); $form->addInputElement($table); From b0ac19f9b1c3f36c65276fcd235857e9b41b52ca Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 12 Jan 2018 19:38:30 +0000 Subject: [PATCH 0278/2515] Added prepopulation fueature for a week view. --- WEB-INF/lib/ttWeekViewHelper.class.php | 81 ++++++++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- week.php | 8 ++- 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 4a8ce4e73..2741a57e7 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -213,6 +213,87 @@ static function getDataForWeekView($records, $dayHeaders) { return $dataArray; } + // prePopulateFromPastWeeks - is a complementary function to getDataForWeekView. + // It build an "empty" $dataArray with only labels present. Labels are taken from + // the most recent past week, up to 5 weeks back from this week. + // This is a data entry acceleration feature to help users quickly populate their + // regular entry list for a new week, even after a long vacation. + static function prePopulateFromPastWeeks($startDate, $dayHeaders) { + global $user; + global $i18n; + + // First, determine past week start and end dates. + $objDate = new DateAndTime(DB_DATEFORMAT, $startDate); + $objDate->decDay(7); + $pastWeekStartDate = $objDate->toString(DB_DATEFORMAT); + $objDate->incDay(6); + $pastWeekEndDate = $objDate->toString(DB_DATEFORMAT); + unset($objDate); + + // Obtain past week(s) records. + $records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $pastWeekStartDate, $pastWeekEndDate); + // Handle potential situation of no records by re-trying for up to 4 more previous weeks (after a long vacation, etc.). + if (!$records) { + for ($i = 0; $i < 4; $i++) { + $objDate = new DateAndTime(DB_DATEFORMAT, $pastWeekStartDate); + $objDate->decDay(7); + $pastWeekStartDate = $objDate->toString(DB_DATEFORMAT); + $objDate->incDay(6); + $pastWeekEndDate = $objDate->toString(DB_DATEFORMAT); + unset($objDate); + + $records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $pastWeekStartDate, $pastWeekEndDate); + // Break out of the loop if we found something. + if ($records) break; + } + } + + // TODO: consider refactoring, this block of code is used 2 times. + // Construct the first row for a brand new entry. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry').':'); // Insert row. + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + // Construct the second row for daily comments for a brand new entry. + $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('label.notes').':'); // Insert row. + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + + // Iterate through records and build an "empty" $dataArray. + foreach ($records as $record) { + // Create row id with 0 suffix. In prepopulated view, we only need one row for similar records. + $row_id = ttWeekViewHelper::makeRowIdentifier($record).'_0'; + // Find row. + $pos = ttWeekViewHelper::findRow($row_id, $dataArray); + if ($pos < 0) { + // Insert row for durations. + $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); + $pos = ttWeekViewHelper::findRow($row_id, $dataArray); + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + // Insert row for comments. + $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->getKey('label.notes').':'); + $pos++; + // Insert empty cells with proper control ids. + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + $pos--; + } + } + + return $dataArray; + } + // cellExists is a helper function for getDataForWeekView() to see if a cell with a given label // and a day header already exists. static function cellExists($row_id, $day_header, $dataArray) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7ad200440..0a674e29a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.14.3742 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3743 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index bb75bdf51..5db40a258 100644 --- a/week.php +++ b/week.php @@ -114,8 +114,12 @@ $lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); // Get already existing records. $records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT)); -// Build data array for the table. Format is described in the function. -$dataArray = ttWeekViewHelper::getDataForWeekView($records, $dayHeaders); +// Build data array for the table. Format is described in ttWeekViewHelper::getDataForWeekView function. +if ($records) + $dataArray = ttWeekViewHelper::getDataForWeekView($records, $dayHeaders); +else + $dataArray = ttWeekViewHelper::prePopulateFromPastWeeks($startDate->toString(DB_DATEFORMAT), $dayHeaders); + // Build day totals (total durations for each day in week). $dayTotals = ttWeekViewHelper::getDayTotals($dataArray, $dayHeaders); From de518d7584b24c438ac562b3f1eca4e96568c85a Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 13 Jan 2018 03:36:34 +0000 Subject: [PATCH 0279/2515] Improved a comment. --- WEB-INF/lib/ttWeekViewHelper.class.php | 55 ++++++++++++-------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 2741a57e7..e74a08f5a 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -85,9 +85,9 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { return $result; } - // getDataForWeekView - builds an array to render a table of durations and comments for week view. + // getDataForWeekView - builds an array to render a table of durations and comments for a week view. // In a week view we want one row representing the same attributes to have 7 values for each day of week. - // We identify simlar records by a combination of client, billable, project, task, and custom field values. + // We identify similar records by a combination of client, billable, project, task, and custom field values. // This will allow us to extend the feature when more custom fields are added. // // "cl:546,bl:1,pr:23456,ts:27464,cf_1:example text" @@ -104,7 +104,7 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // $dataArray = array( // array( // Row 0. This is a special, one-off row for a new week entry with empty values. // 'row_id' => null, // Row identifier. Null for a new entry. - // 'label' => 'New entry', // Human readable label for the row describing what this time entry is for. + // 'label' => 'New entry:', // Human readable label for the row describing what this time entry is for. // 'day_0' => array('control_id' => '0_day_0', 'tt_log_id' => null, 'duration' => null), // control_id is row_id plus day header for column. // 'day_1' => array('control_id' => '0_day_1', 'tt_log_id' => null, 'duration' => null), // 'day_2' => array('control_id' => '0_day_2', 'tt_log_id' => null, 'duration' => null), @@ -114,10 +114,9 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_6' => array('control_id' => '0_day_6', 'tt_log_id' => null, 'duration' => null) // ), // - // TODO: work in progress re-documenting the array for improved week view. Trying to implement this now. // array( // Row 1. This row represents daily comments for a new entry in row above (row 0). - // 'row_id' => null, // Row identifier. See ttWeekViewHelper::makeRowIdentifier(). - // 'label' => 'Notes', // Human readable label. + // 'row_id' => null, + // 'label' => 'Notes:', // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => null, 'note' => null), // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => null, 'note' => null), // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => null, 'note' => null), @@ -126,29 +125,28 @@ static function getRecordsForInterval($user_id, $start_date, $end_date) { // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => null, 'note' => null), // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'note' => null) // ), - // TODO: work in progress... // - // array( // Row 1. - // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', // Row identifier. See ttWeekViewHelper::makeRowIdentifier(). - // 'label' => 'Anuko - Time Tracker - Coding', // Human readable label for the row describing what this time entry is for. - // 'day_0' => array('control_id' => '1_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), // control_id is row_id plus day header for column. - // 'day_1' => array('control_id' => '1_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), - // 'day_2' => array('control_id' => '1_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), - // 'day_3' => array('control_id' => '1_day_3', 'tt_log_id' => null, 'duration' => null), - // 'day_4' => array('control_id' => '1_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '1_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), - // 'day_6' => array('control_id' => '1_day_6', 'tt_log_id' => null, 'duration' => null) - // ), // array( // Row 2. - // 'row_id' => 'bl:0_0', - // 'label' => '', // In this case the label is empty as we don't have anything to put into it, as we only have billable flag. - // 'day_0' => array('control_id' => '2_day_0', 'tt_log_id' => null, 'duration' => null), - // 'day_1' => array('control_id' => '2_day_1', 'tt_log_id' => 12350, 'duration' => '01:30'), - // 'day_2' => array('control_id' => '2_day_2', 'tt_log_id' => null, 'duration' => null), - // 'day_3' => array('control_id' => '2_day_3', 'tt_log_id' => 12351,'duration' => '02:30'), - // 'day_4' => array('control_id' => '2_day_4', 'tt_log_id' => 12352, 'duration' => '04:00'), - // 'day_5' => array('control_id' => '2_day_5', 'tt_log_id' => null, 'duration' => null), + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0', + // 'label' => 'Anuko - Time Tracker - Coding - Option 2', + // 'day_0' => array('control_id' => '2_day_0', 'tt_log_id' => 12345, 'duration' => '00:00'), + // 'day_1' => array('control_id' => '2_day_1', 'tt_log_id' => 12346, 'duration' => '01:00'), + // 'day_2' => array('control_id' => '2_day_2', 'tt_log_id' => 12347, 'duration' => '02:00'), + // 'day_3' => array('control_id' => '2_day_3', 'tt_log_id' => null, 'duration' => null), + // 'day_4' => array('control_id' => '2_day_4', 'tt_log_id' => 12348, 'duration' => '04:00'), + // 'day_5' => array('control_id' => '2_day_5', 'tt_log_id' => 12349, 'duration' => '04:00'), // 'day_6' => array('control_id' => '2_day_6', 'tt_log_id' => null, 'duration' => null) + // ), + // array( // Row 3. + // 'row_id' => 'cl:546,bl:1,pr:23456,ts:27464,cf_1:7623_0_notes', + // 'label' => 'Notes:', + // 'day_0' => array('control_id' => '3_day_0', 'tt_log_id' => 12345, 'note' => 'Comment one'), + // 'day_1' => array('control_id' => '3_day_1', 'tt_log_id' => 12346, 'note' => 'Comment two'), + // 'day_2' => array('control_id' => '3_day_2', 'tt_log_id' => 12347, 'note' => 'Comment three'), + // 'day_3' => array('control_id' => '3_day_3', 'tt_log_id' => null, 'note' => null), + // 'day_4' => array('control_id' => '3_day_4', 'tt_log_id' => 12348, 'note' => 'Comment four'), + // 'day_5' => array('control_id' => '3_day_5', 'tt_log_id' => 12349, 'note' => 'Comment five'), + // 'day_6' => array('control_id' => '3_day_6', 'tt_log_id' => null, 'note' => null) // ) // ); static function getDataForWeekView($records, $dayHeaders) { @@ -214,8 +212,8 @@ static function getDataForWeekView($records, $dayHeaders) { } // prePopulateFromPastWeeks - is a complementary function to getDataForWeekView. - // It build an "empty" $dataArray with only labels present. Labels are taken from - // the most recent past week, up to 5 weeks back from this week. + // It builds an "empty" $dataArray with only labels present. Labels are taken from + // the most recent active past week, up to 5 weeks back from now. // This is a data entry acceleration feature to help users quickly populate their // regular entry list for a new week, even after a long vacation. static function prePopulateFromPastWeeks($startDate, $dayHeaders) { @@ -248,7 +246,6 @@ static function prePopulateFromPastWeeks($startDate, $dayHeaders) { } } - // TODO: consider refactoring, this block of code is used 2 times. // Construct the first row for a brand new entry. $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry').':'); // Insert row. // Insert empty cells with proper control ids. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0a674e29a..3d16e583b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.15.3743 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3744 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 75eff172d58ac5b4f017434743f8f8d5d8fd1554 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 13 Jan 2018 19:04:47 +0000 Subject: [PATCH 0280/2515] A bit of refactoring with getting rid of some GLOBALS. --- WEB-INF/lib/DateAndTime.class.php | 23 +++++++++++------------ WEB-INF/templates/footer.tpl | 2 +- initialize.php | 2 -- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php index 4752e99fc..20f274265 100644 --- a/WEB-INF/lib/DateAndTime.class.php +++ b/WEB-INF/lib/DateAndTime.class.php @@ -321,18 +321,17 @@ function incDay(/*int*/$days=1) { */ function preprocessFormatString($format) { global $i18n; - if (isset($GLOBALS['i18n'])) { - // replace locale-dependent strings - $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format); - $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format); - $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8'); - $format = str_replace('%b', $abbrev_month, $format); - $format = str_replace('%h', $abbrev_month, $format); - $format = str_replace('%z', date('O'), $format); - $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime - if (strpos($format, '%c') !== false) { - $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format); - } + + // replace locale-dependent strings + $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format); + $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format); + $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8'); + $format = str_replace('%b', $abbrev_month, $format); + $format = str_replace('%h', $abbrev_month, $format); + $format = str_replace('%z', date('O'), $format); + $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime + if (strpos($format, '%c') !== false) { + $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format); } return $format; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3d16e583b..d06750181 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.15.3744 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3745 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/initialize.php b/initialize.php index c9a424586..29425c074 100644 --- a/initialize.php +++ b/initialize.php @@ -199,8 +199,6 @@ $i18n->load($lang); $GLOBALS['I18N'] = &$i18n; -$GLOBALS['USER'] = &$user; - // Assign things for smarty to use in template files. $smarty->assign('i18n', $i18n->keys); $smarty->assign('err', $err); From 77da39e33eb70b8b01502c09e8057dd199554de6 Mon Sep 17 00:00:00 2001 From: anuko Date: Sat, 13 Jan 2018 20:27:38 +0000 Subject: [PATCH 0281/2515] More refactoring. --- WEB-INF/lib/form/ActionForm.class.php | 2 +- WEB-INF/lib/form/Calendar.class.php | 3 ++- WEB-INF/lib/form/CheckboxGroup.class.php | 7 ++++--- WEB-INF/lib/form/DateField.class.php | 13 +++++-------- WEB-INF/lib/form/FloatField.class.php | 5 ++++- WEB-INF/lib/form/Form.class.php | 4 ++-- WEB-INF/lib/form/FormElement.class.php | 4 ++-- WEB-INF/lib/ttImportHelper.class.php | 8 +++++--- WEB-INF/lib/ttInvoiceHelper.class.php | 1 - WEB-INF/templates/footer.tpl | 2 +- initialize.php | 1 - mobile/user_add.php | 1 - mobile/user_edit.php | 1 - user_add.php | 1 - user_edit.php | 2 +- 15 files changed, 27 insertions(+), 28 deletions(-) diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index ece7ceb9f..97c9219c0 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -176,7 +176,7 @@ function loadBean() { import('form.'.$ref_el["class"]); $class_name = $ref_el["class"]; $el = new $class_name($ref_el["name"]); - if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]); + $el->localize(); $el->setValueSafe(@$_SESSION[$this->mSessionCell . "_" .$el->getName()]); if ($this->mForm && !isset($this->mForm->elements[$ref_el["name"]])) { diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index ab2dcf573..1340c9873 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -57,8 +57,9 @@ function setHighlight($highlight) { $this->highlight = $highlight; } - function localize($i18n) { + function localize() { global $user; + global $i18n; $this->mMonthNames = $i18n->monthNames; $this->mWeekDayShortNames = $i18n->weekdayShortNames; diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index 0bb3ac42d..810c96311 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -58,9 +58,10 @@ function getLayout() { return $this->mLayout; } function setGroupIn($value) { $this->mGroupIn = $value; if ($this->mGroupIn<1) $this->mGroupIn = 1;} function getGroupIn() { return $this->mGroupIn; } - function localize($i18n) { - $this->lSelAll = $i18n->getKey('label.select_all'); - $this->lSelNone = $i18n->getKey('label.select_none'); + function localize() { + global $i18n; + $this->lSelAll = $i18n->getKey('label.select_all'); + $this->lSelNone = $i18n->getKey('label.select_none'); } function getHtml() { diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index ecfdaf92b..f8eef8cb8 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -41,14 +41,12 @@ function __construct($name) { $this->class = 'DateField'; $this->name = $name; $this->mDateObj = new DateAndTime(); - - if (isset($GLOBALS["I18N"])) { - $this->localize($GLOBALS["I18N"]); - } + $this->localize(); } - function localize($i18n) { + function localize() { global $user; + global $i18n; $this->mDateObj->setFormat($user->date_format); @@ -80,6 +78,7 @@ function getValueSafe() { } function getHtml() { + global $user; if (!$this->isEnabled()) { $html = htmlspecialchars($this->getValue()). @@ -296,9 +295,7 @@ function getButtonCodeYear(dateFieldName, dateVal, adjust, label) { function getDateString(dateVal) {\n"; - if (isset($GLOBALS['i18n'])) { - $html .= "dateVal.locale = \"".$GLOBALS['i18n']->lang."\";\n"; - } + $html .= "dateVal.locale = \"".$user->lang."\";\n"; $html .= "return dateVal.strftime(dateFormat); } diff --git a/WEB-INF/lib/form/FloatField.class.php b/WEB-INF/lib/form/FloatField.class.php index b11f4a115..cb035c7c3 100644 --- a/WEB-INF/lib/form/FloatField.class.php +++ b/WEB-INF/lib/form/FloatField.class.php @@ -33,11 +33,14 @@ class FloatField extends TextField { var $mFFormat; function __construct($name) { + global $user; + $this->class = 'FloatField'; $this->name = $name; + $this->mDelimiter = $user->decimal_mark; } - function localize($i18n) { + function localize() { global $user; $this->mDelimiter = $user->decimal_mark; } diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index cf7890c60..5a4baa9be 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -135,7 +135,7 @@ function addInput($params) { if ($el!=null) { $el->setFormName($this->name); if (isset($params["id"])) $el->setId($params["id"]); - if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]); + $el->localize(); if (isset($params["enable"])) $el->setEnabled($params["enable"]); if (isset($params["style"])) $el->setStyle($params["style"]); @@ -153,7 +153,7 @@ function addInput($params) { function addInputElement(&$el) { if ($el && is_object($el)) { - if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]); + $el->localize(); $el->setFormName($this->name); $this->elements[$el->name] = &$el; diff --git a/WEB-INF/lib/form/FormElement.class.php b/WEB-INF/lib/form/FormElement.class.php index ff7b3b28a..0443e6c9a 100644 --- a/WEB-INF/lib/form/FormElement.class.php +++ b/WEB-INF/lib/form/FormElement.class.php @@ -84,8 +84,8 @@ function isEnabled() { return $this->enabled; } function setOnChange($str) { $this->on_change = $str; } function setOnClick($str) { $this->on_click = $str; } - function localize($i18n) {} // Localization occurs in derived classes and is dependent on control type. - // For example, in calendar control we need to localize day and month names. + function localize() {} // Localization occurs in derived classes and is dependent on control type. + // For example, in calendar control we need to localize day and month names. // getHtml returns HTML for the element. function getHtml() { return ''; } diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index f7be431f6..5e2d40a5a 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -329,6 +329,8 @@ function dataElement($parser, $data) { // startElement, endElement, and dataElement functions are called as many times as necessary. // Actual import occurs in the endElement handler. function importXml() { + global $i18n; + // Do we have a compressed file? $compressed = false; $file_ext = substr($_FILES['xmlfile']['name'], strrpos($_FILES['xmlfile']['name'], '.') + 1); @@ -343,13 +345,13 @@ function importXml() { // If the file is compressed - uncompress it. if ($compressed) { if (!$this->uncompress($_FILES['xmlfile']['tmp_name'], $filename)) { - $this->errors->add($GLOBALS['I18N']->getKey('error.sys')); + $this->errors->add($i18n->getKey('error.sys')); return; } unlink($_FILES['xmlfile']['tmp_name']); } else { if (!move_uploaded_file($_FILES['xmlfile']['tmp_name'], $filename)) { - $this->errors->add($GLOBALS['I18N']->getKey('error.upload')); + $this->errors->add($i18n->getKey('error.upload')); return; } } @@ -369,7 +371,7 @@ function importXml() { xml_get_current_line_number($parser))); } if (!$this->canImport) { - $this->errors->add($GLOBALS['I18N']->getKey('error.user_exists')); + $this->errors->add($i18n->getKey('error.user_exists')); break; } } diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index b7d2cc280..2784a7b91 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -99,7 +99,6 @@ static function getInvoiceByName($invoice_name) { // The getInvoiceItems retrieves tt_log items associated with the invoice. static function getInvoiceItems($invoice_id) { global $user; - global $i18n; $mdb2 = getConnection(); // At this time only detailed invoice is supported. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d06750181..1279cfa30 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.15.3745 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3746 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/initialize.php b/initialize.php index 29425c074..689925d31 100644 --- a/initialize.php +++ b/initialize.php @@ -197,7 +197,6 @@ // Load i18n file. $i18n->load($lang); -$GLOBALS['I18N'] = &$i18n; // Assign things for smarty to use in template files. $smarty->assign('i18n', $i18n->keys); diff --git a/mobile/user_add.php b/mobile/user_add.php index c1f7e291e..24adc1127 100644 --- a/mobile/user_add.php +++ b/mobile/user_add.php @@ -107,7 +107,6 @@ function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; $field = new FloatField('rate_'.$table->getValueAtName($row, 'id')); $field->setFormName($table->getFormName()); - $field->localize($GLOBALS['I18N']); $field->setSize(5); $field->setFormat('.2'); foreach ($assigned_projects as $p) { diff --git a/mobile/user_edit.php b/mobile/user_edit.php index 204e7137b..e8a116ff0 100644 --- a/mobile/user_edit.php +++ b/mobile/user_edit.php @@ -137,7 +137,6 @@ function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); $field->setFormName($table->getFormName()); - $field->localize($GLOBALS['I18N']); $field->setSize(5); $field->setFormat('.2'); foreach ($assigned_projects as $p) { diff --git a/user_add.php b/user_add.php index 3c9190566..b8b5d3020 100644 --- a/user_add.php +++ b/user_add.php @@ -107,7 +107,6 @@ function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; $field = new FloatField('rate_'.$table->getValueAtName($row, 'id')); $field->setFormName($table->getFormName()); - $field->localize($GLOBALS['I18N']); $field->setSize(5); $field->setFormat('.2'); foreach ($assigned_projects as $p) { diff --git a/user_edit.php b/user_edit.php index c8608773e..d7a3feb5e 100644 --- a/user_edit.php +++ b/user_edit.php @@ -135,9 +135,9 @@ function render(&$table, $value, $row, $column, $selected = false) { class RateCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; + $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); $field->setFormName($table->getFormName()); - $field->localize($GLOBALS['I18N']); $field->setSize(5); $field->setFormat('.2'); foreach ($assigned_projects as $p) { From 7341c172b0754194233c787f14f2cde95c75205d Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 14 Jan 2018 13:52:26 +0000 Subject: [PATCH 0282/2515] A bit more refactoring. --- WEB-INF/lib/Auth.class.php | 3 ++- WEB-INF/lib/auth/Auth_ldap.class.php | 5 ++--- WEB-INF/templates/footer.tpl | 2 +- access_denied.php | 2 +- initialize.php | 1 - mobile/access_denied.php | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/Auth.class.php b/WEB-INF/lib/Auth.class.php index 2c3c657da..354d34ba2 100644 --- a/WEB-INF/lib/Auth.class.php +++ b/WEB-INF/lib/Auth.class.php @@ -36,7 +36,8 @@ function isAuthenticated() { // die ("Your browser's cookie functionality is turned off. Please turn it on."); // } - $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display. + global $smarty; + $smarty->assign('authenticated', true); // Used in header.tpl for menu display. return true; } session_write_close(); diff --git a/WEB-INF/lib/auth/Auth_ldap.class.php b/WEB-INF/lib/auth/Auth_ldap.class.php index f99d752a0..e17b6e7c9 100644 --- a/WEB-INF/lib/auth/Auth_ldap.class.php +++ b/WEB-INF/lib/auth/Auth_ldap.class.php @@ -53,10 +53,9 @@ class Auth_ldap extends Auth { function __construct($params) { + global $smarty; $this->params = $params; - if (isset($GLOBALS['smarty'])) { - $GLOBALS['smarty']->assign('Auth_ldap_params', $this->params); - } + $smarty->assign('Auth_ldap_params', $this->params); } function ldap_escape($str){ diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1279cfa30..7c5a8ab2a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.15.3746 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3747 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/access_denied.php b/access_denied.php index d5c58fe22..65a5ed72d 100644 --- a/access_denied.php +++ b/access_denied.php @@ -29,7 +29,7 @@ require_once('initialize.php'); $err->add($i18n->getKey('error.access_denied')); -if ($auth->isAuthenticated()) $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display. +if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->getKey('label.error')); $smarty->assign('content_page_name', 'access_denied.tpl'); diff --git a/initialize.php b/initialize.php index 689925d31..c1a8437a0 100644 --- a/initialize.php +++ b/initialize.php @@ -74,7 +74,6 @@ $smarty->use_sub_dirs = false; $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = TEMPLATE_DIR.'_c'; -$GLOBALS['SMARTY'] = &$smarty; // Note: these 3 settings below used to be in .htaccess file. Moved them here to eliminate "error 500" problems // with some shared hostings that do not have AllowOverride Options or AllowOverride All in their apache configurations. diff --git a/mobile/access_denied.php b/mobile/access_denied.php index 836579a5a..b0bc00281 100644 --- a/mobile/access_denied.php +++ b/mobile/access_denied.php @@ -29,7 +29,7 @@ require_once('../initialize.php'); $err->add($i18n->getKey('error.access_denied')); -if ($auth->isAuthenticated()) $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display. +if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->getKey('label.error')); $smarty->assign('content_page_name', 'mobile/access_denied.tpl'); From 21b321bd90ffd53e88021da44f39dc340cc63bc2 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 14 Jan 2018 14:52:50 +0000 Subject: [PATCH 0283/2515] Cosmetic - maintenance adjustment. --- WEB-INF/lib/ttTeamHelper.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 6f716f587..69fcaa0f9 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -810,7 +810,7 @@ static function update($team_id, $fields) return true; } - // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 50). + // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 100). static function getInactiveTeams() { $inactive_teams = array(); $mdb2 = getConnection(); @@ -829,7 +829,7 @@ static function getInactiveTeams() { $count++; $inactive_teams[] = $team_id; // Limit the array size for perfomance by allowing this operation on small chunks only. - if ($count >= 50) break; + if ($count >= 100) break; } } return $inactive_teams; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7c5a8ab2a..06726f1a9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.15.3747 | Copyright © Anuko | +  Anuko Time Tracker 1.13.15.3748 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 2e5d329bb88d0cda3515cccaea70575867b482fd Mon Sep 17 00:00:00 2001 From: anuko Date: Wed, 17 Jan 2018 22:43:08 +0000 Subject: [PATCH 0284/2515] Cosmetic comment fix. --- quotas.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quotas.php b/quotas.php index ac0998c5e..2e64e425d 100644 --- a/quotas.php +++ b/quotas.php @@ -93,7 +93,7 @@ } } -// Get monthly quotas where for the entire year. +// Get monthly quotas for the entire year. $monthsData = $quota->get($selectedYear); $form = new Form('monthlyQuotasForm'); From dd30f46db3b91a8540b92f905930d8c38ea4c2b9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 00:50:30 +0000 Subject: [PATCH 0285/2515] Work in progress integrating changes from PR #48 - introduced a database field. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 9 +++++---- mysql.sql | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 06726f1a9..e1c31da80 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.13.15.3748 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3749 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 2b0d896ca..49c9747ea 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -600,7 +600,7 @@ function setChange($sql) { setChange("ALTER TABLE tt_invoices DROP end_date"); } - if ($_POST["convert1600to11300"]) { + if ($_POST["convert1600to11400"]) { setChange("DROP TABLE IF EXISTS tt_invoice_headers"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL"); setChange("ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL"); @@ -645,6 +645,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_teams` ADD `bcc_email` varchar(100) default NULL AFTER `uncompleted_indicators`"); setChange("ALTER TABLE `tt_cron` ADD `cc` varchar(100) default NULL AFTER `email`"); setChange("ALTER TABLE `tt_cron` ADD `subject` varchar(100) default NULL AFTER `cc`"); + setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } // The update_clients function updates projects field in tt_clients table. @@ -750,7 +751,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.13.0) + Create database structure (v1.14.0)
(applies only to new installations, do not execute when updating)
@@ -782,8 +783,8 @@ function setChange($sql) {



Update database structure (v1.6 to v1.13)
Update database structure (v1.6 to v1.14)
diff --git a/mysql.sql b/mysql.sql index de5060dad..9a971bece 100644 --- a/mysql.sql +++ b/mysql.sql @@ -144,6 +144,7 @@ CREATE TABLE `tt_log` ( `invoice_id` int(11) default NULL, # invoice id `comment` text, # user provided comment for time record `billable` tinyint(4) default '0', # whether the record is billable or not + `paid` tinyint(4) default '0', # whether the record is paid `status` tinyint(4) default '1', # time record status PRIMARY KEY (`id`) ); From f7226ae1586d42a3166bdd9b9384b7e47eb27383 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 14:36:46 +0000 Subject: [PATCH 0286/2515] Work in progress on localization files for paid status plugin. --- WEB-INF/resources/ca.lang.php | 3 ++ WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 4 +++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 53 +++++++++++++++++--------------- WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 13 +++++--- WEB-INF/resources/fi.lang.php | 3 ++ WEB-INF/resources/fr.lang.php | 3 ++ WEB-INF/resources/he.lang.php | 15 +++++---- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 3 ++ WEB-INF/resources/pt-br.lang.php | 3 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 19 +++++++----- WEB-INF/resources/sr.lang.php | 4 +++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/zh-cn.lang.php | 23 +++++++------- WEB-INF/templates/footer.tpl | 2 +- 19 files changed, 101 insertions(+), 56 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 696f02d36..bc225c661 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -225,6 +225,9 @@ 'label.fav_report' => 'Report favorit', // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Sessió iniciada', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 95f3c2131..3a3ec5bf0 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -207,6 +207,8 @@ 'label.what_is_it' => 'Hvad er det?', 'label.expense' => 'Udgift', 'label.quantity' => 'Mængde', +// TODO: translate the following. +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 1ce0510dc..54e26439b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -202,6 +202,10 @@ 'label.fav_report' => 'Bevorzugter Report', 'label.cron_schedule' => 'Cronjob Zeitplan', 'label.what_is_it' => 'Was ist es?', +// TODO: translate the following. +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Anmelden', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index d8c1f5519..bbcf84225 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -204,6 +204,7 @@ 'label.what_is_it' => 'What is it?', 'label.expense' => 'Expense', 'label.quantity' => 'Quantity', +'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 01ff997f1..09e0f5c0e 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -64,7 +64,7 @@ 'menu.options' => 'Opciones', // Footer - strings on the bottom of most pages. -// TODO: translate the following strings. +// TODO: translate the following. // 'footer.contribute_msg' => 'You can contribute to Time Tracker in different ways.' // 'footer.credits' => 'Credits', // 'footer.license' => 'License', @@ -72,7 +72,7 @@ // This is a link to a webpage that describes how to contribute to the project. // Error messages. -// TODO: translate the following strings. +// TODO: translate the following. // 'error.access_denied' => 'Access denied.', // 'error.sys' => 'System error.', 'error.db' => 'Error de la Base de Datos.', @@ -82,7 +82,7 @@ // TODO: translate error.interval. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', 'error.project' => 'Seleccionar Proyecto.', -// TODO: translate the following strings. +// TODO: translate the following. // 'error.task' => 'Select task.', // 'error.client' => 'Select client.', // 'error.report' => 'Select report.', @@ -90,7 +90,7 @@ // Note to translators: this string needs to be translated. // 'error.user_exists' => 'User with this login already exists.', 'error.project_exists' => 'Ya existe un proyecto con este nombre.', -// TODO: translate the following strings. +// TODO: translate the following. // 'error.task_exists' => 'Task with this name already exists.', // 'error.client_exists' => 'Client with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', @@ -121,7 +121,7 @@ // TODO: translate button.add_task // 'button.add_task' => 'Add task', 'button.add_client' => 'Agregar cliente', -// TODO: translate the following strings. +// TODO: translate the following. // 'button.add_invoice' => 'Add invoice', // 'button.add_option' => 'Add option', 'button.add' => 'Agregar', @@ -161,7 +161,7 @@ 'label.end_date' => 'Fecha de fin', 'label.user' => 'Usuario', 'label.users' => 'Personas', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.client' => 'Client', // 'label.clients' => 'Clients', 'label.option' => 'Opción', @@ -169,7 +169,7 @@ // 'label.invoice' => 'Invoice', 'label.project' => 'Proyecto', 'label.projects' => 'Proyectos', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -186,7 +186,7 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Hoy', 'label.total_hours' => 'Horas totales', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Modificar', @@ -199,7 +199,7 @@ // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', 'label.id' => 'Identificación', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', // 'label.date_format' => 'Date format', @@ -212,7 +212,7 @@ // TODO: check whether label.subtotal is translated correctly. 'label.subtotal' => 'Subtotal', 'label.total' => 'Total', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', 'label.or' => 'o', @@ -236,16 +236,19 @@ // 'label.type_text' => 'text', // 'label.required' => 'Required', 'label.fav_report' => 'Reporte favorito', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Sesión iniciada', 'title.teams' => 'Grupos', // Note to translators: we need a more accurate translation of title.create_team. English is "Creating Team". // 'title.create_team' => 'Crear una nueva cuenta de manejador', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', 'title.reset_password' => 'Reestablecer contraseña', @@ -254,7 +257,7 @@ 'title.time' => 'Tiempo', 'title.edit_time_record' => 'Modificando el historial de tiempo', 'title.delete_time_record' => 'Eliminando el historial de tiempo', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -263,14 +266,14 @@ // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', 'title.invoice' => 'Factura', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Proyectos', 'title.add_project' => 'Agregando proyecto', 'title.edit_project' => 'Modificando proyecto', 'title.delete_project' => 'Eliminando proyecto', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -283,7 +286,7 @@ 'title.add_client' => 'Agregar cliente', 'title.edit_client' => 'Modificar cliente', 'title.delete_client' => 'Eliminar cliente', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -297,7 +300,7 @@ 'title.import' => 'Importar datos', 'title.options' => 'Opciones', 'title.profile' => 'Perfil', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -333,11 +336,11 @@ // TODO: translate the following. // 'dropdown.all_time' => 'all time', 'dropdown.projects' => 'proyectos', -// TODO: translate the following strings. +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', 'dropdown.select' => '--- seleccionar ---', -// TODO: translate the following strings. +// TODO: translate the following. // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', @@ -388,7 +391,7 @@ // 'form.reports.include_records' => 'Include records', 'form.reports.include_billable' => 'facturable', 'form.reports.include_not_billable' => 'no facturable', -// TODO: translate the following strings. +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', 'form.reports.select_period' => 'Seleccionar período de tiempo', @@ -424,7 +427,7 @@ // 'form.charts.chart' => 'Chart', // Projects form. See example at https://timetracker.anuko.com/projects.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.projects.active_projects' => 'Active Projects', // 'form.projects.inactive_projects' => 'Inactive Projects', @@ -433,7 +436,7 @@ // 'form.tasks.inactive_tasks' => 'Inactive Tasks', // Users form. See example at https://timetracker.anuko.com/users.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', @@ -445,12 +448,12 @@ // 'form.users.default_rate' => 'Default hourly rate', // Client delete form. See example at https://timetracker.anuko.com/client_delete.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.client.client_to_delete' => 'Client to delete', // 'form.client.client_entries' => 'Client entries', // Clients form. See example at https://timetracker.anuko.com/clients.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', @@ -473,7 +476,7 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 horas', 'form.profile.24_hours' => '24 horas', -// TODO: translate the following strings. +// TODO: translate the following. // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index a22add160..148588031 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -230,6 +230,7 @@ // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.options' => 'Suvandid', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 15b15281c..710751bfa 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -60,7 +60,7 @@ 'menu.options' => 'تنظیمات', // Footer - strings on the bottom of most pages. -// TODO: translate the following strings. +// TODO: translate the following. // 'footer.contribute_msg' => 'You can contribute to Time Tracker in different ways.', // 'footer.credits' => 'Credits', // 'footer.license' => 'License', @@ -216,9 +216,12 @@ 'label.type_text' => 'متن', 'label.required' => 'اجباری', 'label.fav_report' => 'گزارش های برگزیده', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'ورود', @@ -261,7 +264,7 @@ 'title.add_invoice' => 'درج فاکتور', 'title.view_invoice' => 'نمایش فاکتور', 'title.delete_invoice' => 'حذف فاکتور', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.notifications' => 'Notifications', // 'title.add_notification' => 'Adding Notification', // 'title.edit_notification' => 'Editing Notification', @@ -313,7 +316,7 @@ 'dropdown.select_invoice' => '--- انتخاب فاکتور ---', 'dropdown.status_active' => 'فعال', 'dropdown.status_inactive' => 'غیرفعال', -// TODO: translate the following strings. +// TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', @@ -410,7 +413,7 @@ 'form.users.default_rate' => 'نرخ ساعتی پیش فرض', // Client delete form. See example at https://timetracker.anuko.com/client_delete.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.client.client_to_delete' => 'Client to delete', // 'form.client.client_entries' => 'Client entries', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 67229682f..75ee68be7 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -206,6 +206,9 @@ 'label.fav_report' => 'Raporttipohja', 'label.cron_schedule' => 'Cron-ajoitus', 'label.what_is_it' => 'Mikä se on?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Kirjautuminen', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5c2ee98f5..ebf4e0213 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -200,6 +200,9 @@ 'label.fav_report' => 'Rapport favori', 'label.cron_schedule' => 'Horaire Cron', 'label.what_is_it' => 'Qu\\\'est-ce que c\\\'est?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Connexion', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index dedd88e99..21e944e96 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -220,9 +220,12 @@ 'label.type_text' => 'טקסט', 'label.required' => 'חובה', 'label.fav_report' => 'דוח מועדף', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'כניסה', @@ -236,7 +239,7 @@ 'title.time' => 'זמן', 'title.edit_time_record' => 'עריכת רשומה', 'title.delete_time_record' => 'מחיקת רשומה', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -266,7 +269,7 @@ 'title.add_invoice' => 'הוספת חשבונית', 'title.view_invoice' => 'הצגת חשבונית', 'title.delete_invoice' => 'מחיקת חשבונית', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.notifications' => 'Notifications', // 'title.add_notification' => 'Adding Notification', // 'title.edit_notification' => 'Editing Notification', @@ -316,7 +319,7 @@ 'dropdown.select_invoice' => '--- בחר חשבונית ---', 'dropdown.status_active' => 'פעיל', 'dropdown.status_inactive' => 'לא פעיל', -// TODO: translate the following strings. +// TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', @@ -358,7 +361,7 @@ 'form.reports.include_records' => 'כלול רישומים', 'form.reports.include_billable' => 'לחיוב', 'form.reports.include_not_billable' => 'לא לחיוב', -// TODO: translate the following strings. +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', 'form.reports.select_period' => 'בחר תקופת זמן', @@ -411,7 +414,7 @@ 'form.users.default_rate' => 'תעריף ברירת מחדל לשעה', // Client delete form. See example at https://timetracker.anuko.com/client_delete.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.client.client_to_delete' => 'Client to delete', // 'form.client.client_entries' => 'Client entries', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 44139d9f1..c9a8086d2 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -204,6 +204,8 @@ 'label.what_is_it' => 'Wat betekent dit?', 'label.expense' => 'Kosten', 'label.quantity' => 'Hoeveelheid', +// TODO: translate the following. +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Aanmelden', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 1114d0e01..fc379fee5 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -211,6 +211,9 @@ 'label.fav_report' => 'Ulubiony raport', 'label.cron_schedule' => 'Harmonogram crona', 'label.what_is_it' => 'Co to jest?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Logowanie', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index c50e8f848..f065cc42e 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -206,6 +206,9 @@ 'label.fav_report' => 'Relatório favorito', 'label.cron_schedule' => 'Agenda cron', 'label.what_is_it' => 'O que é?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 94431907b..d8d05ee43 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -204,6 +204,7 @@ 'label.what_is_it' => 'Что это?', 'label.expense' => 'Расход', 'label.quantity' => 'Количество', +'label.paid_status' => 'Статус оплаты', // Form titles. 'title.login' => 'Вход в систему', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 38b25f62c..edb9b2241 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -98,7 +98,7 @@ 'error.no_email' => 'K tomuto prihlasovaciemu menu nie je priradený žiadny e-mail.', 'error.uncompleted_exists' => 'Nekompletný záznam už existuje. Zatvorte ho alebo ho vymažte.', 'error.goto_uncompleted' => 'Ísť na nekompletný záznam.', -// TODO: translate the following strings. +// TODO: translate the following. // 'error.overlap' => 'Time interval overlaps with existing records.', // 'error.future_date' => 'Date is in future.', @@ -217,9 +217,12 @@ 'label.type_text' => 'text', 'label.required' => 'Povinné', 'label.fav_report' => 'Obľúbená zostava', -// TODO: translate the following strings. +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Prihlásenie', @@ -233,7 +236,7 @@ 'title.time' => 'Časový záznam', 'title.edit_time_record' => 'Upravovanie časového záznamu', 'title.delete_time_record' => 'Vymazávanie časového záznamu', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -263,7 +266,7 @@ 'title.add_invoice' => 'Pridávanie faktúry', 'title.view_invoice' => 'Priehliadanie faktúry', 'title.delete_invoice' => 'Vymazávanie faktúry', -// TODO: translate the following strings. +// TODO: translate the following. // 'title.notifications' => 'Notifications', // 'title.add_notification' => 'Adding Notification', // 'title.edit_notification' => 'Editing Notification', @@ -314,7 +317,7 @@ // 'dropdown.select_invoice' => '--- select invoice ---', 'dropdown.status_active' => 'aktívny', 'dropdown.status_inactive' => 'neaktívny', -// TODO: translate the following strings. +// TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', @@ -356,13 +359,13 @@ 'form.reports.include_records' => 'Zahrnúť záznamy', 'form.reports.include_billable' => 'faktúrovateĺné', 'form.reports.include_not_billable' => 'nefaktúrovateľné', -// TODO: translate the following strings. +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', 'form.reports.select_period' => 'Vyberte časový rozsah', 'form.reports.set_period' => 'alebo nastavte dátumy', 'form.reports.show_fields' => 'Zobraziť polia', -// TODO: translate the following strings. +// TODO: translate the following. // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', 'form.reports.group_by_date' => 'dátum', @@ -409,7 +412,7 @@ 'form.users.default_rate' => 'Predvolená hodinová sadzba', // Client delete form. See example at https://timetracker.anuko.com/client_delete.php -// TODO: translate the following strings. +// TODO: translate the following. // 'form.client.client_to_delete' => 'Client to delete', // 'form.client.client_entries' => 'Client entries', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index f72175066..ad277e8b8 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -208,6 +208,10 @@ 'label.fav_report' => 'Omiljeni izveštaji', 'label.cron_schedule' => 'Sredi raspored', 'label.what_is_it' => 'Šta je ovo?', +// TODO: Translate the following. +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. 'title.login' => 'Prijava', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 679db6e33..02b11d6ee 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -206,6 +206,8 @@ 'label.what_is_it' => 'Vad är detta?', 'label.expense' => 'Kostnad', 'label.quantity' => 'Antal', +// TODO: translate the following. +// 'label.paid_status' => 'Paid status', // Rubriker för formulär 'title.login' => 'Logga in', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 28d485735..9e4897e44 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -213,17 +213,18 @@ // 'label.condition' => 'Condition', // Labels for plugins (extensions to Time Tracker that provide additional features). // TODO: Translate the following. -'label.custom_fields' => 'Custom fields', -'label.monthly_quotas' => 'Monthly quotas', -'label.type' => 'Type', -'label.type_dropdown' => 'dropdown', -'label.type_text' => 'text', -'label.required' => 'Required', -'label.fav_report' => 'Favorite report', -'label.cron_schedule' => 'Cron schedule', -'label.what_is_it' => 'What is it?', -'label.expense' => 'Expense', -'label.quantity' => 'Quantity', +// 'label.custom_fields' => 'Custom fields', +// 'label.monthly_quotas' => 'Monthly quotas', +// 'label.type' => 'Type', +// 'label.type_dropdown' => 'dropdown', +// 'label.type_text' => 'text', +// 'label.required' => 'Required', +// 'label.fav_report' => 'Favorite report', +// 'label.cron_schedule' => 'Cron schedule', +// 'label.what_is_it' => 'What is it?', +// 'label.expense' => 'Expense', +// 'label.quantity' => 'Quantity', +// 'label.paid_status' => 'Paid status', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e1c31da80..04bb73172 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3749 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3750 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From c0c074a026debe06878f1ade76e02ebd0ae0fe9d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 15:06:14 +0000 Subject: [PATCH 0287/2515] Introduced label.paid for better integration of the paid status plugin. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 19 files changed, 19 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index bc225c661..3ac69f79b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -228,6 +228,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Sessió iniciada', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 3a3ec5bf0..90edcd22a 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -209,6 +209,7 @@ 'label.quantity' => 'Mængde', // TODO: translate the following. // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 54e26439b..391f8d199 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -206,6 +206,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Anmelden', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index bbcf84225..8bdc991c3 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -205,6 +205,7 @@ 'label.expense' => 'Expense', 'label.quantity' => 'Quantity', 'label.paid_status' => 'Paid status', +'label.paid' => 'Paid', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 09e0f5c0e..d52837df0 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -242,6 +242,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Sesión iniciada', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 148588031..38a26791d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -231,6 +231,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.options' => 'Suvandid', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 710751bfa..d72e4722c 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -222,6 +222,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'ورود', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 75ee68be7..c2d56e73d 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -209,6 +209,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Kirjautuminen', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index ebf4e0213..b9690b3df 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -203,6 +203,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Connexion', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 21e944e96..4ec907b1c 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -226,6 +226,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'כניסה', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index c9a8086d2..6e45e0c80 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -206,6 +206,7 @@ 'label.quantity' => 'Hoeveelheid', // TODO: translate the following. // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Aanmelden', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index fc379fee5..f71ebfa80 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -214,6 +214,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Logowanie', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index f065cc42e..d5d5a22f7 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -209,6 +209,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Login', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index d8d05ee43..138def6b9 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -205,6 +205,7 @@ 'label.expense' => 'Расход', 'label.quantity' => 'Количество', 'label.paid_status' => 'Статус оплаты', +'label.paid' => 'Оплачено', // Form titles. 'title.login' => 'Вход в систему', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index edb9b2241..a44c791d0 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -223,6 +223,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Prihlásenie', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index ad277e8b8..278a5289f 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -212,6 +212,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. 'title.login' => 'Prijava', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 02b11d6ee..12e65c550 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -208,6 +208,7 @@ 'label.quantity' => 'Antal', // TODO: translate the following. // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Rubriker för formulär 'title.login' => 'Logga in', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 9e4897e44..32e1a887f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -225,6 +225,7 @@ // 'label.expense' => 'Expense', // 'label.quantity' => 'Quantity', // 'label.paid_status' => 'Paid status', +// 'label.paid' => 'Paid', // Form titles. // TODO: Translate the following. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 04bb73172..faf09a264 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3750 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3751 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 70f38eea57095a6895fd727799a0c90ebeeb6cf9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 15:59:38 +0000 Subject: [PATCH 0288/2515] Further work on localization files in preparation for integrating paid status plugin as per PR #49. --- WEB-INF/resources/ca.lang.php | 2 ++ WEB-INF/resources/da.lang.php | 3 +++ WEB-INF/resources/de.lang.php | 3 +++ WEB-INF/resources/en.lang.php | 2 ++ WEB-INF/resources/es.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 3 +++ WEB-INF/resources/fr.lang.php | 3 +++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/nl.lang.php | 3 +++ WEB-INF/resources/pl.lang.php | 3 +++ WEB-INF/resources/pt-br.lang.php | 4 +++- WEB-INF/resources/ru.lang.php | 2 ++ WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sr.lang.php | 3 +++ WEB-INF/resources/sv.lang.php | 3 +++ WEB-INF/templates/footer.tpl | 2 +- 17 files changed, 42 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3ac69f79b..7b3118052 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -320,6 +320,8 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 90edcd22a..2699acb8a 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -302,6 +302,9 @@ 'dropdown.status_inactive' => 'Inaktive', 'dropdown.delete'=>'Slet', 'dropdown.do_not_delete'=>'Slet ikke', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Har du glemt din adgangskode?', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 391f8d199..dd54e5d39 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -297,6 +297,9 @@ 'dropdown.status_inactive' => 'inaktiv', 'dropdown.delete'=>'löschen', 'dropdown.do_not_delete'=>'nicht löschen', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 8bdc991c3..327c9f250 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -298,6 +298,8 @@ 'dropdown.status_inactive' => 'inactive', 'dropdown.delete'=>'delete', 'dropdown.do_not_delete'=>'do not delete', +'dropdown.paid' => 'paid', +'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index d52837df0..8d643179e 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -347,6 +347,8 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index d72e4722c..f0dce4b71 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -320,6 +320,8 @@ // TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index c2d56e73d..308320d1f 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -298,6 +298,9 @@ 'dropdown.status_inactive' => 'inaktiivinen', 'dropdown.delete'=>'poista', 'dropdown.do_not_delete'=>'älä poista', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index b9690b3df..2748de751 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -290,6 +290,9 @@ 'dropdown.status_inactive' => 'inactif', 'dropdown.delete'=>'supprimer', 'dropdown.do_not_delete'=>'ne pas supprimer', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 4ec907b1c..0c1350d35 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -323,6 +323,8 @@ // TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 6e45e0c80..899f559b8 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -297,6 +297,9 @@ 'dropdown.status_inactive' => 'inactief', 'dropdown.delete'=>'verwijderen', 'dropdown.do_not_delete'=>'niet verwijderen', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index f71ebfa80..ffa5a2a65 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -306,6 +306,9 @@ 'dropdown.status_inactive' => 'nieaktywny', 'dropdown.delete'=>'usuń', 'dropdown.do_not_delete'=>'nie usuwaj', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index d5d5a22f7..50ab6d2e3 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -298,7 +298,9 @@ 'dropdown.status_inactive' => 'inativo', 'dropdown.delete' => 'apagar', 'dropdown.do_not_delete' => 'não apagar', - +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 138def6b9..c0d2deaef 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -296,6 +296,8 @@ 'dropdown.status_inactive' => 'неактивный', 'dropdown.delete'=>'удалить', 'dropdown.do_not_delete'=>'не удалять', +'dropdown.paid' => 'оплачено', +'dropdown.not_paid' => 'не оплачено', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index a44c791d0..100cfece2 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -321,6 +321,8 @@ // TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 278a5289f..e7a01e22b 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -304,6 +304,9 @@ 'dropdown.status_inactive' => 'neaktivan', 'dropdown.delete'=>'obriši', 'dropdown.do_not_delete'=>'nemoj obrisati', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 12e65c550..899cc1de9 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -301,6 +301,9 @@ 'dropdown.status_inactive' => 'Inaktiv', 'dropdown.delete' => 'Ta bort', 'dropdown.do_not_delete' => 'Ta inte bort', +// TODO: translate the following. +// 'dropdown.paid' => 'paid', +// 'dropdown.not_paid' => 'not paid', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index faf09a264..b7dd2acd9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3751 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3752 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 5d654698cf0f12e3f4f0848bcf02440a945a2bc8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 16:27:42 +0000 Subject: [PATCH 0289/2515] Improving localization files in preparation for integrating paid status plugin as per PR #49. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 11 ++++++----- WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 16 +++++++++------- WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 14 ++++++++------ WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 19 ++++++++++--------- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 19 files changed, 57 insertions(+), 28 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 7b3118052..0ee311019 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -135,6 +135,7 @@ // TODO: translate the following. // 'button.close' => 'Close', // 'button.stop' => 'Stop', +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 2699acb8a..2beb6db26 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -118,6 +118,8 @@ 'button.import' => 'Importer team', 'button.close' => 'Luk', 'button.stop' => 'Stop', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Team navn', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index dd54e5d39..84c92426c 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -114,6 +114,8 @@ 'button.import' => 'Team importieren', 'button.close' => 'Schließen', 'button.stop' => 'Stop', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Teamname', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 327c9f250..4a499dcf6 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -118,6 +118,7 @@ 'button.import' => 'Import team', 'button.close' => 'Close', 'button.stop' => 'Stop', +'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Team name', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 8d643179e..2979912f9 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -48,7 +48,7 @@ 'menu.create_team' => 'Crear una nueva cuenta de manejador', 'menu.profile' => 'Perfil', 'menu.time' => 'Tiempo', -// TODO: translate the following string. +// TODO: translate the following. // 'menu.expenses' => 'Expenses', 'menu.reports' => 'Reportes', // Note to translators: menu.charts needs to be translated. @@ -112,7 +112,7 @@ 'button.login' => 'Iniciar sesion', 'button.now' => 'Ahora', 'button.save' => 'Guardar', -// TODO: translate the following string. +// TODO: translate the following. // 'button.copy' => 'Copy', 'button.cancel' => 'Cancelar', 'button.submit' => 'Enviar', @@ -135,8 +135,9 @@ 'button.import' => 'Importar grupo', // TODO: translate button.close. // 'button.close' => 'Close', -// TODO: translate the following string. +// TODO: translate the following. // 'button.stop' => 'Stop', +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate label.team_name @@ -165,7 +166,7 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', 'label.option' => 'Opción', -// TODO: translate the following string. +// TODO: translate the following. // 'label.invoice' => 'Invoice', 'label.project' => 'Proyecto', 'label.projects' => 'Proyectos', @@ -404,7 +405,7 @@ 'form.reports.group_by_no' => '--- no agrupar ---', 'form.reports.group_by_date' => 'fecha', 'form.reports.group_by_user' => 'usuario', -// TODO: translate the following string. +// TODO: translate the following. // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'proyecto', // TODO: traslate the following string. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 38a26791d..962b7e724 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -137,6 +137,7 @@ // TODO: translate the following. // 'button.close' => 'Close', // 'button.stop' => 'Stop', +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index f0dce4b71..59be22cb9 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -68,7 +68,7 @@ // This is a link to a webpage that describes how to contribute to the project. // Error messages. -// TODO: translate the following string. +// TODO: translate the following. // 'error.access_denied' => 'Access denied.', 'error.sys' => 'خطا در سیستم.', 'error.db' => 'خطا در پایگاه داده.', @@ -80,7 +80,7 @@ 'error.project' => 'انتخاب پروژه.', 'error.task' => 'انتخاب وظیفه.', 'error.client' => 'انتخاب مشتری.', -// TODO: translate the following string. +// TODO: translate the following. // 'error.report' => 'Select report.', 'error.auth' => 'نام کاربری یا رمز عبور اشتباه است.', 'error.user_exists' => 'کاربری با این نام کاربری موجود است.', @@ -100,7 +100,7 @@ 'error.uncompleted_exists' => 'قسمت ناتمامی موجود است. آن را تمام یا حذف کنید.', 'error.goto_uncompleted' => 'مراجعه به قسمت ناتمام.', 'error.overlap' => 'بازه زمانی با سوابق موجود هم پوشانی دارد.', -// TODO: translate the following string. +// TODO: translate the following. // 'error.future_date' => 'Date is in future.', // Labels for buttons. @@ -126,6 +126,8 @@ 'button.import' => 'وارد کردن تیم', 'button.close' => 'بستن', 'button.stop' => 'توقف', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'نام تیم', @@ -150,7 +152,7 @@ 'label.users' => 'کاربران', 'label.client' => 'مشتری', 'label.clients' => 'مشتریان', -// TODO: translate the following string. +// TODO: translate the following. // 'label.option' => 'Option', 'label.invoice' => 'فاکتور', 'label.project' => 'پروژه', @@ -184,7 +186,7 @@ // 'label.week_view' => 'Week view', 'label.id' => 'شناسه', 'label.language' => 'زبان', -// TODO: translate the following string. +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => 'قالب تاریخ', 'label.time_format' => 'قالب زمان', @@ -228,7 +230,7 @@ 'title.login' => 'ورود', 'title.teams' => 'تیم ها', 'title.create_team' => 'ایجاد تیم', -// TODO: translate the following string. +// TODO: translate the following. // 'title.edit_team' => 'Editing Team', 'title.delete_team' => 'حذف تیم', 'title.reset_password' => 'بازیابی رمزعبور', @@ -312,7 +314,7 @@ 'dropdown.projects' => 'پروژه ها', 'dropdown.tasks' => 'وظایف', 'dropdown.clients' => 'مشتریان', -// TODO: translate the following string. +// TODO: translate the following. // 'dropdown.select' => '--- select ---', 'dropdown.select_invoice' => '--- انتخاب فاکتور ---', 'dropdown.status_active' => 'فعال', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 308320d1f..4a78edb5e 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -116,6 +116,8 @@ 'button.import' => 'Tuo tiimi', 'button.close' => 'Sulje', 'button.stop' => 'Lopeta', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Tiimin nimi', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 2748de751..9de209d9f 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -114,6 +114,8 @@ 'button.import' => 'Importer une équipe', 'button.close' => 'Fermer', 'button.stop' => 'Arrêter', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Nom équipe', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 0c1350d35..dd33fd709 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -85,7 +85,7 @@ 'error.project' => 'בחר פרוייקט', 'error.task' => 'בחר משימה', 'error.client' => 'בחר לקוח', -// TODO: translate the following string. +// TODO: translate the following. // 'error.report' => 'Select report.', 'error.auth' => 'שם משתמש או סיסמה שגויים', 'error.user_exists' => 'שם משתמש כבר קיים', @@ -104,7 +104,7 @@ 'error.uncompleted_exists' => 'רישום חלקי כבר קיים. סגור או מחק אותו.', 'error.goto_uncompleted' => 'פתח את הרישום החלקי.', 'error.overlap' => 'טווח הזמן מתנגש עם רישומים קיימים.', -// TODO: translate the following string. +// TODO: translate the following. // 'error.future_date' => 'Date is in future.', // Labels for buttons. @@ -130,6 +130,8 @@ 'button.import' => 'ייבא צוות', 'button.close' => 'סגור', 'button.stop' => 'עצור', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'שם הצוות', @@ -154,7 +156,7 @@ 'label.users' => 'משתמשים', 'label.client' => 'לקוח', 'label.clients' => 'לקוחות', -// TODO: translate the following string. +// TODO: translate the following. // 'label.option' => 'Option', 'label.invoice' => 'חשבונית', 'label.project' => 'פרוייקט', @@ -188,7 +190,7 @@ // 'label.week_view' => 'Week view', 'label.id' => 'מזהה', 'label.language' => 'שפה', -// TODO: translate the following string. +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => 'תבנית של תאריך', 'label.time_format' => 'תבנית של שעה', @@ -232,7 +234,7 @@ 'title.login' => 'כניסה', 'title.teams' => 'צוותים', 'title.create_team' => 'יצירת צוות', -// TODO: translate the following string. +// TODO: translate the following. // 'title.edit_team' => 'Editing Team', 'title.delete_team' => 'מחיקת צוות', 'title.reset_password' => 'איפוס סיסמה', @@ -315,7 +317,7 @@ 'dropdown.projects' => 'פרוייקטים', 'dropdown.tasks' => 'משימות', 'dropdown.clients' => 'לקוחות', -// TODO: translate the following string. +// TODO: translate the following. // 'dropdown.select' => '--- select ---', 'dropdown.select_invoice' => '--- בחר חשבונית ---', 'dropdown.status_active' => 'פעיל', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 899f559b8..3be4eb7d4 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -117,6 +117,8 @@ 'button.import' => 'Team importeren', 'button.close' => 'Sluiten', 'button.stop' => 'Stop', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Teamnaam', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index ffa5a2a65..272ea88c6 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -121,6 +121,8 @@ 'button.import' => 'Importuj zespół', 'button.close' => 'Zamknij', 'button.stop' => 'Zatrzymaj', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Nazwa zespołu', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 50ab6d2e3..1df5d0223 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -116,6 +116,8 @@ 'button.import' => 'Importar equipe', 'button.close' => 'Fechar', 'button.stop' => 'Parar', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Nome da equipe', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index c0d2deaef..dfaf2ba53 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -118,6 +118,7 @@ 'button.import' => 'Импортировать команду', 'button.close' => 'Закрыть', 'button.stop' => 'Завершить', +'button.mark_paid' => 'Отметить оплату', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Название команды', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 100cfece2..e0d099d75 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -80,7 +80,7 @@ 'error.project' => 'Vyberte projekt.', 'error.task' => 'Vyberte úlohy.', 'error.client' => 'Vyberte klienta.', -// TODO: translate the following string. +// TODO: translate the following. // 'error.report' => 'Select report.', 'error.auth' => 'Nesprávne prihlasovacie meno alebo heslo.', 'error.user_exists' => 'Používateľ s týmto prihlasovacím menom už existuje.', @@ -106,7 +106,7 @@ 'button.login' => 'Prihlásiť', 'button.now' => 'Teraz', 'button.save' => 'Uložiť', -// TODO: translate the following string. +// TODO: translate the following. // 'button.copy' => 'Copy', 'button.cancel' => 'Zrušiť', 'button.submit' => 'Odoslať', @@ -125,8 +125,9 @@ 'button.export' => 'Exportovať tím', 'button.import' => 'Importovať tím', 'button.close' => 'Zatvoriť', -// TODO: translate the following string. +// TODO: translate the following. // 'button.stop' => 'Stop', +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Názov tímu', @@ -166,7 +167,7 @@ // 'label.notes' => 'Notes', // 'label.item' => 'Item', 'label.cost' => 'Náklady', -// TODO: translate the following string. +// TODO: translate the following. // 'label.day_total' => 'Day total', 'label.week_total' => 'Týždeň celkom', // TODO: translate the following. @@ -185,7 +186,7 @@ // 'label.week_view' => 'Week view', 'label.id' => 'ID', 'label.language' => 'Jazyk', -// TODO: translate the following string. +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => 'Formát dátumu', 'label.time_format' => 'Formát času', @@ -229,7 +230,7 @@ 'title.login' => 'Prihlásenie', 'title.teams' => 'Tímy', 'title.create_team' => 'Vytváranie tímu', -// TODO: translate the following string. +// TODO: translate the following. // 'title.edit_team' => 'Editing Team', 'title.delete_team' => 'Vymazávanie tímu', 'title.reset_password' => 'Obnovovanie hesla', @@ -311,10 +312,10 @@ 'dropdown.all_time' => 'celý čas', 'dropdown.projects' => 'projekty', 'dropdown.tasks' => 'úlohy', -// TODO: translate the following string. -'dropdown.clients' => 'clients', +// TODO: translate the following. +// 'dropdown.clients' => 'clients', 'dropdown.select' => '--- vyberte ---', -// TODO: translate the following string. +// TODO: translate the following. // 'dropdown.select_invoice' => '--- select invoice ---', 'dropdown.status_active' => 'aktívny', 'dropdown.status_inactive' => 'neaktívny', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index e7a01e22b..57c863522 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -118,6 +118,8 @@ 'button.import' => 'Uvezi tim', 'button.close' => 'Zatvori', 'button.stop' => 'Stani', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Naziv tim-a', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 899cc1de9..f9b2e156f 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -118,6 +118,8 @@ 'button.import' => 'Importera arbetsgrupp', 'button.close' => 'Stäng', 'button.stop' => 'Avsluta', +// TODO: translate the following. +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => 'Namn på arbetsgrupp', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 32e1a887f..25f62a7e8 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -131,6 +131,7 @@ // TODO: translate the following. // 'button.close' => 'Close', // 'button.stop' => 'Stop', +// 'button.mark_paid' => 'Mark paid', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.team_name' => '团队名称', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b7dd2acd9..88be71859 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3752 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3753 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6970116f343469689e3014845bbff5c77c3bc6c4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 23:16:12 +0000 Subject: [PATCH 0290/2515] Work in progress integrating paid status plugin as per PR #49. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 6 ++++++ profile_edit.php | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 88be71859..d9671930f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if ($smarty.const.DEBUG_PAID_STATUS)} + + + + +{/if} diff --git a/profile_edit.php b/profile_edit.php index 97192c375..d85c1dcc1 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -67,6 +67,7 @@ $cl_clients = $request->getParameter('clients'); $cl_client_required = $request->getParameter('client_required'); $cl_invoices = $request->getParameter('invoices'); + $cl_paid_status = $request->getParameter('paid_status'); $cl_custom_fields = $request->getParameter('custom_fields'); $cl_expenses = $request->getParameter('expenses'); $cl_tax_expenses = $request->getParameter('tax_expenses'); @@ -101,6 +102,7 @@ $cl_clients = in_array('cl', $plugins); $cl_client_required = in_array('cm', $plugins); $cl_invoices = in_array('iv', $plugins); + $cl_paid_status = in_array('ps', $plugins); $cl_custom_fields = in_array('cf', $plugins); $cl_expenses = in_array('ex', $plugins); $cl_tax_expenses = in_array('et', $plugins); @@ -193,6 +195,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'client_required','value'=>$cl_client_required)); $form->addInput(array('type'=>'checkbox','name'=>'invoices','value'=>$cl_invoices)); + $form->addInput(array('type'=>'checkbox','name'=>'paid_status','value'=>$cl_paid_status)); $form->addInput(array('type'=>'checkbox','name'=>'custom_fields','value'=>$cl_custom_fields,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'expenses','value'=>$cl_expenses,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'tax_expenses','value'=>$cl_tax_expenses)); @@ -242,6 +245,8 @@ $plugins .= ',cm'; if ($cl_invoices) $plugins .= ',iv'; + if ($cl_paid_status) + $plugins .= ',ps'; if ($cl_custom_fields) $plugins .= ',cf'; if ($cl_expenses) From 50e5a1ac3ca2b64b3a52c4f9a8782cac56a83f58 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Jan 2018 23:51:14 +0000 Subject: [PATCH 0291/2515] Fixed the conditional include of paid status plugin. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d9671930f..229e5ae32 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.14.0.3753 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3754 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index c4e0f5819..973f3cb81 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -205,6 +205,12 @@ function handlePluginCheckboxes() { {$forms.profileForm.invoices.control}
{$forms.profileForm.paid_status.control}
{$forms.profileForm.custom_fields.control} {$i18n.label.configure}
- -{if ($smarty.const.DEBUG_PAID_STATUS)} +{if ($smarty.const.DEBUG_PAID_STATUS == 1)} From 8ddbc8e6180344c754600a56e6df0100327f2ed0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 14:18:43 +0000 Subject: [PATCH 0292/2515] Removed no longer used team address in export and import. --- WEB-INF/lib/ttExportHelper.class.php | 1 - WEB-INF/lib/ttImportHelper.class.php | 5 +---- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/ttExportHelper.class.php b/WEB-INF/lib/ttExportHelper.class.php index 61de42c6b..aa8f6c76a 100644 --- a/WEB-INF/lib/ttExportHelper.class.php +++ b/WEB-INF/lib/ttExportHelper.class.php @@ -67,7 +67,6 @@ function createDataFile($compress = false) { "\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" task_required=\"".$user->task_required. "\" record_type=\"".$user->record_type."\">\n"); fwrite($file, " team."]]>\n"); - fwrite($file, "
address."]]>
\n"); fwrite($file, "\n"); // Prepare user map. diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 5e2d40a5a..99b35e411 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -116,7 +116,6 @@ function endElement($parser, $name) { if ($this->canImport) { $team_id = ttTeamHelper::insert(array( 'name' => $this->teamData['NAME'], - 'address' => $this->teamData['ADDRESS'], 'currency' => $this->teamData['CURRENCY'], 'lock_spec' => $this->teamData['LOCK_SPEC'], 'workday_hours' => $this->teamData['WORKDAY_HOURS'], @@ -315,9 +314,7 @@ function dataElement($parser, $data) { || $this->currentTag == 'LABEL' || $this->currentTag == 'VALUE' || $this->currentTag == 'COMMENT' - || $this->currentTag == 'ADDRESS' - || $this->currentTag == 'CLIENT_NAME' - || $this->currentTag == 'CLIENT_ADDRESS') { + || $this->currentTag == 'ADDRESS') { if (isset($this->currentElement[$this->currentTag])) $this->currentElement[$this->currentTag] .= trim($data); else diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 229e5ae32..ea522fa34 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.14.0.3754 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3755 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 973f3cb81..542148ef5 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -205,7 +205,7 @@ function handlePluginCheckboxes() { {$forms.profileForm.invoices.control}
{$forms.profileForm.paid_status.control}
-
 Anuko Time Tracker 1.14.0.3755 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3756 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e732e1dd5c8a5cfaa24f5690ede39be2a90d0e3d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 14:41:34 +0000 Subject: [PATCH 0293/2515] Removed not used team address field handling. --- WEB-INF/lib/ttTeamHelper.class.php | 7 ++----- WEB-INF/lib/ttUser.class.php | 4 +--- WEB-INF/templates/footer.tpl | 2 +- profile_edit.php | 4 ---- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 69fcaa0f9..0f3358f65 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -750,9 +750,8 @@ static function insert($fields) { $workday_hours_v = ''; } - $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f) + $sql = "insert into tt_teams (name, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f) values(".$mdb2->quote(trim($fields['name'])). - ", ".$mdb2->quote(trim($fields['address'])). ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang). "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $task_required_v $record_type_v $uncompleted_indicators_v $workday_hours_v)"; $affected = $mdb2->exec($sql); @@ -771,7 +770,6 @@ static function update($team_id, $fields) $mdb2 = getConnection(); $name_part = 'name = '.$mdb2->quote($fields['name']); $currency_part = ''; - $addr_part = ''; $lang_part = ''; $decimal_mark_part = ''; $date_format_part = ''; @@ -786,7 +784,6 @@ static function update($team_id, $fields) $lock_spec_part = ''; $workday_hours_part = ''; - if (isset($fields['address'])) $addr_part = ', address = '.$mdb2->quote($fields['address']); if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); if (isset($fields['lang'])) $lang_part = ', lang = '.$mdb2->quote($fields['lang']); if (isset($fields['decimal_mark'])) $decimal_mark_part = ', decimal_mark = '.$mdb2->quote($fields['decimal_mark']); @@ -801,7 +798,7 @@ static function update($team_id, $fields) if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); - $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part + $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part $uncompleted_indicators_part $bcc_email_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; $affected = $mdb2->exec($sql); diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 20efe2595..565e47adc 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -51,7 +51,6 @@ class ttUser { var $plugins = null; // Comma-separated list of enabled plugins. var $team = null; // Team name. var $custom_logo = 0; // Whether to use a custom logo for team. - var $address = null; // Address for invoices. var $lock_spec = null; // Cron specification for record locking. var $workday_hours = 8; // Number of work hours in a regular day. var $rights = 0; // A mask of user rights. @@ -66,7 +65,7 @@ function __construct($login, $id = null) { $mdb2 = getConnection(); $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, - t.address, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, + t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, t.tracking_mode, t.project_required, t.task_required, t.record_type, t.uncompleted_indicators, t.bcc_email, t.plugins, t.lock_spec, t.workday_hours, t.custom_logo FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE "; @@ -102,7 +101,6 @@ function __construct($login, $id = null) { $this->uncompleted_indicators = $val['uncompleted_indicators']; $this->bcc_email = $val['bcc_email']; $this->team = $val['team_name']; - $this->address = $val['address']; $this->currency = $val['currency']; $this->plugins = $val['plugins']; $this->lock_spec = $val['lock_spec']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ea522fa34..400209c38 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3756 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3757 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/profile_edit.php b/profile_edit.php index d85c1dcc1..ce20f4a52 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -50,7 +50,6 @@ if ($user->canManageTeam()) { $cl_team = trim($request->getParameter('team_name')); - $cl_address = trim($request->getParameter('address')); $cl_currency = trim($request->getParameter('currency')); if (!$cl_currency) $cl_currency = CURRENCY_DEFAULT; $cl_lang = $request->getParameter('lang'); @@ -82,7 +81,6 @@ $cl_email = $user->email; if ($user->canManageTeam()) { $cl_team = $user->team; - $cl_address = $user->address; $cl_currency = ($user->currency == ''? CURRENCY_DEFAULT : $user->currency); $cl_lang = $user->lang; $cl_decimal_mark = $user->decimal_mark; @@ -224,7 +222,6 @@ if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); if ($user->canManageTeam()) { if (!ttValidString($cl_team, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.team_name')); - if (!ttValidString($cl_address, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.address')); if (!ttValidString($cl_currency, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.currency')); if ($user->isManager()) { if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.bcc')); @@ -263,7 +260,6 @@ $update_result = ttTeamHelper::update($user->team_id, array( 'name' => $cl_team, - 'address' => $cl_address, 'currency' => $cl_currency, 'lang' => $cl_lang, 'decimal_mark' => $cl_decimal_mark, From d5d78055d87535ec75bcde0c10260882b9839b8c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 15:03:34 +0000 Subject: [PATCH 0294/2515] Dropped no longer used address field from the database. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 106 +++++++++++++++++++---------------- mysql.sql | 1 - 3 files changed, 58 insertions(+), 51 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 400209c38..6828544e2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + +
 Anuko Time Tracker 1.14.0.3757 | Copyright © Anuko | +  Anuko Time Tracker 1.15.0.3758 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 49c9747ea..bf8c958e9 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -600,54 +600,6 @@ function setChange($sql) { setChange("ALTER TABLE tt_invoices DROP end_date"); } - if ($_POST["convert1600to11400"]) { - setChange("DROP TABLE IF EXISTS tt_invoice_headers"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL"); - setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY (`id`))"); - setChange("create index date_idx on tt_expense_items(date)"); - setChange("create index user_idx on tt_expense_items(user_id)"); - setChange("create index client_idx on tt_expense_items(client_id)"); - setChange("create index project_idx on tt_expense_items(project_id)"); - setChange("create index invoice_idx on tt_expense_items(invoice_id)"); - setChange("ALTER TABLE tt_fav_reports DROP sort_by"); - setChange("ALTER TABLE tt_fav_reports DROP show_empty_days"); - setChange("ALTER TABLE tt_invoices DROP discount"); - setChange("ALTER TABLE tt_users ADD COLUMN `client_id` int(11) default NULL"); - setChange("ALTER TABLE tt_teams ADD COLUMN `decimal_mark` char(1) NOT NULL default '.'"); - setChange("ALTER TABLE tt_fav_reports ADD COLUMN `invoice` tinyint(4) default NULL"); - setChange("CREATE TABLE `tt_cron` (`id` int(11) NOT NULL auto_increment, `cron_spec` varchar(255) NOT NULL, `last` int(11) default NULL, `next` int(11) default NULL, `report_id` int(11) default NULL, `email` varchar(100) default NULL, `status` tinyint(4) default '1', PRIMARY KEY (`id`))"); - setChange("ALTER TABLE tt_cron ADD COLUMN `team_id` int(11) NOT NULL"); - setChange("create index client_idx on tt_client_project_binds(client_id)"); - setChange("create index project_idx on tt_client_project_binds(project_id)"); - setChange("ALTER TABLE tt_log ADD COLUMN status tinyint(4) default '1'"); - setChange("ALTER TABLE tt_custom_field_log ADD COLUMN status tinyint(4) default '1'"); - setChange("ALTER TABLE tt_expense_items ADD COLUMN status tinyint(4) default '1'"); - setChange("ALTER TABLE tt_invoices ADD COLUMN status tinyint(4) default '1'"); - setChange("DROP INDEX name_idx on tt_invoices"); - setChange("create unique index name_idx on tt_invoices(team_id, name, status)"); - setChange("ALTER TABLE tt_teams ADD COLUMN lock_spec varchar(255) default NULL"); - setChange("ALTER TABLE tt_teams DROP locktime"); - setChange("CREATE TABLE `tt_monthly_quota` (`team_id` int(11) NOT NULL, `year` smallint(5) UNSIGNED NOT NULL, `month` tinyint(3) UNSIGNED NOT NULL, `quota` smallint(5) UNSIGNED NOT NULL, PRIMARY KEY (`year`,`month`,`team_id`))"); - setChange("ALTER TABLE `tt_monthly_quota` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE"); - setChange("ALTER TABLE `tt_teams` ADD `workday_hours` SMALLINT NULL DEFAULT '8' AFTER `lock_spec`"); - setChange("RENAME TABLE tt_monthly_quota TO tt_monthly_quotas"); - setChange("ALTER TABLE tt_expense_items modify `name` text NOT NULL"); - setChange("ALTER TABLE `tt_teams` ADD `uncompleted_indicators` SMALLINT(2) NOT NULL DEFAULT '0' AFTER `record_type`"); - setChange("CREATE TABLE `tt_predefined_expenses` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', PRIMARY KEY (`id`))"); - setChange("ALTER TABLE `tt_teams` ADD `task_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`"); - setChange("ALTER TABLE `tt_teams` ADD `project_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`"); - setChange("ALTER TABLE `tt_cron` ADD `report_condition` varchar(255) default NULL AFTER `email`"); - setChange("ALTER TABLE `tt_fav_reports` ADD `status` tinyint(4) default '1'"); - setChange("ALTER TABLE `tt_teams` ADD `bcc_email` varchar(100) default NULL AFTER `uncompleted_indicators`"); - setChange("ALTER TABLE `tt_cron` ADD `cc` varchar(100) default NULL AFTER `email`"); - setChange("ALTER TABLE `tt_cron` ADD `subject` varchar(100) default NULL AFTER `cc`"); - setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); - } - // The update_clients function updates projects field in tt_clients table. if ($_POST["update_clients"]) { $mdb2 = getConnection(); @@ -709,6 +661,58 @@ function setChange($sql) { print "Updated $affected teams...
\n"; } + if ($_POST["convert1600to11400"]) { + setChange("DROP TABLE IF EXISTS tt_invoice_headers"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_client` tinyint(4) NOT NULL default '0'"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `show_invoice` tinyint(4) NOT NULL default '0'"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `group_by` varchar(20) default NULL"); + setChange("CREATE TABLE `tt_expense_items` (`id` bigint NOT NULL auto_increment, `date` date NOT NULL, `user_id` int(11) NOT NULL, `client_id` int(11) default NULL, `project_id` int(11) default NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', `invoice_id` int(11) default NULL, PRIMARY KEY (`id`))"); + setChange("create index date_idx on tt_expense_items(date)"); + setChange("create index user_idx on tt_expense_items(user_id)"); + setChange("create index client_idx on tt_expense_items(client_id)"); + setChange("create index project_idx on tt_expense_items(project_id)"); + setChange("create index invoice_idx on tt_expense_items(invoice_id)"); + setChange("ALTER TABLE tt_fav_reports DROP sort_by"); + setChange("ALTER TABLE tt_fav_reports DROP show_empty_days"); + setChange("ALTER TABLE tt_invoices DROP discount"); + setChange("ALTER TABLE tt_users ADD COLUMN `client_id` int(11) default NULL"); + setChange("ALTER TABLE tt_teams ADD COLUMN `decimal_mark` char(1) NOT NULL default '.'"); + setChange("ALTER TABLE tt_fav_reports ADD COLUMN `invoice` tinyint(4) default NULL"); + setChange("CREATE TABLE `tt_cron` (`id` int(11) NOT NULL auto_increment, `cron_spec` varchar(255) NOT NULL, `last` int(11) default NULL, `next` int(11) default NULL, `report_id` int(11) default NULL, `email` varchar(100) default NULL, `status` tinyint(4) default '1', PRIMARY KEY (`id`))"); + setChange("ALTER TABLE tt_cron ADD COLUMN `team_id` int(11) NOT NULL"); + setChange("create index client_idx on tt_client_project_binds(client_id)"); + setChange("create index project_idx on tt_client_project_binds(project_id)"); + setChange("ALTER TABLE tt_log ADD COLUMN status tinyint(4) default '1'"); + setChange("ALTER TABLE tt_custom_field_log ADD COLUMN status tinyint(4) default '1'"); + setChange("ALTER TABLE tt_expense_items ADD COLUMN status tinyint(4) default '1'"); + setChange("ALTER TABLE tt_invoices ADD COLUMN status tinyint(4) default '1'"); + setChange("DROP INDEX name_idx on tt_invoices"); + setChange("create unique index name_idx on tt_invoices(team_id, name, status)"); + setChange("ALTER TABLE tt_teams ADD COLUMN lock_spec varchar(255) default NULL"); + setChange("ALTER TABLE tt_teams DROP locktime"); + setChange("CREATE TABLE `tt_monthly_quota` (`team_id` int(11) NOT NULL, `year` smallint(5) UNSIGNED NOT NULL, `month` tinyint(3) UNSIGNED NOT NULL, `quota` smallint(5) UNSIGNED NOT NULL, PRIMARY KEY (`year`,`month`,`team_id`))"); + setChange("ALTER TABLE `tt_monthly_quota` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE"); + setChange("ALTER TABLE `tt_teams` ADD `workday_hours` SMALLINT NULL DEFAULT '8' AFTER `lock_spec`"); + setChange("RENAME TABLE tt_monthly_quota TO tt_monthly_quotas"); + setChange("ALTER TABLE tt_expense_items modify `name` text NOT NULL"); + setChange("ALTER TABLE `tt_teams` ADD `uncompleted_indicators` SMALLINT(2) NOT NULL DEFAULT '0' AFTER `record_type`"); + setChange("CREATE TABLE `tt_predefined_expenses` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', PRIMARY KEY (`id`))"); + setChange("ALTER TABLE `tt_teams` ADD `task_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`"); + setChange("ALTER TABLE `tt_teams` ADD `project_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`"); + setChange("ALTER TABLE `tt_cron` ADD `report_condition` varchar(255) default NULL AFTER `email`"); + setChange("ALTER TABLE `tt_fav_reports` ADD `status` tinyint(4) default '1'"); + setChange("ALTER TABLE `tt_teams` ADD `bcc_email` varchar(100) default NULL AFTER `uncompleted_indicators`"); + setChange("ALTER TABLE `tt_cron` ADD `cc` varchar(100) default NULL AFTER `email`"); + setChange("ALTER TABLE `tt_cron` ADD `subject` varchar(100) default NULL AFTER `cc`"); + setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); + } + + if ($_POST["convert11400to11500"]) { + setChange("ALTER TABLE `tt_teams` DROP `address`"); + } + if ($_POST["cleanup"]) { $mdb2 = getConnection(); @@ -751,7 +755,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.14.0) + Create database structure (v1.15.0)
(applies only to new installations, do not execute when updating)
@@ -786,6 +790,10 @@ function setChange($sql) {
Update database structure (v1.6 to v1.14)
Update database structure (v1.14 to v1.15)

DB Maintenance

diff --git a/mysql.sql b/mysql.sql index 9a971bece..72701be81 100644 --- a/mysql.sql +++ b/mysql.sql @@ -16,7 +16,6 @@ CREATE TABLE `tt_teams` ( `id` int(11) NOT NULL auto_increment, # team id `timestamp` timestamp NOT NULL, # modification timestamp `name` varchar(80) default NULL, # team name - `address` varchar(255) default NULL, # team address, used in invoices `currency` varchar(7) default NULL, # team currency symbol `decimal_mark` char(1) NOT NULL default '.', # separator in decimals `lang` varchar(10) NOT NULL default 'en', # language From 7d8f23aae5b4dbcff5a3dc565c4418acd7df30ea Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 15:43:27 +0000 Subject: [PATCH 0295/2515] A bit of cleanup. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 4 ++-- profile_edit.php | 31 +++++++++++++++++------------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 6828544e2..52573e797 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + - + diff --git a/profile_edit.php b/profile_edit.php index ce20f4a52..a9e9a42ca 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -54,14 +54,17 @@ if (!$cl_currency) $cl_currency = CURRENCY_DEFAULT; $cl_lang = $request->getParameter('lang'); $cl_decimal_mark = $request->getParameter('decimal_mark'); - $cl_custom_format_date = $request->getParameter('format_date'); - $cl_custom_format_time = $request->getParameter('format_time'); + $cl_date_format = $request->getParameter('date_format'); + $cl_time_format = $request->getParameter('time_format'); $cl_start_week = $request->getParameter('start_week'); $cl_tracking_mode = $request->getParameter('tracking_mode'); $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); + $cl_bcc_email = trim($request->getParameter('bcc_email')); + + // Plugin checkboxes. $cl_charts = $request->getParameter('charts'); $cl_clients = $request->getParameter('clients'); $cl_client_required = $request->getParameter('client_required'); @@ -71,7 +74,6 @@ $cl_expenses = $request->getParameter('expenses'); $cl_tax_expenses = $request->getParameter('tax_expenses'); $cl_notifications = $request->getParameter('notifications'); - $cl_bcc_email = trim($request->getParameter('bcc_email')); $cl_locking = $request->getParameter('locking'); $cl_quotas = $request->getParameter('quotas'); } @@ -84,8 +86,8 @@ $cl_currency = ($user->currency == ''? CURRENCY_DEFAULT : $user->currency); $cl_lang = $user->lang; $cl_decimal_mark = $user->decimal_mark; - $cl_custom_format_date = $user->date_format; - $cl_custom_format_time = $user->time_format; + $cl_date_format = $user->date_format; + $cl_time_format = $user->time_format; $cl_start_week = $user->week_start; $cl_tracking_mode = $user->tracking_mode; $cl_project_required = $user->project_required; @@ -121,9 +123,7 @@ if ($user->canManageTeam()) { $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','value'=>$cl_team)); $form->addInput(array('type'=>'text','maxlength'=>'7','name'=>'currency','value'=>$cl_currency)); - $DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>',')); - $form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, - 'onchange'=>'adjustDecimalPreview()')); + // Prepare an array of available languages. $lang_files = I18n::getLangFileList(); foreach ($lang_files as $lfile) { @@ -141,17 +141,22 @@ } $longname_lang = mu_sort($longname_lang, 'name'); $form->addInput(array('type'=>'combobox','name'=>'lang','style'=>'width: 150px','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang)); + + $DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>',')); + $form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, + 'onchange'=>'adjustDecimalPreview()')); + $DATE_FORMAT_OPTIONS = array( array('id'=>'%Y-%m-%d','name'=>'Y-m-d'), array('id'=>'%m/%d/%Y','name'=>'m/d/Y'), array('id'=>'%d.%m.%Y','name'=>'d.m.Y'), array('id'=>'%d.%m.%Y %a','name'=>'d.m.Y a')); - $form->addInput(array('type'=>'combobox','name'=>'format_date','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_custom_format_date, + $form->addInput(array('type'=>'combobox','name'=>'date_format','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format, 'onchange'=>'MakeFormatPreview("date_format_preview", this);')); $TIME_FORMAT_OPTIONS = array( array('id'=>'%H:%M','name'=>$i18n->getKey('form.profile.24_hours')), array('id'=>'%I:%M %p','name'=>$i18n->getKey('form.profile.12_hours'))); - $form->addInput(array('type'=>'combobox','name'=>'format_time','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_custom_format_time, + $form->addInput(array('type'=>'combobox','name'=>'time_format','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format, 'onchange'=>'MakeFormatPreview("time_format_preview", this);')); // Prepare week start choices. @@ -188,10 +193,10 @@ $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'bcc_email','value'=>$cl_bcc_email)); } + // Plugin checkboxes. $form->addInput(array('type'=>'checkbox','name'=>'charts','value'=>$cl_charts)); $form->addInput(array('type'=>'checkbox','name'=>'clients','value'=>$cl_clients,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'client_required','value'=>$cl_client_required)); - $form->addInput(array('type'=>'checkbox','name'=>'invoices','value'=>$cl_invoices)); $form->addInput(array('type'=>'checkbox','name'=>'paid_status','value'=>$cl_paid_status)); $form->addInput(array('type'=>'checkbox','name'=>'custom_fields','value'=>$cl_custom_fields,'onchange'=>'handlePluginCheckboxes()')); @@ -263,8 +268,8 @@ 'currency' => $cl_currency, 'lang' => $cl_lang, 'decimal_mark' => $cl_decimal_mark, - 'date_format' => $cl_custom_format_date, - 'time_format' => $cl_custom_format_time, + 'date_format' => $cl_date_format, + 'time_format' => $cl_time_format, 'week_start' => $cl_start_week, 'tracking_mode' => $cl_tracking_mode, 'project_required' => $cl_project_required, From 9a9200cf19fc4de98b09834e7d598b1b4c6f44b3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 16:18:38 +0000 Subject: [PATCH 0296/2515] Work in progress integrating paid status plugin. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/reports.tpl | 8 ++++++++ charts.php | 2 +- expenses.php | 4 ++-- login.php | 3 +-- reports.php | 10 ++++++++++ 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 52573e797..f994bf1b9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.15.0.3758 | Copyright © Anuko | +  Anuko Time Tracker 1.15.0.3759 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 542148ef5..4a05bb0ad 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -142,11 +142,11 @@ function handlePluginCheckboxes() { {$forms.profileForm.decimal_mark.control}  
{$i18n.label.date_format}:{$forms.profileForm.format_date.control}  {$forms.profileForm.date_format.control}  
{$i18n.label.time_format}:{$forms.profileForm.format_time.control}  {$forms.profileForm.time_format.control}  
{$i18n.label.week_start}:
- {/if} +{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))} + + + + + + +{/if} {if $user->canManageTeam() || $user->isClient()} diff --git a/charts.php b/charts.php index 985a1ae8e..c76eddfa5 100644 --- a/charts.php +++ b/charts.php @@ -84,7 +84,7 @@ // Who do we draw charts for? $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); -if ($request->getMethod( )== 'POST') { +if ($request->isPost()) { // If chart interval changed - save it. $cl_interval = $request->getParameter('interval'); if ($cl_interval) { diff --git a/expenses.php b/expenses.php index 93161f085..8db286537 100644 --- a/expenses.php +++ b/expenses.php @@ -50,9 +50,9 @@ // Initialize variables. $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id']) ? $_SESSION['behalf_id'] : $user->id)); -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST' ? null : @$_SESSION['client'])); +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST' ? null : @$_SESSION['project'])); +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; $cl_item_name = $request->getParameter('item_name'); $cl_cost = $request->getParameter('cost'); diff --git a/login.php b/login.php index b0c583fa2..d398794c4 100644 --- a/login.php +++ b/login.php @@ -32,9 +32,8 @@ import('ttUser'); $cl_login = $request->getParameter('login'); +if ($cl_login == null && $request->isGet()) $cl_login = @$_COOKIE['tt_login']; $cl_password = $request->getParameter('password'); -if ($cl_login == null && $request->getMethod() == 'GET') - $cl_login = @$_COOKIE['tt_login']; $form = new Form('loginForm'); $form->addInput(array('type'=>'text','size'=>'25','maxlength'=>'100','name'=>'login','style'=>'width: 220px;','value'=>$cl_login)); diff --git a/reports.php b/reports.php index 69e742351..f6d9cf05d 100644 --- a/reports.php +++ b/reports.php @@ -122,6 +122,16 @@ 'data'=>$include_options, 'empty'=>array(''=>$i18n->getKey('dropdown.all')))); +if ($user->isPluginEnabled('ps')) { + $form->addInput(array('type'=>'combobox', + 'name'=>'paid_status', + 'style'=>'width: 250px;', + 'data'=>array('1'=>$i18n->getKey('dropdown.paid'),'2'=>$i18n->getKey('dropdown.not_paid')), + 'empty'=>array(''=>$i18n->getKey('dropdown.all')) + )); +} + + // Add invoiced / not invoiced selector. $invoice_options = array('1'=>$i18n->getKey('form.reports.include_invoiced'), '2'=>$i18n->getKey('form.reports.include_not_invoiced')); From 704d09fab8234dda51765058b15393f6c68191f3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 16:30:22 +0000 Subject: [PATCH 0297/2515] More consistent use of isGet() and isPost() functions. --- WEB-INF/lib/html/HttpRequest.class.php | 8 ++++---- WEB-INF/templates/footer.tpl | 2 +- mobile/expenses.php | 4 ++-- mobile/time.php | 8 ++++---- mobile/timer.php | 2 +- reports.php | 2 +- time.php | 8 ++++---- week.php | 8 ++++---- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/WEB-INF/lib/html/HttpRequest.class.php b/WEB-INF/lib/html/HttpRequest.class.php index cd66a8cc6..2eb26f0a7 100644 --- a/WEB-INF/lib/html/HttpRequest.class.php +++ b/WEB-INF/lib/html/HttpRequest.class.php @@ -42,17 +42,17 @@ function isPost() { return ($this->getMethod() == 'POST'); } - // The getParameter is the primary function of this class. It returns request parameter, + // The getParameter is the primary function of this class. It returns request parameter // identified by $name. - function getParameter($name = "", $default = null) { + function getParameter($name = '', $default = null) { switch ($this->getMethod()) { case 'GET': - if (isset($_GET[$name]) && ($_GET[$name] != "")) + if (isset($_GET[$name]) && ($_GET[$name] != '')) return $_GET[$name]; case 'POST': - if (isset($_POST[$name]) && ($_POST[$name] != "")) + if (isset($_POST[$name]) && ($_POST[$name] != '')) return $_POST[$name]; } return $default; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f994bf1b9..af0b60e8d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.15.0.3759 | Copyright © Anuko | +  Anuko Time Tracker 1.15.0.3760 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 5ca7a171f..0f9b129f7 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -209,6 +209,14 @@ function handleCheckboxes() { {$forms.reportForm.invoice.control}
{$i18n.label.paid_status}
{$forms.reportForm.paid_status.control}
{$i18n.label.users}
-
 Anuko Time Tracker 1.15.0.3760 | Copyright © Anuko | +  Anuko Time Tracker 1.15.0.3761 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/expenses.php b/mobile/expenses.php index fafe1373e..790a7ace0 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -54,9 +54,9 @@ // Initialize variables. $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id']) ? $_SESSION['behalf_id'] : $user->id)); -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST' ? null : @$_SESSION['client'])); +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST' ? null : @$_SESSION['project'])); +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; $cl_item_name = $request->getParameter('item_name'); $cl_cost = $request->getParameter('cost'); diff --git a/mobile/time.php b/mobile/time.php index db8aa34bf..0c634f3a5 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -66,7 +66,7 @@ $cl_duration = trim($request->getParameter('duration')); $cl_note = trim($request->getParameter('note')); // Custom field. -$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->isPost() ? null : @$_SESSION['cf_1']))); $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if ($user->isPluginEnabled('iv')) { @@ -77,11 +77,11 @@ if (isset($_SESSION['billable'])) $cl_billable = $_SESSION['billable']; } -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); +$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; // Elements of timeRecordForm. diff --git a/mobile/timer.php b/mobile/timer.php index cdb32c7b8..1fa6c1377 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -61,7 +61,7 @@ $cl_start = trim($request->getParameter('browser_time')); $cl_finish = trim($request->getParameter('browser_time')); // Custom field. -$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->isPost() ? null : @$_SESSION['cf_1']))); $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if ($user->isPluginEnabled('iv')) { diff --git a/reports.php b/reports.php index f6d9cf05d..710de5246 100644 --- a/reports.php +++ b/reports.php @@ -231,7 +231,7 @@ $bean = new ActionForm('reportBean', $form, $request); // At this point form values are obtained from session if they are there. -if (($request->getMethod() == 'GET') && !$bean->isSaved()) { +if ($request->isGet() && !$bean->isSaved()) { // No previous form data were found in session. Use the following default values. $form->setValueByElement('users', array_keys($user_list)); $period = new Period(INTERVAL_THIS_MONTH, new DateAndTime($user->date_format)); diff --git a/time.php b/time.php index c001f21f6..caab2bd71 100644 --- a/time.php +++ b/time.php @@ -81,7 +81,7 @@ $cl_duration = trim($request->getParameter('duration')); $cl_note = trim($request->getParameter('note')); // Custom field. -$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->isPost() ? null : @$_SESSION['cf_1']))); $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if ($user->isPluginEnabled('iv')) { @@ -93,11 +93,11 @@ $cl_billable = $_SESSION['billable']; } $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); +$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; // Elements of timeRecordForm. diff --git a/week.php b/week.php index 5db40a258..16fd79ba7 100644 --- a/week.php +++ b/week.php @@ -89,7 +89,7 @@ // Initialize variables. // Custom field. -$cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? null : @$_SESSION['cf_1']))); +$cl_cf_1 = trim($request->getParameter('cf_1', ($request->isPost() ? null : @$_SESSION['cf_1']))); $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if ($user->isPluginEnabled('iv')) { @@ -101,11 +101,11 @@ $cl_billable = $_SESSION['billable']; } $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id)); -$cl_client = $request->getParameter('client', ($request->getMethod()=='POST'? null : @$_SESSION['client'])); +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->getMethod()=='POST'? null : @$_SESSION['project'])); +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->getMethod()=='POST'? null : @$_SESSION['task'])); +$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; // Get the data we need to display week view. From 2bfbf9aa34b4e672ceba72003e294a0a6c5c7972 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 17:55:36 +0000 Subject: [PATCH 0298/2515] Added labels to localization files for paid status plugin. --- WEB-INF/resources/ca.lang.php | 2 ++ WEB-INF/resources/cs.lang.php | 2 ++ WEB-INF/resources/da.lang.php | 3 +++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 2 ++ WEB-INF/resources/es.lang.php | 2 ++ WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 2 ++ WEB-INF/resources/it.lang.php | 3 +++ WEB-INF/resources/ja.lang.php | 2 ++ WEB-INF/resources/ko.lang.php | 3 +++ WEB-INF/resources/nl.lang.php | 3 +++ WEB-INF/resources/no.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 3 +++ WEB-INF/resources/ro.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 2 ++ WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 2 ++ WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 3 +++ WEB-INF/resources/tr.lang.php | 3 +++ WEB-INF/resources/zh-cn.lang.php | 2 ++ WEB-INF/resources/zh-tw.lang.php | 2 ++ WEB-INF/templates/footer.tpl | 2 +- 30 files changed, 66 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 0ee311019..b0373d4ff 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -216,6 +216,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). // 'label.custom_fields' => 'Custom fields', // 'label.monthly_quotas' => 'Monthly quotas', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 50755b4f9..4d61c3837 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -149,6 +149,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 2beb6db26..97273d49f 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -197,6 +197,9 @@ 'label.role_admin' => '(Administrator)', 'label.page' => 'Side', 'label.condition' => 'Betingelse', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Brugerdefineret felt', 'label.monthly_quotas' => 'Månedlig kvota', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 84c92426c..8c7d153dc 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -194,6 +194,8 @@ 'label.page' => 'Seite', // TODO: translate the following. // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Benutzerfelder', 'label.monthly_quotas' => 'Monatliche Quoten', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 4a499dcf6..fedb09941 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -193,6 +193,8 @@ 'label.role_admin' => '(administrator)', 'label.page' => 'Page', 'label.condition' => 'Condition', +'label.yes' => 'yes', +'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Custom fields', 'label.monthly_quotas' => 'Monthly quotas', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 2979912f9..ac50e5d05 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -228,6 +228,8 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). // TODO: translate the following. // 'label.custom_fields' => 'Custom fields', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 962b7e724..83d29c6a6 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -219,6 +219,8 @@ // 'label.role_admin' => '(administrator)', // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). // 'label.custom_fields' => 'Custom fields', // 'label.monthly_quotas' => 'Monthly quotas', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 59be22cb9..420f8f40a 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -209,6 +209,8 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'فیلدهای سفارشی', // Translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 4a78edb5e..f5604da82 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -197,6 +197,8 @@ 'label.page' => 'Sivu', // TODO: translate the following. // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Omat kentät', // Translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 9de209d9f..b5855a118 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -192,6 +192,8 @@ 'label.role_admin' => '(administrateur)', 'label.page' => 'Page', 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Champs personalisés', 'label.monthly_quotas' => 'Quotas mensuels', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index dd33fd709..11a4712cb 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -213,6 +213,8 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'שדות אישיים', // Translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index fbaf1079e..2d71ebd67 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -142,6 +142,8 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 27e39ae1a..762fb2e31 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -142,6 +142,9 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 79e2d1b0c..14e29dd52 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -144,6 +144,8 @@ // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 385815f3a..9ea440b51 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -140,6 +140,9 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 3be4eb7d4..6f46e2747 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -194,6 +194,9 @@ 'label.role_admin' => '(beheerder)', 'label.page' => 'Pagina', 'label.condition' => 'Voorwaarde', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Eigen velden', 'label.monthly_quotas' => 'Doelen per maand', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index ac23f43ec..3a52278f2 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -140,6 +140,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 272ea88c6..376dbbaf8 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -202,6 +202,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Niestandardowe pola', // Translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 1df5d0223..5cb100b79 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -197,6 +197,8 @@ 'label.page' => 'Página', // TODO: translate the following. // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Campos personalizados', // Translate the following. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 29d8cc4bc..5fdd5a0ba 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -136,6 +136,9 @@ 'label.subject' => 'Assunto', // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0442cae75..858006424 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -144,6 +144,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index dfaf2ba53..a3e2d6f8a 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -193,6 +193,8 @@ 'label.role_admin' => '(администратор)', 'label.page' => 'Стр', 'label.condition' => 'Условие', +'label.yes' => 'да', +'label.no' => 'нет', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Дополнительные поля', 'label.monthly_quotas' => 'Месячные квоты', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e0d099d75..78852e0c8 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -209,6 +209,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Vlastné polia', // Translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 3f3548f6c..c476b47d3 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -144,6 +144,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 57c863522..2e8179612 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -199,6 +199,8 @@ 'label.page' => 'Strana', // TODO: translate the following. // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Dodatna polja', // Translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index f9b2e156f..2b66518e3 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -196,6 +196,9 @@ 'label.role_admin' => '(Administratör)', 'label.page' => 'Sida', 'label.condition' => 'Villkor', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Egna fält', 'label.monthly_quotas' => 'Månadskvoter', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 267f6ba42..856485ae9 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -144,6 +144,9 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// TODO: translate the following. +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 25f62a7e8..51221682c 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -212,6 +212,8 @@ 'label.page' => '页码', // TODO: translate the following. // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). // TODO: Translate the following. // 'label.custom_fields' => 'Custom fields', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 3b9ab68b3..a287dbb07 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -142,6 +142,8 @@ // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', +// 'label.yes' => 'yes', +// 'label.no' => 'no', // Form titles. // TODO: the entire title section is missing here. See the English file. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index af0b60e8d..2c504cff1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.15.0.3761 | Copyright © Anuko | +  Anuko Time Tracker 1.15.0.3762 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a0b1d0a4dfd23d96f60c2fe03c9b3682df2fe88f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 20 Jan 2018 23:59:36 +0000 Subject: [PATCH 0299/2515] Fixed export-import to accommodate new fields. --- WEB-INF/lib/ttExportHelper.class.php | 13 ++--- WEB-INF/lib/ttImportHelper.class.php | 14 ++++-- WEB-INF/lib/ttTeamHelper.class.php | 72 +++++++++++++++++----------- WEB-INF/lib/ttTimeHelper.class.php | 10 ++-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 4 +- 6 files changed, 70 insertions(+), 45 deletions(-) diff --git a/WEB-INF/lib/ttExportHelper.class.php b/WEB-INF/lib/ttExportHelper.class.php index aa8f6c76a..a3f6485d5 100644 --- a/WEB-INF/lib/ttExportHelper.class.php +++ b/WEB-INF/lib/ttExportHelper.class.php @@ -61,11 +61,12 @@ function createDataFile($compress = false) { fwrite($file, "\n"); // Write team info. - fwrite($file, "currency."\" lock_spec=\"".$user->lock_spec."\" lang=\"".$user->lang. - "\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format. - "\" week_start=\"".$user->week_start."\" workday_hours=\"".$user->workday_hours. - "\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" task_required=\"".$user->task_required. - "\" record_type=\"".$user->record_type."\">\n"); + fwrite($file, "currency."\" decimal_mark=\"".$user->decimal_mark."\" lang=\"".$user->lang. + "\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start. + "\" tracking_mode=\"".$user->tracking_mode."\" project_required=\"".$user->project_required."\" task_required=\"".$user->task_required. + "\" record_type=\"".$user->record_type."\" uncompleted_indicators=\"".$user->uncompleted_indicators."\" bcc_email=\"".$user->bcc_email. + "\" plugins=\"".$user->plugins."\" lock_spec=\"".$user->lock_spec."\" workday_hours=\"".$user->workday_hours. + "\">\n"); fwrite($file, " team."]]>\n"); fwrite($file, "\n"); @@ -217,7 +218,7 @@ function createDataFile($compress = false) { foreach ($records as $record) { $key++; $this->logMap[$record['id']] = $key; - fwrite($file, " userMap[$record['user_id']]."\" date=\"".$record['date']."\" start=\"".$record['start']."\" finish=\"".$record['finish']."\" duration=\"".($record['start']?"":$record['duration'])."\" client_id=\"".$this->clientMap[$record['client_id']]."\" project_id=\"".$this->projectMap[$record['project_id']]."\" task_id=\"".$this->taskMap[$record['task_id']]."\" invoice_id=\"".$this->invoiceMap[$record['invoice_id']]."\" billable=\"".$record['billable']."\" status=\"".$record['status']."\">\n"); + fwrite($file, " userMap[$record['user_id']]."\" date=\"".$record['date']."\" start=\"".$record['start']."\" finish=\"".$record['finish']."\" duration=\"".($record['start']?"":$record['duration'])."\" client_id=\"".$this->clientMap[$record['client_id']]."\" project_id=\"".$this->projectMap[$record['project_id']]."\" task_id=\"".$this->taskMap[$record['task_id']]."\" invoice_id=\"".$this->invoiceMap[$record['invoice_id']]."\" billable=\"".$record['billable']."\" paid=\"".$record['paid']."\" status=\"".$record['status']."\">\n"); fwrite($file, " \n"); fwrite($file, " \n"); } diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 99b35e411..753dc1654 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -117,17 +117,20 @@ function endElement($parser, $name) { $team_id = ttTeamHelper::insert(array( 'name' => $this->teamData['NAME'], 'currency' => $this->teamData['CURRENCY'], - 'lock_spec' => $this->teamData['LOCK_SPEC'], - 'workday_hours' => $this->teamData['WORKDAY_HOURS'], - 'lang' => $this->teamData['LANG'], 'decimal_mark' => $this->teamData['DECIMAL_MARK'], + 'lang' => $this->teamData['LANG'], 'date_format' => $this->teamData['DATE_FORMAT'], 'time_format' => $this->teamData['TIME_FORMAT'], 'week_start' => $this->teamData['WEEK_START'], - 'plugins' => $this->teamData['PLUGINS'], 'tracking_mode' => $this->teamData['TRACKING_MODE'], + 'project_required' => $this->teamData['PROJECT_REQUIRED'], 'task_required' => $this->teamData['TASK_REQUIRED'], - 'record_type' => $this->teamData['RECORD_TYPE'])); + 'record_type' => $this->teamData['RECORD_TYPE'], + 'uncompleted_indicators' => $this->teamData['UNCOMPLETED_INDICATORS'], + 'bcc_email' => $this->teamData['BCC_EMAIL'], + 'plugins' => $this->teamData['PLUGINS'], + 'lock_spec' => $this->teamData['LOCK_SPEC'], + 'workday_hours' => $this->teamData['WORKDAY_HOURS'])); if ($team_id) { $this->team_id = $team_id; foreach ($this->users as $key=>$user_item) { @@ -231,6 +234,7 @@ function endElement($parser, $name) { 'invoice' => $this->invoiceMap[$this->currentElement['INVOICE_ID']], 'note' => (isset($this->currentElement['COMMENT']) ? $this->currentElement['COMMENT'] : ''), 'billable' => $this->currentElement['BILLABLE'], + 'paid' => $this->currentElement['PAID'], 'status' => $this->currentElement['STATUS'])); } diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 0f3358f65..612712370 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -636,21 +636,6 @@ static function insert($fields) { $mdb2 = getConnection(); - $lock_spec = $fields['lock_spec']; - if ($lock_spec !== null) { - $lockspec_f = ', lock_spec'; - $lockspec_v = ', ' . $mdb2->quote($lock_spec); - } else { - $lockspec_f = ''; - $lockspec_v = ''; - } - - $lang = $fields['lang']; - if (!$lang) { - global $i18n; - $lang = $i18n->lang; - } - $decimal_mark = $fields['decimal_mark']; if ($decimal_mark !== null) { $decimal_mark_f = ', decimal_mark'; @@ -660,6 +645,12 @@ static function insert($fields) { $decimal_mark_v = ''; } + $lang = $fields['lang']; + if (!$lang) { + global $i18n; + $lang = $i18n->lang; + } + $date_format = $fields['date_format']; if ($date_format !== null) { $date_format_f = ', date_format'; @@ -696,15 +687,6 @@ static function insert($fields) { $week_start_v = ''; } - $plugins = $fields['plugins']; - if ($plugins !== null) { - $plugins_f = ', plugins'; - $plugins_v = ', ' . $mdb2->quote($plugins); - } else { - $plugins_f = ''; - $plugins_v = ''; - } - $tracking_mode = $fields['tracking_mode']; if ($tracking_mode !== null) { $tracking_mode_f = ', tracking_mode'; @@ -714,6 +696,15 @@ static function insert($fields) { $tracking_mode_v = ''; } + $project_required = $fields['project_required']; + if ($project_required !== null) { + $project_required_f = ', project_required'; + $project_required_v = ', ' . (int)$project_required; + } else { + $project_required_f = ''; + $project_required_v = ''; + } + $task_required = $fields['task_required']; if ($task_required !== null) { $task_required_f = ', task_required'; @@ -741,6 +732,33 @@ static function insert($fields) { $uncompleted_indicators_v = ''; } + $bcc_email = $fields['bcc_email']; + if ($bcc_email !== null) { + $bcc_email_f = ', bcc_email'; + $bcc_email_v = ', ' . $mdb2->quote($bcc_email); + } else { + $bcc_email_f = ''; + $bcc_email_v = ''; + } + + $plugins = $fields['plugins']; + if ($plugins !== null) { + $plugins_f = ', plugins'; + $plugins_v = ', ' . $mdb2->quote($plugins); + } else { + $plugins_f = ''; + $plugins_v = ''; + } + + $lock_spec = $fields['lock_spec']; + if ($lock_spec !== null) { + $lockspec_f = ', lock_spec'; + $lockspec_v = ', ' . $mdb2->quote($lock_spec); + } else { + $lockspec_f = ''; + $lockspec_v = ''; + } + $workday_hours = $fields['workday_hours']; if ($workday_hours !== null) { $workday_hours_f = ', workday_hours'; @@ -750,10 +768,10 @@ static function insert($fields) { $workday_hours_v = ''; } - $sql = "insert into tt_teams (name, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f) + $sql = "insert into tt_teams (name, currency $decimal_mark_f, lang $date_format_f $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $uncompleted_indicators_f $bcc_email_f $plugins_f $lockspec_f $workday_hours_f) values(".$mdb2->quote(trim($fields['name'])). - ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang). - "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $task_required_v $record_type_v $uncompleted_indicators_v $workday_hours_v)"; + ", ".$mdb2->quote(trim($fields['currency']))." $decimal_mark_v, ".$mdb2->quote($lang). + "$date_format_v $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $uncompleted_indicators_v $bcc_email_v $plugins_v $lockspec_v $workday_hours_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 9d3f8bbe2..44a1a8cf0 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -370,6 +370,7 @@ static function insert($fields) $invoice = $fields['invoice']; $note = $fields['note']; $billable = $fields['billable']; + $paid = $fields['paid']; if (array_key_exists('status', $fields)) { // Key exists and may be NULL during migration of data. $status_f = ', status'; $status_v = ', '.$mdb2->quote($fields['status']); @@ -390,10 +391,11 @@ static function insert($fields) } if (!$billable) $billable = 0; + if (!$paid) $paid = 0; if ($duration) { - $sql = "insert into tt_log (timestamp, user_id, date, duration, client_id, project_id, task_id, invoice_id, comment, billable $status_f) ". - "values ('$timestamp', $user_id, ".$mdb2->quote($date).", '$duration', ".$mdb2->quote($client).", ".$mdb2->quote($project).", ".$mdb2->quote($task).", ".$mdb2->quote($invoice).", ".$mdb2->quote($note).", $billable $status_v)"; + $sql = "insert into tt_log (timestamp, user_id, date, duration, client_id, project_id, task_id, invoice_id, comment, billable, paid $status_f) ". + "values ('$timestamp', $user_id, ".$mdb2->quote($date).", '$duration', ".$mdb2->quote($client).", ".$mdb2->quote($project).", ".$mdb2->quote($task).", ".$mdb2->quote($invoice).", ".$mdb2->quote($note).", $billable, $paid $status_v)"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; @@ -403,7 +405,7 @@ static function insert($fields) if (!$duration && ttTimeHelper::getUncompleted($user_id)) return false; $sql = "insert into tt_log (timestamp, user_id, date, start, duration, client_id, project_id, task_id, invoice_id, comment, billable $status_f) ". - "values ('$timestamp', $user_id, ".$mdb2->quote($date).", '$start', '$duration', ".$mdb2->quote($client).", ".$mdb2->quote($project).", ".$mdb2->quote($task).", ".$mdb2->quote($invoice).", ".$mdb2->quote($note).", $billable $status_v)"; + "values ('$timestamp', $user_id, ".$mdb2->quote($date).", '$start', '$duration', ".$mdb2->quote($client).", ".$mdb2->quote($project).", ".$mdb2->quote($task).", ".$mdb2->quote($invoice).", ".$mdb2->quote($note).", $billable, $paid $status_v)"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; @@ -625,7 +627,7 @@ static function getAllRecords($user_id) { $sql = "select l.id, l.timestamp, l.user_id, l.date, TIME_FORMAT(l.start, '%k:%i') as start, TIME_FORMAT(sec_to_time(time_to_sec(l.start) + time_to_sec(l.duration)), '%k:%i') as finish, TIME_FORMAT(l.duration, '%k:%i') as duration, - l.client_id, l.project_id, l.task_id, l.invoice_id, l.comment, l.billable, l.status + l.client_id, l.project_id, l.task_id, l.invoice_id, l.comment, l.billable, l.paid, l.status from tt_log l where l.user_id = $user_id order by l.id"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2c504cff1..c02ed1e16 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - {if $smarty.const.WEEK_VIEW_DEBUG == 1} - + - {/if} {/if} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 355b9726e..f532be424 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -8,11 +8,13 @@ {$forms.timeRecordForm.open}
 Anuko Time Tracker 1.15.0.3762 | Copyright © Anuko | +  Anuko Time Tracker 1.15.1.3763 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 4a05bb0ad..e766ffb8b 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -172,8 +172,8 @@ function handlePluginCheckboxes() { {/if} {* initialize preview text *} @@ -229,12 +237,10 @@ function handlePluginCheckboxes() { {$forms.profileForm.quotas.control} {$i18n.label.configure}
{$forms.profileForm.week_view.control} {$i18n.label.configure} {$i18n.label.configure}
+{if $user->isPluginEnabled('wv')} +{/if} @@ -73,6 +79,7 @@
{$i18n.label.day_view} / {$i18n.label.week_view}
diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index f51447547..7c59f5b3b 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -50,6 +50,12 @@ +{/if} +{if $user->isPluginEnabled('wvn')} + + + + {/if}
{$i18n.label.task}: {$forms.weekTimeForm.task.control}
{$i18n.label.week_note}:{$forms.weekTimeForm.note.control}
 
+{if $user->isPluginEnabled('wvl')}
@@ -135,12 +142,16 @@
+{/if} + {if $time_records} + {if $user->isPluginEnabled('wvl')} + {/if} {if $user->isPluginEnabled('mq')} diff --git a/profile_edit.php b/profile_edit.php index 6d82bf783..1d12bae48 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -207,9 +207,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'notifications','value'=>$cl_notifications,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()')); - if (defined('WEEK_VIEW_DEBUG') && isTrue(WEEK_VIEW_DEBUG)) { - $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view)); - } + $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()')); } $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); diff --git a/week.php b/week.php index b70f20b99..44a05bdc5 100644 --- a/week.php +++ b/week.php @@ -39,7 +39,7 @@ import('DateAndTime'); // Access check. -if (!ttAccessCheck(right_data_entry)) { +if (!ttAccessCheck(right_data_entry) || !$user->isPluginEnabled('wv')) { header('Location: access_denied.php'); exit(); } @@ -107,6 +107,8 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; +$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); +$_SESSION['note'] = $cl_note; // Get the data we need to display week view. // Get column headers, which are day numbers in month. @@ -126,19 +128,27 @@ // Define rendering class for a label field to the left of durations. class LabelCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { + global $user; + $this->setOptions(array('width'=>200,'valign'=>'middle')); - // Special handling for row 0, which represents a new week entry. + + // Special handling for a new week entry (row 0, or 0 and 1 if we show notes). if (0 == $row) { - $this->setOptions(array('style'=>'text-align: center; font-weight: bold;')); - } else if (0 != $row % 2) { + $this->setOptions(array('style'=>'text-align: center; font-weight: bold; vertical-align: top;')); + } else if ($user->isPluginEnabled('wvns') && (1 == $row)) { + $this->setOptions(array('style'=>'text-align: right; vertical-align: top;')); + } else if ($user->isPluginEnabled('wvns') && (0 != $row % 2)) { $this->setOptions(array('style'=>'text-align: right;')); } // Special handling for not billable entries. - if ($row > 1 && 0 == $row % 2) { + $ignoreRow = $user->isPluginEnabled('wvns') ? 1 : 0; + if ($row > $ignoreRow) { $row_id = $table->getValueAtName($row,'row_id'); $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl'); if (!$billable) { - $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. + if (($user->isPluginEnabled('wvns') && (0 == $row % 2)) || !$user->isPluginEnabled('wvns')) { + $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. + } } } $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. @@ -149,6 +159,8 @@ function render(&$table, $value, $row, $column, $selected = false) { // Define rendering class for a single cell for a time or a comment entry in week view table. class WeekViewCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { + global $user; + $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). $field = new TextField($field_name); // Disable control if the date is locked. @@ -157,15 +169,24 @@ function render(&$table, $value, $row, $column, $selected = false) { $field->setEnabled(false); $field->setFormName($table->getFormName()); $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. - if (0 == $row % 2) - $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. - else { - $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. - $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to help view the entire comment. + // Provide visual separation for new entry row. + $rowToSeparate = $user->isPluginEnabled('wvns') ? 1 : 0; + if ($rowToSeparate == $row) { + $field->setStyle('width: 60px; margin-bottom: 40px'); + } + if ($user->isPluginEnabled('wvns')) { + if (0 == $row % 2) { + $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. + } else { + $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. + $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to help view the entire comment. + } + } else { + $field->setValue($table->getValueAt($row,$column)['duration']); + // $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to see comment. TODO - value not available. } // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control // because we can't supply start and finish times in week view - there are no fields for them. - global $user; if (!$field->getValue() && TYPE_START_FINISH == $user->record_type) { $field->setEnabled(false); } @@ -269,6 +290,9 @@ function render(&$table, $value, $row, $column, $selected = false) { 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->getKey('dropdown.select')))); } +if (!defined('NOTE_INPUT_HEIGHT')) + define('NOTE_INPUT_HEIGHT', 40); +$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); // Add other controls. $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar @@ -317,6 +341,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if (!$cl_task) $err->add($i18n->getKey('error.task')); } } + // Finished validating user input for row 0. // Process the table of values. if ($err->no()) { @@ -335,7 +360,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $control_id = $rowNumber.'_'.$dayHeader; // Handle durations and comments in separate blocks of code. - if (0 == $rowNumber % 2) { + if (!$user->isPluginEnabled('wvns') || (0 == $rowNumber % 2)) { // Handle durations row here. // Obtain existing and posted durations. @@ -372,15 +397,21 @@ function render(&$table, $value, $row, $column, $selected = false) { $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; // Note: no need to check for a possible conflict with an already existing row // because we are doing an insert that does not affect already existing data. + + if ($user->isPluginEnabled('wvn')) { + $fields['note'] = $request->getParameter('note'); + } } $fields['day_header'] = $dayHeader; $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. $fields['duration'] = $postedDuration; $fields['browser_today'] = $request->getParameter('browser_today', null); - // Take note value from the control below duration. - $noteRowNumber = $rowNumber + 1; - $note_control_id = $noteRowNumber.'_'.$dayHeader; - $fields['note'] = $request->getParameter($note_control_id); + if ($user->isPluginEnabled('wvns')) { + // Take note value from the control below duration. + $noteRowNumber = $rowNumber + 1; + $note_control_id = $noteRowNumber.'_'.$dayHeader; + $fields['note'] = $request->getParameter($note_control_id); + } $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { // Delete an already existing record here. @@ -393,7 +424,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } if (!$result) break; // Break out of the loop in case of first error. - } else { + } else if ($user->isPluginEnabled('wvns')) { // Handle commments row here. // Obtain existing and posted comments. From 4d9b923bd817d0df8022054b85016911dedba035 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 17:56:59 +0000 Subject: [PATCH 0413/2515] Fixed a persistence problem for week view plugin options. --- WEB-INF/templates/footer.tpl | 2 +- profile_edit.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8799451c0..5a86537a9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
{$i18n.label.week_total}: {$week_total}
{$i18n.label.month_total}: {$month_total}
-
 Anuko Time Tracker 1.17.11.3872 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3873 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/profile_edit.php b/profile_edit.php index 1d12bae48..5839c7e0f 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -266,6 +266,16 @@ $plugins .= ',mq'; if ($cl_week_view) $plugins .= ',wv'; + + // Recycle week view plugin options as they are not configured on this page. + $existing_plugins = explode(',', $user->plugins); + if (in_array('wvn', $existing_plugins)) + $plugins .= ',wvn'; + if (in_array('wvl', $existing_plugins)) + $plugins .= ',wvl'; + if (in_array('wvns', $existing_plugins)) + $plugins .= ',wvns'; + $plugins = trim($plugins, ','); $update_result = ttTeamHelper::update($user->team_id, array( From 83ede0d76ad8cc93c9228cab73662899b2584321 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 18:32:53 +0000 Subject: [PATCH 0414/2515] Some refactoring in translation files. --- WEB-INF/resources/ca.lang.php | 8 ++++---- WEB-INF/resources/cs.lang.php | 12 ++++++++++++ WEB-INF/resources/et.lang.php | 12 ++++++++++++ WEB-INF/resources/hu.lang.php | 12 ++++++++++++ WEB-INF/resources/ja.lang.php | 14 ++++++++++++-- WEB-INF/resources/ko.lang.php | 14 ++++++++++++-- WEB-INF/resources/no.lang.php | 14 ++++++++++++-- WEB-INF/resources/pt.lang.php | 13 ++++++++++++- WEB-INF/resources/ro.lang.php | 17 ++++++++++++++--- WEB-INF/resources/sl.lang.php | 12 ++++++++++++ WEB-INF/resources/tr.lang.php | 16 +++++++++++++--- WEB-INF/resources/zh-cn.lang.php | 16 +++++++++++++--- WEB-INF/resources/zh-tw.lang.php | 16 +++++++++++++--- WEB-INF/templates/footer.tpl | 2 +- 14 files changed, 154 insertions(+), 24 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 1c13561c8..31e8a8654 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -350,10 +350,6 @@ // TODO: translate the following. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", - - -// TODO: refactoring ongoing down from here. - // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Per restablir la paraula de pas, si us plau escrigui-la i faci clic en guardar.', @@ -365,6 +361,10 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', + + +// TODO: refactoring ongoing down from here. + // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). // TODO: translate the following. // 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 390c47b1f..c45027e08 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -360,6 +360,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2ee25c9a1..2327a84f5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -355,6 +355,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e2c39ba7c..aa42b58f0 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -354,6 +354,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 225e77019..94b4d6189 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -354,6 +354,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -398,7 +410,6 @@ "form.mytime.finish" => '終了', "form.mytime.duration" => '期間', "form.mytime.note" => 'ノート', -"form.mytime.behalf" => '日課', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', "form.mytime.th.project" => 'プロジェクト', @@ -560,7 +571,6 @@ "label.chart.title2" => 'ユーザーに対するプロジェクト', "label.chart.period" => '期間表示のチャート', -"label.pbehalf_info" => '%s %s %sを代表して', "label.req_fields" => '* 必須のフィールド', "label.sel_project" => 'プロジェクトの選択', "label.sel_activity" => '活動内容の選択', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index c7c740529..803ce3e57 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -356,6 +356,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -399,7 +411,6 @@ "form.mytime.finish" => '마감', "form.mytime.duration" => '기간', "form.mytime.note" => '표식', -"form.mytime.behalf" => '다음을 위한 하루일과', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', "form.mytime.th.project" => '프로젝트', @@ -555,7 +566,6 @@ "label.chart.title2" => '사용자별 프로젝트', "label.chart.period" => '기간에 따른 그래프', -"label.pbehalf_info" => '%s %s %s 을 대표하여', "label.req_fields" => '* 필수 필드', "label.sel_project" => '프로젝트 선택', "label.sel_activity" => '활동내용 선택', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 15c8eba3c..315c35a39 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -349,6 +349,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -396,7 +408,6 @@ "form.mytime.finish" => 'ferdig', "form.mytime.duration" => 'varighet', "form.mytime.note" => 'notat', -"form.mytime.behalf" => 'daglig arbeide for', "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', "form.mytime.th.project" => 'prosjekt', @@ -560,7 +571,6 @@ // "controls.default" => '--- default ---', // labels -"label.pbehalf_info" => '%s %s på vegne av %s', "label.req_fields" => '* obligatoriske felt', "label.sel_project" => 'velg prosjekt', "label.sel_activity" => 'velg aktivitet', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index b2af0a1b1..195706245 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -344,6 +344,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -444,7 +456,6 @@ "controls.sel_period" => '--- selecione o período de tempo ---', // labels -"label.pbehalf_info" => '%s %s on behalf of %s', "label.req_fields" => '* campos obrigatórios', "label.sel_tp" => 'selecione o período de tempo', "label.set_tp" => 'ou selecionar datas', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f153f9db8..54c5850bf 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -218,7 +218,8 @@ // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', // 'label.required_fields' => '* - required fields', -// 'label.on_behalf' => 'on behalf of', +'label.on_behalf' => 'in numele', +// TODO: translate the following. // 'label.role_manager' => '(manager)', // 'label.role_comanager' => '(co-manager)', // 'label.role_admin' => '(administrator)', @@ -354,6 +355,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -398,7 +411,6 @@ "form.mytime.finish" => 'sfarsit', "form.mytime.duration" => 'durata', "form.mytime.note" => 'nota', -"form.mytime.behalf" => 'activitatea zilnica pentru', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', "form.mytime.th.project" => 'proiect', @@ -534,7 +546,6 @@ "controls.sel_groupby" => '--- fara grupare ---', // labels -"label.pbehalf_info" => '%s %s in numele %s', "label.req_fields" => '* date obligatorii', "label.sel_project" => 'alege proiect', "label.sel_activity" => 'alege activitate', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 17d6749ed..b964bd847 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -344,6 +344,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a6e730844..eaf228bc4 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -221,7 +221,7 @@ // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', // 'label.required_fields' => '* - required fields', -// 'label.on_behalf' => 'on behalf of', +'label.on_behalf' => 'adına', 'label.role_manager' => '(yönetici)', 'label.role_comanager' => '(yardımcı yönetici)', 'label.role_admin' => '(sistem yönetici)', @@ -358,6 +358,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -404,7 +416,6 @@ "form.mytime.finish" => 'tamamla', "form.mytime.duration" => 'süre', "form.mytime.note" => 'not', -"form.mytime.behalf" => 'kişiye yönelik günlük çalışma', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', "form.mytime.th.project" => 'proje', @@ -591,7 +602,6 @@ // "label.chart.title2" => 'projects for user', "label.chart.period" => 'dönem için grafik', -"label.pbehalf_info" => '% % % adına', "label.today" => 'bugün', "label.req_fields" => '* zorunlu bilgi', "label.sel_project" => 'proje seç', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b5f6899e3..6a4dd5060 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -203,7 +203,7 @@ // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', // 'label.required_fields' => '* - required fields', -// 'label.on_behalf' => 'on behalf of', +'label.on_behalf' => '代表', 'label.role_manager' => '(经理)', 'label.role_comanager' => '(合作经理人)', 'label.role_admin' => '(管理员)', @@ -340,6 +340,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -396,7 +408,6 @@ "form.mytime.finish" => '结束', "form.mytime.duration" => '持续时间', "form.mytime.note" => '备注', -"form.mytime.behalf" => '每日工作,人员:', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', "form.mytime.th.project" => '项目', @@ -577,7 +588,6 @@ "label.chart.title2" => '项目用户', "label.chart.period" => '图表期限', -"label.pbehalf_info" => '%s %s 代表%s', "label.req_fields" => '* 必填栏目', "label.sel_project" => '选择项目', "label.sel_activity" => '选择活动', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0f53cba4c..ea024e201 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -211,7 +211,7 @@ // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', // 'label.required_fields' => '* - required fields', -// 'label.on_behalf' => 'on behalf of', +'label.on_behalf' => '代表', 'label.role_manager' => '(經理)', 'label.role_comanager' => '(合作經理人)', 'label.role_admin' => '(管理員)', @@ -348,6 +348,18 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. +// TODO: translate the following. +// 'form.change_password.tip' => 'Type new password and click on Save.', + +// Time form. See example at https://timetracker.anuko.com/time.php. +// TODO: translate the following. +// 'form.time.duration_format' => '(hh:mm or 0.0h)', +// 'form.time.billable' => 'Billable', +// 'form.time.uncompleted' => 'Uncompleted', +// 'form.time.remaining_quota' => 'Remaining quota', +// 'form.time.over_quota' => 'Over quota', + // TODO: refactoring ongoing down from here. @@ -395,7 +407,6 @@ "form.mytime.finish" => '結束', "form.mytime.duration" => '持續時間', "form.mytime.note" => '備註', -"form.mytime.behalf" => '每日工作,執行人員:', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', "form.mytime.th.project" => '項目', @@ -576,7 +587,6 @@ "label.chart.title2" => '項目用戶', "label.chart.period" => '圖表期限', -"label.pbehalf_info" => '%s %s 代表%s', "label.today" => '今天', "label.req_fields" => '* 必填欄目', "label.sel_project" => '選擇項目', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5a86537a9..a9c88cf70 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3873 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3874 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 93b6bab58db7c4160f256a83dd27372e3d2bd1a8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 18:55:50 +0000 Subject: [PATCH 0415/2515] Added a comment for config.php.dist to clarify secure ldap connection. --- WEB-INF/config.php.dist | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 00469da58..fed4eea59 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -205,7 +205,7 @@ define('AUTH_MODULE', 'db'); // Configuration example for OpenLDAP server: // define('AUTH_MODULE', 'ldap'); // $GLOBALS['AUTH_MODULE_PARAMS'] = array( -// 'server' => '127.0.0.1', // OpenLDAP server address or name. +// 'server' => '127.0.0.1', // OpenLDAP server address or name. For secure LDAP use ldaps://hostname:port here. // 'type' => 'openldap', // Type of server. openldap type should also work with Sun Directory Server when member_of is empty. // It may work with other (non Windows AD) LDAP servers. For Windows AD use the 'ad' type. // 'base_dn' => 'ou=People,dc=example,dc=com', // Base distinguished name in LDAP catalog. @@ -216,7 +216,7 @@ define('AUTH_MODULE', 'db'); // Configuration example for Windows domains with Active Directory: // define('AUTH_MODULE', 'ldap'); // $GLOBALS['AUTH_MODULE_PARAMS'] = array( -// 'server' => '127.0.0.1', // Domain controller IP address or name. +// 'server' => '127.0.0.1', // Domain controller IP address or name. For secure LDAP use ldaps://hostname:port here. // 'type' => 'ad', // Type of server. // 'base_dn' => 'DC=example,DC=com', // Base distinguished name in LDAP catalog. // 'default_domain' => 'example.com', // Default domain. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a9c88cf70..5602954b1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3874 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3875 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0d2b6d0ff50696d05d15a02754ba9fd4292305b5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 19:22:02 +0000 Subject: [PATCH 0416/2515] Cosmetic cleanup. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 31e8a8654..b78521343 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -418,7 +418,6 @@ "form.mytime.finish" => 'Fi', "form.mytime.duration" => 'Durada', "form.mytime.note" => 'Nota', -"form.mytime.behalf" => 'Treball del dia per a', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', "form.mytime.th.project" => 'Projecte', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index c45027e08..69be8b46e 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -414,7 +414,6 @@ "form.mytime.finish" => 'konec', "form.mytime.duration" => 'trvání', "form.mytime.note" => 'poznámka', -"form.mytime.behalf" => 'denní práce pracovníka', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', "form.mytime.th.project" => 'projekt', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2327a84f5..7e50a506a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -415,7 +415,6 @@ "form.mytime.finish" => 'lõpp', "form.mytime.duration" => 'kestus', "form.mytime.note" => 'märkus', -// Note to translators: "form.mytime.behalf" => 'igapäevane töö', // the translation is incorrect "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', "form.mytime.th.project" => 'projekt', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5602954b1..45bcf24ae 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3875 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3876 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0dc212b76906e38b3da317721028f9268cc845b3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 21:49:07 +0000 Subject: [PATCH 0417/2515] A bit more refactoring. --- WEB-INF/resources/ca.lang.php | 9 +++++---- WEB-INF/resources/cs.lang.php | 8 ++++++++ WEB-INF/resources/et.lang.php | 8 ++++++++ WEB-INF/resources/hu.lang.php | 8 ++++++++ WEB-INF/resources/ja.lang.php | 8 ++++++++ WEB-INF/resources/ko.lang.php | 7 +++++++ WEB-INF/resources/no.lang.php | 8 ++++++++ WEB-INF/resources/pt.lang.php | 8 ++++++++ WEB-INF/resources/ro.lang.php | 8 ++++++++ WEB-INF/resources/sl.lang.php | 8 ++++++++ WEB-INF/resources/tr.lang.php | 8 ++++++++ WEB-INF/resources/zh-cn.lang.php | 8 ++++++++ WEB-INF/resources/zh-tw.lang.php | 8 ++++++++ WEB-INF/templates/footer.tpl | 2 +- 14 files changed, 101 insertions(+), 5 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index b78521343..da525974f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -361,17 +361,18 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', - - -// TODO: refactoring ongoing down from here. - // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). // TODO: translate the following. // 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', // Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. // 'form.week.new_entry' => 'New entry', + + +// TODO: refactoring ongoing down from here. + // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar com a favorit', // TODO: translate the following. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 69be8b46e..075a347d3 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -372,6 +372,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7e50a506a..b3b97ea76 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -367,6 +367,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index aa42b58f0..5d4458b48 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -366,6 +366,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 94b4d6189..f3f690b77 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -366,6 +366,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 803ce3e57..4f9ed42f4 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -368,6 +368,13 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 315c35a39..0d7dd25af 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -361,6 +361,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 195706245..f17db7998 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -356,6 +356,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 54c5850bf..35a571c20 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -367,6 +367,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index b964bd847..47bfdf127 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -356,6 +356,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index eaf228bc4..51f869661 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -370,6 +370,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6a4dd5060..e7bc0475e 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -352,6 +352,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ea024e201..193899172 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -360,6 +360,14 @@ // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', +// Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). +// TODO: translate the following. +// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', + +// Week view form. See example at https://timetracker.anuko.com/week.php. +// TODO: translate the following. +// 'form.week.new_entry' => 'New entry', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 45bcf24ae..2fce3d921 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3876 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3877 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 4a485b6eff6708b9e326bc7549429d4b1cfc3e9e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 22:02:01 +0000 Subject: [PATCH 0418/2515] More refactoring. --- WEB-INF/resources/ca.lang.php | 8 +++----- WEB-INF/resources/cs.lang.php | 19 +++++++++++++++++++ WEB-INF/resources/et.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/ja.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/ko.lang.php | 21 +++++++++++++++++++++ WEB-INF/resources/no.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/pt.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/ro.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/sl.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/tr.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/zh-cn.lang.php | 20 ++++++++++++++++++++ WEB-INF/resources/zh-tw.lang.php | 20 ++++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 15 files changed, 245 insertions(+), 7 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index da525974f..4cc26ee4f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -369,10 +369,6 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', - - -// TODO: refactoring ongoing down from here. - // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar com a favorit', // TODO: translate the following. @@ -395,7 +391,9 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', -// TODO: the entire section from here to bottom needs refactoring. + + +// TODO: refactoring ongoing down from here. // administrator form "form.admin.duty_text" => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker.(No està permès col·lisions de e-mail).', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 075a347d3..898fad413 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -380,6 +380,25 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b3b97ea76..9fa124479 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -375,6 +375,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index b70c0f938..749e8c751 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -384,7 +384,7 @@ 'form.reports.group_by_task' => 'وظیفه', // TODO: translate form.reports.totals_only. Selecting this option means to print subtotals only for a "grouped by" report. // In other words, items are not printed, only subtotals for grouped items are printed. -'form.reports.totals_only' => 'Totals only', +// 'form.reports.totals_only' => 'Totals only', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 5d4458b48..b2ec01a0b 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -374,6 +374,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index f3f690b77..6e9f2f3ca 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -374,6 +374,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 4f9ed42f4..78b70f8e7 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -376,6 +376,27 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 0d7dd25af..cb2020864 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -369,6 +369,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index f17db7998..077487252 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -364,6 +364,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 35a571c20..b31e552a7 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -375,6 +375,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 47bfdf127..292c2e543 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -364,6 +364,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 51f869661..9994e8777 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -378,6 +378,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index e7bc0475e..29bbb50aa 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -360,6 +360,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 193899172..9da275156 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -368,6 +368,26 @@ // TODO: translate the following. // 'form.week.new_entry' => 'New entry', +// Reports form. See example at https://timetracker.anuko.com/reports.php +// TODO: translate the following. +// 'form.reports.save_as_favorite' => 'Save as favorite', +// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +// 'form.reports.include_billable' => 'billable', +// 'form.reports.include_not_billable' => 'not billable', +// 'form.reports.include_invoiced' => 'invoiced', +// 'form.reports.include_not_invoiced' => 'not invoiced', +// 'form.reports.select_period' => 'Select time period', +// 'form.reports.set_period' => 'or set dates', +// 'form.reports.show_fields' => 'Show fields', +// 'form.reports.group_by' => 'Group by', +// 'form.reports.group_by_no' => '--- no grouping ---', +// 'form.reports.group_by_date' => 'date', +// 'form.reports.group_by_user' => 'user', +// 'form.reports.group_by_client' => 'client', +// 'form.reports.group_by_project' => 'project', +// 'form.reports.group_by_task' => 'task', +// 'form.reports.totals_only' => 'Totals only', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2fce3d921..22bc1f46f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3877 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3878 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3e589ad628d6ccb685e769e4d740c7065c9381ae Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 22:12:21 +0000 Subject: [PATCH 0419/2515] Recycled a few old translation strings. --- WEB-INF/resources/cs.lang.php | 5 ++--- WEB-INF/resources/et.lang.php | 2 -- WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 4 ++-- WEB-INF/resources/ko.lang.php | 4 ++-- WEB-INF/resources/no.lang.php | 4 ++-- WEB-INF/resources/zh-cn.lang.php | 4 ++-- WEB-INF/resources/zh-tw.lang.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 13 insertions(+), 18 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 898fad413..7aa4800f9 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -383,7 +383,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => 'Opravdu chceš vymazat tuto položku z oblíbených?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -403,8 +404,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.filter_confirm_delete" => 'opravdu chceš vymazat tuto položku z oblíbených?', - // password reminder form attributes "form.fpass.title" => 'resetovat heslo', "form.fpass.login" => 'přihlásit', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9fa124479..dbd9043b5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -402,8 +402,6 @@ "form.filter.project" => 'projekt', "form.filter.filter" => 'lemmikraport', "form.filter.filter_new" => 'salvesta lemmikuna', -// Note to translators: the string below is missing and must be added to the translation -// "form.filter.filter_confirm_delete" => 'are you sure you want to delete this favorite report?', // password reminder form attributes "form.fpass.title" => 'tühjenda salasõna', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b2ec01a0b..d7a98e086 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -401,8 +401,6 @@ "form.filter.project" => 'projekt', "form.filter.filter" => 'előre definiált riport formátum', "form.filter.filter_new" => 'mentsük el ezt a riport formátumot', -// Note to translators: the string below is missing and must be added and translated -// "form.filter.filter_confirm_delete" => 'are you sure you want to delete this favorite report?', // password reminder form attributes "form.fpass.send_pass_str" => 'jelszó alap állapotra állítása megkezdve', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6e9f2f3ca..064065d6c 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -377,7 +377,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => 'このお気に入りレポートを削除しますか?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -401,7 +402,6 @@ "form.filter.project" => 'プロジェクト', "form.filter.filter" => 'お気に入りレポート', "form.filter.filter_new" => 'お気に入りに保存', -"form.filter.filter_confirm_delete" => 'このお気に入りレポートを削除しますか?', // password reminder form attributes "form.fpass.login" => 'ログイン', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 78b70f8e7..a7753f297 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -379,7 +379,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => '좋아하는 이 보고서를 삭제해도 좋습니까?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -403,7 +404,6 @@ "form.filter.project" => '프로젝트', "form.filter.filter" => '좋아하는 보고서', "form.filter.filter_new" => '좋아하는 것으로 저장', -"form.filter.filter_confirm_delete" => '좋아하는 이 보고서를 삭제해도 좋습니까?', // password reminder form attributes "form.fpass.login" => '로그인', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index cb2020864..e0d8afeb8 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -372,7 +372,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => 'Er du sikker på at du vil slette denne favorittrapporten?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -398,7 +399,6 @@ // "form.filter.project" => 'prosjekt', // "form.filter.filter" => 'favorittrapport', // "form.filter.filter_new" => 'lagre som favoritt', -// "form.filter.filter_confirm_delete" => 'er du sikker på at du vil slette denne favorittrapporten?', // password reminder form attributes "form.fpass.login" => 'innlogging', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 29bbb50aa..b53089a3a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -363,7 +363,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => '您确认要删除收藏的这个报告吗?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -391,7 +392,6 @@ "form.filter.project" => '项目', "form.filter.filter" => '收藏的报告', "form.filter.filter_new" => '保存到我的收藏夹', -"form.filter.filter_confirm_delete" => '您确认要删除收藏的这个报告吗?', // login form attributes "form.login.title" => '登录', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 9da275156..acb240952 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -371,7 +371,8 @@ // Reports form. See example at https://timetracker.anuko.com/reports.php // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', -// 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', +'form.reports.confirm_delete' => '您確認要刪除收藏的這個報告嗎?', +// TODO: translate the following. // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', @@ -395,7 +396,6 @@ "form.filter.project" => '項目', "form.filter.filter" => '收藏的報告', "form.filter.filter_new" => '保存到我的存檔', -"form.filter.filter_confirm_delete" => '您確認要刪除收藏的這個報告嗎?', // password reminder form attributes "form.fpass.login" => '登錄', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 22bc1f46f..c23561f41 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3878 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3879 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a9a8fdcc7552086444fd96738287e794972dbcca Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 22:37:54 +0000 Subject: [PATCH 0420/2515] Recycled some old translation strings. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 21 ++++++++++----------- WEB-INF/resources/hu.lang.php | 11 ----------- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 11 insertions(+), 32 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 4cc26ee4f..4510e407a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -571,6 +571,5 @@ "label.or" => 'o', "label.disable" => 'Deshabilitar', "label.enable" => 'Habilitar', -"label.filter" => 'Filtrar', "label.timeweek" => 'total setmanal', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7aa4800f9..882c08830 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -603,7 +603,6 @@ "label.or" => 'nebo', "label.disable" => 'zakázat', "label.enable" => 'povolit', -"label.filter" => 'filtr', "label.timeweek" => 'celkem za týden', "label.hrs" => 'hodin', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index dbd9043b5..63b388fd5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -170,8 +170,8 @@ // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => 'Projekt', +'label.projects' => 'Projektid', // TODO: translate the following. -// 'label.projects' => 'Projects', // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -233,7 +233,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'Lemmikraport', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -271,7 +272,8 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', +'title.projects' => 'Projektid', +// TODO: translate the following. // 'title.add_project' => 'Adding Project', // 'title.edit_project' => 'Editing Project', // 'title.delete_project' => 'Deleting Project', @@ -332,7 +334,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projektid', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -376,8 +379,8 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php +'form.reports.save_as_favorite' => 'Salvesta lemmikuna', // TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', @@ -391,7 +394,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'projekt', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -399,10 +403,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'projekt', -"form.filter.filter" => 'lemmikraport', -"form.filter.filter_new" => 'salvesta lemmikuna', - // password reminder form attributes "form.fpass.title" => 'tühjenda salasõna', "form.fpass.login" => 'login', @@ -615,6 +615,5 @@ "label.or" => 'või', "label.disable" => 'keela', "label.enable" => 'luba', -"label.filter" => 'filtreeri', "label.timeweek" => 'nädalane summa', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index d7a98e086..5b7ff8d4e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -579,15 +579,4 @@ "label.or" => 'vagy', "label.disable" => 'tiltva', "label.enable" => 'engedélyezve', -"label.filter" => 'szűrés', -// Note to translators: the strings below are missing and must be added and translated -//"label.timeweek" => 'weekly total', -// "label.hrs" => 'hrs', -// "label.errors" => 'errors', -// "label.ldap_hint" => 'Type your Windows login and password in the fields below.', -// "label.calendar_today" => 'today', -// "label.calendar_close" => 'close', - -// login hello text -// "login.hello.text" => "Anuko Time Tracker is a simple, easy to use, open source time tracking system.", ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 064065d6c..921de273e 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -614,7 +614,6 @@ "label.or" => 'あるいは', "label.disable" => '使用中止', "label.enable" => '使用可能', -"label.filter" => 'フィルター', "label.timeweek" => '週合計', "label.hrs" => '時間', "label.errors" => 'エラー', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a7753f297..01da8c1d0 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -609,7 +609,6 @@ "label.or" => '혹은', "label.disable" => '무력화', "label.enable" => '가능화', -"label.filter" => '필터', "label.timeweek" => '주별 합계', "label.hrs" => '시간', "label.errors" => '오류', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index e0d8afeb8..f48bc0ddf 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -616,7 +616,6 @@ // "label.or" => 'or', // "label.disable" => 'slå av', // "label.enable" => 'slå på', -// "label.filter" => 'filter', // "label.timeweek" => 'uken totalt', // "label.hrs" => 'timer', // "label.errors" => 'feil', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b31e552a7..469ff52bb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -590,5 +590,4 @@ "label.or" => 'sau', "label.disable" => 'inactiv', "label.enable" => 'activ', -"label.filter" => 'filtru', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9994e8777..97c754558 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -646,6 +646,5 @@ "label.or" => 'ya da', "label.disable" => 'devre dışı bırak', "label.enable" => 'devreye sok', -"label.filter" => 'filtre', "label.timeweek" => 'haftalık toplam', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b53089a3a..73f4b7090 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -631,7 +631,6 @@ "label.or" => '或', "label.disable" => '禁用', "label.enable" => '启用', -"label.filter" => '过滤器', "label.timeweek" => '一周总计', "label.hrs" => '小时', "label.errors" => '错误', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index acb240952..5c53632f3 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -631,7 +631,6 @@ "label.or" => '或', "label.disable" => '禁用', "label.enable" => '啟用', -"label.filter" => '篩檢程式', "label.timeweek" => '一周總計', "label.hrs" => '小時', "label.errors" => '錯誤', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c23561f41..7d8c2a711 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3879 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3880 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7d955163ec01fc748d8618224ff777b1b7866593 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 23:34:28 +0000 Subject: [PATCH 0421/2515] Some cleanup and recycling. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/hu.lang.php | 21 ++++++++++----------- WEB-INF/resources/ja.lang.php | 25 ++++++++++++------------- WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 23 insertions(+), 32 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 4510e407a..216545626 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -412,7 +412,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'Data', "form.mytime.project" => 'Projecte', -"form.mytime.activity" => 'Activitat', "form.mytime.start" => 'Inici', "form.mytime.finish" => 'Fi', "form.mytime.duration" => 'Durada', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 882c08830..560bfbeb9 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -435,7 +435,6 @@ // Note to translators: "form.mytime.time_form" => ' (hh:mm)', // the string must be translated "form.mytime.date" => 'datum', "form.mytime.project" => 'projekt', -"form.mytime.activity" => 'činnost', "form.mytime.start" => 'začátek', "form.mytime.finish" => 'konec', "form.mytime.duration" => 'trvání', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 63b388fd5..5889aa99c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -436,7 +436,6 @@ // "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'kuupäev', "form.mytime.project" => 'projekt', -"form.mytime.activity" => 'tegevus', "form.mytime.start" => 'algus', "form.mytime.finish" => 'lõpp', "form.mytime.duration" => 'kestus', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 5b7ff8d4e..e3936e9b9 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -171,8 +171,8 @@ // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => 'Projekt', +'label.projects' => 'Projektek', // TODO: translate the following. -// 'label.projects' => 'Projects', // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -234,7 +234,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'Előre definiált riport formátum', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -271,7 +272,8 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', +'title.projects' => 'Projektek', +// TODO: translate the following. // 'title.add_project' => 'Adding Project', // 'title.edit_project' => 'Editing Project', // 'title.delete_project' => 'Deleting Project', @@ -331,7 +333,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projektek', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -375,8 +378,8 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php +'form.reports.save_as_favorite' => 'Mentsük el ezt a riport formátumot', // TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', @@ -390,7 +393,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'projekt', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -398,10 +402,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'projekt', -"form.filter.filter" => 'előre definiált riport formátum', -"form.filter.filter_new" => 'mentsük el ezt a riport formátumot', - // password reminder form attributes "form.fpass.send_pass_str" => 'jelszó alap állapotra állítása megkezdve', "form.fpass.send_pass_subj" => 'A jelszó alap állapotra állítása a Anuko TimeTracker-ben', @@ -426,7 +426,6 @@ "form.mytime.time_form" => ' (óó:pp)', "form.mytime.date" => 'dátum', "form.mytime.project" => 'projekt', -"form.mytime.activity" => 'tevékenység', "form.mytime.start" => 'kezdete', "form.mytime.finish" => 'vége', "form.mytime.duration" => 'hossz', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 921de273e..51c1d33fb 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -169,8 +169,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'プロジェクト', +'label.projects' => 'プロジェクト', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -234,7 +235,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'お気に入りレポート', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -271,7 +273,8 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', +'title.projects' => 'プロジェクト', +// TODO: translate the following. // 'title.add_project' => 'Adding Project', // 'title.edit_project' => 'Editing Project', // 'title.delete_project' => 'Deleting Project', @@ -331,7 +334,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'プロジェクト', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -375,8 +379,7 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', +'form.reports.save_as_favorite' => 'お気に入りに保存', 'form.reports.confirm_delete' => 'このお気に入りレポートを削除しますか?', // TODO: translate the following. // 'form.reports.include_billable' => 'billable', @@ -391,7 +394,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'プロジェクト', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -399,10 +403,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'プロジェクト', -"form.filter.filter" => 'お気に入りレポート', -"form.filter.filter_new" => 'お気に入りに保存', - // password reminder form attributes "form.fpass.login" => 'ログイン', "form.fpass.send_pass_str" => '送信したパスワードの初期化の要求', @@ -433,7 +433,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => '日付', "form.mytime.project" => 'プロジェクト', -"form.mytime.activity" => '活動内容', "form.mytime.start" => '開始', "form.mytime.finish" => '終了', "form.mytime.duration" => '期間', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 469ff52bb..3dda8f32d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -434,7 +434,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'data', "form.mytime.project" => 'proiect', -"form.mytime.activity" => 'activitate', "form.mytime.start" => 'inceput', "form.mytime.finish" => 'sfarsit', "form.mytime.duration" => 'durata', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 97c754558..6c146d291 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -439,7 +439,6 @@ "form.mytime.time_form" => ' (ss:dd)', "form.mytime.date" => 'tarih', "form.mytime.project" => 'proje', -"form.mytime.activity" => 'faaliyet', "form.mytime.start" => 'başlat', "form.mytime.finish" => 'tamamla', "form.mytime.duration" => 'süre', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 73f4b7090..a0b9cd999 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -431,7 +431,6 @@ "form.mytime.time_form" => ' (时:分)', "form.mytime.date" => '日期', "form.mytime.project" => '项目', -"form.mytime.activity" => '活动', "form.mytime.start" => '开始', "form.mytime.finish" => '结束', "form.mytime.duration" => '持续时间', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 5c53632f3..cc92672f8 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -430,7 +430,6 @@ "form.mytime.time_form" => ' (時:分)', "form.mytime.date" => '日期', "form.mytime.project" => '項目', -"form.mytime.activity" => '活動', "form.mytime.start" => '開始', "form.mytime.finish" => '結束', "form.mytime.duration" => '持續時間', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7d8c2a711..5750a92d2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3880 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3881 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 23c3793cd381969c72f361ed7d93aea054b0b461 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 14:56:40 +0000 Subject: [PATCH 0422/2515] A bit of cleanup. --- WEB-INF/resources/ca.lang.php | 4 +--- WEB-INF/resources/cs.lang.php | 6 ++---- WEB-INF/resources/et.lang.php | 6 ++---- WEB-INF/resources/hu.lang.php | 7 +------ WEB-INF/resources/ja.lang.php | 4 +--- WEB-INF/resources/ko.lang.php | 4 +--- WEB-INF/resources/no.lang.php | 4 +--- WEB-INF/resources/pt.lang.php | 4 ++-- WEB-INF/resources/ro.lang.php | 4 +--- WEB-INF/resources/tr.lang.php | 5 +---- WEB-INF/resources/zh-cn.lang.php | 4 +--- WEB-INF/resources/zh-tw.lang.php | 5 +---- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 16 insertions(+), 43 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 216545626..e846f0a39 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -210,7 +210,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* camps requerits', 'label.on_behalf' => 'a nom de', 'label.role_manager' => '(manejador)', 'label.role_comanager' => '(auxiliar del manejador)', @@ -556,8 +556,6 @@ // labels "label.chart.period" => 'gràfica por període', -"label.req_fields" => '* camps requerits', -"label.sel_project" => 'Seleccionar projecte', "label.sel_tp" => 'Seleccionar període de temps', "label.set_tp" => 'o establir dates', "label.fields" => 'Mostrar camps', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 560bfbeb9..266899543 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -218,7 +218,8 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* nutno vyplnit', +// TODO: translate the following. // 'label.on_behalf' => 'on behalf of', 'label.role_manager' => '(manažer)', 'label.role_comanager' => '(co-manažer)', @@ -587,9 +588,6 @@ "label.chart.title2" => 'projekty uživatele', "label.chart.period" => 'přehled za období', -"label.req_fields" => '* nutno vyplnit', -"label.sel_project" => 'výběr projektu', -"label.sel_activity" => 'výběr činnosti', "label.sel_tp" => 'výberte období', "label.set_tp" => 'nebo určete dny', "label.fields" => 'zobrazit pole', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 5889aa99c..25b9e8daa 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -215,7 +215,8 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* nõutud väljad', +// TODO: translate the following. // 'label.on_behalf' => 'on behalf of', 'label.role_manager' => '(haldur)', 'label.role_comanager' => '(kaashaldur)', @@ -599,9 +600,6 @@ // "label.chart.title2" => 'projects for user', "label.chart.period" => 'tabel perioodiks', -"label.req_fields" => '* nõutud väljad', -"label.sel_project" => 'vali projekt', -"label.sel_activity" => 'vali tegevus', "label.sel_tp" => 'vali ajaperiood', "label.set_tp" => 'või märgi kuupäevad', "label.fields" => 'näita välju', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e3936e9b9..553ff3177 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -216,7 +216,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* kötelezően kitöltendő mezők', 'label.on_behalf' => 'helyett', 'label.role_manager' => '(vezető)', 'label.role_comanager' => '(helyettes)', @@ -562,15 +562,10 @@ "controls.sel_groupby" => '--- csoportosítás nélkül ---', // labels -"label.req_fields" => '* kötelezően kitöltendő mezők', -"label.sel_project" => 'válassz projektet', -"label.sel_activity" => 'válassz tevékenységet', "label.sel_tp" => 'jelölj meg egy időszakot', "label.set_tp" => '... vagy állíts be konkrét dátumot', "label.fields" => 'csak a kijelölt mezők fognak szerepelni a riportban', "label.group_title" => 'csoportosítva', -// Note to translators: the string below is missing and must be added and translated -// "label.include_title" => 'include records', "label.inv_str" => 'számla', "label.set_empl" => 'válassz dolgozót', "label.sel_all" => 'mindenkit kijelöl', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 51c1d33fb..530bf5a8c 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -215,7 +215,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* 必須のフィールド', 'label.on_behalf' => 'を代表して', // TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm // This may require different terms for role_manager and role_comanager. @@ -598,9 +598,7 @@ "label.chart.title2" => 'ユーザーに対するプロジェクト', "label.chart.period" => '期間表示のチャート', -"label.req_fields" => '* 必須のフィールド', "label.sel_project" => 'プロジェクトの選択', -"label.sel_activity" => '活動内容の選択', "label.sel_tp" => '時間期間の選択', "label.set_tp" => 'あるいは日付を設定', "label.fields" => 'フィールドの表示', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 01da8c1d0..245e4d66c 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -215,7 +215,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* 필수 필드', 'label.on_behalf' => '을 대표하여', // TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm // This may require different terms for role_manager and role_comanager. @@ -594,9 +594,7 @@ "label.chart.title2" => '사용자별 프로젝트', "label.chart.period" => '기간에 따른 그래프', -"label.req_fields" => '* 필수 필드', "label.sel_project" => '프로젝트 선택', -"label.sel_activity" => '활동내용 선택', "label.sel_tp" => '시간 기간을 선택', "label.set_tp" => '혹은 날짜를 설정', "label.fields" => '필드들을 보기', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index f48bc0ddf..207a47702 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -212,7 +212,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* obligatoriske felt', 'label.on_behalf' => 'på vegne av', // TODO: translate the following. // 'label.role_manager' => '(manager)', @@ -599,9 +599,7 @@ // "controls.default" => '--- default ---', // labels -"label.req_fields" => '* obligatoriske felt', "label.sel_project" => 'velg prosjekt', -"label.sel_activity" => 'velg aktivitet', "label.sel_tp" => 'velg tidsperiode', "label.set_tp" => 'eller sett dato', "label.fields" => 'vis feltene', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 077487252..585313f0f 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -206,7 +206,8 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* campos obrigatórios', +// TODO: translate the following. // 'label.on_behalf' => 'on behalf of', 'label.role_manager' => '(gerente)', // TODO: translate the following. @@ -484,7 +485,6 @@ "controls.sel_period" => '--- selecione o período de tempo ---', // labels -"label.req_fields" => '* campos obrigatórios', "label.sel_tp" => 'selecione o período de tempo', "label.set_tp" => 'ou selecionar datas', "label.fields" => 'exibir campos', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 3dda8f32d..931d9e288 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -217,7 +217,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* date obligatorii', 'label.on_behalf' => 'in numele', // TODO: translate the following. // 'label.role_manager' => '(manager)', @@ -573,9 +573,7 @@ "controls.sel_groupby" => '--- fara grupare ---', // labels -"label.req_fields" => '* date obligatorii', "label.sel_project" => 'alege proiect', -"label.sel_activity" => 'alege activitate', "label.sel_tp" => 'alege perioada', "label.set_tp" => 'sau introdu intervalul de date', "label.fields" => 'arata campuri', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 6c146d291..311754824 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -220,7 +220,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* zorunlu bilgi', 'label.on_behalf' => 'adına', 'label.role_manager' => '(yönetici)', 'label.role_comanager' => '(yardımcı yönetici)', @@ -629,10 +629,7 @@ // "label.chart.title2" => 'projects for user', "label.chart.period" => 'dönem için grafik', -"label.today" => 'bugün', -"label.req_fields" => '* zorunlu bilgi', "label.sel_project" => 'proje seç', -"label.sel_activity" => 'faaliyet seç', "label.sel_tp" => 'zaman aralığını seç', "label.set_tp" => 'ya da tarihleri belirle', "label.fields" => 'alanları göster', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a0b9cd999..20a65ad36 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -202,7 +202,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* 必填栏目', 'label.on_behalf' => '代表', 'label.role_manager' => '(经理)', 'label.role_comanager' => '(合作经理人)', @@ -615,9 +615,7 @@ "label.chart.title2" => '项目用户', "label.chart.period" => '图表期限', -"label.req_fields" => '* 必填栏目', "label.sel_project" => '选择项目', -"label.sel_activity" => '选择活动', "label.sel_tp" => '选择时间段', "label.set_tp" => '或设定日期', "label.fields" => '显示栏目', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index cc92672f8..ee805928b 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -210,7 +210,7 @@ // 'label.or' => 'or', // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', -// 'label.required_fields' => '* - required fields', +'label.required_fields' => '* 必填欄目', 'label.on_behalf' => '代表', 'label.role_manager' => '(經理)', 'label.role_comanager' => '(合作經理人)', @@ -614,10 +614,7 @@ "label.chart.title2" => '項目用戶', "label.chart.period" => '圖表期限', -"label.today" => '今天', -"label.req_fields" => '* 必填欄目', "label.sel_project" => '選擇項目', -"label.sel_activity" => '選擇活動', "label.sel_tp" => '選擇時間段', "label.set_tp" => '或設定日期', "label.fields" => '顯示欄目', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5750a92d2..4a6c2bcfc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3881 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3882 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b93e1f345f38296eaf777d0d56d15bba188a2210 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 15:28:56 +0000 Subject: [PATCH 0423/2515] Recycled some translation strings. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 4 ++-- WEB-INF/resources/et.lang.php | 4 ++-- WEB-INF/resources/ja.lang.php | 5 ++--- WEB-INF/resources/ko.lang.php | 5 ++--- WEB-INF/resources/no.lang.php | 9 +++------ WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 5 ++--- WEB-INF/resources/zh-cn.lang.php | 13 +++++-------- WEB-INF/resources/zh-tw.lang.php | 8 ++++---- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 23 insertions(+), 34 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e846f0a39..3bd8b5d68 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -568,5 +568,4 @@ "label.or" => 'o', "label.disable" => 'Deshabilitar', "label.enable" => 'Habilitar', -"label.timeweek" => 'total setmanal', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 266899543..84456dbcc 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -185,7 +185,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => 'Celkem za týden', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Dnes', // TODO: translate the following. @@ -600,6 +601,5 @@ "label.or" => 'nebo', "label.disable" => 'zakázat', "label.enable" => 'povolit', -"label.timeweek" => 'celkem za týden', "label.hrs" => 'hodin', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 25b9e8daa..51f9204d4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -183,7 +183,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => 'Nädalane summa', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Täna', // TODO: translate the following. @@ -612,5 +613,4 @@ "label.or" => 'või', "label.disable" => 'keela', "label.enable" => 'luba', -"label.timeweek" => 'nädalane summa', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 530bf5a8c..f2bc29f8f 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -183,7 +183,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => '週合計', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => '今日', // TODO: translate the following. @@ -598,7 +599,6 @@ "label.chart.title2" => 'ユーザーに対するプロジェクト', "label.chart.period" => '期間表示のチャート', -"label.sel_project" => 'プロジェクトの選択', "label.sel_tp" => '時間期間の選択', "label.set_tp" => 'あるいは日付を設定', "label.fields" => 'フィールドの表示', @@ -611,7 +611,6 @@ "label.or" => 'あるいは', "label.disable" => '使用中止', "label.enable" => '使用可能', -"label.timeweek" => '週合計', "label.hrs" => '時間', "label.errors" => 'エラー', "label.ldap_hint" => '下記のフィールドにあなたのWindowsのログインIDパスワードを入力してください。', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 245e4d66c..41c8bc3ca 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -182,7 +182,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => '주별 합계', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => '오늘', // TODO: translate the following. @@ -594,7 +595,6 @@ "label.chart.title2" => '사용자별 프로젝트', "label.chart.period" => '기간에 따른 그래프', -"label.sel_project" => '프로젝트 선택', "label.sel_tp" => '시간 기간을 선택', "label.set_tp" => '혹은 날짜를 설정', "label.fields" => '필드들을 보기', @@ -607,7 +607,6 @@ "label.or" => '혹은', "label.disable" => '무력화', "label.enable" => '가능화', -"label.timeweek" => '주별 합계', "label.hrs" => '시간', "label.errors" => '오류', "label.ldap_hint" => '아래의 필드들에서 Windows 로그인암호 를 입력하십시오.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 207a47702..46895c992 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -135,8 +135,8 @@ 'button.create_team' => 'Opprett team', 'button.export' => 'Eksport team', 'button.import' => 'Importer team', +'button.close' => 'Lukk', // TODO: translate the following. -// 'button.close' => 'Close', // 'button.stop' => 'Stop', // Labels for controls on forms. Labels in this section are used on multiple forms. @@ -181,7 +181,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => 'Uken totalt', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'I dag', // TODO: translate the following. @@ -599,7 +600,6 @@ // "controls.default" => '--- default ---', // labels -"label.sel_project" => 'velg prosjekt', "label.sel_tp" => 'velg tidsperiode', "label.set_tp" => 'eller sett dato', "label.fields" => 'vis feltene', @@ -614,12 +614,9 @@ // "label.or" => 'or', // "label.disable" => 'slå av', // "label.enable" => 'slå på', -// "label.timeweek" => 'uken totalt', // "label.hrs" => 'timer', // "label.errors" => 'feil', // "label.ldap_hint" => 'Skriv din Windows login og passord i feltene nedenfor.', -// "label.calendar_today" => 'i dag', -// "label.calendar_close" => 'lukk', // login hello text // "login.hello.text" => "Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.", diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 931d9e288..29bc409c2 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -573,7 +573,6 @@ "controls.sel_groupby" => '--- fara grupare ---', // labels -"label.sel_project" => 'alege proiect', "label.sel_tp" => 'alege perioada', "label.set_tp" => 'sau introdu intervalul de date', "label.fields" => 'arata campuri', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 311754824..b07ed80b6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -188,7 +188,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => 'Haftalık toplam', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Bugün', // TODO: translate the following. @@ -629,7 +630,6 @@ // "label.chart.title2" => 'projects for user', "label.chart.period" => 'dönem için grafik', -"label.sel_project" => 'proje seç', "label.sel_tp" => 'zaman aralığını seç', "label.set_tp" => 'ya da tarihleri belirle', "label.fields" => 'alanları göster', @@ -642,5 +642,4 @@ "label.or" => 'ya da', "label.disable" => 'devre dışı bırak', "label.enable" => 'devreye sok', -"label.timeweek" => 'haftalık toplam', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 20a65ad36..308e17a92 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -74,7 +74,8 @@ 'error.not_equal' => '栏目"{0}"不等于栏目"{1}"。', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -// 'error.project' => 'Select project.', +'error.project' => '选择项目。', +// TODO: translate the following. // 'error.task' => 'Select task.', // 'error.client' => 'Select client.', // 'error.report' => 'Select report.', @@ -125,8 +126,8 @@ // 'button.create_team' => 'Create team', 'button.export' => '导出团队信息', 'button.import' => '导入团队信息', +'button.close' => '关闭', // TODO: translate the following. -// 'button.close' => 'Close', // 'button.stop' => 'Stop', // Labels for controls on forms. Labels in this section are used on multiple forms. @@ -170,7 +171,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => '一周总计', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => '今天', // TODO: translate the following. @@ -615,7 +617,6 @@ "label.chart.title2" => '项目用户', "label.chart.period" => '图表期限', -"label.sel_project" => '选择项目', "label.sel_tp" => '选择时间段', "label.set_tp" => '或设定日期', "label.fields" => '显示栏目', @@ -628,13 +629,9 @@ "label.or" => '或', "label.disable" => '禁用', "label.enable" => '启用', -"label.timeweek" => '一周总计', "label.hrs" => '小时', "label.errors" => '错误', "label.ldap_hint" => '在下面的栏目输入您的Windows用户名密码。', -// Note to translators: strings below must be translated. - "label.calendar_today" => '今天', - "label.calendar_close" => '关闭', // login hello text "login.hello.text" => "anuko时间跟踪器是一种简单、易用、开放源代码的实时跟踪系统。", diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ee805928b..d73e3eb9a 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -81,7 +81,8 @@ 'error.not_equal' => '欄目"{0}"不等於欄目"{1}"', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -// 'error.project' => 'Select project.', +'error.project' => '選擇項目', +// TODO: translate the following. // 'error.task' => 'Select task.', // 'error.client' => 'Select client.', // 'error.report' => 'Select report.', @@ -178,7 +179,8 @@ // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', +'label.week_total' => '一周總計', +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => '今天', // TODO: translate the following. @@ -614,7 +616,6 @@ "label.chart.title2" => '項目用戶', "label.chart.period" => '圖表期限', -"label.sel_project" => '選擇項目', "label.sel_tp" => '選擇時間段', "label.set_tp" => '或設定日期', "label.fields" => '顯示欄目', @@ -627,7 +628,6 @@ "label.or" => '或', "label.disable" => '禁用', "label.enable" => '啟用', -"label.timeweek" => '一周總計', "label.hrs" => '小時', "label.errors" => '錯誤', "label.ldap_hint" => '在下麵的欄目輸入您的Windows用戶名密碼。', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4a6c2bcfc..4fa7f3441 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3882 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3883 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 5f99ff70f69cc9be6af7ef1061ee6c1bd46e319a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 15:55:19 +0000 Subject: [PATCH 0424/2515] More cleanup in Catalan file. --- WEB-INF/resources/ca.lang.php | 32 ++++++++++---------------------- WEB-INF/resources/ro.lang.php | 2 -- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3bd8b5d68..aa25dd96b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -356,7 +356,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => 'Facturable', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -373,15 +374,16 @@ 'form.reports.save_as_favorite' => 'Guardar com a favorit', // TODO: translate the following. // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', +'form.reports.include_billable' => 'facturable', +'form.reports.include_not_billable' => 'no facturable', +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.select_period' => 'Seleccionar període de temps', +'form.reports.set_period' => 'o establir dates', +'form.reports.show_fields' => 'Mostrar camps', +'form.reports.group_by' => 'Agrupar per', +'form.reports.group_by_no' => '--- no agrupar ---', 'form.reports.group_by_date' => 'data', // TODO: translate the following. // 'form.reports.group_by_user' => 'user', @@ -425,12 +427,6 @@ "form.mytime.th.note" => 'Nota', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', "form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', -"form.mytime.billable" => 'facturable', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'Crear un nou compte de manejador', -"form.profile.edit_title" => 'Modificant perfil', // people form attributes "form.people.ppl_str" => 'Persones', @@ -549,18 +545,10 @@ "controls.per_td" => 'Aquest dia', "controls.per_lw" => 'La setmana passada', "controls.sel_period" => '--- Seleccionar període de temps ---', -"controls.sel_groupby" => '--- No agrupar ---', -"controls.inc_billable" => 'facturable', -"controls.inc_nbillable" => 'no facturable', // labels "label.chart.period" => 'gràfica por període', -"label.sel_tp" => 'Seleccionar període de temps', -"label.set_tp" => 'o establir dates', -"label.fields" => 'Mostrar camps', -"label.group_title" => 'Agrupar per', -"label.include_title" => 'include records', "label.inv_str" => 'Factura', "label.set_empl" => 'Seleccionar usuaris', "label.sel_all" => 'Seleccionar tots', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 29bc409c2..61fdd9267 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -577,8 +577,6 @@ "label.set_tp" => 'sau introdu intervalul de date', "label.fields" => 'arata campuri', "label.group_title" => 'grupat dupa', -// Note to translators: the string below is missing and must be added and translated -// "label.include_title" => 'include records', "label.inv_str" => 'factura', "label.set_empl" => 'alege utilizatori', "label.sel_all" => 'selecteaza tot', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4fa7f3441..7c33f8e40 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3883 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3884 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 1b74bf5bac7eb20285f7020f14b26e56f33df6c8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 16:12:48 +0000 Subject: [PATCH 0425/2515] More cleanup in translation files. --- WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/no.lang.php | 4 +--- WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 13 ++++--------- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 11 insertions(+), 19 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 84456dbcc..33cbdf338 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -593,7 +593,6 @@ "label.set_tp" => 'nebo určete dny', "label.fields" => 'zobrazit pole', "label.group_title" => 'seskupit podle', -"label.include_title" => 'včetně záznamů', "label.inv_str" => 'faktura', "label.set_empl" => 'výběr uživatelů', "label.sel_all" => 'vybrat všechno', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 51f9204d4..387caf337 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -605,7 +605,7 @@ "label.set_tp" => 'või märgi kuupäevad', "label.fields" => 'näita välju', "label.group_title" => 'grupeeri', -"label.include_title" => 'kaasa kanded', + "label.inv_str" => 'arved', "label.set_empl" => 'vali kasutajad', "label.sel_all" => 'vali kõik', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index f2bc29f8f..8981d7251 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -603,7 +603,7 @@ "label.set_tp" => 'あるいは日付を設定', "label.fields" => 'フィールドの表示', "label.group_title" => '次のようにグループ化', -"label.include_title" => 'レコードの含み', + "label.inv_str" => '送り状', "label.set_empl" => 'ユーザーの選択', "label.sel_all" => 'すべて選択', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 41c8bc3ca..5b923a087 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -599,7 +599,7 @@ "label.set_tp" => '혹은 날짜를 설정', "label.fields" => '필드들을 보기', "label.group_title" => '다음것에 의한 그룹화', -"label.include_title" => '기록을 포함', + "label.inv_str" => '송장', "label.set_empl" => '사용자들을 선택', "label.sel_all" => '모두 선택', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 46895c992..382668599 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -604,9 +604,7 @@ "label.set_tp" => 'eller sett dato', "label.fields" => 'vis feltene', "label.group_title" => 'sorter på', -// Note to translators: the strings below must be translated -// "label.include_title" => 'ta med oppføringer', -// "label.inv_str" => 'faktura', +"label.inv_str" => 'faktura', "label.set_empl" => 'velg brukere', // Note to translators: the strings below are missing and must be translated and added // "label.sel_all" => 'velg alle', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b07ed80b6..7b68a4439 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -634,7 +634,7 @@ "label.set_tp" => 'ya da tarihleri belirle', "label.fields" => 'alanları göster', "label.group_title" => 'gruplandırma kıstası', -"label.include_title" => 'kayıtları dahil et', + "label.inv_str" => 'fatura', "label.set_empl" => 'kullanıcıları seç', "label.sel_all" => 'tümünü seç', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 308e17a92..84feb5c80 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -371,10 +371,10 @@ // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => '选择时间段', +'form.reports.set_period' => '或设定日期', +'form.reports.show_fields' => '显示栏目', +'form.reports.group_by' => '分组方式', // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', @@ -617,11 +617,6 @@ "label.chart.title2" => '项目用户', "label.chart.period" => '图表期限', -"label.sel_tp" => '选择时间段', -"label.set_tp" => '或设定日期', -"label.fields" => '显示栏目', -"label.group_title" => '分组方式:', -"label.include_title" => '包含记录', "label.inv_str" => '发票', "label.set_empl" => '选择用户', "label.sel_all" => '全部选择', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index d73e3eb9a..72ff1d931 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -620,7 +620,7 @@ "label.set_tp" => '或設定日期', "label.fields" => '顯示欄目', "label.group_title" => '分組方式:', -"label.include_title" => '包含記錄', + "label.inv_str" => '發票', "label.set_empl" => '選擇用戶', "label.sel_all" => '全部選擇', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7c33f8e40..b86f3b7b0 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3884 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3885 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 38d97eaf2723be5511437b425b81ca8d1d0625c4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 17:32:16 +0000 Subject: [PATCH 0426/2515] A bit of recycling in Turkish file. --- WEB-INF/resources/tr.lang.php | 38 ++++++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 7b68a4439..a9644f6c4 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -174,7 +174,8 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Fatura', +// TODO: translate the following. // 'label.project' => 'Project', // 'label.projects' => 'Projects', // 'label.task' => 'Task', @@ -273,7 +274,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Fatura', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', // 'title.projects' => 'Projects', @@ -292,7 +294,8 @@ // 'title.add_client' => 'Adding Client', // 'title.edit_client' => 'Editing Client', // 'title.delete_client' => 'Deleting Client', -// 'title.invoices' => 'Invoices', +'title.invoices' => 'Faturalar', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -366,7 +369,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => 'Faturalandırılabilir', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -383,15 +387,17 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', +'form.reports.include_billable' => 'faturalandırılabilir', +'form.reports.include_not_billable' => 'faturalandırılamaz', +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.select_period' => 'Zaman aralığını seç', +'form.reports.set_period' => 'ya da tarihleri belirle', +'form.reports.show_fields' => 'Alanları göster', +'form.reports.group_by' => 'Gruplandırma kıstas', +'form.reports.group_by_no' => '--- gruplama yok ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -455,7 +461,6 @@ "form.mytime.th.delete" => 'sil', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', -"form.mytime.billable" => 'faturalandırılabilir', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', // Note to translators: the string below is missing and must be translated and added // "form.mytime.uncompleted" => 'uncompleted', @@ -618,24 +623,15 @@ // Note to translators: the string below is missing and must be added and translated // "controls.per_ty" => 'this year', "controls.sel_period" => '--- zaman dönemi seç ---', -"controls.sel_groupby" => '--- gruplama yok ---', "controls.inc_billable" => 'faturalandırılabilir', "controls.inc_nbillable" => 'faturalandırılamaz', -// Note to translators: the string below is missing and must be added and translated -// "controls.default" => '--- default ---', // labels "label.chart.title1" => 'kullanıcı için faaliyetler', -// Note to translators: the string below is missing and must be added and translated -// "label.chart.title2" => 'projects for user', "label.chart.period" => 'dönem için grafik', -"label.sel_tp" => 'zaman aralığını seç', -"label.set_tp" => 'ya da tarihleri belirle', -"label.fields" => 'alanları göster', "label.group_title" => 'gruplandırma kıstası', -"label.inv_str" => 'fatura', "label.set_empl" => 'kullanıcıları seç', "label.sel_all" => 'tümünü seç', "label.sel_none" => 'hiçbirini seçme', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b86f3b7b0..2445a33e3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3885 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3886 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 78fe66a36428eb15c2c7e60bbccc1d557d0ab502 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 17:34:49 +0000 Subject: [PATCH 0427/2515] More cleanup in Turkish file. --- WEB-INF/resources/tr.lang.php | 5 ----- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a9644f6c4..c233d570e 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -620,11 +620,6 @@ "controls.per_lw" => 'geçen hafta', "controls.per_td" => 'bugün', "controls.per_at" => 'tüm zamanlar', -// Note to translators: the string below is missing and must be added and translated -// "controls.per_ty" => 'this year', -"controls.sel_period" => '--- zaman dönemi seç ---', -"controls.inc_billable" => 'faturalandırılabilir', -"controls.inc_nbillable" => 'faturalandırılamaz', // labels "label.chart.title1" => 'kullanıcı için faaliyetler', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2445a33e3..30999b9ac 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3886 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3887 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 61cdc03e938e2d87754439c2dce5dde7e8a2b47d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 18:22:29 +0000 Subject: [PATCH 0428/2515] A bit of cleanup. --- WEB-INF/resources/ca.lang.php | 8 +++----- WEB-INF/resources/cs.lang.php | 2 -- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 3 --- WEB-INF/resources/ko.lang.php | 3 --- WEB-INF/resources/no.lang.php | 3 --- WEB-INF/resources/pt.lang.php | 5 ++--- WEB-INF/resources/ro.lang.php | 7 ------- WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 3 --- WEB-INF/resources/zh-tw.lang.php | 3 --- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 6 insertions(+), 42 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index aa25dd96b..f7ac70959 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -82,10 +82,11 @@ 'error.not_equal' => 'L\\\'Arxiu "{0}" no és igual al arxiu "{1}".', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -'error.project' => 'Selleccionar projecte.', +'error.project' => 'Selleccionar projecte.', // TODO: Selleccionar or Sel·leccionar? Is this correct? // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Sel·leccionar client.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Usuari o parula de pas incorrecta.', @@ -531,9 +532,6 @@ "forward.geninvoice" => 'Generar factura', "forward.change" => 'Configurar clients', -// strings inside contols on forms -"controls.select.project" => '--- Sel·leccionar projecte ---', -"controls.select.activity" => '--- Sel·leccionar activitat ---', "controls.select.client" => '--- Sel·leccionar client ---', "controls.project_bind" => '--- Tots ---', "controls.all" => '--- Tots ---', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 33cbdf338..d8ec7deb2 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -566,8 +566,6 @@ "forward.geninvoice" => 'vytvořit fakturu', "forward.change" => 'upravit zákazníky', -// strings inside contols on forms -"controls.select.project" => '--- výběr projektu ---', "controls.select.client" => '--- výběr zákazníka ---', "controls.project_bind" => '--- všechny ---', "controls.all" => '--- vše ---', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 387caf337..83d5ffa2a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -573,9 +573,6 @@ "forward.geninvoice" => 'loo arve', "forward.change" => 'konfigureeri kliendid', -// strings inside contols on forms -"controls.select.project" => '--- vali projekt ---', -"controls.select.activity" => '--- vali tegevus ---', "controls.select.client" => '--- vali klient ---', "controls.project_bind" => '--- kõik ---', "controls.all" => '--- kõik ---', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 553ff3177..4f5dc5ceb 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -547,9 +547,6 @@ "forward.geninvoice" => 'számla készítés', "forward.change" => 'ügyfelek adatainak beállítása', -// strings inside contols on forms -"controls.select.project" => '--- válassz projektet ---', -"controls.select.activity" => '--- válassz tevékenységet ---', "controls.select.client" => '--- válassz ügyfelet ---', "controls.project_bind" => '--- összes ---', "controls.all" => '--- összes ---', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8981d7251..4f14f7ffd 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -574,9 +574,6 @@ "forward.geninvoice" => '送り状の作成', "forward.change" => 'クライアントの構成', -// strings inside contols on forms -"controls.select.project" => '--- プロジェクトの選択 ---', -"controls.select.activity" => '--- 活動内容の選択 ---', "controls.select.client" => '--- クライアントの選択 ---', "controls.project_bind" => '--- すべて ---', "controls.all" => '--- すべて ---', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 5b923a087..8235c8de0 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -570,9 +570,6 @@ "forward.geninvoice" => '송장 만들기', "forward.change" => '클라이언트 구성', -// strings inside contols on forms -"controls.select.project" => '--- 프로젝트 선택 ---', -"controls.select.activity" => '--- 활동내용 선택 ---', "controls.select.client" => '--- 클라이언트 선택 ---', "controls.project_bind" => '--- 전부 ---', "controls.all" => '--- 전부 ---', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 382668599..51f634d46 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -575,9 +575,6 @@ // "forward.geninvoice" => 'lag faktura', // "forward.change" => 'konfigur klienter', -// strings inside contols on forms -"controls.select.project" => '--- velg prosjekt ---', -"controls.select.activity" => '--- velg aktivitet ---', // Note to translators: the string below is missing and must be translated and added // "controls.select.client" => '--- velg klient ---', "controls.project_bind" => '--- alle ---', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 585313f0f..e46dbf5a0 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -82,7 +82,8 @@ // 'error.empty' => 'Field "{0}" is empty.', // 'error.not_equal' => 'Field "{0}" is not equal to field "{1}".', // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -// 'error.project' => 'Select project.', +'error.project' => 'Selecione projeto.', +// TODO: translate the following. // 'error.task' => 'Select task.', // 'error.client' => 'Select client.', // 'error.report' => 'Select report.', @@ -476,8 +477,6 @@ // miscellaneous strings "forward.forgot_password" => 'esqueceu a senha?', -// strings inside contols on forms -"controls.select.project" => '--- selecione projeto ---', "controls.per_tm" => 'este mês', "controls.per_lm" => 'último mês', "controls.per_tw" => 'esta semana', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 61fdd9267..0945fc94a 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -554,9 +554,6 @@ "forward.geninvoice" => 'genereaza factura', "forward.change" => 'configureaza clienti', -// strings inside contols on forms -"controls.select.project" => '--- alege proiect ---', -"controls.select.activity" => '--- alege activitate ---', "controls.select.client" => '--- alege client ---', "controls.project_bind" => '--- toate ---', "controls.all" => '--- toate ---', @@ -565,10 +562,6 @@ "controls.per_lm" => 'luna trecuta', "controls.per_tw" => 'saptamana curenta', "controls.per_lw" => 'saptamana trecuta', -// Note to translators: the strings below must be translated -// "controls.per_td" => 'this day', -// "controls.per_at" => 'all time', -// "controls.per_ty" => 'this year' "controls.sel_period" => '--- alege perioada ---', "controls.sel_groupby" => '--- fara grupare ---', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c233d570e..eb39d03a9 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -607,9 +607,6 @@ "forward.geninvoice" => 'fatura yarat', "forward.change" => 'müşterileri düzenle', -// strings inside contols on forms -"controls.select.project" => '--- proje seç ---', -"controls.select.activity" => '--- faaliyet seç ---', "controls.select.client" => '--- müşteri seç ---', "controls.project_bind" => '--- tümü ---', "controls.all" => '--- tümü ---', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 84feb5c80..b8bf9d487 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -592,9 +592,6 @@ "forward.geninvoice" => '生成发票', "forward.change" => '客户设置', -// strings inside contols on forms -"controls.select.project" => '--- 选择项目 ---', -"controls.select.activity" => '--- 选择活动 ---', "controls.select.client" => '--- 选择客户 ---', "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 72ff1d931..0a09f28c4 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -591,9 +591,6 @@ "forward.geninvoice" => '生成發票', "forward.change" => '客戶設置', -// strings inside contols on forms -"controls.select.project" => '--- 選擇項目 ---', -"controls.select.activity" => '--- 選擇活動 ---', "controls.select.client" => '--- 選擇客戶 ---', "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 30999b9ac..117255ab5 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3887 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3888 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 24d52e87346d5bd47fd695d12abb1512254b26f9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 18:26:00 +0000 Subject: [PATCH 0429/2515] Fixed one string stranslation. --- WEB-INF/resources/ca.lang.php | 3 +-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f7ac70959..5ff179b4b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -82,7 +82,7 @@ 'error.not_equal' => 'L\\\'Arxiu "{0}" no és igual al arxiu "{1}".', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -'error.project' => 'Selleccionar projecte.', // TODO: Selleccionar or Sel·leccionar? Is this correct? +'error.project' => 'Sel·leccionar projecte.', // TODO: translate the following. // 'error.task' => 'Select task.', 'error.client' => 'Sel·leccionar client.', @@ -532,7 +532,6 @@ "forward.geninvoice" => 'Generar factura', "forward.change" => 'Configurar clients', -"controls.select.client" => '--- Sel·leccionar client ---', "controls.project_bind" => '--- Tots ---', "controls.all" => '--- Tots ---', "controls.notbind" => '--- No ---', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 117255ab5..0bed5a52c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3888 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3889 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9822905b00350445f82a5415d8c47db10706d1b7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 19:16:06 +0000 Subject: [PATCH 0430/2515] Some recycling in Estonian translation. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 30 +++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 5ff179b4b..b4a7ea08b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -541,7 +541,6 @@ "controls.per_lw" => 'La setmana passada', "controls.per_td" => 'Aquest dia', "controls.per_lw" => 'La setmana passada', -"controls.sel_period" => '--- Seleccionar període de temps ---', // labels "label.chart.period" => 'gràfica por període', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d8ec7deb2..0855e9832 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -577,7 +577,6 @@ "controls.per_td" => 'dnes', "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', -"controls.sel_period" => '--- výběr období ---', "controls.sel_groupby" => '--- vše dohromady ---', "controls.inc_billable" => 'k fakturaci', "controls.inc_nbillable" => 'mimo fakturaci', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 83d5ffa2a..f45bc1a46 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -367,7 +367,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => 'Arvestatav', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -384,15 +385,17 @@ 'form.reports.save_as_favorite' => 'Salvesta lemmikuna', // TODO: translate the following. // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', +'form.reports.include_billable' => 'arvestatav', +'form.reports.include_not_billable' => 'mittearvestatav', +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.select_period' => 'Vali ajaperiood', +'form.reports.set_period' => 'või märgi kuupäevad', +'form.reports.show_fields' => 'Näita välju', +'form.reports.group_by' => 'Grupeeri', +'form.reports.group_by_no' => '--- ilma grupeerimata ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -583,14 +586,8 @@ "controls.per_lw" => 'eelmine nädal', "controls.per_td" => 'täna', "controls.per_at" => 'kõik ajad', -// Note to translators: the string below must be translated and added -// "controls.per_ty" => 'this year', -"controls.sel_period" => '--- vali ajaperiood ---', -"controls.sel_groupby" => '--- ilma grupeerimata ---', "controls.inc_billable" => 'arvestatav', "controls.inc_nbillable" => 'mittearvestatav', -// Note to translators: the string below must be translated and added -// "controls.default" => '--- default ---', // labels "label.chart.title1" => 'tegevused kasutajal', @@ -598,11 +595,6 @@ // "label.chart.title2" => 'projects for user', "label.chart.period" => 'tabel perioodiks', -"label.sel_tp" => 'vali ajaperiood', -"label.set_tp" => 'või märgi kuupäevad', -"label.fields" => 'näita välju', -"label.group_title" => 'grupeeri', - "label.inv_str" => 'arved', "label.set_empl" => 'vali kasutajad', "label.sel_all" => 'vali kõik', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0bed5a52c..015584ccc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3889 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3890 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 521fd7ea48c665e3e311e36975dd04428bca42a5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 20:43:06 +0000 Subject: [PATCH 0431/2515] A bit of cleanup and recycling. --- WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/sl.lang.php | 5 ++-- WEB-INF/resources/tr.lang.php | 49 +++----------------------------- WEB-INF/resources/zh-cn.lang.php | 29 ++----------------- WEB-INF/resources/zh-tw.lang.php | 28 ++---------------- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 13 insertions(+), 101 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 4f5dc5ceb..e04ec0b28 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -444,7 +444,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => 'új vezetői jogosultság létrehozása', "form.profile.edit_title" => 'profil szerkesztése', -"form.profile.name" => 'név', // people form attributes "form.people.ppl_str" => 'munkatársak', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 292c2e543..e9849e0f4 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -143,7 +143,8 @@ // 'label.manager_name' => 'Manager name', // 'label.manager_login' => 'Manager login', 'label.person_name' => 'Ime', -// 'label.thing_name' => 'Name', +'label.thing_name' => 'Ime', +// TODO: translate the following. // 'label.login' => 'Login', 'label.password' => 'Geslo', // TODO: translate the following. @@ -403,8 +404,6 @@ "form.project.edit_str" => 'urejanje projektov', "form.project.add_str" => 'dodajanje novega projekta', "form.project.del_str" => 'brisanje projekta', -"form.project.th.name" => 'ime', -"form.project.name" => 'ime', // activities form attributes "form.activity.project" => 'projekt', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index eb39d03a9..74a6d3f32 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -154,8 +154,9 @@ // TODO: translate the following. // 'label.manager_name' => 'Manager name', // 'label.manager_login' => 'Manager login', -// 'label.person_name' => 'Name', -// 'label.thing_name' => 'Name', +'label.person_name' => 'Isim', +'label.thing_name' => 'Isim', +// TODO: translate the following. // 'label.login' => 'Login', 'label.password' => 'Parola', // TODO: translate the following. @@ -197,7 +198,7 @@ // 'label.total_hours' => 'Total hours', // 'label.total_cost' => 'Total cost', // 'label.view' => 'View', -// 'label.edit' => 'Edit', +'label.edit' => 'Düzenle', 'label.delete' => 'Sil', // TODO: translate the following. // 'label.configure' => 'Configure', @@ -429,15 +430,7 @@ "form.admin.profile.noprofiles" => 'veritabanınız boş. yeni bir ekip yaratmak için yönetici olarak giriş yapın.', "form.admin.profile.comment" => 'ekibi sil', "form.admin.profile.th.id" => 'id', -"form.admin.profile.th.name" => 'isim', -"form.admin.profile.th.edit" => 'düzenle', -"form.admin.profile.th.del" => 'sil', "form.admin.profile.th.active" => 'aktif', -// Note to translators: the strings below are missing and must be translated and added -// "form.admin.options" => 'options', -// "form.admin.custom_date_format" => "date format", -// "form.admin.custom_time_format" => "time format", -// "form.admin.start_week" => "first day of week", // my time form attributes "form.mytime.title" => 'zamanım', @@ -457,8 +450,6 @@ "form.mytime.th.finish" => 'tamamla', "form.mytime.th.duration" => 'süre', "form.mytime.th.note" => 'not', -"form.mytime.th.edit" => 'düzenle', -"form.mytime.th.delete" => 'sil', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', @@ -469,35 +460,19 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => 'yeni yönetici hesabı yarat', "form.profile.edit_title" => 'profili düzenliyor', -"form.profile.name" => 'isim', -// Note to translators: "form.profile.login" => 'e-posta', // email has been changed to login - -// Note to translators: the string below is missing and must be translated and added -// "form.profile.showchart" => 'show pie charts', -// "form.profile.lang" => 'language', -// "form.profile.custom_date_format" => "date format", -// "form.profile.custom_time_format" => "time format", -// "form.profile.default_format" => "(default)", -// "form.profile.start_week" => "first day of week", // people form attributes "form.people.ppl_str" => 'insanlar', "form.people.createu_str" => 'yeni kullanıcı yarat', "form.people.edit_str" => 'kullanıcı düzenleniyor', "form.people.del_str" => 'kullanıcı siliniyor', -"form.people.th.name" => 'isim', -// Note to translators: "form.people.th.login" => 'e-posta', // email has been changed to login "form.people.th.role" => 'rol', -"form.people.th.edit" => 'düzenle', -"form.people.th.del" => 'sil', "form.people.th.status" => 'durum', "form.people.th.project" => 'proje', "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', "form.people.empl" => 'kullanıcı', -"form.people.name" => 'isim', -// Note to translators: "form.people.login" => 'e-posta', // email has been changed to login "form.people.rate" => 'varsayılan saat ücreti', "form.people.comanager" => 'yardımcı yönetici', @@ -508,22 +483,14 @@ "form.project.edit_str" => 'proje düzenleniyor', "form.project.add_str" => 'yeni proje ekleniyor', "form.project.del_str" => 'proje siliniyor', -"form.project.th.name" => 'isim', -"form.project.th.edit" => 'düzenle', -"form.project.th.del" => 'sil', -"form.project.name" => 'isim', // activities form attributes "form.activity.act_title" => 'faaliyetler', "form.activity.add_title" => 'yeni faaliyetler ekleniyor', "form.activity.edit_str" => 'faaliyetler düzenleniyor', "form.activity.del_str" => 'faaliyetler siliniyor', -"form.activity.name" => 'isim', "form.activity.project" => 'proje', -"form.activity.th.name" => 'isim', "form.activity.th.project" => 'proje', -"form.activity.th.edit" => 'düzenle', -"form.activity.th.del" => 'sil', // report attributes "form.report.title" => 'raporlar', @@ -582,19 +549,11 @@ "form.migration.export.title" => 'dışarı aktar', "form.migration.export.success" => 'dışarı aktarma başarıyla tamamlandı', "form.migration.export.text" => 'tüm ekip bilgilerinizi bir xml dosyasına aktarabilirsiniz. bu, kendi sunucunuza bilgi aktarmak istediğinizde faydalı olabilir.', -// Note to translators: the strings below are missing and must be added and translated -// "form.migration.compression.none" => 'none', -// "form.migration.compression.gzip" => 'gzip', -// "form.migration.compression.bzip" => 'bzip', "form.client.title" => 'müşteriler', "form.client.add_title" => 'müşteri ekle', "form.client.edit_title" => 'müşteriyi düzenle', "form.client.del_title" => 'müşteriyi sil', -"form.client.th.name" => 'isim', -"form.client.th.edit" => 'düzenle', -"form.client.th.del" => 'sil', -"form.client.name" => 'isim', "form.client.tax" => 'vergi', "form.client.comment" => 'yorum ', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b8bf9d487..2e0dacc3c 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -137,9 +137,8 @@ 'label.currency' => '货币', 'label.manager_name' => '管理员姓名', 'label.manager_login' => '管理员登录', -// TODO: translate the following. -// 'label.person_name' => 'Name', -// 'label.thing_name' => 'Name', +'label.person_name' => '姓名', +'label.thing_name' => '名称', // 'label.login' => 'Login', 'label.password' => '密码', 'label.confirm_password' => '确认密码', @@ -179,7 +178,7 @@ // 'label.total_hours' => 'Total hours', // 'label.total_cost' => 'Total cost', // 'label.view' => 'View', -// 'label.edit' => 'Edit', +'label.edit' => '编辑', 'label.delete' => '删除', // TODO: translate the following. // 'label.configure' => 'Configure', @@ -417,9 +416,6 @@ "form.admin.profile.noprofiles" => '您的数据库没有任何记录。请以管理员身份登录并创建一个新团队。', "form.admin.profile.comment" => '删除团队', "form.admin.profile.th.id" => 'ID号', -"form.admin.profile.th.name" => '姓名', -"form.admin.profile.th.edit" => '编辑', -"form.admin.profile.th.del" => '删除', "form.admin.profile.th.active" => '启用', "form.admin.options" => '选项', "form.admin.custom_date_format" => "日期格式", @@ -444,8 +440,6 @@ "form.mytime.th.finish" => '结束', "form.mytime.th.duration" => '持续时间', "form.mytime.th.note" => '备注', -"form.mytime.th.edit" => '编辑', -"form.mytime.th.delete" => '删除', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', "form.mytime.billable" => '计费时间', @@ -456,7 +450,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '新建管理账号', "form.profile.edit_title" => '编辑简介', -"form.profile.name" => '名字', "form.profile.login" => '登录', "form.profile.showchart" => '显示饼状图', @@ -471,18 +464,14 @@ "form.people.createu_str" => '新建用户', "form.people.edit_str" => '编辑用户', "form.people.del_str" => '删除用户', -"form.people.th.name" => '姓名', "form.people.th.login" => '登录', "form.people.th.role" => '角色', -"form.people.th.edit" => '编辑', -"form.people.th.del" => '删除', "form.people.th.status" => '状态', "form.people.th.project" => '项目', "form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', "form.people.empl" => '用户', -"form.people.name" => '姓名', "form.people.login" => '登录', "form.people.rate" => '默认小时收费', @@ -494,22 +483,14 @@ "form.project.edit_str" => '编辑项目', "form.project.add_str" => '添加新项目', "form.project.del_str" => '删除项目', -"form.project.th.name" => '名称', -"form.project.th.edit" => '编辑', -"form.project.th.del" => '删除', -"form.project.name" => '名称', // activities form attributes "form.activity.act_title" => '活动', "form.activity.add_title" => '新建活动', "form.activity.edit_str" => '编辑活动', "form.activity.del_str" => '删除活动', -"form.activity.name" => '名称', "form.activity.project" => '项目', -"form.activity.th.name" => '名称', "form.activity.th.project" => '项目', -"form.activity.th.edit" => '编辑', -"form.activity.th.del" => '删除', // report attributes "form.report.title" => '报告', @@ -576,10 +557,6 @@ "form.client.add_title" => '添加客户', "form.client.edit_title" => '编辑客户', "form.client.del_title" => '删除客户', -"form.client.th.name" => '姓名', -"form.client.th.edit" => '编辑', -"form.client.th.del" => '删除', -"form.client.name" => '姓名', "form.client.tax" => '税', "form.client.comment" => '备注', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0a09f28c4..52b541687 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -146,8 +146,8 @@ // TODO: translate the following. // 'label.manager_name' => 'Manager name', // 'label.manager_login' => 'Manager login', -// 'label.person_name' => 'Name', -// 'label.thing_name' => 'Name', +'label.person_name' => '姓名', +'label.thing_name' => '名稱', 'label.login' => '登錄', 'label.password' => '密碼', 'label.confirm_password' => '確認密碼', @@ -187,7 +187,7 @@ // 'label.total_hours' => 'Total hours', // 'label.total_cost' => 'Total cost', // 'label.view' => 'View', -// 'label.edit' => 'Edit', +'label.edit' => '編輯', 'label.delete' => '刪除', // TODO: translate the following. // 'label.configure' => 'Configure', @@ -416,9 +416,6 @@ "form.admin.profile.noprofiles" => '您的資料庫沒有任何記錄。請以管理員身份登錄並創建一個新團隊。', "form.admin.profile.comment" => '刪除團隊', "form.admin.profile.th.id" => 'ID號', -"form.admin.profile.th.name" => '姓名', -"form.admin.profile.th.edit" => '編輯', -"form.admin.profile.th.del" => '刪除', "form.admin.profile.th.active" => '啟動', "form.admin.options" => '選項', "form.admin.custom_date_format" => "日期格式", @@ -443,8 +440,6 @@ "form.mytime.th.finish" => '結束', "form.mytime.th.duration" => '持續時間', "form.mytime.th.note" => '備註', -"form.mytime.th.edit" => '編輯', -"form.mytime.th.delete" => '刪除', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', "form.mytime.billable" => '計費時間', @@ -455,7 +450,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '創建新管理帳號', "form.profile.edit_title" => '編輯簡介', -"form.profile.name" => '名字', "form.profile.login" => '登錄', "form.profile.showchart" => '顯示餅狀圖', @@ -470,18 +464,14 @@ "form.people.createu_str" => '新建用戶', "form.people.edit_str" => '編輯用戶', "form.people.del_str" => '刪除用戶', -"form.people.th.name" => '姓名', "form.people.th.login" => '登錄', "form.people.th.role" => '角色', -"form.people.th.edit" => '編輯', -"form.people.th.del" => '刪除', "form.people.th.status" => '狀態', "form.people.th.project" => '項目', "form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', "form.people.empl" => '用戶', -"form.people.name" => '姓名', "form.people.login" => '登錄', "form.people.rate" => '默認小時收費', @@ -493,22 +483,14 @@ "form.project.edit_str" => '編輯專案', "form.project.add_str" => '添加新項目', "form.project.del_str" => '刪除項目', -"form.project.th.name" => '名稱', -"form.project.th.edit" => '編輯', -"form.project.th.del" => '刪除', -"form.project.name" => '名稱', // activities form attributes "form.activity.act_title" => '活動', "form.activity.add_title" => '新建活動', "form.activity.edit_str" => '編輯活動', "form.activity.del_str" => '刪除活動', -"form.activity.name" => '名稱', "form.activity.project" => '項目', -"form.activity.th.name" => '名稱', "form.activity.th.project" => '項目', -"form.activity.th.edit" => '編輯', -"form.activity.th.del" => '刪除', // report attributes "form.report.title" => '報告', @@ -575,10 +557,6 @@ "form.client.add_title" => '添加客戶', "form.client.edit_title" => '編輯客戶', "form.client.del_title" => '刪除客戶', -"form.client.th.name" => '姓名', -"form.client.th.edit" => '編輯', -"form.client.th.del" => '刪除', -"form.client.name" => '姓名', "form.client.tax" => '稅', "form.client.comment" => '備註', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 015584ccc..3e609a43c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3890 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3891 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0e191e482cfe8660d293b6e0791935c945193b01 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 21:29:16 +0000 Subject: [PATCH 0432/2515] More cleanup and recycling in translation files. --- WEB-INF/resources/ca.lang.php | 5 +---- WEB-INF/resources/cs.lang.php | 2 -- WEB-INF/resources/et.lang.php | 3 +-- WEB-INF/resources/hu.lang.php | 9 ++------- WEB-INF/resources/ja.lang.php | 7 ++----- WEB-INF/resources/ko.lang.php | 7 ++----- WEB-INF/resources/no.lang.php | 4 +--- WEB-INF/resources/ro.lang.php | 7 +++---- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 7 ++----- WEB-INF/resources/zh-tw.lang.php | 7 ++----- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 18 insertions(+), 47 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index b4a7ea08b..a932312f0 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -189,8 +189,8 @@ // 'label.view' => 'View', 'label.edit' => 'Modificar', 'label.delete' => 'Eliminar', +'label.configure' => 'Configurar', // TODO: translate the following. -// 'label.configure' => 'Configure', // 'label.select_all' => 'Select all', // 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', @@ -526,11 +526,8 @@ // miscellaneous strings "forward.forgot_password" => '¿Ha oblidat la seva paraula de pas?', -"forward.edit" => 'Modificar', -"forward.delete" => 'Eliminar', "forward.tocsvfile" => 'Exportar dades a un arxiu .csv', "forward.geninvoice" => 'Generar factura', -"forward.change" => 'Configurar clients', "controls.project_bind" => '--- Tots ---', "controls.all" => '--- Tots ---', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 0855e9832..9ce67f918 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -564,7 +564,6 @@ "forward.tocsvfile" => 'exportovat data do .csv souboru', "forward.toxmlfile" => 'exportovat data do .xml souboru', "forward.geninvoice" => 'vytvořit fakturu', -"forward.change" => 'upravit zákazníky', "controls.select.client" => '--- výběr zákazníka ---', "controls.project_bind" => '--- všechny ---', @@ -577,7 +576,6 @@ "controls.per_td" => 'dnes', "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', -"controls.sel_groupby" => '--- vše dohromady ---', "controls.inc_billable" => 'k fakturaci', "controls.inc_nbillable" => 'mimo fakturaci', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index f45bc1a46..e667460df 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -193,8 +193,8 @@ // 'label.view' => 'View', 'label.edit' => 'Muuda', 'label.delete' => 'Kustuta', +'label.configure' => 'Konfigureeri', // TODO: translate the following. -// 'label.configure' => 'Configure', // 'label.select_all' => 'Select all', // 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', @@ -574,7 +574,6 @@ "forward.tocsvfile" => 'ekspordi andmed .csv faili', "forward.toxmlfile" => 'ekspordi andmed .xml faili', "forward.geninvoice" => 'loo arve', -"forward.change" => 'konfigureeri kliendid', "controls.select.client" => '--- vali klient ---', "controls.project_bind" => '--- kõik ---', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e04ec0b28..c382374d3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -389,7 +389,8 @@ // 'form.reports.set_period' => 'or set dates', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- csoportosítás nélkül ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -538,13 +539,8 @@ // miscellaneous strings "forward.forgot_password" => 'elfelejtetted a jelszót?', -"forward.edit" => 'szerkesztés', -"forward.delete" => 'törlés', "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', -// Note to translators: the string below is missing and must be added and translated -// "forward.toxmlfile" => 'export data to .xml file', "forward.geninvoice" => 'számla készítés', -"forward.change" => 'ügyfelek adatainak beállítása', "controls.select.client" => '--- válassz ügyfelet ---', "controls.project_bind" => '--- összes ---', @@ -555,7 +551,6 @@ "controls.per_tw" => 'ezen a héten', "controls.per_lw" => 'múlt héten', "controls.sel_period" => '--- válassz időszakot ---', -"controls.sel_groupby" => '--- csoportosítás nélkül ---', // labels "label.sel_tp" => 'jelölj meg egy időszakot', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 4f14f7ffd..640bdbace 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -391,7 +391,8 @@ // 'form.reports.set_period' => 'or set dates', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- グループの機能がありません ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -567,12 +568,9 @@ // miscellaneous strings "forward.forgot_password" => 'パスワードを忘れましたか?', -"forward.edit" => '編集', -"forward.delete" => '削除', "forward.tocsvfile" => 'csvファイルにエクスポート', "forward.toxmlfile" => 'xmlファイルにエクスポート', "forward.geninvoice" => '送り状の作成', -"forward.change" => 'クライアントの構成', "controls.select.client" => '--- クライアントの選択 ---', "controls.project_bind" => '--- すべて ---', @@ -586,7 +584,6 @@ "controls.per_at" => 'すべての時間', "controls.per_ty" => '今年', "controls.sel_period" => '--- 時間期間の選択 ---', -"controls.sel_groupby" => '--- グループの機能がありません ---', "controls.inc_billable" => '請求できる', "controls.inc_nbillable" => '請求できません', "controls.default" => '--- デフォルト ---', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 8235c8de0..9f327ce74 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -390,7 +390,8 @@ // 'form.reports.set_period' => 'or set dates', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- 그룹화되지 않음 ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -563,12 +564,9 @@ // miscellaneous strings "forward.forgot_password" => '암호를 잊으셨습니까?', -"forward.edit" => '편집', -"forward.delete" => '삭제', "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', "forward.geninvoice" => '송장 만들기', -"forward.change" => '클라이언트 구성', "controls.select.client" => '--- 클라이언트 선택 ---', "controls.project_bind" => '--- 전부 ---', @@ -582,7 +580,6 @@ "controls.per_at" => '전시간', "controls.per_ty" => '올해', "controls.sel_period" => '--- 시간 기간을 선택 ---', -"controls.sel_groupby" => '--- 그룹화되지 않음 ---', "controls.inc_billable" => '청구 가능한', "controls.inc_nbillable" => '청구 가능하지 않은', "controls.default" => '--- 디폴트 ---', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 51f634d46..9a2cd748b 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -182,7 +182,7 @@ // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', 'label.week_total' => 'Uken totalt', -// TODO: translate the following. +// TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'I dag', // TODO: translate the following. @@ -573,7 +573,6 @@ // Note to translators: the strings below are missing and must be translated and added // "forward.toxmlfile" => 'eksporter data til en .xml fil', // "forward.geninvoice" => 'lag faktura', -// "forward.change" => 'konfigur klienter', // Note to translators: the string below is missing and must be translated and added // "controls.select.client" => '--- velg klient ---', @@ -590,7 +589,6 @@ // "controls.per_at" => 'all tid', // "controls.per_ty" => 'dette årr', "controls.sel_period" => '--- velg tidsperiode ---', -"controls.sel_groupby" => '--- ingen sortering ---', // Note to translators: the strings below are missing and must be translated and added // "controls.inc_billable" => 'fakturerbar', // "controls.inc_nbillable" => 'ikke fakturerbar', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0945fc94a..6f768ed2d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -194,8 +194,8 @@ // TODO: confirm that label.edit and label.delete are translated correctly. 'label.edit' => 'Editează', 'label.delete' => 'Șterge', +'label.configure' => 'Configureaza', // TODO: translate the following. -// 'label.configure' => 'Configure', // 'label.select_all' => 'Select all', // 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', @@ -387,7 +387,8 @@ // 'form.reports.set_period' => 'or set dates', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- fara grupare ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -552,7 +553,6 @@ "forward.forgot_password" => 'parola pierduta?', "forward.tocsvfile" => 'exporta date in fisier .csv', "forward.geninvoice" => 'genereaza factura', -"forward.change" => 'configureaza clienti', "controls.select.client" => '--- alege client ---', "controls.project_bind" => '--- toate ---', @@ -563,7 +563,6 @@ "controls.per_tw" => 'saptamana curenta', "controls.per_lw" => 'saptamana trecuta', "controls.sel_period" => '--- alege perioada ---', -"controls.sel_groupby" => '--- fara grupare ---', // labels "label.sel_tp" => 'alege perioada', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 56feee800..d636b5ac2 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -126,7 +126,7 @@ 'button.export' => 'Exportovať tím', 'button.import' => 'Importovať tím', 'button.close' => 'Zatvoriť', -// TODO: translate the following. +// TODO: translate the following. // 'button.stop' => 'Stop', // Labels for controls on forms. Labels in this section are used on multiple forms. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 74a6d3f32..7741fe9a6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -559,12 +559,9 @@ // miscellaneous strings "forward.forgot_password" => 'parolanızı unuttunuz mu?', -"forward.edit" => 'düzenle', -"forward.delete" => 'sil', "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', "forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', "forward.geninvoice" => 'fatura yarat', -"forward.change" => 'müşterileri düzenle', "controls.select.client" => '--- müşteri seç ---', "controls.project_bind" => '--- tümü ---', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 2e0dacc3c..23940d5e9 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -374,7 +374,8 @@ 'form.reports.set_period' => '或设定日期', 'form.reports.show_fields' => '显示栏目', 'form.reports.group_by' => '分组方式', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- 没有分组 ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -562,12 +563,9 @@ // miscellaneous strings "forward.forgot_password" => '忘记密码?', -"forward.edit" => '编辑', -"forward.delete" => '删除', "forward.tocsvfile" => '将数据导出到.csv文件', "forward.toxmlfile" => '将数据导出到.xml文件', "forward.geninvoice" => '生成发票', -"forward.change" => '客户设置', "controls.select.client" => '--- 选择客户 ---', "controls.project_bind" => '--- 全部 ---', @@ -581,7 +579,6 @@ "controls.per_at" => '全部时间', "controls.per_ty" => '今年', "controls.sel_period" => '--- 选择时间段 ---', -"controls.sel_groupby" => '--- 没有分组 ---', "controls.inc_billable" => '计费时间', "controls.inc_nbillable" => '非计费时间', "controls.default" => '--- 默认 ---', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 52b541687..c5f57ee8d 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -383,7 +383,8 @@ // 'form.reports.set_period' => 'or set dates', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.group_by' => 'Group by', -// 'form.reports.group_by_no' => '--- no grouping ---', +'form.reports.group_by_no' => '--- 沒有分組 ---', +// TODO: translate the following. // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', @@ -562,12 +563,9 @@ // miscellaneous strings "forward.forgot_password" => '忘記密碼?', -"forward.edit" => '編輯', -"forward.delete" => '刪除', "forward.tocsvfile" => '將資料輸出到.csv文件', "forward.toxmlfile" => '將資料輸出到.xml文件', "forward.geninvoice" => '生成發票', -"forward.change" => '客戶設置', "controls.select.client" => '--- 選擇客戶 ---', "controls.project_bind" => '--- 全部 ---', @@ -581,7 +579,6 @@ "controls.per_at" => '全部時間', "controls.per_ty" => '今年', "controls.sel_period" => '--- 選擇時間段 ---', -"controls.sel_groupby" => '--- 沒有分組 ---', "controls.inc_billable" => '計費時間', "controls.inc_nbillable" => '非計費時間', "controls.default" => '--- 默認 ---', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3e609a43c..89e477b31 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3891 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3892 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 8f20fd3208aaa11e5ecf009c7c01af45a5a8532d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 21:42:50 +0000 Subject: [PATCH 0433/2515] Removed unused strings. --- WEB-INF/resources/ca.lang.php | 3 --- WEB-INF/resources/cs.lang.php | 5 ----- WEB-INF/resources/et.lang.php | 6 ------ WEB-INF/resources/ja.lang.php | 5 ----- WEB-INF/resources/ko.lang.php | 5 ----- WEB-INF/resources/sl.lang.php | 5 ----- WEB-INF/resources/tr.lang.php | 4 ---- WEB-INF/resources/zh-cn.lang.php | 5 ----- WEB-INF/resources/zh-tw.lang.php | 5 ----- WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 1 insertion(+), 44 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a932312f0..a43499733 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -539,9 +539,6 @@ "controls.per_td" => 'Aquest dia', "controls.per_lw" => 'La setmana passada', -// labels -"label.chart.period" => 'gràfica por període', - "label.inv_str" => 'Factura', "label.set_empl" => 'Seleccionar usuaris', "label.sel_all" => 'Seleccionar tots', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9ce67f918..63726b784 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -579,11 +579,6 @@ "controls.inc_billable" => 'k fakturaci', "controls.inc_nbillable" => 'mimo fakturaci', -// labels -"label.chart.title1" => 'činnosti uživatele', -"label.chart.title2" => 'projekty uživatele', -"label.chart.period" => 'přehled za období', - "label.sel_tp" => 'výberte období', "label.set_tp" => 'nebo určete dny', "label.fields" => 'zobrazit pole', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e667460df..c00626e26 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -588,12 +588,6 @@ "controls.inc_billable" => 'arvestatav', "controls.inc_nbillable" => 'mittearvestatav', -// labels -"label.chart.title1" => 'tegevused kasutajal', -// Note to translators: the string below is missing and must be translated and added -// "label.chart.title2" => 'projects for user', -"label.chart.period" => 'tabel perioodiks', - "label.inv_str" => 'arved', "label.set_empl" => 'vali kasutajad', "label.sel_all" => 'vali kõik', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 640bdbace..269de9147 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -588,11 +588,6 @@ "controls.inc_nbillable" => '請求できません', "controls.default" => '--- デフォルト ---', -// labels -"label.chart.title1" => 'ユーザーに対する活動内容', -"label.chart.title2" => 'ユーザーに対するプロジェクト', -"label.chart.period" => '期間表示のチャート', - "label.sel_tp" => '時間期間の選択', "label.set_tp" => 'あるいは日付を設定', "label.fields" => 'フィールドの表示', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 9f327ce74..3d44bceee 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -584,11 +584,6 @@ "controls.inc_nbillable" => '청구 가능하지 않은', "controls.default" => '--- 디폴트 ---', -// labels -"label.chart.title1" => '사용자별 활동내용', -"label.chart.title2" => '사용자별 프로젝트', -"label.chart.period" => '기간에 따른 그래프', - "label.sel_tp" => '시간 기간을 선택', "label.set_tp" => '혹은 날짜를 설정', "label.fields" => '필드들을 보기', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index e9849e0f4..1c4dd6083 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -416,9 +416,4 @@ // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', "form.mail.sending_str" => 'sporočilo poslano', - -// labels -"label.chart.title2" => 'projekti uporabnika', -"label.chart.period" => 'graf za obdobje', - ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 7741fe9a6..9a874e941 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -574,10 +574,6 @@ "controls.per_td" => 'bugün', "controls.per_at" => 'tüm zamanlar', -// labels -"label.chart.title1" => 'kullanıcı için faaliyetler', -"label.chart.period" => 'dönem için grafik', - "label.group_title" => 'gruplandırma kıstası', "label.set_empl" => 'kullanıcıları seç', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 23940d5e9..c79ec8f6c 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -583,11 +583,6 @@ "controls.inc_nbillable" => '非计费时间', "controls.default" => '--- 默认 ---', -// labels -"label.chart.title1" => '活动用户', -"label.chart.title2" => '项目用户', -"label.chart.period" => '图表期限', - "label.inv_str" => '发票', "label.set_empl" => '选择用户', "label.sel_all" => '全部选择', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index c5f57ee8d..d70566842 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -583,11 +583,6 @@ "controls.inc_nbillable" => '非計費時間', "controls.default" => '--- 默認 ---', -// labels -"label.chart.title1" => '活動用戶', -"label.chart.title2" => '項目用戶', -"label.chart.period" => '圖表期限', - "label.sel_tp" => '選擇時間段', "label.set_tp" => '或設定日期', "label.fields" => '顯示欄目', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 89e477b31..86207ac56 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3892 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3893 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a47536cd7a62956808cd69f559d9928919440560 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 21:53:05 +0000 Subject: [PATCH 0434/2515] A bit of cleanup on Slovenian file. --- WEB-INF/resources/sl.lang.php | 30 ++++++++++-------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 1c4dd6083..629c54a93 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -164,8 +164,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'Projekt', +'label.projects' => 'Projekti', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -262,10 +263,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Projekti', +'title.add_project' => 'Dodajanje projekta', +'title.edit_project' => 'Urejanje projekta', +'title.delete_project' => 'Brisanje projekta', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -322,7 +324,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projekti', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -389,25 +392,12 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'projekt', - -// password reminder form attributes -"form.fpass.login" => 'prijava', "form.fpass.send_pass_str" => 'zahteva za razveljavitev gesla je bila poslana', "form.fpass.send_pass_subj" => 'Anuko Time Tracker zahteva za razveljavitev gesla', // Note to translators: the ending of this tring below needs to be translated. "form.fpass.send_pass_body" => "Spoštovani uporabnik,\n\nNekdo, najverjetneje vi, je zahteval razveljavitev vašega Anuko Time Tracker gesla. Prosimo obiščite to povezavo, če želite razveljaviti vaše geslo.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "za razveljavitev gesla, prosimo vtipkajte geslo in kliknite gumb shrani", -// projects form attributes -"form.project.proj_title" => 'projekti', -"form.project.edit_str" => 'urejanje projektov', -"form.project.add_str" => 'dodajanje novega projekta', -"form.project.del_str" => 'brisanje projekta', - -// activities form attributes -"form.activity.project" => 'projekt', - // mail form attributes "form.mail.from" => 'od', "form.mail.to" => 'za', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 86207ac56..e34044740 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3893 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3894 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 30fe1769a76524d74ad90d73c938f76b782bb9c2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 23:04:08 +0000 Subject: [PATCH 0435/2515] Finished refactoring Slovenian file. --- WEB-INF/resources/sl.lang.php | 125 ++++++++++++++++++++++++++++------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 106 insertions(+), 21 deletions(-) diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 629c54a93..7bd9d0925 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -198,7 +198,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Komentar', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -343,10 +344,10 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. -// TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.message' => 'Zahteva za razveljavitev gesla je bila poslana.', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Tracker zahteva za razveljavitev gesla', +// TODO: translate the ending of this string properly. +'form.reset_password.email_body' => "Spoštovani uporabnik,\n\nNekdo, najverjetneje vi, je zahteval razveljavitev vašega Anuko Time Tracker gesla. Prosimo obiščite to povezavo, če želite razveljaviti vaše geslo.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -384,26 +385,110 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'projekt', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', -// TODO: refactoring ongoing down from here. +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', -"form.fpass.send_pass_str" => 'zahteva za razveljavitev gesla je bila poslana', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker zahteva za razveljavitev gesla', -// Note to translators: the ending of this tring below needs to be translated. -"form.fpass.send_pass_body" => "Spoštovani uporabnik,\n\nNekdo, najverjetneje vi, je zahteval razveljavitev vašega Anuko Time Tracker gesla. Prosimo obiščite to povezavo, če želite razveljaviti vaše geslo.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "za razveljavitev gesla, prosimo vtipkajte geslo in kliknite gumb shrani", +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', -// mail form attributes -"form.mail.from" => 'od', -"form.mail.to" => 'za', -"form.mail.comment" => 'komentar', -"form.mail.above" => 'pošlji to poročilo preko elektronske pošte', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'sporočilo poslano', +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Od', +'form.mail.to' => 'Za', +// TODO: translate the following. +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e34044740..ec247152b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3894 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3895 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7222eeeece08554fe11df2fe33e17dded52b06d0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 23:21:50 +0000 Subject: [PATCH 0436/2515] Some more cleanup in translation files. --- WEB-INF/resources/ca.lang.php | 4 ++-- WEB-INF/resources/cs.lang.php | 4 ++-- WEB-INF/resources/et.lang.php | 4 ++-- WEB-INF/resources/hu.lang.php | 4 ++-- WEB-INF/resources/ja.lang.php | 4 ++-- WEB-INF/resources/ko.lang.php | 4 ++-- WEB-INF/resources/no.lang.php | 4 ++-- WEB-INF/resources/pt.lang.php | 3 ++- WEB-INF/resources/ro.lang.php | 4 ++-- WEB-INF/resources/tr.lang.php | 4 ++-- WEB-INF/resources/zh-cn.lang.php | 4 ++-- WEB-INF/resources/zh-tw.lang.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 25 insertions(+), 24 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a43499733..a13ac0706 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -208,7 +208,8 @@ // 'label.total' => 'Total', // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'o', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* camps requerits', @@ -543,7 +544,6 @@ "label.set_empl" => 'Seleccionar usuaris', "label.sel_all" => 'Seleccionar tots', "label.sel_none" => 'Treure totes las seleccions', -"label.or" => 'o', "label.disable" => 'Deshabilitar', "label.enable" => 'Habilitar', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 63726b784..75ad05975 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -216,7 +216,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'nebo', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* nutno vyplnit', @@ -587,7 +588,6 @@ "label.set_empl" => 'výběr uživatelů', "label.sel_all" => 'vybrat všechno', "label.sel_none" => 'zrušit výběr', -"label.or" => 'nebo', "label.disable" => 'zakázat', "label.enable" => 'povolit', "label.hrs" => 'hodin', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index c00626e26..b3f90392b 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -213,7 +213,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'või', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* nõutud väljad', @@ -592,7 +593,6 @@ "label.set_empl" => 'vali kasutajad', "label.sel_all" => 'vali kõik', "label.sel_none" => 'märgi kõik mittevalituks', -"label.or" => 'või', "label.disable" => 'keela', "label.enable" => 'luba', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c382374d3..822a02593 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -213,7 +213,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'vagy', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* kötelezően kitöltendő mezők', @@ -561,7 +562,6 @@ "label.set_empl" => 'válassz dolgozót', "label.sel_all" => 'mindenkit kijelöl', "label.sel_none" => 'senkit nem jelöl ki', -"label.or" => 'vagy', "label.disable" => 'tiltva', "label.enable" => 'engedélyezve', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 269de9147..292a8e348 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -213,7 +213,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'あるいは', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* 必須のフィールド', @@ -597,7 +598,6 @@ "label.set_empl" => 'ユーザーの選択', "label.sel_all" => 'すべて選択', "label.sel_none" => 'すべて解除', -"label.or" => 'あるいは', "label.disable" => '使用中止', "label.enable" => '使用可能', "label.hrs" => '時間', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3d44bceee..24c5cbcd1 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -213,7 +213,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => '혹은', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* 필수 필드', @@ -593,7 +594,6 @@ "label.set_empl" => '사용자들을 선택', "label.sel_all" => '모두 선택', "label.sel_none" => '모두 해제', -"label.or" => '혹은', "label.disable" => '무력화', "label.enable" => '가능화', "label.hrs" => '시간', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 9a2cd748b..7b5561a4f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -210,7 +210,8 @@ // 'label.total' => 'Total', // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'eller', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* obligatoriske felt', @@ -604,7 +605,6 @@ // Note to translators: the strings below are missing and must be translated and added // "label.sel_all" => 'velg alle', // "label.sel_none" => 'velg ingen', -// "label.or" => 'or', // "label.disable" => 'slå av', // "label.enable" => 'slå på', // "label.hrs" => 'timer', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index e46dbf5a0..e00310b22 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -204,7 +204,8 @@ // 'label.total' => 'Total', // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'ou', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* campos obrigatórios', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 6f768ed2d..443086d92 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -214,7 +214,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'sau', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* date obligatorii', @@ -573,7 +574,6 @@ "label.set_empl" => 'alege utilizatori', "label.sel_all" => 'selecteaza tot', "label.sel_none" => 'deselecteaza tot', -"label.or" => 'sau', "label.disable" => 'inactiv', "label.enable" => 'activ', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9a874e941..29c13aa15 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -220,7 +220,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => 'ya da', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* zorunlu bilgi', @@ -579,7 +580,6 @@ "label.set_empl" => 'kullanıcıları seç', "label.sel_all" => 'tümünü seç', "label.sel_none" => 'hiçbirini seçme', -"label.or" => 'ya da', "label.disable" => 'devre dışı bırak', "label.enable" => 'devreye sok', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index c79ec8f6c..bc80aa8d8 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -200,7 +200,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => '或', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* 必填栏目', @@ -587,7 +588,6 @@ "label.set_empl" => '选择用户', "label.sel_all" => '全部选择', "label.sel_none" => '全部不选', -"label.or" => '或', "label.disable" => '禁用', "label.enable" => '启用', "label.hrs" => '小时', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index d70566842..08234a59c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -209,7 +209,8 @@ // TODO: translate the following. // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', -// 'label.or' => 'or', +'label.or' => '或', +// TODO: translate the following. // 'label.error' => 'Error', // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* 必填欄目', @@ -592,7 +593,6 @@ "label.set_empl" => '選擇用戶', "label.sel_all" => '全部選擇', "label.sel_none" => '全部不選', -"label.or" => '或', "label.disable" => '禁用', "label.enable" => '啟用', "label.hrs" => '小時', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ec247152b..7aff8a850 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3895 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3896 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a1d5424b34ee023a130970feb3a6ee7cbc8c299a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 4 Feb 2018 23:34:45 +0000 Subject: [PATCH 0437/2515] Cleanup and recycling in Catalan file. --- WEB-INF/resources/ca.lang.php | 45 ++++++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a13ac0706..c2b6b2e8c 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -61,7 +61,8 @@ 'menu.teams' => 'Equips', // TODO: translate the following. // 'menu.export' => 'Export', -// 'menu.clients' => 'Clients', +'menu.clients' => 'Clients', +// TODO: translate the following. // 'menu.options' => 'Options', // Footer - strings on the bottom of most pages. @@ -164,10 +165,12 @@ // 'label.end_date' => 'End date', // 'label.user' => 'User', // 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', +'label.client' => 'Client', +'label.clients' => 'Clients', +// TODO: translate the following. // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Factura', +// TODO: translate the following. // 'label.project' => 'Project', // 'label.projects' => 'Projects', // 'label.task' => 'Task', @@ -201,9 +204,11 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Comentari', +// TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'Impost', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', // 'label.total' => 'Total', // 'label.client_name' => 'Client name', @@ -266,7 +271,8 @@ 'title.report' => 'Informe', // TODO: translate the following. // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Factura', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', // 'title.projects' => 'Projects', @@ -281,11 +287,12 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', -// 'title.invoices' => 'Invoices', +'title.clients' => 'Clients', +'title.add_client' => 'Agregar client', +'title.edit_client' => 'Modificar client', +'title.delete_client' => 'Eliminar client', +'title.invoices' => 'Factures', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -331,7 +338,8 @@ // 'dropdown.all_time' => 'all time', // 'dropdown.projects' => 'projects', // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'clients', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -491,8 +499,6 @@ "form.mail.sending_str" => 'Missatge enviat', // invoice attributes -"form.invoice.title" => 'Factura', -"form.invoice.caption" => 'Factura', "form.invoice.above" => 'Informació addicional per factura', "form.invoice.select_cust" => 'Seleccioni el client', "form.invoice.fillform" => 'Empleni els camps', @@ -518,17 +524,9 @@ "form.migration.export.success" => 'Exportació finalitzada amb èxit', "form.migration.export.text" => 'Vosté pot exportar totes les dades del grup dins d\\\'un archivo xml. Això pot ser útil si necessita migrar dades al seu propi servidor.', -"form.client.title" => 'Clients', -"form.client.add_title" => 'Agregar client', -"form.client.edit_title" => 'Modificar client', -"form.client.del_title" => 'Eliminar client', -"form.client.tax" => 'Impost', -"form.client.comment" => 'Comentari ', - // miscellaneous strings "forward.forgot_password" => '¿Ha oblidat la seva paraula de pas?', "forward.tocsvfile" => 'Exportar dades a un arxiu .csv', -"forward.geninvoice" => 'Generar factura', "controls.project_bind" => '--- Tots ---', "controls.all" => '--- Tots ---', @@ -540,7 +538,6 @@ "controls.per_td" => 'Aquest dia', "controls.per_lw" => 'La setmana passada', -"label.inv_str" => 'Factura', "label.set_empl" => 'Seleccionar usuaris', "label.sel_all" => 'Seleccionar tots', "label.sel_none" => 'Treure totes las seleccions', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7aff8a850..d83d7911e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3896 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3897 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 263a4924b085965afa24a82f22f89182cd6e9e7e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 13:04:59 +0000 Subject: [PATCH 0438/2515] A bit of recycling in translations. --- WEB-INF/resources/cs.lang.php | 9 +++------ WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 11 +++++------ WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 75ad05975..d5ebab17d 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -370,7 +370,7 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => 'K fakturaci', // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -387,9 +387,9 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => 'Opravdu chceš vymazat tuto položku z oblíbených?', +'form.reports.include_billable' => 'k fakturaci', +'form.reports.include_not_billable' => 'mimo fakturaci', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.select_period' => 'Select time period', @@ -451,7 +451,6 @@ "form.mytime.th.note" => 'poznámka', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', "form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', -"form.mytime.billable" => 'k fakturaci', "form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', // Note to translators: the string below is missing in the translation and must be added // "form.mytime.uncompleted" => 'uncompleted', @@ -577,8 +576,6 @@ "controls.per_td" => 'dnes', "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', -"controls.inc_billable" => 'k fakturaci', -"controls.inc_nbillable" => 'mimo fakturaci', "label.sel_tp" => 'výberte období', "label.set_tp" => 'nebo určete dny', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b3f90392b..f6a97afe3 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -455,7 +455,6 @@ "form.mytime.th.note" => 'märkus', "form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', -"form.mytime.billable" => 'arvestatav', "form.mytime.warn_tozero_rec" => 'see ajakanne tuleb kustutada kuna see ajaperiood on lukustatud', // Note to translators: the string below must be translated and added // "form.mytime.uncompleted" => 'uncompleted', @@ -586,8 +585,6 @@ "controls.per_lw" => 'eelmine nädal', "controls.per_td" => 'täna', "controls.per_at" => 'kõik ajad', -"controls.inc_billable" => 'arvestatav', -"controls.inc_nbillable" => 'mittearvestatav', "label.inv_str" => 'arved', "label.set_empl" => 'vali kasutajad', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 292a8e348..36627e3be 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -367,7 +367,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => '請求できる', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -384,8 +385,9 @@ 'form.reports.save_as_favorite' => 'お気に入りに保存', 'form.reports.confirm_delete' => 'このお気に入りレポートを削除しますか?', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', +'form.reports.include_billable' => '請求できる', +'form.reports.include_not_billable' => '請求できません', +// TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.select_period' => 'Select time period', @@ -449,7 +451,6 @@ "form.mytime.th.note" => 'ノート', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', -"form.mytime.billable" => '請求できる', "form.mytime.warn_tozero_rec" => 'この時間レコードの期間が満了されましたから、この時間レコードは削除されることが必要です', "form.mytime.uncompleted" => '未完成の', @@ -585,8 +586,6 @@ "controls.per_at" => 'すべての時間', "controls.per_ty" => '今年', "controls.sel_period" => '--- 時間期間の選択 ---', -"controls.inc_billable" => '請求できる', -"controls.inc_nbillable" => '請求できません', "controls.default" => '--- デフォルト ---', "label.sel_tp" => '時間期間の選択', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d83d7911e..69ede36fa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3897 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3898 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 71fec3f0a23c27d6fce365e4c45b1981caf2bfaf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 13:28:03 +0000 Subject: [PATCH 0439/2515] Some more recycling. --- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 11 ++++------- WEB-INF/resources/no.lang.php | 12 ++++-------- WEB-INF/resources/zh-cn.lang.php | 11 ++++------- WEB-INF/resources/zh-tw.lang.php | 11 ++++------- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 17 insertions(+), 31 deletions(-) diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 36627e3be..a9393baff 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -586,7 +586,6 @@ "controls.per_at" => 'すべての時間', "controls.per_ty" => '今年', "controls.sel_period" => '--- 時間期間の選択 ---', -"controls.default" => '--- デフォルト ---', "label.sel_tp" => '時間期間の選択', "label.set_tp" => 'あるいは日付を設定', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 24c5cbcd1..11d63d718 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -365,7 +365,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => '청구가능', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -382,9 +383,9 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => '좋아하는 이 보고서를 삭제해도 좋습니까?', +'form.reports.include_billable' => '청구 가능한', +'form.reports.include_not_billable' => '청구 가능하지 않은', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.select_period' => 'Select time period', @@ -451,7 +452,6 @@ "form.mytime.th.note" => '표식', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', -"form.mytime.billable" => '청구가능', "form.mytime.warn_tozero_rec" => '이 시간기간이 로크되었으므로 이 시간기록은 삭제되어야 합니다', "form.mytime.uncompleted" => '완성되지 않은', @@ -581,9 +581,6 @@ "controls.per_at" => '전시간', "controls.per_ty" => '올해', "controls.sel_period" => '--- 시간 기간을 선택 ---', -"controls.inc_billable" => '청구 가능한', -"controls.inc_nbillable" => '청구 가능하지 않은', -"controls.default" => '--- 디폴트 ---', "label.sel_tp" => '시간 기간을 선택', "label.set_tp" => '혹은 날짜를 설정', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 7b5561a4f..5b4d5d4b6 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -358,7 +358,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => 'Fakturerbar', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -375,9 +376,9 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => 'Er du sikker på at du vil slette denne favorittrapporten?', +'form.reports.include_billable' => 'fakturerbar', +'form.reports.include_not_billable' => 'ikke fakturerbar', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.select_period' => 'Select time period', @@ -448,7 +449,6 @@ // Note to translators: the strings below must be translated // "form.mytime.del_yes" => 'tidsoppføringen er slettet', // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', -// "form.mytime.billable" => 'kan faktureres', // "form.mytime.warn_tozero_rec" => 'Denne oppføringen må slettes fordi tidsperioden er låst', // "form.mytime.uncompleted" => 'uferdig', @@ -590,10 +590,6 @@ // "controls.per_at" => 'all tid', // "controls.per_ty" => 'dette årr', "controls.sel_period" => '--- velg tidsperiode ---', -// Note to translators: the strings below are missing and must be translated and added -// "controls.inc_billable" => 'fakturerbar', -// "controls.inc_nbillable" => 'ikke fakturerbar', -// "controls.default" => '--- default ---', // labels "label.sel_tp" => 'velg tidsperiode', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index bc80aa8d8..093436b4a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -349,7 +349,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => '计费时间', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -366,9 +367,9 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => '您确认要删除收藏的这个报告吗?', +'form.reports.include_billable' => '计费时间', +'form.reports.include_not_billable' => '非计费时间', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', 'form.reports.select_period' => '选择时间段', @@ -444,7 +445,6 @@ "form.mytime.th.note" => '备注', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', -"form.mytime.billable" => '计费时间', "form.mytime.warn_tozero_rec" => '由于这段时间是锁定的,该时间记录必须删除', "form.mytime.uncompleted" => '未完成', @@ -580,9 +580,6 @@ "controls.per_at" => '全部时间', "controls.per_ty" => '今年', "controls.sel_period" => '--- 选择时间段 ---', -"controls.inc_billable" => '计费时间', -"controls.inc_nbillable" => '非计费时间', -"controls.default" => '--- 默认 ---', "label.inv_str" => '发票', "label.set_empl" => '选择用户', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 08234a59c..ccf55e543 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -358,7 +358,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', -// 'form.time.billable' => 'Billable', +'form.time.billable' => '計費時間', +// TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -375,9 +376,9 @@ // TODO: translate the following. // 'form.reports.save_as_favorite' => 'Save as favorite', 'form.reports.confirm_delete' => '您確認要刪除收藏的這個報告嗎?', +'form.reports.include_billable' => '計費時間', +'form.reports.include_not_billable' => '非計費時間', // TODO: translate the following. -// 'form.reports.include_billable' => 'billable', -// 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', // 'form.reports.select_period' => 'Select time period', @@ -444,7 +445,6 @@ "form.mytime.th.note" => '備註', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', -"form.mytime.billable" => '計費時間', "form.mytime.warn_tozero_rec" => '由於這段時間是鎖定的,該時間記錄必須刪除', "form.mytime.uncompleted" => '未完成', @@ -580,9 +580,6 @@ "controls.per_at" => '全部時間', "controls.per_ty" => '今年', "controls.sel_period" => '--- 選擇時間段 ---', -"controls.inc_billable" => '計費時間', -"controls.inc_nbillable" => '非計費時間', -"controls.default" => '--- 默認 ---', "label.sel_tp" => '選擇時間段', "label.set_tp" => '或設定日期', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 69ede36fa..da69485a6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3898 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3899 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 14694940d3905eb4b429dc7b936ff80c80ef3783 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 13:53:02 +0000 Subject: [PATCH 0440/2515] More recycling in translation files. --- WEB-INF/resources/cs.lang.php | 11 +++++------ WEB-INF/resources/hu.lang.php | 12 ++++-------- WEB-INF/resources/ja.lang.php | 14 ++++---------- WEB-INF/resources/ko.lang.php | 14 ++++---------- WEB-INF/resources/no.lang.php | 12 +++--------- WEB-INF/resources/pt.lang.php | 12 +++--------- WEB-INF/resources/ro.lang.php | 14 ++++---------- WEB-INF/resources/zh-tw.lang.php | 14 ++++---------- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 32 insertions(+), 73 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d5ebab17d..2d96bd617 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -392,10 +392,11 @@ // TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => 'Výberte období', +'form.reports.set_period' => 'nebo určete dny', +'form.reports.show_fields' => 'Zobrazit pole', +'form.reports.group_by' => 'Seskupit podle', +// TODO: translate the following. // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', @@ -577,8 +578,6 @@ "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', -"label.sel_tp" => 'výberte období', -"label.set_tp" => 'nebo určete dny', "label.fields" => 'zobrazit pole', "label.group_title" => 'seskupit podle', "label.inv_str" => 'faktura', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 822a02593..2b460f17f 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -386,10 +386,11 @@ // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', +'form.reports.select_period' => 'Jelölj meg egy időszakot', +'form.reports.set_period' => 'vagy állíts be konkrét dátumot', +// TODO: translate the following. // 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.group_by' => 'Csoportosítva', 'form.reports.group_by_no' => '--- csoportosítás nélkül ---', // TODO: translate the following. // 'form.reports.group_by_date' => 'date', @@ -551,13 +552,8 @@ "controls.per_lm" => 'múlt hónapban', "controls.per_tw" => 'ezen a héten', "controls.per_lw" => 'múlt héten', -"controls.sel_period" => '--- válassz időszakot ---', // labels -"label.sel_tp" => 'jelölj meg egy időszakot', -"label.set_tp" => '... vagy állíts be konkrét dátumot', -"label.fields" => 'csak a kijelölt mezők fognak szerepelni a riportban', -"label.group_title" => 'csoportosítva', "label.inv_str" => 'számla', "label.set_empl" => 'válassz dolgozót', "label.sel_all" => 'mindenkit kijelöl', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index a9393baff..9e95cdfad 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -390,10 +390,10 @@ // TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => '時間期間の選択', +'form.reports.set_period' => 'あるいは日付を設定', +'form.reports.show_fields' => 'フィールドの表示', +'form.reports.group_by' => '次のようにグループ化', 'form.reports.group_by_no' => '--- グループの機能がありません ---', // TODO: translate the following. // 'form.reports.group_by_date' => 'date', @@ -585,12 +585,6 @@ "controls.per_td" => '今日', "controls.per_at" => 'すべての時間', "controls.per_ty" => '今年', -"controls.sel_period" => '--- 時間期間の選択 ---', - -"label.sel_tp" => '時間期間の選択', -"label.set_tp" => 'あるいは日付を設定', -"label.fields" => 'フィールドの表示', -"label.group_title" => '次のようにグループ化', "label.inv_str" => '送り状', "label.set_empl" => 'ユーザーの選択', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 11d63d718..f0a76b759 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -388,10 +388,10 @@ // TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => '시간 기간을 선택', +'form.reports.set_period' => '혹은 날짜를 설정', +'form.reports.show_fields' => '필드들을 보기', +'form.reports.group_by' => '다음것에 의한 그룹화', 'form.reports.group_by_no' => '--- 그룹화되지 않음 ---', // TODO: translate the following. // 'form.reports.group_by_date' => 'date', @@ -580,12 +580,6 @@ "controls.per_td" => '오늘', "controls.per_at" => '전시간', "controls.per_ty" => '올해', -"controls.sel_period" => '--- 시간 기간을 선택 ---', - -"label.sel_tp" => '시간 기간을 선택', -"label.set_tp" => '혹은 날짜를 설정', -"label.fields" => '필드들을 보기', -"label.group_title" => '다음것에 의한 그룹화', "label.inv_str" => '송장', "label.set_empl" => '사용자들을 선택', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 5b4d5d4b6..6ef7f4fcb 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -381,9 +381,9 @@ // TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', +'form.reports.select_period' => 'Velg tidsperiode', +'form.reports.set_period' => 'eller sett dato', +'form.reports.show_fields' => 'Vis feltene', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', @@ -589,13 +589,7 @@ // "controls.per_td" => 'i dag', // "controls.per_at" => 'all tid', // "controls.per_ty" => 'dette årr', -"controls.sel_period" => '--- velg tidsperiode ---', -// labels -"label.sel_tp" => 'velg tidsperiode', -"label.set_tp" => 'eller sett dato', -"label.fields" => 'vis feltene', -"label.group_title" => 'sorter på', "label.inv_str" => 'faktura', "label.set_empl" => 'velg brukere', // Note to translators: the strings below are missing and must be translated and added diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index e00310b22..4c4c6b0cf 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -375,9 +375,9 @@ // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', +'form.reports.select_period' => 'Selecione o período de tempo', +'form.reports.set_period' => 'ou selecionar datas', +'form.reports.show_fields' => 'Exibir campos', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', @@ -482,10 +482,4 @@ "controls.per_lm" => 'último mês', "controls.per_tw" => 'esta semana', "controls.per_lw" => 'última semana', -"controls.sel_period" => '--- selecione o período de tempo ---', - -// labels -"label.sel_tp" => 'selecione o período de tempo', -"label.set_tp" => 'ou selecionar datas', -"label.fields" => 'exibir campos', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 443086d92..6f65be521 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -384,10 +384,10 @@ // 'form.reports.include_not_billable' => 'not billable', // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => 'Alege perioada', +'form.reports.set_period' => 'sau introdu intervalul de date', +'form.reports.show_fields' => 'Arata campuri', +'form.reports.group_by' => 'Grupat dupa', 'form.reports.group_by_no' => '--- fara grupare ---', // TODO: translate the following. // 'form.reports.group_by_date' => 'date', @@ -563,13 +563,7 @@ "controls.per_lm" => 'luna trecuta', "controls.per_tw" => 'saptamana curenta', "controls.per_lw" => 'saptamana trecuta', -"controls.sel_period" => '--- alege perioada ---', -// labels -"label.sel_tp" => 'alege perioada', -"label.set_tp" => 'sau introdu intervalul de date', -"label.fields" => 'arata campuri', -"label.group_title" => 'grupat dupa', "label.inv_str" => 'factura', "label.set_empl" => 'alege utilizatori', "label.sel_all" => 'selecteaza tot', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ccf55e543..b90145499 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -381,10 +381,10 @@ // TODO: translate the following. // 'form.reports.include_invoiced' => 'invoiced', // 'form.reports.include_not_invoiced' => 'not invoiced', -// 'form.reports.select_period' => 'Select time period', -// 'form.reports.set_period' => 'or set dates', -// 'form.reports.show_fields' => 'Show fields', -// 'form.reports.group_by' => 'Group by', +'form.reports.select_period' => '選擇時間段', +'form.reports.set_period' => '或設定日期', +'form.reports.show_fields' => '顯示欄目', +'form.reports.group_by' => '分組方式', 'form.reports.group_by_no' => '--- 沒有分組 ---', // TODO: translate the following. // 'form.reports.group_by_date' => 'date', @@ -579,12 +579,6 @@ "controls.per_td" => '今天', "controls.per_at" => '全部時間', "controls.per_ty" => '今年', -"controls.sel_period" => '--- 選擇時間段 ---', - -"label.sel_tp" => '選擇時間段', -"label.set_tp" => '或設定日期', -"label.fields" => '顯示欄目', -"label.group_title" => '分組方式:', "label.inv_str" => '發票', "label.set_empl" => '選擇用戶', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index da69485a6..2bf792d3b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3899 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3900 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 59cc31a364495ff91d9b43fada500982418fd4e7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 14:09:52 +0000 Subject: [PATCH 0441/2515] More recycling in translations. --- WEB-INF/resources/ca.lang.php | 3 +-- WEB-INF/resources/cs.lang.php | 3 +-- WEB-INF/resources/et.lang.php | 3 +-- WEB-INF/resources/hu.lang.php | 3 +-- WEB-INF/resources/ja.lang.php | 3 +-- WEB-INF/resources/ko.lang.php | 3 +-- WEB-INF/resources/no.lang.php | 3 +-- WEB-INF/resources/pt.lang.php | 5 +---- WEB-INF/resources/ro.lang.php | 3 +-- WEB-INF/resources/tr.lang.php | 3 +-- WEB-INF/resources/zh-cn.lang.php | 3 +-- WEB-INF/resources/zh-tw.lang.php | 3 +-- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 13 insertions(+), 27 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index c2b6b2e8c..2d332432b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -350,8 +350,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => '¿Ha oblidat la seva paraula de pas?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -525,7 +525,6 @@ "form.migration.export.text" => 'Vosté pot exportar totes les dades del grup dins d\\\'un archivo xml. Això pot ser útil si necessita migrar dades al seu propi servidor.', // miscellaneous strings -"forward.forgot_password" => '¿Ha oblidat la seva paraula de pas?', "forward.tocsvfile" => 'Exportar dades a un arxiu .csv', "controls.project_bind" => '--- Tots ---', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2d96bd617..282fe930e 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -353,8 +353,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Zapomenuté heslo?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -561,7 +561,6 @@ "form.client.comment" => 'poznámka ', // miscellaneous strings -"forward.forgot_password" => 'zapomenuté heslo?', "forward.tocsvfile" => 'exportovat data do .csv souboru', "forward.toxmlfile" => 'exportovat data do .xml souboru', "forward.geninvoice" => 'vytvořit fakturu', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index f6a97afe3..25e8afa2e 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -351,8 +351,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Unustasid salasõna?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -570,7 +570,6 @@ "form.client.comment" => 'märkus ', // miscellaneous strings -"forward.forgot_password" => 'unustasid salasõna?', "forward.tocsvfile" => 'ekspordi andmed .csv faili', "forward.toxmlfile" => 'ekspordi andmed .xml faili', "forward.geninvoice" => 'loo arve', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 2b460f17f..3aef04eed 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -348,8 +348,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Elfelejtetted a jelszót?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -540,7 +540,6 @@ "form.client.comment" => 'megjegyzés ', // miscellaneous strings -"forward.forgot_password" => 'elfelejtetted a jelszót?', "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', "forward.geninvoice" => 'számla készítés', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 9e95cdfad..57dfd5395 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -350,8 +350,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'パスワードを忘れましたか?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -569,7 +569,6 @@ "form.client.comment" => 'コメント ', // miscellaneous strings -"forward.forgot_password" => 'パスワードを忘れましたか?', "forward.tocsvfile" => 'csvファイルにエクスポート', "forward.toxmlfile" => 'xmlファイルにエクスポート', "forward.geninvoice" => '送り状の作成', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f0a76b759..2f3eba603 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -348,8 +348,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => '암호를 잊으셨습니까?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -564,7 +564,6 @@ "form.client.comment" => '코멘트 ', // miscellaneous strings -"forward.forgot_password" => '암호를 잊으셨습니까?', "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', "forward.geninvoice" => '송장 만들기', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 6ef7f4fcb..247fcdb01 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -341,8 +341,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Glemt passordet?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -569,7 +569,6 @@ // "form.client.comment" => 'kommentar ', // miscellaneous strings -"forward.forgot_password" => 'glemt passordet?', "forward.tocsvfile" => 'eksporter data til en .csv fil', // Note to translators: the strings below are missing and must be translated and added // "forward.toxmlfile" => 'eksporter data til en .xml fil', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 4c4c6b0cf..efec8b810 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -337,8 +337,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Esqueceu a senha?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -475,9 +475,6 @@ // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // "form.mail.sending_str" => 'the message has been sent', -// miscellaneous strings -"forward.forgot_password" => 'esqueceu a senha?', - "controls.per_tm" => 'este mês', "controls.per_lm" => 'último mês', "controls.per_tw" => 'esta semana', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 6f65be521..43c9bc65d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -346,8 +346,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Parola pierduta?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -551,7 +551,6 @@ "form.client.comment" => 'comentariu ', // miscellaneous strings -"forward.forgot_password" => 'parola pierduta?', "forward.tocsvfile" => 'exporta date in fisier .csv', "forward.geninvoice" => 'genereaza factura', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 29c13aa15..5cc10983f 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -354,8 +354,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => 'Parolanızı unuttunuz mu?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -559,7 +559,6 @@ "form.client.comment" => 'yorum ', // miscellaneous strings -"forward.forgot_password" => 'parolanızı unuttunuz mu?', "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', "forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', "forward.geninvoice" => 'fatura yarat', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 093436b4a..3dd3896cd 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -332,8 +332,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => '忘记密码?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -563,7 +563,6 @@ "form.client.comment" => '备注', // miscellaneous strings -"forward.forgot_password" => '忘记密码?', "forward.tocsvfile" => '将数据导出到.csv文件', "forward.toxmlfile" => '将数据导出到.xml文件', "forward.geninvoice" => '生成发票', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index b90145499..2f270a2d8 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -341,8 +341,8 @@ // 'dropdown.not_paid' => 'not paid', // Login form. See example at https://timetracker.anuko.com/login.php. +'form.login.forgot_password' => '忘記密碼?', // TODO: translate the following. -// 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -563,7 +563,6 @@ "form.client.comment" => '備註', // miscellaneous strings -"forward.forgot_password" => '忘記密碼?', "forward.tocsvfile" => '將資料輸出到.csv文件', "forward.toxmlfile" => '將資料輸出到.xml文件', "forward.geninvoice" => '生成發票', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2bf792d3b..e50a6a6ef 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3900 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3901 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 1593111c571fb4ab79ed1a7239552767f5e2dce0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 14:58:23 +0000 Subject: [PATCH 0442/2515] Some more recycling in translation files. --- WEB-INF/resources/ca.lang.php | 9 +++------ WEB-INF/resources/cs.lang.php | 15 +++++---------- WEB-INF/resources/et.lang.php | 13 +++++-------- WEB-INF/resources/hu.lang.php | 9 +++------ WEB-INF/resources/ja.lang.php | 9 +++------ WEB-INF/resources/ko.lang.php | 9 +++------ WEB-INF/resources/no.lang.php | 9 +++------ WEB-INF/resources/pt.lang.php | 12 ++---------- WEB-INF/resources/ro.lang.php | 6 +----- WEB-INF/resources/tr.lang.php | 9 +++------ WEB-INF/resources/zh-cn.lang.php | 9 +++------ WEB-INF/resources/zh-tw.lang.php | 9 +++------ WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 38 insertions(+), 82 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 2d332432b..2053e8104 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -179,8 +179,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Nota', +'label.notes' => 'Notes', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -427,14 +428,12 @@ "form.mytime.start" => 'Inici', "form.mytime.finish" => 'Fi', "form.mytime.duration" => 'Durada', -"form.mytime.note" => 'Nota', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', "form.mytime.th.project" => 'Projecte', "form.mytime.th.start" => 'Inici', "form.mytime.th.finish" => 'Fi', "form.mytime.th.duration" => 'Durada', -"form.mytime.th.note" => 'Nota', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', "form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', @@ -473,7 +472,6 @@ "form.report.duration" => 'Durada', "form.report.start" => 'Inici', "form.report.finish" => 'Fi', -"form.report.note" => 'Nota', "form.report.project" => 'Projecte', "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', @@ -483,7 +481,6 @@ "form.report.th.start" => 'Inici', "form.report.th.finish" => 'Fi', "form.report.th.duration" => 'Durada', -"form.report.th.note" => 'Nota', // charts form attributes // Note to translators: form.charts.title needs to be translated. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 282fe930e..aa4350515 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -180,8 +180,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Poznámka', +'label.notes' => 'Poznámky', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -208,7 +209,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Komentář', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -442,14 +444,12 @@ "form.mytime.start" => 'začátek', "form.mytime.finish" => 'konec', "form.mytime.duration" => 'trvání', -"form.mytime.note" => 'poznámka', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', "form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'začátek', "form.mytime.th.finish" => 'konec', "form.mytime.th.duration" => 'trvání', -"form.mytime.th.note" => 'poznámka', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', "form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', "form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', @@ -500,7 +500,6 @@ "form.report.duration" => 'trvání', "form.report.start" => 'počátek', "form.report.finish" => 'konec', -"form.report.note" => 'poznámka', "form.report.project" => 'projekt', "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', @@ -510,12 +509,10 @@ "form.report.th.start" => 'počátek', "form.report.th.finish" => 'konec', "form.report.th.duration" => 'trvání', -"form.report.th.note" => 'poznámka', // mail form attributes "form.mail.from" => 'od', "form.mail.to" => 'komu', -"form.mail.comment" => 'komentář', "form.mail.above" => 'poslat sestavu e-mailem', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -530,7 +527,6 @@ "form.invoice.date" => 'datum', "form.invoice.number" => 'faktura číslo', "form.invoice.tax" => 'DPH', -"form.invoice.comment" => 'komentář ', "form.invoice.th.username" => 'osoba', "form.invoice.th.time" => 'hodin', "form.invoice.th.rate" => 'sazba', @@ -558,7 +554,6 @@ "form.client.edit_title" => 'upravit zákazníka', "form.client.del_title" => 'smazat zákazníka', "form.client.tax" => 'DPH', -"form.client.comment" => 'poznámka ', // miscellaneous strings "forward.tocsvfile" => 'exportovat data do .csv souboru', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 25e8afa2e..d1aa1416b 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -178,8 +178,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Märkus', +'label.notes' => 'Märkused', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -205,7 +206,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Kommentaar', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -445,14 +447,12 @@ "form.mytime.start" => 'algus', "form.mytime.finish" => 'lõpp', "form.mytime.duration" => 'kestus', -"form.mytime.note" => 'märkus', "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', "form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'algus', "form.mytime.th.finish" => 'lõpp', "form.mytime.th.duration" => 'kestus', -"form.mytime.th.note" => 'märkus', "form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', "form.mytime.warn_tozero_rec" => 'see ajakanne tuleb kustutada kuna see ajaperiood on lukustatud', @@ -509,7 +509,6 @@ "form.report.duration" => 'kestus', "form.report.start" => 'algus', "form.report.finish" => 'lõpp', -"form.report.note" => 'märkus', "form.report.project" => 'projekt', "form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', @@ -519,12 +518,10 @@ "form.report.th.start" => 'algus', "form.report.th.finish" => 'lõpp', "form.report.th.duration" => 'kestus', -"form.report.th.note" => 'märkus', // mail form attributes "form.mail.from" => 'kellelt', "form.mail.to" => 'kellele', -"form.mail.comment" => 'märkus', "form.mail.above" => 'saada aruanne e-mailiga', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 3aef04eed..426e278fd 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -179,8 +179,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Megjegyzés', +'label.notes' => 'Megjegyzések', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -432,14 +433,12 @@ "form.mytime.start" => 'kezdete', "form.mytime.finish" => 'vége', "form.mytime.duration" => 'hossz', -"form.mytime.note" => 'megjegyzés', "form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', "form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'kezdete', "form.mytime.th.finish" => 'vége', "form.mytime.th.duration" => 'hossz', -"form.mytime.th.note" => 'megjegyzés', "form.mytime.del_yes" => 'a bejegyzés törölve', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', @@ -483,7 +482,6 @@ "form.report.duration" => 'időtartam', "form.report.start" => 'kezdet', "form.report.finish" => 'befejezés', -"form.report.note" => 'megjegyzés', "form.report.project" => 'projekt', "form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', @@ -493,7 +491,6 @@ "form.report.th.start" => 'elkezdve', "form.report.th.finish" => 'befejezve', "form.report.th.duration" => 'időtartam', -"form.report.th.note" => 'megjegyzés', // mail form attributes "form.mail.from" => 'feladó', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 57dfd5395..bece0e4c2 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -178,8 +178,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'ノート', +'label.notes' => 'ノート', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -441,14 +442,12 @@ "form.mytime.start" => '開始', "form.mytime.finish" => '終了', "form.mytime.duration" => '期間', -"form.mytime.note" => 'ノート', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', "form.mytime.th.project" => 'プロジェクト', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '終了', "form.mytime.th.duration" => '期間', -"form.mytime.th.note" => 'ノート', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', "form.mytime.warn_tozero_rec" => 'この時間レコードの期間が満了されましたから、この時間レコードは削除されることが必要です', @@ -509,7 +508,6 @@ "form.report.duration" => '期間', "form.report.start" => '開始', "form.report.finish" => '終了', -"form.report.note" => 'ノート', "form.report.project" => 'プロジェクト', "form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', @@ -519,7 +517,6 @@ "form.report.th.start" => '開始', "form.report.th.finish" => '終了', "form.report.th.duration" => '期間', -"form.report.th.note" => 'ノート', // mail form attributes "form.mail.from" => 'から', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 2f3eba603..daba7b98a 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -177,8 +177,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => '표식', +'label.notes' => '표식', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -442,14 +443,12 @@ "form.mytime.start" => '시작', "form.mytime.finish" => '마감', "form.mytime.duration" => '기간', -"form.mytime.note" => '표식', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', "form.mytime.th.project" => '프로젝트', "form.mytime.th.start" => '시작', "form.mytime.th.finish" => '마감', "form.mytime.th.duration" => '기간', -"form.mytime.th.note" => '표식', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', "form.mytime.warn_tozero_rec" => '이 시간기간이 로크되었으므로 이 시간기록은 삭제되어야 합니다', @@ -504,7 +503,6 @@ "form.report.duration" => '기간', "form.report.start" => '시작', "form.report.finish" => '마감', -"form.report.note" => '표식', "form.report.project" => '프로젝트', "form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', @@ -514,7 +512,6 @@ "form.report.th.start" => '시작', "form.report.th.finish" => '마감', "form.report.th.duration" => '기간', -"form.report.th.note" => '주의', // mail form attributes "form.mail.from" => '부터', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 247fcdb01..72e1fda2f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -176,8 +176,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Notat', +'label.notes' => 'Notater', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -438,14 +439,12 @@ "form.mytime.start" => 'starttid', "form.mytime.finish" => 'ferdig', "form.mytime.duration" => 'varighet', -"form.mytime.note" => 'notat', "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', "form.mytime.th.project" => 'prosjekt', "form.mytime.th.start" => 'starttid', "form.mytime.th.finish" => 'ferdig', "form.mytime.th.duration" => 'varighet', -"form.mytime.th.note" => 'notat', // Note to translators: the strings below must be translated // "form.mytime.del_yes" => 'tidsoppføringen er slettet', // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', @@ -506,7 +505,6 @@ "form.report.duration" => 'varighet', "form.report.start" => 'starttid', "form.report.finish" => 'ferdig', -"form.report.note" => 'notat', "form.report.project" => 'prosjekt', // Note to translators: the strings below must be translated // "form.report.totals_only" => 'kun summer', @@ -517,7 +515,6 @@ "form.report.th.start" => 'starttid', "form.report.th.finish" => 'ferdig', "form.report.th.duration" => 'varighet', -"form.report.th.note" => 'notat', // mail form attributes "form.mail.from" => 'fra', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index efec8b810..f6946d990 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -171,9 +171,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', 'label.duration' => 'Duração', +'label.note' => 'Anotação', +'label.notes' => 'Anotações', // TODO: translate the following. -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -404,20 +404,13 @@ "form.mytime.project" => 'projeto', "form.mytime.start" => 'início', "form.mytime.finish" => 'fim', -"form.mytime.note" => 'anotação', "form.mytime.daily" => 'trabalho diário', "form.mytime.total" => 'horas totais: ', "form.mytime.th.project" => 'projeto', "form.mytime.th.start" => 'início', "form.mytime.th.finish" => 'finish', "form.mytime.th.duration" => 'duração', -"form.mytime.th.note" => 'fim', "form.mytime.del_yes" => 'o período registrado foi apagado com sucesso', -// Note to translators: the strings below are missing and must be added and translated -// "form.mytime.no_finished_rec" => 'this record was saved with only start time. it is not an error. logout if you need to.', -// "form.mytime.billable" => 'billable', -// "form.mytime.warn_tozero_rec" => 'this time record must be deleted because this time period is locked', -// "form.mytime.uncompleted" => 'uncompleted', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title @@ -457,7 +450,6 @@ "form.report.duration" => 'duração', "form.report.start" => 'início', "form.report.finish" => 'fim', -"form.report.note" => 'anotação', "form.report.project" => 'projeto', // Note to translators: the string below is missing and must be added and translated // "form.report.totals_only" => 'totals only', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 43c9bc65d..005badda2 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -179,7 +179,7 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', +'label.note' => 'Nota', // 'label.notes' => 'Notes', // 'label.item' => 'Item', // 'label.cost' => 'Cost', @@ -439,14 +439,12 @@ "form.mytime.start" => 'inceput', "form.mytime.finish" => 'sfarsit', "form.mytime.duration" => 'durata', -"form.mytime.note" => 'nota', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', "form.mytime.th.project" => 'proiect', "form.mytime.th.start" => 'inceput', "form.mytime.th.finish" => 'sfarsit', "form.mytime.th.duration" => 'durata', -"form.mytime.th.note" => 'nota', "form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', @@ -490,7 +488,6 @@ "form.report.duration" => 'durata', "form.report.start" => 'inceput', "form.report.finish" => 'sfarsit', -"form.report.note" => 'nota', "form.report.project" => 'proiect', "form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', @@ -500,7 +497,6 @@ "form.report.th.start" => 'inceput', "form.report.th.finish" => 'sfarsit', "form.report.th.duration" => 'durata', -"form.report.th.note" => 'nota', // mail form attributes "form.mail.from" => 'de la', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 5cc10983f..986b6b3d0 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -185,8 +185,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => 'Not', +'label.notes' => 'Notlar', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -443,14 +444,12 @@ "form.mytime.start" => 'başlat', "form.mytime.finish" => 'tamamla', "form.mytime.duration" => 'süre', -"form.mytime.note" => 'not', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', "form.mytime.th.project" => 'proje', "form.mytime.th.start" => 'başlat', "form.mytime.th.finish" => 'tamamla', "form.mytime.th.duration" => 'süre', -"form.mytime.th.note" => 'not', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', @@ -502,7 +501,6 @@ "form.report.duration" => 'süre', "form.report.start" => 'başlangıç', "form.report.finish" => 'son', -"form.report.note" => 'not', "form.report.project" => 'proje', "form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', @@ -512,7 +510,6 @@ "form.report.th.start" => 'başlangıç', "form.report.th.finish" => 'son', "form.report.th.duration" => 'süre', -"form.report.th.note" => 'not', // mail form attributes "form.mail.from" => 'kimden', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 3dd3896cd..2bb7e8e2d 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -165,8 +165,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => '备注', +'label.notes' => '备注', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -435,14 +436,12 @@ "form.mytime.start" => '开始', "form.mytime.finish" => '结束', "form.mytime.duration" => '持续时间', -"form.mytime.note" => '备注', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', "form.mytime.th.project" => '项目', "form.mytime.th.start" => '开始', "form.mytime.th.finish" => '结束', "form.mytime.th.duration" => '持续时间', -"form.mytime.th.note" => '备注', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', "form.mytime.warn_tozero_rec" => '由于这段时间是锁定的,该时间记录必须删除', @@ -503,7 +502,6 @@ "form.report.duration" => '持续时间', "form.report.start" => '开始', "form.report.finish" => '结束', -"form.report.note" => '备注', "form.report.project" => '项目', "form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', @@ -513,7 +511,6 @@ "form.report.th.start" => '开始', "form.report.th.finish" => '结束', "form.report.th.duration" => '持续时间', -"form.report.th.note" => '备注', // mail form attributes "form.mail.from" => '从', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2f270a2d8..634208b23 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -174,8 +174,9 @@ // 'label.start' => 'Start', // 'label.finish' => 'Finish', // 'label.duration' => 'Duration', -// 'label.note' => 'Note', -// 'label.notes' => 'Notes', +'label.note' => '備註', +'label.notes' => '備註', +// TODO: translate the following. // 'label.item' => 'Item', // 'label.cost' => 'Cost', // 'label.day_total' => 'Day total', @@ -435,14 +436,12 @@ "form.mytime.start" => '開始', "form.mytime.finish" => '結束', "form.mytime.duration" => '持續時間', -"form.mytime.note" => '備註', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', "form.mytime.th.project" => '項目', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '結束', "form.mytime.th.duration" => '持續時間', -"form.mytime.th.note" => '備註', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', "form.mytime.warn_tozero_rec" => '由於這段時間是鎖定的,該時間記錄必須刪除', @@ -503,7 +502,6 @@ "form.report.duration" => '持續時間', "form.report.start" => '開始', "form.report.finish" => '結束', -"form.report.note" => '備註', "form.report.project" => '項目', "form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', @@ -513,7 +511,6 @@ "form.report.th.start" => '開始', "form.report.th.finish" => '結束', "form.report.th.duration" => '持續時間', -"form.report.th.note" => '備註', // mail form attributes "form.mail.from" => '從', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e50a6a6ef..9060f5f16 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3901 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3902 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From d843adf87afb693ebf31ca3ad23705126ffca0bc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 23:22:34 +0000 Subject: [PATCH 0443/2515] More recycling in translation files. --- WEB-INF/resources/ca.lang.php | 2 -- WEB-INF/resources/hu.lang.php | 6 ++---- WEB-INF/resources/ja.lang.php | 6 ++---- WEB-INF/resources/ko.lang.php | 6 ++---- WEB-INF/resources/no.lang.php | 6 ++---- WEB-INF/resources/pt.lang.php | 4 ++-- WEB-INF/resources/ro.lang.php | 6 ++---- WEB-INF/resources/tr.lang.php | 6 ++---- WEB-INF/resources/zh-cn.lang.php | 6 ++---- WEB-INF/resources/zh-tw.lang.php | 6 ++---- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 19 insertions(+), 37 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 2053e8104..ce767c1f5 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -489,7 +489,6 @@ // mail form attributes "form.mail.from" => 'De', "form.mail.to" => 'Per a', -"form.mail.comment" => 'Comentari', "form.mail.above" => 'Enviar aquest report por e-mail', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -502,7 +501,6 @@ "form.invoice.date" => 'Data', "form.invoice.number" => 'Número de factura', "form.invoice.tax" => 'Impost', -"form.invoice.comment" => 'Comentari ', "form.invoice.th.username" => 'Persona', "form.invoice.th.time" => 'Hores', "form.invoice.th.rate" => 'Taxa', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 426e278fd..c3a12dd1e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -206,7 +206,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Megjegyzés', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -495,7 +496,6 @@ // mail form attributes "form.mail.from" => 'feladó', "form.mail.to" => 'címzett', -"form.mail.comment" => 'megjegyzés', "form.mail.above" => 'küldjük el ezt a riportot e-mail-ben...', // Note to translators: the string below must be translated // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -510,7 +510,6 @@ "form.invoice.date" => 'Dátum', "form.invoice.number" => 'számla azonosító száma', "form.invoice.tax" => 'adó', -"form.invoice.comment" => 'megjegyzés ', "form.invoice.th.username" => 'személy', "form.invoice.th.time" => 'óra', "form.invoice.th.rate" => 'tarifa', @@ -534,7 +533,6 @@ "form.client.edit_title" => 'ügyfél adatainak szerkesztése', "form.client.del_title" => 'ügyfél törlése', "form.client.tax" => 'adó', -"form.client.comment" => 'megjegyzés ', // miscellaneous strings "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index bece0e4c2..7d4afed40 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -206,7 +206,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'コメント', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -521,7 +522,6 @@ // mail form attributes "form.mail.from" => 'から', "form.mail.to" => 'まで', -"form.mail.comment" => 'コメント', "form.mail.above" => 'このレポートをEメールで送信', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -536,7 +536,6 @@ "form.invoice.date" => '日付', "form.invoice.number" => '送り状の番号', "form.invoice.tax" => '税', -"form.invoice.comment" => 'コメント ', "form.invoice.th.username" => '個人', "form.invoice.th.time" => '時間', "form.invoice.th.rate" => '給料', @@ -563,7 +562,6 @@ "form.client.edit_title" => 'クライアントの編集', "form.client.del_title" => 'クライアントの削除', "form.client.tax" => '税', -"form.client.comment" => 'コメント ', // miscellaneous strings "forward.tocsvfile" => 'csvファイルにエクスポート', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index daba7b98a..3dc4435e1 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -206,7 +206,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => '코멘트', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -516,7 +517,6 @@ // mail form attributes "form.mail.from" => '부터', "form.mail.to" => '까지', -"form.mail.comment" => '코멘트', "form.mail.above" => '이 보고서를 이메일로 송신', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -531,7 +531,6 @@ "form.invoice.date" => '날짜', "form.invoice.number" => '송장 번호', "form.invoice.tax" => '세금', -"form.invoice.comment" => '코멘트 ', "form.invoice.th.username" => '개인', "form.invoice.th.time" => '시간', "form.invoice.th.rate" => '급여', @@ -558,7 +557,6 @@ "form.client.edit_title" => '클라이언트 편집', "form.client.del_title" => '클라이언트 삭제', "form.client.tax" => '세금', -"form.client.comment" => '코멘트 ', // miscellaneous strings "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 72e1fda2f..0a050cf8e 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -204,7 +204,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Kommentar', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -519,7 +520,6 @@ // mail form attributes "form.mail.from" => 'fra', "form.mail.to" => 'til', -"form.mail.comment" => 'kommentar', "form.mail.above" => 'send denne rapporten som e-post', // Note to translators: the strings below must be translated // "form.mail.footer_str" => 'Anuko Time Tracker is et enkelt, brukervennlig tidsregistreringssystem
basert på åpen kildekode. Besøk www.anuko.com for flere opplysninger.', @@ -535,7 +535,6 @@ "form.invoice.date" => 'dato', "form.invoice.number" => 'fakturanummer', "form.invoice.tax" => 'MVA', -"form.invoice.comment" => 'notat', "form.invoice.th.username" => 'person', "form.invoice.th.time" => 'timer', "form.invoice.th.rate" => 'sats', @@ -563,7 +562,6 @@ // "form.client.edit_title" => 'endre klient', // "form.client.del_title" => 'slett klient', // "form.client.tax" => 'avgift', -// "form.client.comment" => 'kommentar ', // miscellaneous strings "forward.tocsvfile" => 'eksporter data til en .csv fil', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index f6946d990..b914f24a3 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -197,7 +197,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Comentário', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -461,7 +462,6 @@ // mail form attributes "form.mail.from" => 'de', "form.mail.to" => 'para', -"form.mail.comment" => 'comentário', "form.mail.above" => 'enviar este relatório por e-mail', // Note to translators: the strings below must be translated // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 005badda2..011ee1465 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -206,7 +206,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Comentariu', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -501,7 +502,6 @@ // mail form attributes "form.mail.from" => 'de la', "form.mail.to" => 'catre', -"form.mail.comment" => 'comentariu', "form.mail.above" => 'trimite acest raport pe e-mail', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -516,7 +516,6 @@ "form.invoice.date" => 'data', "form.invoice.number" => 'numar factura', "form.invoice.tax" => 'taxa', -"form.invoice.comment" => 'comentariu ', "form.invoice.th.username" => 'persoana', "form.invoice.th.time" => 'ore', "form.invoice.th.rate" => 'rata', @@ -544,7 +543,6 @@ "form.client.edit_title" => 'editeaza client', "form.client.del_title" => 'sterge client', "form.client.tax" => 'taxa', -"form.client.comment" => 'comentariu ', // miscellaneous strings "forward.tocsvfile" => 'exporta date in fisier .csv', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 986b6b3d0..845548f26 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -213,7 +213,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => 'Yorum', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -514,7 +515,6 @@ // mail form attributes "form.mail.from" => 'kimden', "form.mail.to" => 'kime', -"form.mail.comment" => 'yorum', "form.mail.above" => 'bu raporu e-posta ile yolla', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -529,7 +529,6 @@ "form.invoice.date" => 'tarih', "form.invoice.number" => 'fatura numarası', "form.invoice.tax" => 'vergi', -"form.invoice.comment" => 'yorum ', "form.invoice.th.username" => 'kişi', "form.invoice.th.time" => 'saatler', "form.invoice.th.rate" => 'tarife', @@ -553,7 +552,6 @@ "form.client.edit_title" => 'müşteriyi düzenle', "form.client.del_title" => 'müşteriyi sil', "form.client.tax" => 'vergi', -"form.client.comment" => 'yorum ', // miscellaneous strings "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 2bb7e8e2d..a82d6fddf 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -193,7 +193,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => '留言', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -515,7 +516,6 @@ // mail form attributes "form.mail.from" => '从', "form.mail.to" => '到', -"form.mail.comment" => '留言', "form.mail.above" => '通过电子邮件发送该报告', // Note to translators: this string needs to be translated. "form.mail.footer_str" => 'anuko时间跟踪器是一种简单、易用、开放源码的时间跟踪系统。 看 www.anuko网更多信息。', @@ -530,7 +530,6 @@ "form.invoice.date" => '日期', "form.invoice.number" => '发票号码', "form.invoice.tax" => '税', -"form.invoice.comment" => '留言', "form.invoice.th.username" => '收费人', "form.invoice.th.time" => '小时数', "form.invoice.th.rate" => '费率', @@ -557,7 +556,6 @@ "form.client.edit_title" => '编辑客户', "form.client.del_title" => '删除客户', "form.client.tax" => '税', -"form.client.comment" => '备注', // miscellaneous strings "forward.tocsvfile" => '将数据导出到.csv文件', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 634208b23..b73d35298 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -202,7 +202,8 @@ // 'label.date_format' => 'Date format', // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', -// 'label.comment' => 'Comment', +'label.comment' => '留言', +// TODO: translate the following. // 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', @@ -515,7 +516,6 @@ // mail form attributes "form.mail.from" => '從', "form.mail.to" => '到', -"form.mail.comment" => '留言', "form.mail.above" => '通過電子郵件發送該報告', // Note to translators: this string needs to be translated. // "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', @@ -530,7 +530,6 @@ "form.invoice.date" => '日期', "form.invoice.number" => '發票號碼', "form.invoice.tax" => '稅', -"form.invoice.comment" => '留言', "form.invoice.th.username" => '收費人', "form.invoice.th.time" => '小時數', "form.invoice.th.rate" => '費率', @@ -557,7 +556,6 @@ "form.client.edit_title" => '編輯客戶', "form.client.del_title" => '刪除客戶', "form.client.tax" => '稅', -"form.client.comment" => '備註', // miscellaneous strings "forward.tocsvfile" => '將資料輸出到.csv文件', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9060f5f16..1b5a6a1bf 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3902 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3903 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9885d4c82ada8562383de5c9e03ff6bb5ab692a3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 5 Feb 2018 23:41:40 +0000 Subject: [PATCH 0444/2515] More recycling. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 5 ++--- WEB-INF/resources/et.lang.php | 7 ++----- WEB-INF/resources/hu.lang.php | 5 ++--- WEB-INF/resources/ja.lang.php | 5 ++--- WEB-INF/resources/ko.lang.php | 5 ++--- WEB-INF/resources/no.lang.php | 5 ++--- WEB-INF/resources/ro.lang.php | 5 ++--- WEB-INF/resources/tr.lang.php | 5 ++--- WEB-INF/resources/zh-cn.lang.php | 5 ++--- WEB-INF/resources/zh-tw.lang.php | 5 ++--- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 21 insertions(+), 34 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index ce767c1f5..3ddaa7c78 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -500,7 +500,6 @@ "form.invoice.fillform" => 'Empleni els camps', "form.invoice.date" => 'Data', "form.invoice.number" => 'Número de factura', -"form.invoice.tax" => 'Impost', "form.invoice.th.username" => 'Persona', "form.invoice.th.time" => 'Hores', "form.invoice.th.rate" => 'Taxa', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index aa4350515..f4de6caf3 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -212,7 +212,8 @@ 'label.comment' => 'Komentář', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'DPH', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => 'Celkem', // TODO: translate the following. @@ -526,7 +527,6 @@ "form.invoice.fillform" => 'vyplňte pole', "form.invoice.date" => 'datum', "form.invoice.number" => 'faktura číslo', -"form.invoice.tax" => 'DPH', "form.invoice.th.username" => 'osoba', "form.invoice.th.time" => 'hodin', "form.invoice.th.rate" => 'sazba', @@ -553,7 +553,6 @@ "form.client.add_title" => 'přidat zákazníka', "form.client.edit_title" => 'upravit zákazníka', "form.client.del_title" => 'smazat zákazníka', -"form.client.tax" => 'DPH', // miscellaneous strings "forward.tocsvfile" => 'exportovat data do .csv souboru', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d1aa1416b..9b67eb8cb 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -209,7 +209,8 @@ 'label.comment' => 'Kommentaar', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'Maks', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => 'Kokku', // TODO: translate the following. @@ -535,8 +536,6 @@ "form.invoice.fillform" => 'täida väljad', "form.invoice.date" => 'kuupäev', "form.invoice.number" => 'arve number', -"form.invoice.tax" => 'maks', -"form.invoice.comment" => 'kommentaar ', "form.invoice.th.username" => 'isik', "form.invoice.th.time" => 'tunde', "form.invoice.th.rate" => 'hind', @@ -563,8 +562,6 @@ "form.client.add_title" => 'lisa klient', "form.client.edit_title" => 'muuda klienti', "form.client.del_title" => 'kustuta klient', -"form.client.tax" => 'maks', -"form.client.comment" => 'märkus ', // miscellaneous strings "forward.tocsvfile" => 'ekspordi andmed .csv faili', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c3a12dd1e..48d18b4dc 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -209,7 +209,8 @@ 'label.comment' => 'Megjegyzés', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'Adó', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => 'Összesen', // TODO: translate the following. @@ -509,7 +510,6 @@ "form.invoice.fillform" => 'töltsd ki a mezőket', "form.invoice.date" => 'Dátum', "form.invoice.number" => 'számla azonosító száma', -"form.invoice.tax" => 'adó', "form.invoice.th.username" => 'személy', "form.invoice.th.time" => 'óra', "form.invoice.th.rate" => 'tarifa', @@ -532,7 +532,6 @@ "form.client.add_title" => 'új ügyfél hozzáadása', "form.client.edit_title" => 'ügyfél adatainak szerkesztése', "form.client.del_title" => 'ügyfél törlése', -"form.client.tax" => 'adó', // miscellaneous strings "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 7d4afed40..c00354668 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -209,7 +209,8 @@ 'label.comment' => 'コメント', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => '税', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => '合計', // TODO: translate the following. @@ -535,7 +536,6 @@ "form.invoice.fillform" => 'フィールドの作成', "form.invoice.date" => '日付', "form.invoice.number" => '送り状の番号', -"form.invoice.tax" => '税', "form.invoice.th.username" => '個人', "form.invoice.th.time" => '時間', "form.invoice.th.rate" => '給料', @@ -561,7 +561,6 @@ "form.client.add_title" => 'クライアントの追加', "form.client.edit_title" => 'クライアントの編集', "form.client.del_title" => 'クライアントの削除', -"form.client.tax" => '税', // miscellaneous strings "forward.tocsvfile" => 'csvファイルにエクスポート', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3dc4435e1..568524f4a 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -209,7 +209,8 @@ 'label.comment' => '코멘트', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => '세금', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => '합계', // TODO: translate the following. @@ -530,7 +531,6 @@ "form.invoice.fillform" => '필드들을 채우십시오', "form.invoice.date" => '날짜', "form.invoice.number" => '송장 번호', -"form.invoice.tax" => '세금', "form.invoice.th.username" => '개인', "form.invoice.th.time" => '시간', "form.invoice.th.rate" => '급여', @@ -556,7 +556,6 @@ "form.client.add_title" => '클라이언트 추가', "form.client.edit_title" => '클라이언트 편집', "form.client.del_title" => '클라이언트 삭제', -"form.client.tax" => '세금', // miscellaneous strings "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 0a050cf8e..0f7672da2 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -207,7 +207,8 @@ 'label.comment' => 'Kommentar', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'MVA', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', // 'label.total' => 'Total', // 'label.client_name' => 'Client name', @@ -534,7 +535,6 @@ // "form.invoice.fillform" => 'fyll inn i feltene', "form.invoice.date" => 'dato', "form.invoice.number" => 'fakturanummer', -"form.invoice.tax" => 'MVA', "form.invoice.th.username" => 'person', "form.invoice.th.time" => 'timer', "form.invoice.th.rate" => 'sats', @@ -561,7 +561,6 @@ // "form.client.add_title" => 'legg til klient', // "form.client.edit_title" => 'endre klient', // "form.client.del_title" => 'slett klient', -// "form.client.tax" => 'avgift', // miscellaneous strings "forward.tocsvfile" => 'eksporter data til en .csv fil', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 011ee1465..51b37acff 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -209,7 +209,8 @@ 'label.comment' => 'Comentariu', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'Taxa', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => 'Total', // TODO: translate the following. @@ -515,7 +516,6 @@ "form.invoice.fillform" => 'comleteaza campurile', "form.invoice.date" => 'data', "form.invoice.number" => 'numar factura', -"form.invoice.tax" => 'taxa', "form.invoice.th.username" => 'persoana', "form.invoice.th.time" => 'ore', "form.invoice.th.rate" => 'rata', @@ -542,7 +542,6 @@ "form.client.add_title" => 'adauga client', "form.client.edit_title" => 'editeaza client', "form.client.del_title" => 'sterge client', -"form.client.tax" => 'taxa', // miscellaneous strings "forward.tocsvfile" => 'exporta date in fisier .csv', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 845548f26..b2fff74e2 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -216,7 +216,8 @@ 'label.comment' => 'Yorum', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => 'Vergi', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => 'Toplam', // TODO: translate the following. @@ -528,7 +529,6 @@ "form.invoice.fillform" => 'alanları doldur', "form.invoice.date" => 'tarih', "form.invoice.number" => 'fatura numarası', -"form.invoice.tax" => 'vergi', "form.invoice.th.username" => 'kişi', "form.invoice.th.time" => 'saatler', "form.invoice.th.rate" => 'tarife', @@ -551,7 +551,6 @@ "form.client.add_title" => 'müşteri ekle', "form.client.edit_title" => 'müşteriyi düzenle', "form.client.del_title" => 'müşteriyi sil', -"form.client.tax" => 'vergi', // miscellaneous strings "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a82d6fddf..9c39e7848 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -196,7 +196,8 @@ 'label.comment' => '留言', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => '税', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => '总计', // TODO: translate the following. @@ -529,7 +530,6 @@ "form.invoice.fillform" => '填写该栏目', "form.invoice.date" => '日期', "form.invoice.number" => '发票号码', -"form.invoice.tax" => '税', "form.invoice.th.username" => '收费人', "form.invoice.th.time" => '小时数', "form.invoice.th.rate" => '费率', @@ -555,7 +555,6 @@ "form.client.add_title" => '添加客户', "form.client.edit_title" => '编辑客户', "form.client.del_title" => '删除客户', -"form.client.tax" => '税', // miscellaneous strings "forward.tocsvfile" => '将数据导出到.csv文件', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index b73d35298..2a4d958d4 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -205,7 +205,8 @@ 'label.comment' => '留言', // TODO: translate the following. // 'label.status' => 'Status', -// 'label.tax' => 'Tax', +'label.tax' => '稅', +// TODO: translate the following. // 'label.subtotal' => 'Subtotal', 'label.total' => '總計', // TODO: translate the following. @@ -529,7 +530,6 @@ "form.invoice.fillform" => '填寫該欄目', "form.invoice.date" => '日期', "form.invoice.number" => '發票號碼', -"form.invoice.tax" => '稅', "form.invoice.th.username" => '收費人', "form.invoice.th.time" => '小時數', "form.invoice.th.rate" => '費率', @@ -555,7 +555,6 @@ "form.client.add_title" => '添加客戶', "form.client.edit_title" => '編輯客戶', "form.client.del_title" => '刪除客戶', -"form.client.tax" => '稅', // miscellaneous strings "forward.tocsvfile" => '將資料輸出到.csv文件', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1b5a6a1bf..94b8c930a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3903 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3904 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b9ac744970553a1899ee8c3f40d27950227a9372 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 00:04:17 +0000 Subject: [PATCH 0445/2515] More recycling. --- WEB-INF/resources/ca.lang.php | 34 ++++++++++++---------------------- WEB-INF/resources/cs.lang.php | 23 ++++------------------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 17 insertions(+), 42 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3ddaa7c78..fce5e0873 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -170,9 +170,9 @@ // TODO: translate the following. // 'label.option' => 'Option', 'label.invoice' => 'Factura', +'label.project' => 'Projecte', +'label.projects' => 'Projectes', // TODO: translate the following. -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -249,6 +249,10 @@ // 'label.week_list' => 'Week list', // Form titles. +// TODO: Improve titles for consistency, so that each title explains correctly what each +// page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. +// Compare with English file to see how it is done there and do Catalan titles similarly. +// Specifically: Agregant vs Agregar, etc. 'title.login' => 'Sessió iniciada', // TODO: translate the following. // 'title.teams' => 'Teams', @@ -276,10 +280,10 @@ // TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Projectes', +'title.add_project' => 'Agregant projecte', +'title.edit_project' => 'Modificant projecte', +'title.delete_project' => 'Eliminant projecte', // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -337,7 +341,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projectes', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', 'dropdown.clients' => 'clients', // TODO: translate the following. @@ -424,13 +429,11 @@ "form.mytime.del_str" => 'Eliminant l\\\'historial de temps', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'Data', -"form.mytime.project" => 'Projecte', "form.mytime.start" => 'Inici', "form.mytime.finish" => 'Fi', "form.mytime.duration" => 'Durada', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', -"form.mytime.th.project" => 'Projecte', "form.mytime.th.start" => 'Inici', "form.mytime.th.finish" => 'Fi', "form.mytime.th.duration" => 'Durada', @@ -445,7 +448,6 @@ "form.people.th.email" => 'e-mail', "form.people.th.role" => 'Rol', "form.people.th.status" => 'Estat', -"form.people.th.project" => 'Projecte', "form.people.th.rate" => 'Taxa', "form.people.manager" => 'Manejador', "form.people.comanager" => 'Auxiliar del manejador', @@ -453,16 +455,6 @@ "form.people.rate" => 'Taxa per defecte en hores', "form.people.comanager" => 'Auxiliar del manejador', -"form.people.projects" => 'Projectes', - -// projects form attributes -"form.project.proj_title" => 'Projectes', -"form.project.edit_str" => 'Modificant projecte', -"form.project.add_str" => 'Agregant nou projecte', -"form.project.del_str" => 'Eliminant projecte', - -// activities form attributes -"form.activity.project" => 'Projecte', // report attributes "form.report.from" => 'Data d\\\'inici', @@ -472,12 +464,10 @@ "form.report.duration" => 'Durada', "form.report.start" => 'Inici', "form.report.finish" => 'Fi', -"form.report.project" => 'Projecte', "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', "form.report.th.empllist" => 'Usuari', "form.report.th.date" => 'Data', -"form.report.th.project" => 'Projecte', "form.report.th.start" => 'Inici', "form.report.th.finish" => 'Fi', "form.report.th.duration" => 'Durada', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index f4de6caf3..9235b2ddc 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -171,7 +171,7 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', +'label.project' => 'Projekt', 'label.projects' => 'Projekty', // TODO: translate the following. // 'label.task' => 'Task', @@ -282,10 +282,10 @@ // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projekty', +'title.add_project' => 'Pridat projekt', +'title.edit_project' => 'Upravit projekt', +'title.delete_project' => 'Smazat projekt', // TODO: translate the following. -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -441,13 +441,11 @@ "form.mytime.del_str" => 'smazat časový záznam', // Note to translators: "form.mytime.time_form" => ' (hh:mm)', // the string must be translated "form.mytime.date" => 'datum', -"form.mytime.project" => 'projekt', "form.mytime.start" => 'začátek', "form.mytime.finish" => 'konec', "form.mytime.duration" => 'trvání', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', -"form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'začátek', "form.mytime.th.finish" => 'konec', "form.mytime.th.duration" => 'trvání', @@ -473,7 +471,6 @@ "form.people.th.login" => 'přihlásit', "form.people.th.role" => 'role', "form.people.th.status" => 'status', -"form.people.th.project" => 'projekt', "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', "form.people.comanager" => 'spolumanažer', @@ -482,16 +479,6 @@ "form.people.rate" => 'hodinová sazba', "form.people.comanager" => 'spolumanažer', -"form.people.projects" => 'projekty', - -// projects form attributes -"form.project.proj_title" => 'projekty', -"form.project.edit_str" => 'upravit projekt', -"form.project.add_str" => 'pridat nový projekt', -"form.project.del_str" => 'smazat projekt', - -// activities form attributes -"form.activity.project" => 'projekt', // report attributes "form.report.from" => 'počáteční datum', @@ -501,12 +488,10 @@ "form.report.duration" => 'trvání', "form.report.start" => 'počátek', "form.report.finish" => 'konec', -"form.report.project" => 'projekt', "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', "form.report.th.empllist" => 'uzivatel', "form.report.th.date" => 'datum', -"form.report.th.project" => 'projekt', "form.report.th.start" => 'počátek', "form.report.th.finish" => 'konec', "form.report.th.duration" => 'trvání', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 94b8c930a..bd9b6a596 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3904 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3905 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 566768d0efea85c215de537c667ae610ddf95909 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 00:50:52 +0000 Subject: [PATCH 0446/2515] A bit more recycling in translations. --- WEB-INF/resources/ca.lang.php | 4 +--- WEB-INF/resources/cs.lang.php | 8 +++----- WEB-INF/resources/et.lang.php | 8 +++----- WEB-INF/resources/hu.lang.php | 8 +++----- WEB-INF/resources/ja.lang.php | 8 +++----- WEB-INF/resources/ko.lang.php | 8 +++----- WEB-INF/resources/no.lang.php | 9 +++------ WEB-INF/resources/pt.lang.php | 9 +-------- WEB-INF/resources/ro.lang.php | 9 ++++----- WEB-INF/resources/tr.lang.php | 8 +++----- WEB-INF/resources/zh-cn.lang.php | 8 +++----- WEB-INF/resources/zh-tw.lang.php | 8 +++----- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 34 insertions(+), 63 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index fce5e0873..33ee714dc 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -206,8 +206,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Comentari', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Estat', 'label.tax' => 'Impost', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -447,7 +446,6 @@ "form.people.del_str" => 'Eliminant usuari', "form.people.th.email" => 'e-mail', "form.people.th.role" => 'Rol', -"form.people.th.status" => 'Estat', "form.people.th.rate" => 'Taxa', "form.people.manager" => 'Manejador', "form.people.comanager" => 'Auxiliar del manejador', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9235b2ddc..5601343c9 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -87,7 +87,8 @@ 'error.project' => 'Výběr projektu.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Výběr zákazníka.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Nesprávné jméno nebo heslo.', @@ -210,8 +211,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Komentář', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Status', 'label.tax' => 'DPH', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -470,7 +470,6 @@ "form.people.del_str" => 'smazat uživatele', "form.people.th.login" => 'přihlásit', "form.people.th.role" => 'role', -"form.people.th.status" => 'status', "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', "form.people.comanager" => 'spolumanažer', @@ -544,7 +543,6 @@ "forward.toxmlfile" => 'exportovat data do .xml souboru', "forward.geninvoice" => 'vytvořit fakturu', -"controls.select.client" => '--- výběr zákazníka ---', "controls.project_bind" => '--- všechny ---', "controls.all" => '--- vše ---', "controls.notbind" => '--- nic ---', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9b67eb8cb..7d0a6bf92 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -87,7 +87,8 @@ 'error.project' => 'Vali projekt.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Vali klient.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Vale login või salasõna.', @@ -207,8 +208,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Kommentaar', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Seisund', 'label.tax' => 'Maks', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -481,7 +481,6 @@ "form.people.del_str" => 'kasutaja kustutamine', "form.people.th.login" => 'login', "form.people.th.role" => 'roll', -"form.people.th.status" => 'seisund', "form.people.th.project" => 'projekt', "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', @@ -568,7 +567,6 @@ "forward.toxmlfile" => 'ekspordi andmed .xml faili', "forward.geninvoice" => 'loo arve', -"controls.select.client" => '--- vali klient ---', "controls.project_bind" => '--- kõik ---', "controls.all" => '--- kõik ---', "controls.notbind" => '--- ei ---', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 48d18b4dc..51487394c 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -87,7 +87,8 @@ 'error.project' => 'Válassz projektet.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Válassz ügyfelet.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', @@ -207,8 +208,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Megjegyzés', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Státusz', 'label.tax' => 'Adó', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -455,7 +455,6 @@ "form.people.edit_str" => 'munkatárs adatainak szerkesztése', "form.people.del_str" => 'munkatárs adatainak törlése', "form.people.th.role" => 'szerepkör', -"form.people.th.status" => 'státusz', "form.people.th.project" => 'projekt', "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', @@ -537,7 +536,6 @@ "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', "forward.geninvoice" => 'számla készítés', -"controls.select.client" => '--- válassz ügyfelet ---', "controls.project_bind" => '--- összes ---', "controls.all" => '--- összes ---', "controls.notbind" => '--- nincs ---', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index c00354668..6e276005a 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -86,7 +86,8 @@ 'error.project' => 'プロジェクトの選択', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'クライアントの選択', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正確なログインあるいはパスワードが不正確です', @@ -207,8 +208,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'コメント', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => '状態', 'label.tax' => '税', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -475,7 +475,6 @@ "form.people.del_str" => 'ユーザーの削除', "form.people.th.login" => 'ログインID', "form.people.th.role" => 'ルール', -"form.people.th.status" => '状態', "form.people.th.project" => 'プロジェクト', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', @@ -567,7 +566,6 @@ "forward.toxmlfile" => 'xmlファイルにエクスポート', "forward.geninvoice" => '送り状の作成', -"controls.select.client" => '--- クライアントの選択 ---', "controls.project_bind" => '--- すべて ---', "controls.all" => '--- すべて ---', "controls.notbind" => '--- いいえ ---', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 568524f4a..483e4572b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -86,7 +86,8 @@ 'error.project' => '프로젝트의 선택', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => '클라이언트 선택', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '부정확한 로그인 혹은 암호가 틀립니다', @@ -207,8 +208,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => '코멘트', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => '상태', 'label.tax' => '세금', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -475,7 +475,6 @@ "form.people.del_str" => '사용자를 삭제하기', "form.people.th.login" => '로그인ID', "form.people.th.role" => '직위', -"form.people.th.status" => '상태', "form.people.th.project" => '프로젝트', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', @@ -562,7 +561,6 @@ "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', "forward.geninvoice" => '송장 만들기', -"controls.select.client" => '--- 클라이언트 선택 ---', "controls.project_bind" => '--- 전부 ---', "controls.all" => '--- 전부 ---', "controls.notbind" => '--- 아니 ---', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 0f7672da2..9c7e68b2a 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -84,7 +84,8 @@ 'error.project' => 'Velg prosjekt.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Velg klient.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Feil brukernavn eller passord.', @@ -205,8 +206,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Kommentar', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Status', 'label.tax' => 'MVA', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -474,7 +474,6 @@ "form.people.del_str" => 'slett bruker', "form.people.th.login" => 'innlogging', "form.people.th.role" => 'rolle', -"form.people.th.status" => 'status', // Note to translators: the 2 strings below are missing and must be added and translated // "form.people.th.project" => 'prosjekt', // "form.people.th.rate" => 'timesats', @@ -568,8 +567,6 @@ // "forward.toxmlfile" => 'eksporter data til en .xml fil', // "forward.geninvoice" => 'lag faktura', -// Note to translators: the string below is missing and must be translated and added -// "controls.select.client" => '--- velg klient ---', "controls.project_bind" => '--- alle ---', "controls.all" => '--- alle ---', // Note to translators: the strings below are missing and must be translated and added diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index b914f24a3..647ac8ed0 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -198,8 +198,8 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Comentário', +'label.status' => 'Status', // TODO: translate the following. -// 'label.status' => 'Status', // 'label.tax' => 'Tax', // 'label.subtotal' => 'Subtotal', // 'label.total' => 'Total', @@ -424,15 +424,8 @@ "form.people.edit_str" => 'editando usuário', "form.people.del_str" => 'apagando usuário', -// Note to translators: "form.people.th.login" => 'e-mail', // email has been changed to login "form.people.th.role" => 'regra', -"form.people.th.status" => 'status', -// Note to translators: the strings below are missing and must be added and translated -// "form.people.th.project" => 'project', -// "form.people.th.rate" => 'rate', "form.people.manager" => 'gerente', -// Note to translators: the string below is missing and must be added and translated -// "form.people.comanager" => 'comanager', "form.people.empl" => 'usuário', // projects form attributes diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 51b37acff..9d4feff42 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -86,10 +86,12 @@ 'error.not_equal' => 'Campul "{0}" nu este egal cu campul "{1}".', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', +// TODO: for "select" errors: Selecteaza or Alege? We need consistent usage. 'error.project' => 'Selecteaza proiect.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Alege client.', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Nume de utilizator sau parola incorecta.', @@ -207,8 +209,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Comentariu', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Stare', 'label.tax' => 'Taxa', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -461,7 +462,6 @@ "form.people.edit_str" => 'editare utilizator', "form.people.del_str" => 'stergee utilizator', "form.people.th.role" => 'functie', -"form.people.th.status" => 'stare', "form.people.th.project" => 'proiect', "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', @@ -547,7 +547,6 @@ "forward.tocsvfile" => 'exporta date in fisier .csv', "forward.geninvoice" => 'genereaza factura', -"controls.select.client" => '--- alege client ---', "controls.project_bind" => '--- toate ---', "controls.all" => '--- toate ---', "controls.notbind" => '--- nu ---', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b2fff74e2..0f02f2b9f 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -92,7 +92,8 @@ 'error.project' => 'Proje seç.', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => 'Müşteri seç', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Hatalı kullanıcı adı veya parola.', @@ -214,8 +215,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => 'Yorum', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => 'Durum', 'label.tax' => 'Vergi', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -469,7 +469,6 @@ "form.people.edit_str" => 'kullanıcı düzenleniyor', "form.people.del_str" => 'kullanıcı siliniyor', "form.people.th.role" => 'rol', -"form.people.th.status" => 'durum', "form.people.th.project" => 'proje', "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', @@ -557,7 +556,6 @@ "forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', "forward.geninvoice" => 'fatura yarat', -"controls.select.client" => '--- müşteri seç ---', "controls.project_bind" => '--- tümü ---', "controls.all" => '--- tümü ---', "controls.notbind" => '--- hiç ---', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 9c39e7848..6967f8558 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -77,7 +77,8 @@ 'error.project' => '选择项目。', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => '选择客户。', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正确的用户名或密码。', @@ -194,8 +195,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => '留言', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => '状态', 'label.tax' => '税', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -469,7 +469,6 @@ "form.people.del_str" => '删除用户', "form.people.th.login" => '登录', "form.people.th.role" => '角色', -"form.people.th.status" => '状态', "form.people.th.project" => '项目', "form.people.th.rate" => '费率', "form.people.manager" => '经理', @@ -561,7 +560,6 @@ "forward.toxmlfile" => '将数据导出到.xml文件', "forward.geninvoice" => '生成发票', -"controls.select.client" => '--- 选择客户 ---', "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', "controls.notbind" => '--- 无 ---', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2a4d958d4..568aa1813 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -84,7 +84,8 @@ 'error.project' => '選擇項目', // TODO: translate the following. // 'error.task' => 'Select task.', -// 'error.client' => 'Select client.', +'error.client' => '選擇客戶', +// TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正確的用戶名或密碼', @@ -203,8 +204,7 @@ // 'label.time_format' => 'Time format', // 'label.week_start' => 'First day of week', 'label.comment' => '留言', -// TODO: translate the following. -// 'label.status' => 'Status', +'label.status' => '狀態', 'label.tax' => '稅', // TODO: translate the following. // 'label.subtotal' => 'Subtotal', @@ -469,7 +469,6 @@ "form.people.del_str" => '刪除用戶', "form.people.th.login" => '登錄', "form.people.th.role" => '角色', -"form.people.th.status" => '狀態', "form.people.th.project" => '項目', "form.people.th.rate" => '費率', "form.people.manager" => '經理', @@ -561,7 +560,6 @@ "forward.toxmlfile" => '將資料輸出到.xml文件', "forward.geninvoice" => '生成發票', -"controls.select.client" => '--- 選擇客戶 ---', "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', "controls.notbind" => '--- 無 ---', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bd9b6a596..cbdd450a9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3905 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3906 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3f154984d083cf6627f5c6f1ca8f4e165b035ca0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 02:51:43 +0000 Subject: [PATCH 0447/2515] Some string recycling in Chinese files. --- WEB-INF/resources/zh-cn.lang.php | 40 +++++++++----------------------- WEB-INF/resources/zh-tw.lang.php | 38 ++++++++---------------------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 22 insertions(+), 58 deletions(-) diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6967f8558..a8633cf0e 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -158,8 +158,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => '项目', +'label.projects' => '项目', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -262,10 +263,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => '项目', +'title.add_project' => '添加项目', +'title.edit_project' => '编辑项目', +'title.delete_project' => '删除项目', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -322,7 +324,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => '项目', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -396,7 +399,6 @@ // For example, form.filter.project property no longer exists, and so on. // If you intend to improve perhaps go in small steps and coordinate with the maintainer if anything is unclear. -"form.filter.project" => '项目', "form.filter.filter" => '收藏的报告', "form.filter.filter_new" => '保存到我的收藏夹', @@ -434,13 +436,11 @@ "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', "form.mytime.date" => '日期', -"form.mytime.project" => '项目', "form.mytime.start" => '开始', "form.mytime.finish" => '结束', "form.mytime.duration" => '持续时间', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', -"form.mytime.th.project" => '项目', "form.mytime.th.start" => '开始', "form.mytime.th.finish" => '结束', "form.mytime.th.duration" => '持续时间', @@ -469,7 +469,6 @@ "form.people.del_str" => '删除用户', "form.people.th.login" => '登录', "form.people.th.role" => '角色', -"form.people.th.project" => '项目', "form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', @@ -478,21 +477,6 @@ "form.people.rate" => '默认小时收费', "form.people.comanager" => '合作经理人', -"form.people.projects" => '项目', - -// projects form attributes -"form.project.proj_title" => '项目', -"form.project.edit_str" => '编辑项目', -"form.project.add_str" => '添加新项目', -"form.project.del_str" => '删除项目', - -// activities form attributes -"form.activity.act_title" => '活动', -"form.activity.add_title" => '新建活动', -"form.activity.edit_str" => '编辑活动', -"form.activity.del_str" => '删除活动', -"form.activity.project" => '项目', -"form.activity.th.project" => '项目', // report attributes "form.report.title" => '报告', @@ -503,12 +487,10 @@ "form.report.duration" => '持续时间', "form.report.start" => '开始', "form.report.finish" => '结束', -"form.report.project" => '项目', "form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', "form.report.th.empllist" => '用户', "form.report.th.date" => '日期', -"form.report.th.project" => '项目', "form.report.th.start" => '开始', "form.report.th.finish" => '结束', "form.report.th.duration" => '持续时间', @@ -518,7 +500,7 @@ "form.mail.to" => '到', "form.mail.above" => '通过电子邮件发送该报告', // Note to translators: this string needs to be translated. - "form.mail.footer_str" => 'anuko时间跟踪器是一种简单、易用、开放源码的时间跟踪系统。 看 www.anuko网更多信息。', +"form.mail.footer_str" => 'anuko时间跟踪器是一种简单、易用、开放源码的时间跟踪系统。 看 www.anuko网更多信息。', "form.mail.sending_str" => '消息已发送', // invoice attributes diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 568aa1813..9d7b03e62 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -167,8 +167,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => '項目', +'label.projects' => '項目', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -271,10 +272,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => '項目', +'title.add_project' => '添加項目', +'title.edit_project' => '編輯專案', // TODO: is this correct? I do not see 項目 here. +'title.delete_project' => '刪除項目', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -331,7 +333,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => '項目', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -401,7 +404,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => '項目', "form.filter.filter" => '收藏的報告', "form.filter.filter_new" => '保存到我的存檔', @@ -434,13 +436,11 @@ "form.mytime.del_str" => '刪除時間記錄', "form.mytime.time_form" => ' (時:分)', "form.mytime.date" => '日期', -"form.mytime.project" => '項目', "form.mytime.start" => '開始', "form.mytime.finish" => '結束', "form.mytime.duration" => '持續時間', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', -"form.mytime.th.project" => '項目', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '結束', "form.mytime.th.duration" => '持續時間', @@ -469,7 +469,6 @@ "form.people.del_str" => '刪除用戶', "form.people.th.login" => '登錄', "form.people.th.role" => '角色', -"form.people.th.project" => '項目', "form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', @@ -478,21 +477,6 @@ "form.people.rate" => '默認小時收費', "form.people.comanager" => '合作經理人', -"form.people.projects" => '項目', - -// projects form attributes -"form.project.proj_title" => '項目', -"form.project.edit_str" => '編輯專案', -"form.project.add_str" => '添加新項目', -"form.project.del_str" => '刪除項目', - -// activities form attributes -"form.activity.act_title" => '活動', -"form.activity.add_title" => '新建活動', -"form.activity.edit_str" => '編輯活動', -"form.activity.del_str" => '刪除活動', -"form.activity.project" => '項目', -"form.activity.th.project" => '項目', // report attributes "form.report.title" => '報告', @@ -503,12 +487,10 @@ "form.report.duration" => '持續時間', "form.report.start" => '開始', "form.report.finish" => '結束', -"form.report.project" => '項目', "form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', "form.report.th.empllist" => '用戶', "form.report.th.date" => '日期', -"form.report.th.project" => '項目', "form.report.th.start" => '開始', "form.report.th.finish" => '結束', "form.report.th.duration" => '持續時間', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index cbdd450a9..9a4613982 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3906 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3907 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 5038971aa31a431afb8819a101b91965ad53b968 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 14:33:52 +0000 Subject: [PATCH 0448/2515] Some more translation recycling. --- WEB-INF/resources/et.lang.php | 21 +++---------------- WEB-INF/resources/hu.lang.php | 22 +++----------------- WEB-INF/resources/tr.lang.php | 38 +++++++++-------------------------- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 17 insertions(+), 66 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7d0a6bf92..554eba0b5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -279,10 +279,10 @@ // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projektid', +'title.add_project' => 'Projekti lisamine', +'title.edit_project' => 'Projekti muutmine', +'title.delete_project' => 'Projekti kustutamine', // TODO: translate the following. -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -444,13 +444,11 @@ // Note to translators: the string below must be translated // "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'kuupäev', -"form.mytime.project" => 'projekt', "form.mytime.start" => 'algus', "form.mytime.finish" => 'lõpp', "form.mytime.duration" => 'kestus', "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', -"form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'algus', "form.mytime.th.finish" => 'lõpp', "form.mytime.th.duration" => 'kestus', @@ -481,7 +479,6 @@ "form.people.del_str" => 'kasutaja kustutamine', "form.people.th.login" => 'login', "form.people.th.role" => 'roll', -"form.people.th.project" => 'projekt', "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', "form.people.comanager" => 'kaashaldur', @@ -490,16 +487,6 @@ "form.people.rate" => 'vaikimisi tunni hind', "form.people.comanager" => 'kaashaldur', -"form.people.projects" => 'projektid', - -// projects form attributes -"form.project.proj_title" => 'projektid', -"form.project.edit_str" => 'projektide muutmine', -"form.project.add_str" => 'uue projekti lisamine', -"form.project.del_str" => 'projekti kustutamine', - -// activities form attributes -"form.activity.project" => 'projekt', // report attributes "form.report.from" => 'algab kuupäevast', @@ -509,12 +496,10 @@ "form.report.duration" => 'kestus', "form.report.start" => 'algus', "form.report.finish" => 'lõpp', -"form.report.project" => 'projekt', "form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', "form.report.th.empllist" => 'kasutaja', "form.report.th.date" => 'kuupäev', -"form.report.th.project" => 'projekt', "form.report.th.start" => 'algus', "form.report.th.finish" => 'lõpp', "form.report.th.duration" => 'kestus', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 51487394c..7055150f3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -277,10 +277,10 @@ // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projektek', +'title.add_project' => 'Projekt hozzáadása', +'title.edit_project' => 'Projekt szerkesztése', +'title.delete_project' => 'Projekt törlése', // TODO: translate the following. -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -431,13 +431,11 @@ "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', "form.mytime.date" => 'dátum', -"form.mytime.project" => 'projekt', "form.mytime.start" => 'kezdete', "form.mytime.finish" => 'vége', "form.mytime.duration" => 'hossz', "form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', -"form.mytime.th.project" => 'projekt', "form.mytime.th.start" => 'kezdete', "form.mytime.th.finish" => 'vége', "form.mytime.th.duration" => 'hossz', @@ -455,7 +453,6 @@ "form.people.edit_str" => 'munkatárs adatainak szerkesztése', "form.people.del_str" => 'munkatárs adatainak törlése', "form.people.th.role" => 'szerepkör', -"form.people.th.project" => 'projekt', "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', "form.people.comanager" => 'helyettes', @@ -463,17 +460,6 @@ "form.people.rate" => 'általános óradíj', "form.people.comanager" => 'helyettes', -"form.people.projects" => 'projektek', -// Note to translators: the string below is missing and must be added and translated - -// projects form attributes -"form.project.proj_title" => 'projektek', -"form.project.edit_str" => 'projekt adatainak szerkesztése', -"form.project.add_str" => 'új projekt hozzáadása', -"form.project.del_str" => 'projekt törlése', - -// activities form attributes -"form.activity.project" => 'projekt', // report attributes "form.report.from" => 'kezdő időpont', @@ -483,12 +469,10 @@ "form.report.duration" => 'időtartam', "form.report.start" => 'kezdet', "form.report.finish" => 'befejezés', -"form.report.project" => 'projekt', "form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', "form.report.th.empllist" => 'dolgozó', "form.report.th.date" => 'dátum', -"form.report.th.project" => 'projekt', "form.report.th.start" => 'elkezdve', "form.report.th.finish" => 'befejezve', "form.report.th.duration" => 'időtartam', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 0f02f2b9f..86f55fc41 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -178,8 +178,9 @@ // 'label.option' => 'Option', 'label.invoice' => 'Fatura', // TODO: translate the following. -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'Proje', +'label.projects' => 'Projeler', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -283,10 +284,11 @@ // TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Projeler', +'title.add_project' => 'Proje ekleniyor', +'title.edit_project' => 'Proje düzenleniyor', +'title.delete_project' => 'Proje siliniyor', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -344,7 +346,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projeler', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -414,7 +417,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'proje', "form.filter.filter" => 'sık kullanılan rapor', "form.filter.filter_new" => 'sık kullanılan olarak kaydet', @@ -442,13 +444,11 @@ "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', "form.mytime.date" => 'tarih', -"form.mytime.project" => 'proje', "form.mytime.start" => 'başlat', "form.mytime.finish" => 'tamamla', "form.mytime.duration" => 'süre', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', -"form.mytime.th.project" => 'proje', "form.mytime.th.start" => 'başlat', "form.mytime.th.finish" => 'tamamla', "form.mytime.th.duration" => 'süre', @@ -469,7 +469,6 @@ "form.people.edit_str" => 'kullanıcı düzenleniyor', "form.people.del_str" => 'kullanıcı siliniyor', "form.people.th.role" => 'rol', -"form.people.th.project" => 'proje', "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', @@ -477,21 +476,6 @@ "form.people.rate" => 'varsayılan saat ücreti', "form.people.comanager" => 'yardımcı yönetici', -"form.people.projects" => 'projeler', - -// projects form attributes -"form.project.proj_title" => 'projeler', -"form.project.edit_str" => 'proje düzenleniyor', -"form.project.add_str" => 'yeni proje ekleniyor', -"form.project.del_str" => 'proje siliniyor', - -// activities form attributes -"form.activity.act_title" => 'faaliyetler', -"form.activity.add_title" => 'yeni faaliyetler ekleniyor', -"form.activity.edit_str" => 'faaliyetler düzenleniyor', -"form.activity.del_str" => 'faaliyetler siliniyor', -"form.activity.project" => 'proje', -"form.activity.th.project" => 'proje', // report attributes "form.report.title" => 'raporlar', @@ -502,12 +486,10 @@ "form.report.duration" => 'süre', "form.report.start" => 'başlangıç', "form.report.finish" => 'son', -"form.report.project" => 'proje', "form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', "form.report.th.empllist" => 'kullanıcı', "form.report.th.date" => 'tarih', -"form.report.th.project" => 'proje', "form.report.th.start" => 'başlangıç', "form.report.th.finish" => 'son', "form.report.th.duration" => 'süre', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9a4613982..0018fffbb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3907 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3908 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e6a5318c80b00b6337dd935fcb1e292ce3bf3bcb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 15:08:18 +0000 Subject: [PATCH 0449/2515] More recycling in translations. --- WEB-INF/resources/ja.lang.php | 26 +++---------------------- WEB-INF/resources/ko.lang.php | 33 ++++++++++---------------------- WEB-INF/resources/no.lang.php | 36 ++++++++++------------------------- WEB-INF/resources/pt.lang.php | 31 ++++++++++-------------------- WEB-INF/resources/ro.lang.php | 32 +++++++++---------------------- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 43 insertions(+), 117 deletions(-) diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6e276005a..c880e3c00 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -279,10 +279,10 @@ // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'プロジェクト', +'title.add_project' => 'プロジェクトの追加', +'title.edit_project' => 'プロジェクトの編集', +'title.delete_project' => 'プロジェクトの削除', // TODO: translate the following. -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -440,13 +440,11 @@ "form.mytime.del_str" => '時間レコードの削除', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => '日付', -"form.mytime.project" => 'プロジェクト', "form.mytime.start" => '開始', "form.mytime.finish" => '終了', "form.mytime.duration" => '期間', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', -"form.mytime.th.project" => 'プロジェクト', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '終了', "form.mytime.th.duration" => '期間', @@ -475,7 +473,6 @@ "form.people.del_str" => 'ユーザーの削除', "form.people.th.login" => 'ログインID', "form.people.th.role" => 'ルール', -"form.people.th.project" => 'プロジェクト', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', "form.people.comanager" => '共同管理者', @@ -484,21 +481,6 @@ "form.people.rate" => 'デフォルト時間当り給料', "form.people.comanager" => '共同管理者', -"form.people.projects" => 'プロジェクト', - -// projects form attributes -"form.project.proj_title" => 'プロジェクト', -"form.project.edit_str" => 'プロジェクトの編集', -"form.project.add_str" => '新規プロジェクトの追加', -"form.project.del_str" => 'プロジェクトの削除', - -// activities form attributes -"form.activity.act_title" => '活動内容', -"form.activity.add_title" => '新規活動内容の追加', -"form.activity.edit_str" => '活動内容の編集', -"form.activity.del_str" => '活動内容の削除', -"form.activity.project" => 'プロジェクト', -"form.activity.th.project" => 'プロジェクト', // report attributes "form.report.title" => 'レポート', @@ -509,12 +491,10 @@ "form.report.duration" => '期間', "form.report.start" => '開始', "form.report.finish" => '終了', -"form.report.project" => 'プロジェクト', "form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', "form.report.th.empllist" => 'ユーザー', "form.report.th.date" => '日付', -"form.report.th.project" => 'プロジェクト', "form.report.th.start" => '開始', "form.report.th.finish" => '終了', "form.report.th.duration" => '期間', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 483e4572b..de56e6d89 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -170,8 +170,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => '프로젝트', +'label.projects' => '프로젝트', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -278,10 +279,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => '프로젝트', +'title.add_project' => '프로젝트를 추가하기', +'title.edit_project' => '프로젝트를 편집하기', +'title.delete_project' => '프로젝트를 편집하기', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -338,7 +340,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => '프로젝트', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -408,7 +411,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => '프로젝트', "form.filter.filter" => '좋아하는 보고서', "form.filter.filter_new" => '좋아하는 것으로 저장', @@ -441,13 +443,11 @@ "form.mytime.del_str" => '시간기록을 삭제하기', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => '날짜', -"form.mytime.project" => '프로젝트', "form.mytime.start" => '시작', "form.mytime.finish" => '마감', "form.mytime.duration" => '기간', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', -"form.mytime.th.project" => '프로젝트', "form.mytime.th.start" => '시작', "form.mytime.th.finish" => '마감', "form.mytime.th.duration" => '기간', @@ -475,7 +475,6 @@ "form.people.del_str" => '사용자를 삭제하기', "form.people.th.login" => '로그인ID', "form.people.th.role" => '직위', -"form.people.th.project" => '프로젝트', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', "form.people.comanager" => '공동관리자', @@ -484,16 +483,6 @@ "form.people.rate" => '디폴트 시간당 급여', "form.people.comanager" => '공동관리자', -"form.people.projects" => '프로젝트', - -// projects form attributes -"form.project.proj_title" => '프로젝트', -"form.project.edit_str" => '프로젝트를 편집하기', -"form.project.add_str" => '신규 프로젝트를 추가하기', -"form.project.del_str" => '프로젝트를 삭제하기', - -// activities form attributes -"form.activity.project" => '프로젝트', // report attributes "form.report.title" => '보고서', @@ -504,12 +493,10 @@ "form.report.duration" => '기간', "form.report.start" => '시작', "form.report.finish" => '마감', -"form.report.project" => '프로젝트', "form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', "form.report.th.empllist" => '사용자', "form.report.th.date" => '날짜', -"form.report.th.project" => '프로젝트', "form.report.th.start" => '시작', "form.report.th.finish" => '마감', "form.report.th.duration" => '기간', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 9c7e68b2a..22e40361c 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -169,8 +169,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'Prosjekt', +'label.projects' => 'Prosjekter', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -271,10 +272,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Prosjekter', +'title.add_project' => 'Legg til prosjekt', +'title.edit_project' => 'Endre prosjekt', +'title.delete_project' => 'Slett prosjekt', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -331,7 +333,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'prosjekter', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -402,7 +405,6 @@ // TODO: Please check the translation against the current English file as many things are being refactored. For example, many labels have been added after label.email. -// "form.filter.project" => 'prosjekt', // "form.filter.filter" => 'favorittrapport', // "form.filter.filter_new" => 'lagre som favoritt', @@ -437,13 +439,11 @@ "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', // Note to translators: "form.mytime.date" => 'dato', // the string must be translated -"form.mytime.project" => 'prosjekt', "form.mytime.start" => 'starttid', "form.mytime.finish" => 'ferdig', "form.mytime.duration" => 'varighet', "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', -"form.mytime.th.project" => 'prosjekt', "form.mytime.th.start" => 'starttid', "form.mytime.th.finish" => 'ferdig', "form.mytime.th.duration" => 'varighet', @@ -475,27 +475,13 @@ "form.people.th.login" => 'innlogging', "form.people.th.role" => 'rolle', // Note to translators: the 2 strings below are missing and must be added and translated -// "form.people.th.project" => 'prosjekt', // "form.people.th.rate" => 'timesats', // Note to translators: the strings below must be correctly translated // "form.people.manager" => 'admin', // "form.people.comanager" => 'co-manager', "form.people.empl" => 'bruker', "form.people.login" => 'innlogging', - "form.people.rate" => 'timesats', -// Note to translators: the strings below are missing and must be added and translated -// "form.people.comanager" => 'co-manager', -// "form.people.projects" => 'prosjekter', - -// projects form attributes -"form.project.proj_title" => 'prosjekter', -"form.project.edit_str" => 'endre prosjekt', -"form.project.add_str" => 'legg til nytt prosjekt', -"form.project.del_str" => 'slett prosjekt', - -// activities form attributes -"form.activity.project" => 'prosjekt', // report attributes "form.report.title" => 'rapporter', @@ -506,13 +492,11 @@ "form.report.duration" => 'varighet', "form.report.start" => 'starttid', "form.report.finish" => 'ferdig', -"form.report.project" => 'prosjekt', // Note to translators: the strings below must be translated // "form.report.totals_only" => 'kun summer', "form.report.total" => 'totalt antall timer', "form.report.th.empllist" => 'bruker', "form.report.th.date" => 'dato', -"form.report.th.project" => 'prosjekt', "form.report.th.start" => 'starttid', "form.report.th.finish" => 'ferdig', "form.report.th.duration" => 'varighet', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 647ac8ed0..1a3c5e560 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -163,8 +163,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'Projeto', +'label.projects' => 'Projetos', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -265,10 +266,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Projetos', +'title.add_project' => 'Adicionando projeto', +'title.edit_project' => 'Editando projeto', +'title.delete_project' => 'Apagando projeto', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -325,7 +327,8 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'projetos', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -402,12 +405,10 @@ // my time form attributes "form.mytime.title" => 'adicionar período', "form.mytime.date" => 'data', -"form.mytime.project" => 'projeto', "form.mytime.start" => 'início', "form.mytime.finish" => 'fim', "form.mytime.daily" => 'trabalho diário', "form.mytime.total" => 'horas totais: ', -"form.mytime.th.project" => 'projeto', "form.mytime.th.start" => 'início', "form.mytime.th.finish" => 'finish', "form.mytime.th.duration" => 'duração', @@ -428,15 +429,6 @@ "form.people.manager" => 'gerente', "form.people.empl" => 'usuário', -// projects form attributes -"form.project.proj_title" => 'projetos', -"form.project.edit_str" => 'editando projeto', -"form.project.add_str" => 'adicionando novo projeto', -"form.project.del_str" => 'apagando projeto', - -// activities form attributes -"form.activity.project" => 'project', - // report attributes "form.report.title" => 'relatórios', "form.report.from" => 'data inicial', @@ -444,9 +436,6 @@ "form.report.duration" => 'duração', "form.report.start" => 'início', "form.report.finish" => 'fim', -"form.report.project" => 'projeto', -// Note to translators: the string below is missing and must be added and translated -// "form.report.totals_only" => 'totals only', "form.report.total" => 'horas totais', "form.report.th.empllist" => 'usuário', // Note to translators: the strings below must be translated diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 9d4feff42..6d35e12bb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -173,8 +173,9 @@ // 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', -// 'label.project' => 'Project', -// 'label.projects' => 'Projects', +'label.project' => 'Proiect', +'label.projects' => 'Proiecte', +// TODO: translate the following. // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', @@ -276,10 +277,11 @@ // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', -// 'title.projects' => 'Projects', -// 'title.add_project' => 'Adding Project', -// 'title.edit_project' => 'Editing Project', -// 'title.delete_project' => 'Deleting Project', +'title.projects' => 'Proiecte', +'title.add_project' => 'Adaugare proiect', +'title.edit_project' => 'Editare proiect', +'title.delete_project' => 'Stergere proiect', +// TODO: translate the following. // 'title.tasks' => 'Tasks', // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', @@ -336,7 +338,7 @@ // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.projects' => 'projects', +'dropdown.projects' => 'proiecte', // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', @@ -404,7 +406,6 @@ // TODO: refactoring ongoing down from here. -"form.filter.project" => 'proiect', "form.filter.filter" => 'rapoarte favorite', "form.filter.filter_new" => 'salveaza ca favorit', @@ -438,13 +439,11 @@ "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'data', -"form.mytime.project" => 'proiect', "form.mytime.start" => 'inceput', "form.mytime.finish" => 'sfarsit', "form.mytime.duration" => 'durata', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', -"form.mytime.th.project" => 'proiect', "form.mytime.th.start" => 'inceput', "form.mytime.th.finish" => 'sfarsit', "form.mytime.th.duration" => 'durata', @@ -462,7 +461,6 @@ "form.people.edit_str" => 'editare utilizator', "form.people.del_str" => 'stergee utilizator', "form.people.th.role" => 'functie', -"form.people.th.project" => 'proiect', "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', "form.people.comanager" => 'comanager', @@ -470,16 +468,6 @@ "form.people.rate" => 'pret pe ora implicit', "form.people.comanager" => 'co-manager', -"form.people.projects" => 'proiecte', - -// projects form attributes -"form.project.proj_title" => 'proiecte', -"form.project.edit_str" => 'editare proiect', -"form.project.add_str" => 'adauagre proiect nou', -"form.project.del_str" => 'stergere proiect', - -// activities form attributes -"form.activity.project" => 'proiect', // report attributes "form.report.title" => 'rapoarte', @@ -490,12 +478,10 @@ "form.report.duration" => 'durata', "form.report.start" => 'inceput', "form.report.finish" => 'sfarsit', -"form.report.project" => 'proiect', "form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', "form.report.th.empllist" => 'utilizator', "form.report.th.date" => 'data', -"form.report.th.project" => 'proiect', "form.report.th.start" => 'inceput', "form.report.th.finish" => 'sfarsit', "form.report.th.duration" => 'durata', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0018fffbb..cbefd28a2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3908 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3909 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 60b43ba15e661ad7a8b4740dd4ba3d756344ef97 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 15:34:50 +0000 Subject: [PATCH 0450/2515] A bit more cleanup. --- WEB-INF/resources/ca.lang.php | 14 ++++---------- WEB-INF/resources/cs.lang.php | 6 ------ WEB-INF/resources/et.lang.php | 5 ----- WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 5 insertions(+), 30 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 33ee714dc..7c3a4f7b8 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -58,7 +58,7 @@ // TODO: translate the following. // 'menu.tasks' => 'Tasks', // 'menu.users' => 'Users', -'menu.teams' => 'Equips', +'menu.teams' => 'Grups', // TODO: translate the following. // 'menu.export' => 'Export', 'menu.clients' => 'Clients', @@ -100,7 +100,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', // 'error.no_login' => 'No user with this login.', -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'La seva base de dades està buida. Iniciï sessió com a administrador i creï un nou grup.', 'error.upload' => 'Error pujant l\\\'arxiu.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -253,11 +253,11 @@ // Compare with English file to see how it is done there and do Catalan titles similarly. // Specifically: Agregant vs Agregar, etc. 'title.login' => 'Sessió iniciada', +'title.teams' => 'Grups', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Eliminar grup', 'title.reset_password' => 'Restablir paraula de pas', // TODO: translate the following. // 'title.change_password' => 'Changing Password', @@ -414,12 +414,6 @@ // administrator form "form.admin.duty_text" => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker.(No està permès col·lisions de e-mail).', - -"form.admin.change_pass" => 'Canviar la paraula de pas de l\\\'administrador de compte', -"form.admin.profile.title" => 'Grups', -"form.admin.profile.noprofiles" => 'La seva base de dades està buida. Iniciï sessió com a administrador i creï un nou grup.', -"form.admin.profile.comment" => 'Eliminar grup', -"form.admin.profile.th.id" => 'Identificació', "form.admin.profile.th.active" => 'Actiu', // my time form attributes diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 5601343c9..d832a9fb3 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -423,17 +423,11 @@ // administrator form "form.admin.title" => 'administrator', "form.admin.duty_text" => 'vytvořit nový tým prostřednictvím účtu týmového manažera.
můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody e-mailových adres!).', - -"form.admin.change_pass" => 'změna hesla účtu administrator', "form.admin.profile.title" => 'týmy', "form.admin.profile.noprofiles" => 'vaše databáze je prázdná. přihlašte se jako admin a vytvořte nový tým.', "form.admin.profile.comment" => 'smazat tým', "form.admin.profile.th.id" => 'id', "form.admin.profile.th.active" => 'aktovní', -// Note to translators: the strings below are missing in the translation and must be added -// "form.admin.custom_date_format" => "date format", -// "form.admin.custom_time_format" => "time format", -// "form.admin.start_week" => "first day of week", // my time form attributes "form.mytime.title" => 'můj deník', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 554eba0b5..079110c3e 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -426,16 +426,11 @@ // Note to translators: the string below must be translated // "form.admin.duty_text" => 'create a new meeskond by creating a new meeskond manager account.
you can also import meeskond data from an xml file from another Anuko time tracker server (no e-mail collisions are allowed).', -"form.admin.change_pass" => 'muuda administraatori konto salasõna', "form.admin.profile.title" => 'meeskonnad', "form.admin.profile.noprofiles" => 'sinu andmebaas on tühi. logi adminina sisse ja loo uus meeskond.', "form.admin.profile.comment" => 'kustuta meeskond', "form.admin.profile.th.id" => 'id', "form.admin.profile.th.active" => 'aktiivne', -// Note to translators: the strings below are missing in the translation and must be translated -// "form.admin.custom_date_format" => "date format", -// "form.admin.custom_time_format" => "time format", -// "form.admin.start_week" => "first day of week", // my time form attributes "form.mytime.title" => 'minu aeg', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 7055150f3..a70dfe8c6 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -417,7 +417,6 @@ "form.admin.title" => 'Adminisztrátor', "form.admin.duty_text" => 'új csoport létrehozása egy csoport-vezetői jogosultsággal.
a csoport adatokat importálhatjuk XML-ből (csak az e-mail címek ne ütközzenek).', -"form.admin.change_pass" => 'az adminisztrátori jelszó megváltoztatása', "form.admin.profile.title" => 'csoportok', "form.admin.profile.noprofiles" => 'az adatbázis üres. lépj be adminisztrátorként és hozz létre egyet.', "form.admin.profile.comment" => 'csoport törlése', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index c880e3c00..f7db2c976 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -423,7 +423,6 @@ "form.admin.title" => '管理者', "form.admin.duty_text" => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', -"form.admin.change_pass" => '管理者のアカウントのパスワードの変更', "form.admin.profile.title" => 'チーム', "form.admin.profile.noprofiles" => 'あなたのデータベースは空いています。管理者にログインして新規チームを作成してください。', "form.admin.profile.comment" => 'チームの削除', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index de56e6d89..7f4e4c2e4 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -426,7 +426,6 @@ "form.admin.title" => '관리자', "form.admin.duty_text" => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', -"form.admin.change_pass" => '관리자 계정의 암호 변경', "form.admin.profile.title" => '팀', "form.admin.profile.noprofiles" => '당신의 데이터베이스는 비어있습니다. 관리자로 로그인하여 새로운 팀을 생성하십시오.', "form.admin.profile.comment" => '팀 삭제', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 22e40361c..b9b1c4241 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -421,7 +421,6 @@ // "form.admin.title" => 'administrator', // "form.admin.duty_text" => 'opprett et nytt team ved å opprette en ny team manager konto.
du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', -// "form.admin.change_pass" => 'bytt passord på administratorkontoen', // "form.admin.profile.title" => 'team', // "form.admin.profile.noprofiles" => 'databasen din er tom. logg inn som admin og opprett et nytt team.', // "form.admin.profile.comment" => 'slett team', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 6d35e12bb..2a6f80a55 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -421,7 +421,6 @@ "form.admin.title" => 'administrator', "form.admin.duty_text" => 'adauga o noua echipa prin adaugarea unui nou cont de tip manager.
deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru emailuri).', -"form.admin.change_pass" => 'schimba parola contului de administrator', "form.admin.profile.title" => 'echipe', "form.admin.profile.noprofiles" => 'baza de date este goala. intra ca admin si adauga o noua echipa.', "form.admin.profile.comment" => 'sterge echipa', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 86f55fc41..19024be50 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -431,7 +431,6 @@ "form.admin.title" => 'yönetici', "form.admin.duty_text" => 'yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (e-posta çakışmalarına izin verilmemekte).', -"form.admin.change_pass" => 'yönetici hesabın parolasını değiştir', "form.admin.profile.title" => 'ekipler', "form.admin.profile.noprofiles" => 'veritabanınız boş. yeni bir ekip yaratmak için yönetici olarak giriş yapın.', "form.admin.profile.comment" => 'ekibi sil', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a8633cf0e..6e40030ec 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -419,7 +419,6 @@ "form.admin.title" => '管理员', "form.admin.duty_text" => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', -"form.admin.change_pass" => '修改管理员账号的密码', "form.admin.profile.title" => '团队', "form.admin.profile.noprofiles" => '您的数据库没有任何记录。请以管理员身份登录并创建一个新团队。', "form.admin.profile.comment" => '删除团队', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 9d7b03e62..f0a481e57 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -419,7 +419,6 @@ "form.admin.title" => '管理員', "form.admin.duty_text" => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', -"form.admin.change_pass" => '修改管理員帳號的密碼', "form.admin.profile.title" => '團隊', "form.admin.profile.noprofiles" => '您的資料庫沒有任何記錄。請以管理員身份登錄並創建一個新團隊。', "form.admin.profile.comment" => '刪除團隊', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index cbefd28a2..ff7e113ac 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3909 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3910 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e18f843182c3fb0675162f14358f6f99384d4128 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 17:27:21 +0000 Subject: [PATCH 0451/2515] Some more refactoring in translation files. --- WEB-INF/resources/ca.lang.php | 23 +++++++++++++++++++---- WEB-INF/resources/cs.lang.php | 16 ++++++++++++++++ WEB-INF/resources/et.lang.php | 15 +++++++++++++++ WEB-INF/resources/hu.lang.php | 15 +++++++++++++++ WEB-INF/resources/ja.lang.php | 15 +++++++++++++++ WEB-INF/resources/ko.lang.php | 15 +++++++++++++++ WEB-INF/resources/no.lang.php | 15 +++++++++++++++ WEB-INF/resources/pt.lang.php | 15 +++++++++++++++ WEB-INF/resources/ro.lang.php | 15 +++++++++++++++ WEB-INF/resources/tr.lang.php | 15 +++++++++++++++ WEB-INF/resources/zh-cn.lang.php | 15 +++++++++++++++ WEB-INF/resources/zh-tw.lang.php | 15 +++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 186 insertions(+), 5 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 7c3a4f7b8..44ff343ed 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -347,7 +347,8 @@ // TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', +'dropdown.status_active' => 'actiu', +// TODO: translate the following. // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', @@ -408,13 +409,27 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.duty_text" => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker.(No està permès col·lisions de e-mail).', -"form.admin.profile.th.active" => 'Actiu', +// form.admin.duty_text is now used in form.teams.hint with email changed to login. +"form.teams.hint" => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker. (No està permès col·lisions de e-mail).', // my time form attributes "form.mytime.title" => 'El meu temps', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d832a9fb3..f38b50d22 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -408,6 +408,22 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 079110c3e..4bd3690f4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -408,6 +408,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a70dfe8c6..b05c0b942 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -404,6 +404,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index f7db2c976..911bfdec9 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -407,6 +407,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 7f4e4c2e4..fdc72c287 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -407,6 +407,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b9b1c4241..630b61f06 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -399,6 +399,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 1a3c5e560..ca4bdf4b4 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -391,6 +391,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 2a6f80a55..1dde9f558 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -402,6 +402,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 19024be50..83649469f 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -413,6 +413,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6e40030ec..469dc759a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -391,6 +391,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index f0a481e57..9d989d08d 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -400,6 +400,21 @@ // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', +// Report form. See example at https://timetracker.anuko.com/report.php +// (after generating a report at https://timetracker.anuko.com/reports.php). +// TODO: translate the following. +// 'form.report.export' => 'Export', +// 'form.report.assign_to_invoice' => 'Assign to invoice', + +// Invoice form. See example at https://timetracker.anuko.com/invoice.php +// (you can get to this form after generating a report). +// TODO: translate the following. +// 'form.invoice.number' => 'Invoice number', +// 'form.invoice.person' => 'Person', +// 'form.invoice.invoice_to_delete' => 'Invoice to delete', +// 'form.invoice.invoice_entries' => 'Invoice entries', +// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ff7e113ac..c3ea9f489 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3910 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3911 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 8063987a8f3384a03296fc617a0c9507a3126c46 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 18:36:26 +0000 Subject: [PATCH 0452/2515] Some recycling and refactoring in translations. --- WEB-INF/resources/ca.lang.php | 15 +++++++++++++++ WEB-INF/resources/cs.lang.php | 15 +++++++++++++++ WEB-INF/resources/et.lang.php | 15 +++++++++++++++ WEB-INF/resources/hu.lang.php | 15 +++++++++++++++ WEB-INF/resources/ja.lang.php | 15 +++++++++++++++ WEB-INF/resources/ko.lang.php | 24 ++++++++++++++++++------ WEB-INF/resources/no.lang.php | 24 +++++++++++++++++------- WEB-INF/resources/pt.lang.php | 15 +++++++++++++++ WEB-INF/resources/ro.lang.php | 23 ++++++++++++++++++----- WEB-INF/resources/tr.lang.php | 23 ++++++++++++++++++----- WEB-INF/resources/zh-cn.lang.php | 26 +++++++++++++++++--------- WEB-INF/resources/zh-tw.lang.php | 24 ++++++++++++++++++------ WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 197 insertions(+), 39 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 44ff343ed..c35d03f83 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -424,6 +424,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index f38b50d22..7ddfb342c 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -423,6 +423,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 4bd3690f4..e29ade064 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -423,6 +423,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b05c0b942..22bc2511e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -419,6 +419,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 911bfdec9..1b1a70457 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -422,6 +422,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index fdc72c287..5660163a6 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -241,7 +241,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => '좋아하는 보고서', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -386,8 +387,7 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', +'form.reports.save_as_favorite' => '좋아하는 것으로 저장', 'form.reports.confirm_delete' => '좋아하는 이 보고서를 삭제해도 좋습니까?', 'form.reports.include_billable' => '청구 가능한', 'form.reports.include_not_billable' => '청구 가능하지 않은', @@ -422,12 +422,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -"form.filter.filter" => '좋아하는 보고서', -"form.filter.filter_new" => '좋아하는 것으로 저장', + +// TODO: refactoring ongoing down from here. // password reminder form attributes "form.fpass.login" => '로그인', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 630b61f06..f251ce61e 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -236,7 +236,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'Favoritt rapport', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -379,8 +380,7 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', +'form.reports.save_as_favorite' => 'Lagre som favoritt', 'form.reports.confirm_delete' => 'Er du sikker på at du vil slette denne favorittrapporten?', 'form.reports.include_billable' => 'fakturerbar', 'form.reports.include_not_billable' => 'ikke fakturerbar', @@ -414,14 +414,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -// TODO: Please check the translation against the current English file as many things are being refactored. For example, many labels have been added after label.email. -// "form.filter.filter" => 'favorittrapport', -// "form.filter.filter_new" => 'lagre som favoritt', +// TODO: refactoring ongoing down from here. // password reminder form attributes "form.fpass.login" => 'innlogging', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index ca4bdf4b4..d2a862356 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -406,6 +406,21 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 1dde9f558..09ed006e3 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -240,7 +240,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'Raport favorite', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -382,8 +383,8 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php +'form.reports.save_as_favorite' => 'Salveaza ca favorit', // TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', // 'form.reports.include_billable' => 'billable', // 'form.reports.include_not_billable' => 'not billable', @@ -417,12 +418,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -"form.filter.filter" => 'rapoarte favorite', -"form.filter.filter_new" => 'salveaza ca favorit', + +// TODO: refactoring ongoing down from here. // password reminder form attributes "form.fpass.login" => 'autentifica', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 83649469f..a5bf9fc91 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -246,7 +246,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => 'Sık kullanılan rapor', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -392,8 +393,8 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php +'form.reports.save_as_favorite' => 'Sık kullanılan olarak kaydet', // TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', // 'form.reports.confirm_delete' => 'Are you sure you want to delete this favorite report?', 'form.reports.include_billable' => 'faturalandırılabilir', 'form.reports.include_not_billable' => 'faturalandırılamaz', @@ -428,12 +429,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -"form.filter.filter" => 'sık kullanılan rapor', -"form.filter.filter_new" => 'sık kullanılan olarak kaydet', + +// TODO: refactoring ongoing down from here. // password reminder form attributes "form.fpass.send_pass_str" => 'parola sıfırlama talebi yollandı', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 469dc759a..36b3ffd61 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -226,7 +226,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => '收藏的报告', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -370,8 +371,7 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', +'form.reports.save_as_favorite' => '保存到我的收藏夹', 'form.reports.confirm_delete' => '您确认要删除收藏的这个报告吗?', 'form.reports.include_billable' => '计费时间', 'form.reports.include_not_billable' => '非计费时间', @@ -406,16 +406,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', + +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -// TODO: everything below needs serious work and be synchronized with the master English file. -// For example, form.filter.project property no longer exists, and so on. -// If you intend to improve perhaps go in small steps and coordinate with the maintainer if anything is unclear. -"form.filter.filter" => '收藏的报告', -"form.filter.filter_new" => '保存到我的收藏夹', +// TODO: refactoring ongoing down from here. // login form attributes "form.login.title" => '登录', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 9d989d08d..bb538c8ad 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -235,7 +235,8 @@ // 'label.type_dropdown' => 'dropdown', // 'label.type_text' => 'text', // 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', +'label.fav_report' => '收藏的報告', +// TODO: translate the following. // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', @@ -379,8 +380,7 @@ // 'form.week.new_entry' => 'New entry', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. -// 'form.reports.save_as_favorite' => 'Save as favorite', +'form.reports.save_as_favorite' => '保存到我的存檔', 'form.reports.confirm_delete' => '您確認要刪除收藏的這個報告嗎?', 'form.reports.include_billable' => '計費時間', 'form.reports.include_not_billable' => '非計費時間', @@ -415,12 +415,24 @@ // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +// Charts form. See example at https://timetracker.anuko.com/charts.php +// TODO: translate the following. +// 'form.charts.interval' => 'Interval', +// 'form.charts.chart' => 'Chart', +// Projects form. See example at https://timetracker.anuko.com/projects.php +// TODO: translate the following. +// 'form.projects.active_projects' => 'Active Projects', +// 'form.projects.inactive_projects' => 'Inactive Projects', + +// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// TODO: translate the following. +// 'form.tasks.active_tasks' => 'Active Tasks', +// 'form.tasks.inactive_tasks' => 'Inactive Tasks', -// TODO: refactoring ongoing down from here. -"form.filter.filter" => '收藏的報告', -"form.filter.filter_new" => '保存到我的存檔', + +// TODO: refactoring ongoing down from here. // password reminder form attributes "form.fpass.login" => '登錄', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c3ea9f489..b9da5638d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3911 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3912 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3151c20a6f850bf1207f914f8b1a7f31c2be7244 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 19:46:32 +0000 Subject: [PATCH 0453/2515] More cleanup in translations. --- WEB-INF/resources/cs.lang.php | 4 +--- WEB-INF/resources/et.lang.php | 4 +--- WEB-INF/resources/zh-cn.lang.php | 13 ++----------- WEB-INF/resources/zh-tw.lang.php | 3 +-- WEB-INF/templates/footer.tpl | 2 +- 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7ddfb342c..ae8e6def8 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -130,8 +130,7 @@ // 'button.add_option' => 'Add option', 'button.add' => 'Přidat', 'button.generate' => 'Vytvořit', -// TODO: translate the following. -// 'button.reset_password' => 'Reset password', +'button.reset_password' => 'Resetovat heslo', 'button.send' => 'Poslat', 'button.send_by_email' => 'Poslat e-mailem', 'button.create_team' => 'Vytvořit tým', @@ -443,7 +442,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.title" => 'resetovat heslo', "form.fpass.login" => 'přihlásit', "form.fpass.send_pass_str" => 'zaslán požadavek k vymazání hesla', "form.fpass.send_pass_subj" => 'Anuko Time Tracker požadavek na vymazání hesla', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e29ade064..8d0b14bc2 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -130,8 +130,7 @@ // 'button.add_option' => 'Add option', 'button.add' => 'Lisa', 'button.generate' => 'Loo', -// TODO: translate the following. -// 'button.reset_password' => 'Reset password', +'button.reset_password' => 'Tühjenda salasõna', 'button.send' => 'Saada', 'button.send_by_email' => 'Saada e-mailiga', 'button.create_team' => 'Loo meeskond', @@ -443,7 +442,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.title" => 'tühjenda salasõna', "form.fpass.login" => 'login', "form.fpass.send_pass_str" => 'salasõna tühjendamise käsk edastatud', // Note to translators: the 3 strings below must be translated diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 36b3ffd61..fd8651a94 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -140,7 +140,7 @@ 'label.manager_login' => '管理员登录', 'label.person_name' => '姓名', 'label.thing_name' => '名称', -// 'label.login' => 'Login', +'label.login' => '登录', 'label.password' => '密码', 'label.confirm_password' => '确认密码', 'label.email' => '电子邮件', @@ -239,8 +239,8 @@ // 'label.week_list' => 'Week list', // Form titles. +'title.login' => '登录', // TODO: translate the following. -// 'title.login' => 'Login', // 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', @@ -425,13 +425,7 @@ // TODO: refactoring ongoing down from here. -// login form attributes -"form.login.title" => '登录', -"form.login.login" => '登录', - // password reminder form attributes -"form.fpass.title" => '重设密码', -"form.fpass.login" => '登录', "form.fpass.send_pass_str" => '密码重设请求已经发送', "form.fpass.send_pass_subj" => 'Anuko时间追踪器密码重设请求', // Note to translators: the ending of this string below needs to be translated. @@ -475,7 +469,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '新建管理账号', "form.profile.edit_title" => '编辑简介', -"form.profile.login" => '登录', "form.profile.showchart" => '显示饼状图', "form.profile.lang" => '语言', @@ -489,13 +482,11 @@ "form.people.createu_str" => '新建用户', "form.people.edit_str" => '编辑用户', "form.people.del_str" => '删除用户', -"form.people.th.login" => '登录', "form.people.th.role" => '角色', "form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', "form.people.empl" => '用户', -"form.people.login" => '登录', "form.people.rate" => '默认小时收费', "form.people.comanager" => '合作经理人', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index bb538c8ad..630ad3ee2 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -127,8 +127,7 @@ // 'button.add_option' => 'Add option', 'button.add' => '添加', 'button.generate' => '創建', -// TODO: translate the following. -// 'button.reset_password' => 'Reset password', +'button.reset_password' => '重設密碼', 'button.send' => '發送', 'button.send_by_email' => '通過郵件發送', // TODO: translate the following. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b9da5638d..9e4b5a1a4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3912 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3913 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e2988808ff230ec86b2a1c2492063f8d67b0cd54 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 19:54:36 +0000 Subject: [PATCH 0454/2515] More cleanup. --- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 1b1a70457..bac57c984 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -593,6 +593,5 @@ "label.disable" => '使用中止', "label.enable" => '使用可能', "label.hrs" => '時間', -"label.errors" => 'エラー', "label.ldap_hint" => '下記のフィールドにあなたのWindowsのログインIDパスワードを入力してください。', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 5660163a6..a648235f4 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -592,6 +592,5 @@ "label.disable" => '무력화', "label.enable" => '가능화', "label.hrs" => '시간', -"label.errors" => '오류', "label.ldap_hint" => '아래의 필드들에서 Windows 로그인암호 를 입력하십시오.', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index f251ce61e..9103eea41 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -596,7 +596,6 @@ // "label.disable" => 'slå av', // "label.enable" => 'slå på', // "label.hrs" => 'timer', -// "label.errors" => 'feil', // "label.ldap_hint" => 'Skriv din Windows login og passord i feltene nedenfor.', // login hello text diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index fd8651a94..f90c1fe3f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -574,7 +574,6 @@ "label.disable" => '禁用', "label.enable" => '启用', "label.hrs" => '小时', -"label.errors" => '错误', "label.ldap_hint" => '在下面的栏目输入您的Windows用户名密码。', // login hello text diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 630ad3ee2..ee867071a 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -585,6 +585,5 @@ "label.disable" => '禁用', "label.enable" => '啟用', "label.hrs" => '小時', -"label.errors" => '錯誤', "label.ldap_hint" => '在下麵的欄目輸入您的Windows用戶名密碼。', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9e4b5a1a4..bc0f075ec 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3913 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3914 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7949c7ae29b8359e2b072f627d2291a4cf260fee Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 20:31:00 +0000 Subject: [PATCH 0455/2515] More recycling in translations. --- WEB-INF/resources/ca.lang.php | 7 +------ WEB-INF/resources/cs.lang.php | 10 +++------- WEB-INF/resources/et.lang.php | 7 +------ WEB-INF/resources/hu.lang.php | 7 +------ WEB-INF/resources/ja.lang.php | 7 +------ WEB-INF/resources/ko.lang.php | 10 +++------- WEB-INF/resources/no.lang.php | 10 +++------- WEB-INF/resources/ro.lang.php | 10 +++------- WEB-INF/resources/tr.lang.php | 10 +++------- WEB-INF/resources/zh-cn.lang.php | 10 +++------- WEB-INF/resources/zh-tw.lang.php | 10 +++------- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 26 insertions(+), 74 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index c35d03f83..a9483d711 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -178,7 +178,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Durada', 'label.note' => 'Nota', 'label.notes' => 'Notes', // TODO: translate the following. @@ -454,12 +454,10 @@ "form.mytime.date" => 'Data', "form.mytime.start" => 'Inici', "form.mytime.finish" => 'Fi', -"form.mytime.duration" => 'Durada', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', "form.mytime.th.start" => 'Inici', "form.mytime.th.finish" => 'Fi', -"form.mytime.th.duration" => 'Durada', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', "form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', @@ -482,8 +480,6 @@ "form.report.from" => 'Data d\\\'inici', "form.report.to" => 'Data de fi', "form.report.groupby_user" => 'Usuari', -"form.report.groupby_project" => 'Projecte', -"form.report.duration" => 'Durada', "form.report.start" => 'Inici', "form.report.finish" => 'Fi', "form.report.totals_only" => 'Només totals', @@ -492,7 +488,6 @@ "form.report.th.date" => 'Data', "form.report.th.start" => 'Inici', "form.report.th.finish" => 'Fi', -"form.report.th.duration" => 'Durada', // charts form attributes // Note to translators: form.charts.title needs to be translated. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index ae8e6def8..08c2e3ce5 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -179,7 +179,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Trvání', 'label.note' => 'Poznámka', 'label.notes' => 'Poznámky', // TODO: translate the following. @@ -403,7 +403,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'projekt', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -466,12 +467,10 @@ "form.mytime.date" => 'datum', "form.mytime.start" => 'začátek', "form.mytime.finish" => 'konec', -"form.mytime.duration" => 'trvání', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', "form.mytime.th.start" => 'začátek', "form.mytime.th.finish" => 'konec', -"form.mytime.th.duration" => 'trvání', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', "form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', "form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', @@ -506,8 +505,6 @@ "form.report.from" => 'počáteční datum', "form.report.to" => 'koncové datum', "form.report.groupby_user" => 'uživatel', -"form.report.groupby_project" => 'projekt', -"form.report.duration" => 'trvání', "form.report.start" => 'počátek', "form.report.finish" => 'konec', "form.report.totals_only" => 'pouze součty', @@ -516,7 +513,6 @@ "form.report.th.date" => 'datum', "form.report.th.start" => 'počátek', "form.report.th.finish" => 'konec', -"form.report.th.duration" => 'trvání', // mail form attributes "form.mail.from" => 'od', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 8d0b14bc2..19ceb5ce1 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -177,7 +177,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Kestus', 'label.note' => 'Märkus', 'label.notes' => 'Märkused', // TODO: translate the following. @@ -469,12 +469,10 @@ "form.mytime.date" => 'kuupäev', "form.mytime.start" => 'algus', "form.mytime.finish" => 'lõpp', -"form.mytime.duration" => 'kestus', "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', "form.mytime.th.start" => 'algus', "form.mytime.th.finish" => 'lõpp', -"form.mytime.th.duration" => 'kestus', "form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', "form.mytime.warn_tozero_rec" => 'see ajakanne tuleb kustutada kuna see ajaperiood on lukustatud', @@ -515,8 +513,6 @@ "form.report.from" => 'algab kuupäevast', "form.report.to" => 'lõpeb kuupäeval', "form.report.groupby_user" => 'kasutaja', -"form.report.groupby_project" => 'projekt', -"form.report.duration" => 'kestus', "form.report.start" => 'algus', "form.report.finish" => 'lõpp', "form.report.totals_only" => 'ainult summad', @@ -525,7 +521,6 @@ "form.report.th.date" => 'kuupäev', "form.report.th.start" => 'algus', "form.report.th.finish" => 'lõpp', -"form.report.th.duration" => 'kestus', // mail form attributes "form.mail.from" => 'kellelt', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 22bc2511e..19eb21cc2 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -179,7 +179,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Időtartam', 'label.note' => 'Megjegyzés', 'label.notes' => 'Megjegyzések', // TODO: translate the following. @@ -462,12 +462,10 @@ "form.mytime.date" => 'dátum', "form.mytime.start" => 'kezdete', "form.mytime.finish" => 'vége', -"form.mytime.duration" => 'hossz', "form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', "form.mytime.th.start" => 'kezdete', "form.mytime.th.finish" => 'vége', -"form.mytime.th.duration" => 'hossz', "form.mytime.del_yes" => 'a bejegyzés törölve', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', @@ -494,8 +492,6 @@ "form.report.from" => 'kezdő időpont', "form.report.to" => 'vég időpont', "form.report.groupby_user" => 'személyek szerint', -"form.report.groupby_project" => 'projektek szerint', -"form.report.duration" => 'időtartam', "form.report.start" => 'kezdet', "form.report.finish" => 'befejezés', "form.report.totals_only" => 'csak a teljes óraszám', @@ -504,7 +500,6 @@ "form.report.th.date" => 'dátum', "form.report.th.start" => 'elkezdve', "form.report.th.finish" => 'befejezve', -"form.report.th.duration" => 'időtartam', // mail form attributes "form.mail.from" => 'feladó', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index bac57c984..eae24bc12 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -178,7 +178,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => '期間', 'label.note' => 'ノート', 'label.notes' => 'ノート', // TODO: translate the following. @@ -471,12 +471,10 @@ "form.mytime.date" => '日付', "form.mytime.start" => '開始', "form.mytime.finish" => '終了', -"form.mytime.duration" => '期間', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '終了', -"form.mytime.th.duration" => '期間', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', "form.mytime.warn_tozero_rec" => 'この時間レコードの期間が満了されましたから、この時間レコードは削除されることが必要です', @@ -516,8 +514,6 @@ "form.report.from" => '開始日付', "form.report.to" => '終了日付', "form.report.groupby_user" => 'ユーザー', -"form.report.groupby_project" => 'プロジェクト', -"form.report.duration" => '期間', "form.report.start" => '開始', "form.report.finish" => '終了', "form.report.totals_only" => '全体だけ', @@ -526,7 +522,6 @@ "form.report.th.date" => '日付', "form.report.th.start" => '開始', "form.report.th.finish" => '終了', -"form.report.th.duration" => '期間', // mail form attributes "form.mail.from" => 'から', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a648235f4..1e3b74151 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -178,7 +178,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => '기간', 'label.note' => '표식', 'label.notes' => '표식', // TODO: translate the following. @@ -403,7 +403,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => '프로젝트', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -471,12 +472,10 @@ "form.mytime.date" => '날짜', "form.mytime.start" => '시작', "form.mytime.finish" => '마감', -"form.mytime.duration" => '기간', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', "form.mytime.th.start" => '시작', "form.mytime.th.finish" => '마감', -"form.mytime.th.duration" => '기간', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', "form.mytime.warn_tozero_rec" => '이 시간기간이 로크되었으므로 이 시간기록은 삭제되어야 합니다', @@ -515,8 +514,6 @@ "form.report.from" => '시작 날짜', "form.report.to" => '마감 날짜', "form.report.groupby_user" => '사용자', -"form.report.groupby_project" => '프로젝트', -"form.report.duration" => '기간', "form.report.start" => '시작', "form.report.finish" => '마감', "form.report.totals_only" => '오직 전체만', @@ -525,7 +522,6 @@ "form.report.th.date" => '날짜', "form.report.th.start" => '시작', "form.report.th.finish" => '마감', -"form.report.th.duration" => '기간', // mail form attributes "form.mail.from" => '부터', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 9103eea41..64b6c1030 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -177,7 +177,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Varighet', 'label.note' => 'Notat', 'label.notes' => 'Notater', // TODO: translate the following. @@ -395,7 +395,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'prosjekt', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -465,12 +466,10 @@ // Note to translators: "form.mytime.date" => 'dato', // the string must be translated "form.mytime.start" => 'starttid', "form.mytime.finish" => 'ferdig', -"form.mytime.duration" => 'varighet', "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', "form.mytime.th.start" => 'starttid', "form.mytime.th.finish" => 'ferdig', -"form.mytime.th.duration" => 'varighet', // Note to translators: the strings below must be translated // "form.mytime.del_yes" => 'tidsoppføringen er slettet', // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', @@ -512,8 +511,6 @@ "form.report.from" => 'starttid', "form.report.to" => 'ferdig', "form.report.groupby_user" => 'bruker', -"form.report.groupby_project" => 'prosjekt', -"form.report.duration" => 'varighet', "form.report.start" => 'starttid', "form.report.finish" => 'ferdig', // Note to translators: the strings below must be translated @@ -523,7 +520,6 @@ "form.report.th.date" => 'dato', "form.report.th.start" => 'starttid', "form.report.th.finish" => 'ferdig', -"form.report.th.duration" => 'varighet', // mail form attributes "form.mail.from" => 'fra', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 09ed006e3..3ea017826 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -181,7 +181,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Durata', 'label.note' => 'Nota', // 'label.notes' => 'Notes', // 'label.item' => 'Item', @@ -399,7 +399,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'proiect', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -468,12 +469,10 @@ "form.mytime.date" => 'data', "form.mytime.start" => 'inceput', "form.mytime.finish" => 'sfarsit', -"form.mytime.duration" => 'durata', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', "form.mytime.th.start" => 'inceput', "form.mytime.th.finish" => 'sfarsit', -"form.mytime.th.duration" => 'durata', "form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', @@ -501,8 +500,6 @@ "form.report.from" => 'data inceput', "form.report.to" => 'data sfarsit', "form.report.groupby_user" => 'utilizator', -"form.report.groupby_project" => 'proiect', -"form.report.duration" => 'durata', "form.report.start" => 'inceput', "form.report.finish" => 'sfarsit', "form.report.totals_only" => 'numai totaluri', @@ -511,7 +508,6 @@ "form.report.th.date" => 'data', "form.report.th.start" => 'inceput', "form.report.th.finish" => 'sfarsit', -"form.report.th.duration" => 'durata', // mail form attributes "form.mail.from" => 'de la', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a5bf9fc91..10fe26745 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -186,7 +186,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => 'Süre', 'label.note' => 'Not', 'label.notes' => 'Notlar', // TODO: translate the following. @@ -410,7 +410,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => 'proje', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -473,12 +474,10 @@ "form.mytime.date" => 'tarih', "form.mytime.start" => 'başlat', "form.mytime.finish" => 'tamamla', -"form.mytime.duration" => 'süre', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', "form.mytime.th.start" => 'başlat', "form.mytime.th.finish" => 'tamamla', -"form.mytime.th.duration" => 'süre', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', @@ -509,8 +508,6 @@ "form.report.from" => 'başlangıç tarihi', "form.report.to" => 'son tarihi', "form.report.groupby_user" => 'kullanıcı', -"form.report.groupby_project" => 'proje', -"form.report.duration" => 'süre', "form.report.start" => 'başlangıç', "form.report.finish" => 'son', "form.report.totals_only" => 'sadece toplamlar', @@ -519,7 +516,6 @@ "form.report.th.date" => 'tarih', "form.report.th.start" => 'başlangıç', "form.report.th.finish" => 'son', -"form.report.th.duration" => 'süre', // mail form attributes "form.mail.from" => 'kimden', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index f90c1fe3f..3ffde5fbf 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -166,7 +166,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => '持续时间', 'label.note' => '备注', 'label.notes' => '备注', // TODO: translate the following. @@ -387,7 +387,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => '项目', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -454,12 +455,10 @@ "form.mytime.date" => '日期', "form.mytime.start" => '开始', "form.mytime.finish" => '结束', -"form.mytime.duration" => '持续时间', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', "form.mytime.th.start" => '开始', "form.mytime.th.finish" => '结束', -"form.mytime.th.duration" => '持续时间', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', "form.mytime.warn_tozero_rec" => '由于这段时间是锁定的,该时间记录必须删除', @@ -496,8 +495,6 @@ "form.report.from" => '开始日期', "form.report.to" => '结束日期', "form.report.groupby_user" => '用户', -"form.report.groupby_project" => '项目', -"form.report.duration" => '持续时间', "form.report.start" => '开始', "form.report.finish" => '结束', "form.report.totals_only" => '仅仅今天', @@ -506,7 +503,6 @@ "form.report.th.date" => '日期', "form.report.th.start" => '开始', "form.report.th.finish" => '结束', -"form.report.th.duration" => '持续时间', // mail form attributes "form.mail.from" => '从', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ee867071a..672213102 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -174,7 +174,7 @@ // 'label.description' => 'Description', // 'label.start' => 'Start', // 'label.finish' => 'Finish', -// 'label.duration' => 'Duration', +'label.duration' => '持續時間', 'label.note' => '備註', 'label.notes' => '備註', // TODO: translate the following. @@ -395,7 +395,8 @@ // 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', -// 'form.reports.group_by_project' => 'project', +'form.reports.group_by_project' => '項目', +// TODO: translate the following. // 'form.reports.group_by_task' => 'task', // 'form.reports.totals_only' => 'Totals only', @@ -463,12 +464,10 @@ "form.mytime.date" => '日期', "form.mytime.start" => '開始', "form.mytime.finish" => '結束', -"form.mytime.duration" => '持續時間', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', "form.mytime.th.start" => '開始', "form.mytime.th.finish" => '結束', -"form.mytime.th.duration" => '持續時間', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', "form.mytime.warn_tozero_rec" => '由於這段時間是鎖定的,該時間記錄必須刪除', @@ -508,8 +507,6 @@ "form.report.from" => '開始日期', "form.report.to" => '結束日期', "form.report.groupby_user" => '用戶', -"form.report.groupby_project" => '項目', -"form.report.duration" => '持續時間', "form.report.start" => '開始', "form.report.finish" => '結束', "form.report.totals_only" => '僅僅今天', @@ -518,7 +515,6 @@ "form.report.th.date" => '日期', "form.report.th.start" => '開始', "form.report.th.finish" => '結束', -"form.report.th.duration" => '持續時間', // mail form attributes "form.mail.from" => '從', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bc0f075ec..4402617cb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3914 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3915 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 35d573bf1fe6836fa858087af9c8b7bbcd588b07 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 21:17:42 +0000 Subject: [PATCH 0456/2515] More recycling in translations. --- WEB-INF/resources/ca.lang.php | 12 ++---------- WEB-INF/resources/cs.lang.php | 12 ++---------- WEB-INF/resources/et.lang.php | 20 ++------------------ WEB-INF/resources/hu.lang.php | 12 ++---------- WEB-INF/resources/ja.lang.php | 12 ++---------- WEB-INF/resources/ko.lang.php | 12 ++---------- WEB-INF/resources/no.lang.php | 14 ++------------ WEB-INF/resources/pt.lang.php | 12 ++---------- WEB-INF/resources/ro.lang.php | 12 ++---------- WEB-INF/resources/tr.lang.php | 12 ++---------- WEB-INF/resources/zh-cn.lang.php | 12 ++---------- WEB-INF/resources/zh-tw.lang.php | 12 ++---------- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 25 insertions(+), 131 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a9483d711..bb10b3f3f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -176,8 +176,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Inici', +'label.finish' => 'Fi', 'label.duration' => 'Durada', 'label.note' => 'Nota', 'label.notes' => 'Notes', @@ -452,12 +452,8 @@ "form.mytime.del_str" => 'Eliminant l\\\'historial de temps', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'Data', -"form.mytime.start" => 'Inici', -"form.mytime.finish" => 'Fi', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', -"form.mytime.th.start" => 'Inici', -"form.mytime.th.finish" => 'Fi', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', "form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', @@ -480,14 +476,10 @@ "form.report.from" => 'Data d\\\'inici', "form.report.to" => 'Data de fi', "form.report.groupby_user" => 'Usuari', -"form.report.start" => 'Inici', -"form.report.finish" => 'Fi', "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', "form.report.th.empllist" => 'Usuari', "form.report.th.date" => 'Data', -"form.report.th.start" => 'Inici', -"form.report.th.finish" => 'Fi', // charts form attributes // Note to translators: form.charts.title needs to be translated. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 08c2e3ce5..fcc46f52a 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -177,8 +177,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Začátek', +'label.finish' => 'Konec', 'label.duration' => 'Trvání', 'label.note' => 'Poznámka', 'label.notes' => 'Poznámky', @@ -465,12 +465,8 @@ "form.mytime.del_str" => 'smazat časový záznam', // Note to translators: "form.mytime.time_form" => ' (hh:mm)', // the string must be translated "form.mytime.date" => 'datum', -"form.mytime.start" => 'začátek', -"form.mytime.finish" => 'konec', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', -"form.mytime.th.start" => 'začátek', -"form.mytime.th.finish" => 'konec', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', "form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', "form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', @@ -505,14 +501,10 @@ "form.report.from" => 'počáteční datum', "form.report.to" => 'koncové datum', "form.report.groupby_user" => 'uživatel', -"form.report.start" => 'počátek', -"form.report.finish" => 'konec', "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', "form.report.th.empllist" => 'uzivatel', "form.report.th.date" => 'datum', -"form.report.th.start" => 'počátek', -"form.report.th.finish" => 'konec', // mail form attributes "form.mail.from" => 'od', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 19ceb5ce1..9c2a68470 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -175,8 +175,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Algus', +'label.finish' => 'Lõpp', 'label.duration' => 'Kestus', 'label.note' => 'Märkus', 'label.notes' => 'Märkused', @@ -467,12 +467,8 @@ // Note to translators: the string below must be translated // "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'kuupäev', -"form.mytime.start" => 'algus', -"form.mytime.finish" => 'lõpp', "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', -"form.mytime.th.start" => 'algus', -"form.mytime.th.finish" => 'lõpp', "form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', "form.mytime.warn_tozero_rec" => 'see ajakanne tuleb kustutada kuna see ajaperiood on lukustatud', @@ -485,14 +481,6 @@ "form.profile.edit_title" => 'profiili muutmine', "form.profile.login" => 'login', -// Note to translators: the strings below must be translated and added to the localization file -// "form.profile.showchart" => 'show pie charts', -// "form.profile.lang" => 'language', -// "form.profile.custom_date_format" => "date format", -// "form.profile.custom_time_format" => "time format", -// "form.profile.default_format" => "(default)", -// "form.profile.start_week" => "first day of week", - // people form attributes "form.people.ppl_str" => 'inimesed', "form.people.createu_str" => 'loo uus kasutaja', @@ -513,14 +501,10 @@ "form.report.from" => 'algab kuupäevast', "form.report.to" => 'lõpeb kuupäeval', "form.report.groupby_user" => 'kasutaja', -"form.report.start" => 'algus', -"form.report.finish" => 'lõpp', "form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', "form.report.th.empllist" => 'kasutaja', "form.report.th.date" => 'kuupäev', -"form.report.th.start" => 'algus', -"form.report.th.finish" => 'lõpp', // mail form attributes "form.mail.from" => 'kellelt', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 19eb21cc2..2521b487f 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -177,8 +177,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Kezdete', +'label.finish' => 'Vége', 'label.duration' => 'Időtartam', 'label.note' => 'Megjegyzés', 'label.notes' => 'Megjegyzések', @@ -460,12 +460,8 @@ "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', "form.mytime.date" => 'dátum', -"form.mytime.start" => 'kezdete', -"form.mytime.finish" => 'vége', "form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', -"form.mytime.th.start" => 'kezdete', -"form.mytime.th.finish" => 'vége', "form.mytime.del_yes" => 'a bejegyzés törölve', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', @@ -492,14 +488,10 @@ "form.report.from" => 'kezdő időpont', "form.report.to" => 'vég időpont', "form.report.groupby_user" => 'személyek szerint', -"form.report.start" => 'kezdet', -"form.report.finish" => 'befejezés', "form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', "form.report.th.empllist" => 'dolgozó', "form.report.th.date" => 'dátum', -"form.report.th.start" => 'elkezdve', -"form.report.th.finish" => 'befejezve', // mail form attributes "form.mail.from" => 'feladó', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index eae24bc12..8dd315459 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -176,8 +176,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => '開始', +'label.finish' => '終了', 'label.duration' => '期間', 'label.note' => 'ノート', 'label.notes' => 'ノート', @@ -469,12 +469,8 @@ "form.mytime.del_str" => '時間レコードの削除', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => '日付', -"form.mytime.start" => '開始', -"form.mytime.finish" => '終了', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', -"form.mytime.th.start" => '開始', -"form.mytime.th.finish" => '終了', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', "form.mytime.warn_tozero_rec" => 'この時間レコードの期間が満了されましたから、この時間レコードは削除されることが必要です', @@ -514,14 +510,10 @@ "form.report.from" => '開始日付', "form.report.to" => '終了日付', "form.report.groupby_user" => 'ユーザー', -"form.report.start" => '開始', -"form.report.finish" => '終了', "form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', "form.report.th.empllist" => 'ユーザー', "form.report.th.date" => '日付', -"form.report.th.start" => '開始', -"form.report.th.finish" => '終了', // mail form attributes "form.mail.from" => 'から', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 1e3b74151..482469f38 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -176,8 +176,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => '시작', +'label.finish' => '마감', 'label.duration' => '기간', 'label.note' => '표식', 'label.notes' => '표식', @@ -470,12 +470,8 @@ "form.mytime.del_str" => '시간기록을 삭제하기', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => '날짜', -"form.mytime.start" => '시작', -"form.mytime.finish" => '마감', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', -"form.mytime.th.start" => '시작', -"form.mytime.th.finish" => '마감', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', "form.mytime.warn_tozero_rec" => '이 시간기간이 로크되었으므로 이 시간기록은 삭제되어야 합니다', @@ -514,14 +510,10 @@ "form.report.from" => '시작 날짜', "form.report.to" => '마감 날짜', "form.report.groupby_user" => '사용자', -"form.report.start" => '시작', -"form.report.finish" => '마감', "form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', "form.report.th.empllist" => '사용자', "form.report.th.date" => '날짜', -"form.report.th.start" => '시작', -"form.report.th.finish" => '마감', // mail form attributes "form.mail.from" => '부터', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 64b6c1030..eb5cee89f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -175,8 +175,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Starttid', +'label.finish' => 'Ferdig', 'label.duration' => 'Varighet', 'label.note' => 'Notat', 'label.notes' => 'Notater', @@ -464,12 +464,8 @@ "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', // Note to translators: "form.mytime.date" => 'dato', // the string must be translated -"form.mytime.start" => 'starttid', -"form.mytime.finish" => 'ferdig', "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', -"form.mytime.th.start" => 'starttid', -"form.mytime.th.finish" => 'ferdig', // Note to translators: the strings below must be translated // "form.mytime.del_yes" => 'tidsoppføringen er slettet', // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', @@ -508,18 +504,12 @@ // report attributes "form.report.title" => 'rapporter', -"form.report.from" => 'starttid', -"form.report.to" => 'ferdig', "form.report.groupby_user" => 'bruker', -"form.report.start" => 'starttid', -"form.report.finish" => 'ferdig', // Note to translators: the strings below must be translated // "form.report.totals_only" => 'kun summer', "form.report.total" => 'totalt antall timer', "form.report.th.empllist" => 'bruker', "form.report.th.date" => 'dato', -"form.report.th.start" => 'starttid', -"form.report.th.finish" => 'ferdig', // mail form attributes "form.mail.from" => 'fra', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d2a862356..7af9b80d9 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -169,8 +169,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Início', +'label.finish' => 'Fim', 'label.duration' => 'Duração', 'label.note' => 'Anotação', 'label.notes' => 'Anotações', @@ -435,13 +435,8 @@ // my time form attributes "form.mytime.title" => 'adicionar período', "form.mytime.date" => 'data', -"form.mytime.start" => 'início', -"form.mytime.finish" => 'fim', "form.mytime.daily" => 'trabalho diário', "form.mytime.total" => 'horas totais: ', -"form.mytime.th.start" => 'início', -"form.mytime.th.finish" => 'finish', -"form.mytime.th.duration" => 'duração', "form.mytime.del_yes" => 'o período registrado foi apagado com sucesso', // profile form attributes @@ -463,9 +458,6 @@ "form.report.title" => 'relatórios', "form.report.from" => 'data inicial', "form.report.to" => 'data final', -"form.report.duration" => 'duração', -"form.report.start" => 'início', -"form.report.finish" => 'fim', "form.report.total" => 'horas totais', "form.report.th.empllist" => 'usuário', // Note to translators: the strings below must be translated diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 3ea017826..f5fac79fe 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -179,8 +179,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Inceput', +'label.finish' => 'Sfarsit', 'label.duration' => 'Durata', 'label.note' => 'Nota', // 'label.notes' => 'Notes', @@ -467,12 +467,8 @@ "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.date" => 'data', -"form.mytime.start" => 'inceput', -"form.mytime.finish" => 'sfarsit', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', -"form.mytime.th.start" => 'inceput', -"form.mytime.th.finish" => 'sfarsit', "form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', @@ -500,14 +496,10 @@ "form.report.from" => 'data inceput', "form.report.to" => 'data sfarsit', "form.report.groupby_user" => 'utilizator', -"form.report.start" => 'inceput', -"form.report.finish" => 'sfarsit', "form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', "form.report.th.empllist" => 'utilizator', "form.report.th.date" => 'data', -"form.report.th.start" => 'inceput', -"form.report.th.finish" => 'sfarsit', // mail form attributes "form.mail.from" => 'de la', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 10fe26745..e8d6cdb9b 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -184,8 +184,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => 'Başlat', +'label.finish' => 'Tamamla', 'label.duration' => 'Süre', 'label.note' => 'Not', 'label.notes' => 'Notlar', @@ -472,12 +472,8 @@ "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', "form.mytime.date" => 'tarih', -"form.mytime.start" => 'başlat', -"form.mytime.finish" => 'tamamla', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', -"form.mytime.th.start" => 'başlat', -"form.mytime.th.finish" => 'tamamla', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', @@ -508,14 +504,10 @@ "form.report.from" => 'başlangıç tarihi', "form.report.to" => 'son tarihi', "form.report.groupby_user" => 'kullanıcı', -"form.report.start" => 'başlangıç', -"form.report.finish" => 'son', "form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', "form.report.th.empllist" => 'kullanıcı', "form.report.th.date" => 'tarih', -"form.report.th.start" => 'başlangıç', -"form.report.th.finish" => 'son', // mail form attributes "form.mail.from" => 'kimden', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 3ffde5fbf..7d6631a02 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -164,8 +164,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => '开始', +'label.finish' => '结束', 'label.duration' => '持续时间', 'label.note' => '备注', 'label.notes' => '备注', @@ -453,12 +453,8 @@ "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', "form.mytime.date" => '日期', -"form.mytime.start" => '开始', -"form.mytime.finish" => '结束', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', -"form.mytime.th.start" => '开始', -"form.mytime.th.finish" => '结束', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', "form.mytime.warn_tozero_rec" => '由于这段时间是锁定的,该时间记录必须删除', @@ -495,14 +491,10 @@ "form.report.from" => '开始日期', "form.report.to" => '结束日期', "form.report.groupby_user" => '用户', -"form.report.start" => '开始', -"form.report.finish" => '结束', "form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', "form.report.th.empllist" => '用户', "form.report.th.date" => '日期', -"form.report.th.start" => '开始', -"form.report.th.finish" => '结束', // mail form attributes "form.mail.from" => '从', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 672213102..7928d31fc 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -172,8 +172,8 @@ // 'label.task' => 'Task', // 'label.tasks' => 'Tasks', // 'label.description' => 'Description', -// 'label.start' => 'Start', -// 'label.finish' => 'Finish', +'label.start' => '開始', +'label.finish' => '結束', 'label.duration' => '持續時間', 'label.note' => '備註', 'label.notes' => '備註', @@ -462,12 +462,8 @@ "form.mytime.del_str" => '刪除時間記錄', "form.mytime.time_form" => ' (時:分)', "form.mytime.date" => '日期', -"form.mytime.start" => '開始', -"form.mytime.finish" => '結束', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', -"form.mytime.th.start" => '開始', -"form.mytime.th.finish" => '結束', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', "form.mytime.warn_tozero_rec" => '由於這段時間是鎖定的,該時間記錄必須刪除', @@ -507,14 +503,10 @@ "form.report.from" => '開始日期', "form.report.to" => '結束日期', "form.report.groupby_user" => '用戶', -"form.report.start" => '開始', -"form.report.finish" => '結束', "form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', "form.report.th.empllist" => '用戶', "form.report.th.date" => '日期', -"form.report.th.start" => '開始', -"form.report.th.finish" => '結束', // mail form attributes "form.mail.from" => '從', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4402617cb..f3bace2b0 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3915 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3916 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a8163493c16ef9b6ff654993b5a05d8852bad128 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 21:32:41 +0000 Subject: [PATCH 0457/2515] More recycling. --- WEB-INF/resources/ca.lang.php | 3 --- WEB-INF/resources/cs.lang.php | 6 +----- WEB-INF/resources/et.lang.php | 7 +------ WEB-INF/resources/hu.lang.php | 5 +---- WEB-INF/resources/ja.lang.php | 5 +---- WEB-INF/resources/ko.lang.php | 5 +---- WEB-INF/resources/no.lang.php | 5 +---- WEB-INF/resources/pt.lang.php | 5 +---- WEB-INF/resources/ro.lang.php | 5 +---- WEB-INF/resources/tr.lang.php | 5 +---- WEB-INF/resources/zh-cn.lang.php | 5 +---- WEB-INF/resources/zh-tw.lang.php | 5 +---- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 12 insertions(+), 51 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index bb10b3f3f..35e7c83d1 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -451,7 +451,6 @@ "form.mytime.edit_title" => 'Modificant l\\\'historial de temps', "form.mytime.del_str" => 'Eliminant l\\\'historial de temps', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => 'Data', "form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', @@ -479,7 +478,6 @@ "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', "form.report.th.empllist" => 'Usuari', -"form.report.th.date" => 'Data', // charts form attributes // Note to translators: form.charts.title needs to be translated. @@ -497,7 +495,6 @@ "form.invoice.above" => 'Informació addicional per factura', "form.invoice.select_cust" => 'Seleccioni el client', "form.invoice.fillform" => 'Empleni els camps', -"form.invoice.date" => 'Data', "form.invoice.number" => 'Número de factura', "form.invoice.th.username" => 'Persona', "form.invoice.th.time" => 'Hores', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index fcc46f52a..e9583a2ad 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -161,8 +161,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => 'Předmět', +'label.date' => 'Datum', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -463,8 +463,6 @@ "form.mytime.title" => 'můj deník', "form.mytime.edit_title" => 'upravit časový záznam', "form.mytime.del_str" => 'smazat časový záznam', -// Note to translators: "form.mytime.time_form" => ' (hh:mm)', // the string must be translated -"form.mytime.date" => 'datum', "form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', @@ -504,7 +502,6 @@ "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', "form.report.th.empllist" => 'uzivatel', -"form.report.th.date" => 'datum', // mail form attributes "form.mail.from" => 'od', @@ -520,7 +517,6 @@ "form.invoice.above" => 'fakturační informace', "form.invoice.select_cust" => 'výběr firmy', "form.invoice.fillform" => 'vyplňte pole', -"form.invoice.date" => 'datum', "form.invoice.number" => 'faktura číslo', "form.invoice.th.username" => 'osoba', "form.invoice.th.time" => 'hodin', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9c2a68470..875b9921f 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -159,8 +159,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => 'Teema', +'label.date' => 'Kuupäev', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -464,9 +464,6 @@ "form.mytime.title" => 'minu aeg', "form.mytime.edit_title" => 'ajakande muutmine', "form.mytime.del_str" => 'ajakande kustutamine', -// Note to translators: the string below must be translated -// "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => 'kuupäev', "form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', "form.mytime.del_yes" => 'ajakanne kustutatud', @@ -504,7 +501,6 @@ "form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', "form.report.th.empllist" => 'kasutaja', -"form.report.th.date" => 'kuupäev', // mail form attributes "form.mail.from" => 'kellelt', @@ -520,7 +516,6 @@ "form.invoice.above" => 'lisainformatsioon arvele', "form.invoice.select_cust" => 'vali klient', "form.invoice.fillform" => 'täida väljad', -"form.invoice.date" => 'kuupäev', "form.invoice.number" => 'arve number', "form.invoice.th.username" => 'isik', "form.invoice.th.time" => 'tunde', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 2521b487f..67c99c17c 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -161,8 +161,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => 'Tárgy', +'label.date' => 'Dátum', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -459,7 +459,6 @@ "form.mytime.edit_title" => 'szerkesztés', "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', -"form.mytime.date" => 'dátum', "form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', "form.mytime.del_yes" => 'a bejegyzés törölve', @@ -491,7 +490,6 @@ "form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', "form.report.th.empllist" => 'dolgozó', -"form.report.th.date" => 'dátum', // mail form attributes "form.mail.from" => 'feladó', @@ -507,7 +505,6 @@ "form.invoice.above" => 'a számlához tartozó adatok', "form.invoice.select_cust" => 'válassz ügyfelet', "form.invoice.fillform" => 'töltsd ki a mezőket', -"form.invoice.date" => 'Dátum', "form.invoice.number" => 'számla azonosító száma', "form.invoice.th.username" => 'személy', "form.invoice.th.time" => 'óra', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8dd315459..8183b46e5 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -160,8 +160,8 @@ // 'label.cc' => 'Cc', // 'label.bcc' => 'Bcc', 'label.subject' => '主題', +'label.date' => '日付', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -468,7 +468,6 @@ "form.mytime.edit_title" => '時間レコードの編集', "form.mytime.del_str" => '時間レコードの削除', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => '日付', "form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', @@ -513,7 +512,6 @@ "form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', "form.report.th.empllist" => 'ユーザー', -"form.report.th.date" => '日付', // mail form attributes "form.mail.from" => 'から', @@ -529,7 +527,6 @@ "form.invoice.above" => '送り状の追加の情報', "form.invoice.select_cust" => 'クライアントの選択', "form.invoice.fillform" => 'フィールドの作成', -"form.invoice.date" => '日付', "form.invoice.number" => '送り状の番号', "form.invoice.th.username" => '個人', "form.invoice.th.time" => '時間', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 482469f38..e0d668b61 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -160,8 +160,8 @@ // 'label.cc' => 'Cc', // 'label.bcc' => 'Bcc', 'label.subject' => '제목', +'label.date' => '날짜', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -469,7 +469,6 @@ "form.mytime.edit_title" => '시간기록을 편집하기', "form.mytime.del_str" => '시간기록을 삭제하기', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => '날짜', "form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', @@ -513,7 +512,6 @@ "form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', "form.report.th.empllist" => '사용자', -"form.report.th.date" => '날짜', // mail form attributes "form.mail.from" => '부터', @@ -529,7 +527,6 @@ "form.invoice.above" => '송장에 대한 보충정보', "form.invoice.select_cust" => '클라이언트의 선택', "form.invoice.fillform" => '필드들을 채우십시오', -"form.invoice.date" => '날짜', "form.invoice.number" => '송장 번호', "form.invoice.th.username" => '개인', "form.invoice.th.time" => '시간', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index eb5cee89f..95cafdebd 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -159,8 +159,8 @@ // 'label.cc' => 'Cc', // 'label.bcc' => 'Bcc', 'label.subject' => 'Emne', +'label.date' => 'Dato', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -463,7 +463,6 @@ // "form.mytime.edit_title" => 'endre tidsoppføringen', "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', -// Note to translators: "form.mytime.date" => 'dato', // the string must be translated "form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', // Note to translators: the strings below must be translated @@ -509,7 +508,6 @@ // "form.report.totals_only" => 'kun summer', "form.report.total" => 'totalt antall timer', "form.report.th.empllist" => 'bruker', -"form.report.th.date" => 'dato', // mail form attributes "form.mail.from" => 'fra', @@ -526,7 +524,6 @@ // Note to translators: the strings below are missing and must be added and translated // "form.invoice.select_cust" => 'velg klient', // "form.invoice.fillform" => 'fyll inn i feltene', -"form.invoice.date" => 'dato', "form.invoice.number" => 'fakturanummer', "form.invoice.th.username" => 'person', "form.invoice.th.time" => 'timer', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 7af9b80d9..81b389dda 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -153,8 +153,8 @@ // 'label.cc' => 'Cc', // 'label.bcc' => 'Bcc', 'label.subject' => 'Assunto', +'label.date' => 'Data', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -434,7 +434,6 @@ // my time form attributes "form.mytime.title" => 'adicionar período', -"form.mytime.date" => 'data', "form.mytime.daily" => 'trabalho diário', "form.mytime.total" => 'horas totais: ', "form.mytime.del_yes" => 'o período registrado foi apagado com sucesso', @@ -460,8 +459,6 @@ "form.report.to" => 'data final', "form.report.total" => 'horas totais', "form.report.th.empllist" => 'usuário', -// Note to translators: the strings below must be translated -// "form.report.th.date" => 'data', // mail form attributes "form.mail.from" => 'de', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f5fac79fe..14f3283f1 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -163,8 +163,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => 'Subiect', +'label.date' => 'Data', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -466,7 +466,6 @@ "form.mytime.edit_title" => 'editarea inregistrarii timpului', "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.date" => 'data', "form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', "form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', @@ -499,7 +498,6 @@ "form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', "form.report.th.empllist" => 'utilizator', -"form.report.th.date" => 'data', // mail form attributes "form.mail.from" => 'de la', @@ -515,7 +513,6 @@ "form.invoice.above" => 'informatii aditionale pentru factura', "form.invoice.select_cust" => 'alege client', "form.invoice.fillform" => 'comleteaza campurile', -"form.invoice.date" => 'data', "form.invoice.number" => 'numar factura', "form.invoice.th.username" => 'persoana', "form.invoice.th.time" => 'ore', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e8d6cdb9b..dce084503 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -167,8 +167,8 @@ // 'label.cc' => 'Cc', // 'label.bcc' => 'Bcc', 'label.subject' => 'Konu', +'label.date' => 'Tarih', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -471,7 +471,6 @@ "form.mytime.edit_title" => 'zaman kaydını düzenliyor', "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', -"form.mytime.date" => 'tarih', "form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', @@ -507,7 +506,6 @@ "form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', "form.report.th.empllist" => 'kullanıcı', -"form.report.th.date" => 'tarih', // mail form attributes "form.mail.from" => 'kimden', @@ -523,7 +521,6 @@ "form.invoice.above" => 'fatura için ek bilgi', "form.invoice.select_cust" => 'müşteri seç', "form.invoice.fillform" => 'alanları doldur', -"form.invoice.date" => 'tarih', "form.invoice.number" => 'fatura numarası', "form.invoice.th.username" => 'kişi', "form.invoice.th.time" => 'saatler', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7d6631a02..a8a5ac981 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -148,8 +148,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => '主题', +'label.date' => '日期', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -452,7 +452,6 @@ "form.mytime.edit_title" => '编辑时间记录', "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', -"form.mytime.date" => '日期', "form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', "form.mytime.del_yes" => '成功删除时间记录', @@ -494,7 +493,6 @@ "form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', "form.report.th.empllist" => '用户', -"form.report.th.date" => '日期', // mail form attributes "form.mail.from" => '从', @@ -510,7 +508,6 @@ "form.invoice.above" => '发票附加信息', "form.invoice.select_cust" => '选择客户', "form.invoice.fillform" => '填写该栏目', -"form.invoice.date" => '日期', "form.invoice.number" => '发票号码', "form.invoice.th.username" => '收费人', "form.invoice.th.time" => '小时数', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 7928d31fc..43893175c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -156,8 +156,8 @@ // TODO: translate the following. // 'label.bcc' => 'Bcc', 'label.subject' => '主題', +'label.date' => '日期', // TODO: translate the following. -// 'label.date' => 'Date', // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', // 'label.user' => 'User', @@ -461,7 +461,6 @@ "form.mytime.edit_title" => '編輯時間記錄', "form.mytime.del_str" => '刪除時間記錄', "form.mytime.time_form" => ' (時:分)', -"form.mytime.date" => '日期', "form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', "form.mytime.del_yes" => '成功刪除時間記錄', @@ -506,7 +505,6 @@ "form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', "form.report.th.empllist" => '用戶', -"form.report.th.date" => '日期', // mail form attributes "form.mail.from" => '從', @@ -522,7 +520,6 @@ "form.invoice.above" => '發票附加資訊', "form.invoice.select_cust" => '選擇客戶', "form.invoice.fillform" => '填寫該欄目', -"form.invoice.date" => '日期', "form.invoice.number" => '發票號碼', "form.invoice.th.username" => '收費人', "form.invoice.th.time" => '小時數', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f3bace2b0..ce9160af1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3916 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3917 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9718046a9aaf2b9b03db4baad8d6222e92dcacc9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 21:47:05 +0000 Subject: [PATCH 0458/2515] A bit more cleanup and recycling. --- WEB-INF/resources/ja.lang.php | 14 +++----------- WEB-INF/resources/ko.lang.php | 14 +++----------- WEB-INF/resources/no.lang.php | 13 +++---------- WEB-INF/resources/ro.lang.php | 5 ----- WEB-INF/resources/zh-cn.lang.php | 13 +++---------- WEB-INF/resources/zh-tw.lang.php | 13 +++---------- WEB-INF/templates/footer.tpl | 2 +- 7 files changed, 16 insertions(+), 58 deletions(-) diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8183b46e5..8ebdc92c0 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -204,9 +204,9 @@ // 'label.id' => 'ID', // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.date_format' => '日付形式', +'label.time_format' => '時間形式', +'label.week_start' => '週の開始日', 'label.comment' => 'コメント', 'label.status' => '状態', 'label.tax' => '税', @@ -459,9 +459,6 @@ "form.admin.profile.th.id" => '識別子', "form.admin.profile.th.active" => '活動内容', "form.admin.options" => 'オプション', -"form.admin.custom_date_format" => "日付形式", -"form.admin.custom_time_format" => "時間形式", -"form.admin.start_week" => "週の開始日", // my time form attributes "form.mytime.title" => '私の時間', @@ -480,13 +477,8 @@ "form.profile.create_title" => '新規管理者のアカウントの作成', "form.profile.edit_title" => 'プロファイルの編集', "form.profile.login" => 'ログインID', - "form.profile.showchart" => 'パイ図表の表示', "form.profile.lang" => '言語', -"form.profile.custom_date_format" => "日付形式", -"form.profile.custom_time_format" => "時間形式", -"form.profile.default_format" => "(デフォルト)", -"form.profile.start_week" => "週の開始日", // people form attributes "form.people.ppl_str" => 'メンバー', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index e0d668b61..4f116fa1a 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -205,9 +205,9 @@ 'label.language' => '언어', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.date_format' => '날짜 포맷', +'label.time_format' => '시간 포맷', +'label.week_start' => '주의 시작요일', 'label.comment' => '코멘트', 'label.status' => '상태', 'label.tax' => '세금', @@ -460,9 +460,6 @@ "form.admin.profile.th.id" => '식별자', "form.admin.profile.th.active" => '활동내용', "form.admin.options" => '옵션', -"form.admin.custom_date_format" => "날짜 포맷", -"form.admin.custom_time_format" => "시간 포맷", -"form.admin.start_week" => "주의 시작요일", // my time form attributes "form.mytime.title" => '나의 시간', @@ -481,12 +478,7 @@ "form.profile.create_title" => '신규 관리자 계정을 생성', "form.profile.edit_title" => '프로필을 편집하기', "form.profile.login" => '로그인ID', - "form.profile.showchart" => '원 그래프를 보기', -"form.profile.custom_date_format" => "날짜 포맷", -"form.profile.custom_time_format" => "시간 포맷", -"form.profile.default_format" => "(디폴트)", -"form.profile.start_week" => "주의 시작요일", // people form attributes "form.people.ppl_str" => '멤버', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 95cafdebd..a617c3669 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -203,9 +203,9 @@ // 'label.id' => 'ID', // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.date_format' => 'Datoformat', +'label.time_format' => 'Tidsformat', +'label.week_start' => 'Første ukedag', 'label.comment' => 'Kommentar', 'label.status' => 'Status', 'label.tax' => 'MVA', @@ -453,9 +453,6 @@ // "form.admin.profile.th.id" => 'id', // "form.admin.profile.th.active" => 'aktiv', // "form.admin.options" => 'opsjoner', -// "form.admin.custom_date_format" => "datoformat", -// "form.admin.custom_time_format" => "tidsformat", -// "form.admin.start_week" => "første ukedag", // my time form attributes // Note to translators: the 2 strings below must be translated @@ -480,10 +477,6 @@ // Note to translators: the strings below are missing and must be added and translated // "form.profile.showchart" => 'vis kakediagram', // "form.profile.lang" => 'språk', -// "form.profile.custom_date_format" => "dato format", -// "form.profile.custom_time_format" => "tims format", -// "form.profile.default_format" => "(default)", -// "form.profile.start_week" => "første dag i uken", // people form attributes "form.people.ppl_str" => 'personer', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 14f3283f1..bd1eecb30 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -455,11 +455,6 @@ "form.admin.profile.comment" => 'sterge echipa', "form.admin.profile.th.id" => 'id', "form.admin.profile.th.active" => 'activ', -// Note to translators: the strings below are missing and must be added and translated -// "form.admin.options" => 'options', -// "form.admin.custom_date_format" => "date format", -// "form.admin.custom_time_format" => "time format", -// "form.admin.start_week" => "first day of week", // my time form attributes "form.mytime.title" => 'timpul meu', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a8a5ac981..9ec9f8381 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -192,9 +192,9 @@ // 'label.id' => 'ID', // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.date_format' => '日期格式', +'label.time_format' => '时间格式', +'label.week_start' => '每周的第一天', 'label.comment' => '留言', 'label.status' => '状态', 'label.tax' => '税', @@ -443,9 +443,6 @@ "form.admin.profile.th.id" => 'ID号', "form.admin.profile.th.active" => '启用', "form.admin.options" => '选项', -"form.admin.custom_date_format" => "日期格式", -"form.admin.custom_time_format" => "时间格式", -"form.admin.start_week" => "每周的第一天", // my time form attributes "form.mytime.title" => '我的时间记录', @@ -466,10 +463,6 @@ "form.profile.showchart" => '显示饼状图', "form.profile.lang" => '语言', -"form.profile.custom_date_format" => "日期格式", -"form.profile.custom_time_format" => "时间格式", -"form.profile.default_format" => "(默认)", -"form.profile.start_week" => "每周的第一天", // people form attributes "form.people.ppl_str" => '人员', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 43893175c..1c5483e48 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -200,9 +200,9 @@ // 'label.id' => 'ID', // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.date_format' => '日期格式', +'label.time_format' => '時間格式', +'label.week_start' => '每週的第一天', 'label.comment' => '留言', 'label.status' => '狀態', 'label.tax' => '稅', @@ -452,9 +452,6 @@ "form.admin.profile.th.id" => 'ID號', "form.admin.profile.th.active" => '啟動', "form.admin.options" => '選項', -"form.admin.custom_date_format" => "日期格式", -"form.admin.custom_time_format" => "時間格式", -"form.admin.start_week" => "每週的第一天", // my time form attributes "form.mytime.title" => '我的時間記錄', @@ -476,10 +473,6 @@ "form.profile.showchart" => '顯示餅狀圖', "form.profile.lang" => '語言', -"form.profile.custom_date_format" => "日期格式", -"form.profile.custom_time_format" => "時間格式", -"form.profile.default_format" => "(默認)", -"form.profile.start_week" => "每週的第一天", // people form attributes "form.people.ppl_str" => '人員', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ce9160af1..bc4a131b4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3917 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3918 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 47a30e69b5389f5e6cf7b7fa879d3410887ab24b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 22:27:38 +0000 Subject: [PATCH 0459/2515] A bit more recycling. --- WEB-INF/resources/ca.lang.php | 3 +-- WEB-INF/resources/cs.lang.php | 10 +++------- WEB-INF/resources/et.lang.php | 9 ++------- WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/ja.lang.php | 21 ++++++++------------- WEB-INF/resources/ko.lang.php | 17 ++++++----------- WEB-INF/resources/no.lang.php | 20 ++++++-------------- WEB-INF/resources/ro.lang.php | 5 ++--- WEB-INF/resources/tr.lang.php | 5 ++--- WEB-INF/resources/zh-cn.lang.php | 10 ++++------ WEB-INF/resources/zh-tw.lang.php | 14 ++++---------- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 39 insertions(+), 78 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 35e7c83d1..ae785345f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -401,8 +401,8 @@ 'form.reports.group_by' => 'Agrupar per', 'form.reports.group_by_no' => '--- no agrupar ---', 'form.reports.group_by_date' => 'data', +'form.reports.group_by_user' => 'usuari', // TODO: translate the following. -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'projecte', // TODO: translate the following. @@ -474,7 +474,6 @@ // report attributes "form.report.from" => 'Data d\\\'inici', "form.report.to" => 'Data de fi', -"form.report.groupby_user" => 'Usuari', "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', "form.report.th.empllist" => 'Usuari', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index e9583a2ad..4fca22460 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -400,8 +400,9 @@ 'form.reports.group_by' => 'Seskupit podle', // TODO: translate the following. // 'form.reports.group_by_no' => '--- no grouping ---', -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', +// TODO: translate the following. +'form.reports.group_by_date' => 'datum', +'form.reports.group_by_user' => 'uživatel', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'projekt', // TODO: translate the following. @@ -443,7 +444,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => 'přihlásit', "form.fpass.send_pass_str" => 'zaslán požadavek k vymazání hesla', "form.fpass.send_pass_subj" => 'Anuko Time Tracker požadavek na vymazání hesla', // Note to translators: this string needs to be translated. @@ -475,7 +475,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => 'vytvořit nový manažerský účet', "form.profile.edit_title" => 'upravit profil', -"form.profile.login" => 'přihlásit', "form.profile.showchart" => 'zobrazuj grafy', @@ -484,13 +483,11 @@ "form.people.createu_str" => 'vytváření nového uživatele', "form.people.edit_str" => 'nastavení uživatele', "form.people.del_str" => 'smazat uživatele', -"form.people.th.login" => 'přihlásit', "form.people.th.role" => 'role', "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', "form.people.comanager" => 'spolumanažer', "form.people.empl" => 'uživatel', -"form.people.login" => 'přihlásit', "form.people.rate" => 'hodinová sazba', "form.people.comanager" => 'spolumanažer', @@ -498,7 +495,6 @@ // report attributes "form.report.from" => 'počáteční datum', "form.report.to" => 'koncové datum', -"form.report.groupby_user" => 'uživatel', "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', "form.report.th.empllist" => 'uzivatel', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 875b9921f..2bb2da704 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -398,9 +398,9 @@ 'form.reports.show_fields' => 'Näita välju', 'form.reports.group_by' => 'Grupeeri', 'form.reports.group_by_no' => '--- ilma grupeerimata ---', +'form.reports.group_by_date' => 'kuupäev', +'form.reports.group_by_user' => 'kasutaja', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'projekt', // TODO: translate the following. @@ -442,7 +442,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => 'login', "form.fpass.send_pass_str" => 'salasõna tühjendamise käsk edastatud', // Note to translators: the 3 strings below must be translated // "form.fpass.send_pass_subj" => 'AnukoTime Tracker password reset request', @@ -476,20 +475,17 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => 'loo uus halduri konto', "form.profile.edit_title" => 'profiili muutmine', -"form.profile.login" => 'login', // people form attributes "form.people.ppl_str" => 'inimesed', "form.people.createu_str" => 'loo uus kasutaja', "form.people.edit_str" => 'kasutaja muutmine', "form.people.del_str" => 'kasutaja kustutamine', -"form.people.th.login" => 'login', "form.people.th.role" => 'roll', "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', "form.people.comanager" => 'kaashaldur', "form.people.empl" => 'kasutaja', -"form.people.login" => 'login', "form.people.rate" => 'vaikimisi tunni hind', "form.people.comanager" => 'kaashaldur', @@ -497,7 +493,6 @@ // report attributes "form.report.from" => 'algab kuupäevast', "form.report.to" => 'lõpeb kuupäeval', -"form.report.groupby_user" => 'kasutaja', "form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', "form.report.th.empllist" => 'kasutaja', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 67c99c17c..30d0c7369 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -486,7 +486,6 @@ // report attributes "form.report.from" => 'kezdő időpont', "form.report.to" => 'vég időpont', -"form.report.groupby_user" => 'személyek szerint', "form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', "form.report.th.empllist" => 'dolgozó', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8ebdc92c0..7c5814bbf 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -151,8 +151,7 @@ // 'label.manager_login' => 'Manager login', 'label.person_name' => '名前', 'label.thing_name' => '名前', -// TODO: translate the following. -// 'label.login' => 'Login', +'label.login' => 'ログインID', 'label.password' => 'パスワード', 'label.confirm_password' => 'パスワードの確認', 'label.email' => 'Eメール', @@ -164,8 +163,9 @@ // TODO: translate the following. // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', +'label.user' => 'ユーザー', +'label.users' => 'ユーザー', +// TODO: translate the following. // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -202,7 +202,8 @@ // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', -// 'label.language' => 'Language', +'label.language' => '言語', +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => '日付形式', 'label.time_format' => '時間形式', @@ -398,9 +399,9 @@ 'form.reports.show_fields' => 'フィールドの表示', 'form.reports.group_by' => '次のようにグループ化', 'form.reports.group_by_no' => '--- グループの機能がありません ---', +'form.reports.group_by_date' => '日付', +'form.reports.group_by_user' => 'ユーザー', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'プロジェクト', // TODO: translate the following. @@ -442,7 +443,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => 'ログイン', "form.fpass.send_pass_str" => '送信したパスワードの初期化の要求', "form.fpass.send_pass_subj" => 'Anuko Time Trackerのパスワードの初期化の要求', // Note to translators: the ending of this string below needs to be translated. @@ -476,22 +476,18 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '新規管理者のアカウントの作成', "form.profile.edit_title" => 'プロファイルの編集', -"form.profile.login" => 'ログインID', "form.profile.showchart" => 'パイ図表の表示', -"form.profile.lang" => '言語', // people form attributes "form.people.ppl_str" => 'メンバー', "form.people.createu_str" => '新規ユーザーの作成', "form.people.edit_str" => 'ユーザーの編集', "form.people.del_str" => 'ユーザーの削除', -"form.people.th.login" => 'ログインID', "form.people.th.role" => 'ルール', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', "form.people.comanager" => '共同管理者', "form.people.empl" => 'ユーザー', -"form.people.login" => 'ログインID', "form.people.rate" => 'デフォルト時間当り給料', "form.people.comanager" => '共同管理者', @@ -500,7 +496,6 @@ "form.report.title" => 'レポート', "form.report.from" => '開始日付', "form.report.to" => '終了日付', -"form.report.groupby_user" => 'ユーザー', "form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', "form.report.th.empllist" => 'ユーザー', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 4f116fa1a..230e55075 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -151,8 +151,7 @@ // 'label.manager_login' => 'Manager login', 'label.person_name' => '이름', 'label.thing_name' => '이름', -// TODO: translate the following. -// 'label.login' => 'Login', +'label.login' => '로그인ID', 'label.password' => 'Password', 'label.confirm_password' => '암호 확인', 'label.email' => '이메일', @@ -164,8 +163,9 @@ // TODO: translate the following. // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', +'label.user' => '사용자', +'label.users' => '사용자', +// TODO: translate the following. // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -399,9 +399,9 @@ 'form.reports.show_fields' => '필드들을 보기', 'form.reports.group_by' => '다음것에 의한 그룹화', 'form.reports.group_by_no' => '--- 그룹화되지 않음 ---', +'form.reports.group_by_date' => '날짜', +'form.reports.group_by_user' => '사용자', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => '프로젝트', // TODO: translate the following. @@ -443,7 +443,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => '로그인', "form.fpass.send_pass_str" => '송신한 암호 재설정 요청', "form.fpass.send_pass_subj" => 'Anuko Time Tracker 암호 재설정 요청', // Note to translators: the ending of this string below needs to be translated. @@ -477,7 +476,6 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '신규 관리자 계정을 생성', "form.profile.edit_title" => '프로필을 편집하기', -"form.profile.login" => '로그인ID', "form.profile.showchart" => '원 그래프를 보기', // people form attributes @@ -485,13 +483,11 @@ "form.people.createu_str" => '신규 사용자를 만들기', "form.people.edit_str" => '사용자를 편집하기', "form.people.del_str" => '사용자를 삭제하기', -"form.people.th.login" => '로그인ID', "form.people.th.role" => '직위', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', "form.people.comanager" => '공동관리자', "form.people.empl" => '사용자', -"form.people.login" => '로그인ID', "form.people.rate" => '디폴트 시간당 급여', "form.people.comanager" => '공동관리자', @@ -500,7 +496,6 @@ "form.report.title" => '보고서', "form.report.from" => '시작 날짜', "form.report.to" => '마감 날짜', -"form.report.groupby_user" => '사용자', "form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', "form.report.th.empllist" => '사용자', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index a617c3669..b6dde6118 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -150,8 +150,7 @@ // 'label.manager_login' => 'Manager login', 'label.person_name' => 'Navn', 'label.thing_name' => 'Navn', -// TODO: translate the following. -// 'label.login' => 'Login', +'label.login' => 'Innlogging', // TODO: is this correct translation for a label? 'label.password' => 'Passord', 'label.confirm_password' => 'Bekreft passord', 'label.email' => 'E-post', @@ -201,7 +200,8 @@ // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', -// 'label.language' => 'Language', +'label.language' => 'Språk', +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => 'Datoformat', 'label.time_format' => 'Tidsformat', @@ -392,8 +392,9 @@ 'form.reports.show_fields' => 'Vis feltene', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', +'form.reports.group_by_date' => 'dato', +'form.reports.group_by_user' => 'bruker', +// TODO: translate the following. // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'prosjekt', // TODO: translate the following. @@ -435,7 +436,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => 'innlogging', "form.fpass.send_pass_str" => 'passordet er sendt', "form.fpass.send_pass_subj" => 'Anuko Time Tracker passordet ditt', // Note to translators: strings below need to be translated. @@ -472,31 +472,23 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => 'lag ny adminkonto', "form.profile.edit_title" => 'endre profil', -"form.profile.login" => 'innlogging', // Note to translators: the strings below are missing and must be added and translated // "form.profile.showchart" => 'vis kakediagram', -// "form.profile.lang" => 'språk', // people form attributes "form.people.ppl_str" => 'personer', "form.people.createu_str" => 'legg til ny bruker', "form.people.edit_str" => 'endre bruker', "form.people.del_str" => 'slett bruker', -"form.people.th.login" => 'innlogging', "form.people.th.role" => 'rolle', // Note to translators: the 2 strings below are missing and must be added and translated // "form.people.th.rate" => 'timesats', -// Note to translators: the strings below must be correctly translated -// "form.people.manager" => 'admin', -// "form.people.comanager" => 'co-manager', "form.people.empl" => 'bruker', -"form.people.login" => 'innlogging', "form.people.rate" => 'timesats', // report attributes "form.report.title" => 'rapporter', -"form.report.groupby_user" => 'bruker', // Note to translators: the strings below must be translated // "form.report.totals_only" => 'kun summer', "form.report.total" => 'totalt antall timer', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index bd1eecb30..e14dca3dc 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -395,9 +395,9 @@ 'form.reports.show_fields' => 'Arata campuri', 'form.reports.group_by' => 'Grupat dupa', 'form.reports.group_by_no' => '--- fara grupare ---', +'form.reports.group_by_date' => 'data', +'form.reports.group_by_user' => 'utilizator', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'proiect', // TODO: translate the following. @@ -489,7 +489,6 @@ "form.report.title" => 'rapoarte', "form.report.from" => 'data inceput', "form.report.to" => 'data sfarsit', -"form.report.groupby_user" => 'utilizator', "form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', "form.report.th.empllist" => 'utilizator', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index dce084503..7fcb6bee3 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -406,9 +406,9 @@ 'form.reports.show_fields' => 'Alanları göster', 'form.reports.group_by' => 'Gruplandırma kıstas', 'form.reports.group_by_no' => '--- gruplama yok ---', +'form.reports.group_by_date' => 'tarih', +'form.reports.group_by_user' => 'kullanıcı', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'proje', // TODO: translate the following. @@ -502,7 +502,6 @@ "form.report.title" => 'raporlar', "form.report.from" => 'başlangıç tarihi', "form.report.to" => 'son tarihi', -"form.report.groupby_user" => 'kullanıcı', "form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', "form.report.th.empllist" => 'kullanıcı', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 9ec9f8381..3a08ff6ec 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -190,7 +190,8 @@ // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', -// 'label.language' => 'Language', +'label.language' => '语言', +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => '日期格式', 'label.time_format' => '时间格式', @@ -383,9 +384,9 @@ 'form.reports.show_fields' => '显示栏目', 'form.reports.group_by' => '分组方式', 'form.reports.group_by_no' => '--- 没有分组 ---', +'form.reports.group_by_date' => '日期', +'form.reports.group_by_user' => '用户', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => '项目', // TODO: translate the following. @@ -460,9 +461,7 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '新建管理账号', "form.profile.edit_title" => '编辑简介', - "form.profile.showchart" => '显示饼状图', -"form.profile.lang" => '语言', // people form attributes "form.people.ppl_str" => '人员', @@ -482,7 +481,6 @@ "form.report.title" => '报告', "form.report.from" => '开始日期', "form.report.to" => '结束日期', -"form.report.groupby_user" => '用户', "form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', "form.report.th.empllist" => '用户', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 1c5483e48..2a509d023 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -198,7 +198,8 @@ // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', -// 'label.language' => 'Language', +'label.language' => '語言', +// TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', 'label.date_format' => '日期格式', 'label.time_format' => '時間格式', @@ -391,9 +392,9 @@ 'form.reports.show_fields' => '顯示欄目', 'form.reports.group_by' => '分組方式', 'form.reports.group_by_no' => '--- 沒有分組 ---', +'form.reports.group_by_date' => '日期', +'form.reports.group_by_user' => '用戶', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', -// 'form.reports.group_by_user' => 'user', // 'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => '項目', // TODO: translate the following. @@ -435,7 +436,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => '登錄', "form.fpass.send_pass_str" => '密碼重設請求已經發送', "form.fpass.send_pass_subj" => 'Anuko時間追蹤器密碼重設請求', // Note to translators: the ending of this string below needs to be translated. @@ -469,23 +469,18 @@ // Note to translators: we need a more accurate translation of form.profile.create_title "form.profile.create_title" => '創建新管理帳號', "form.profile.edit_title" => '編輯簡介', -"form.profile.login" => '登錄', - "form.profile.showchart" => '顯示餅狀圖', -"form.profile.lang" => '語言', // people form attributes "form.people.ppl_str" => '人員', "form.people.createu_str" => '新建用戶', "form.people.edit_str" => '編輯用戶', "form.people.del_str" => '刪除用戶', -"form.people.th.login" => '登錄', "form.people.th.role" => '角色', "form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', "form.people.empl" => '用戶', -"form.people.login" => '登錄', "form.people.rate" => '默認小時收費', "form.people.comanager" => '合作經理人', @@ -494,7 +489,6 @@ "form.report.title" => '報告', "form.report.from" => '開始日期', "form.report.to" => '結束日期', -"form.report.groupby_user" => '用戶', "form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', "form.report.th.empllist" => '用戶', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bc4a131b4..5d52e894a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3918 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3919 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From bca57fffcb2e12e5ebdb825adbf4732e9e0503cf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Feb 2018 22:39:44 +0000 Subject: [PATCH 0460/2515] Some more recycling. --- WEB-INF/resources/ca.lang.php | 18 +++++------------- WEB-INF/resources/cs.lang.php | 11 ++++------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index ae785345f..fe254d921 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -160,11 +160,10 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Assumpte', 'label.date' => 'Data', -// TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', +'label.start_date' => 'Data d\\\'inici', +'label.end_date' => 'Data de fi', +'label.user' => 'Usuari', +'label.users' => 'Usuaris', 'label.client' => 'Client', 'label.clients' => 'Clients', // TODO: translate the following. @@ -407,7 +406,7 @@ 'form.reports.group_by_project' => 'projecte', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => 'Només totals', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -472,15 +471,8 @@ "form.people.comanager" => 'Auxiliar del manejador', // report attributes -"form.report.from" => 'Data d\\\'inici', -"form.report.to" => 'Data de fi', "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', -"form.report.th.empllist" => 'Usuari', - -// charts form attributes -// Note to translators: form.charts.title needs to be translated. -// 'form.charts.title' => 'charts', // mail form attributes "form.mail.from" => 'De', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 4fca22460..7eede7a2b 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -162,9 +162,9 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Předmět', 'label.date' => 'Datum', +'label.start_date' => 'Počáteční datum', +'label.end_date' => 'Koncové datum', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', // 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', @@ -400,14 +400,13 @@ 'form.reports.group_by' => 'Seskupit podle', // TODO: translate the following. // 'form.reports.group_by_no' => '--- no grouping ---', -// TODO: translate the following. 'form.reports.group_by_date' => 'datum', 'form.reports.group_by_user' => 'uživatel', -// 'form.reports.group_by_client' => 'client', +'form.reports.group_by_client' => 'zákazník', 'form.reports.group_by_project' => 'projekt', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => 'Pouze součty', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -493,8 +492,6 @@ "form.people.comanager" => 'spolumanažer', // report attributes -"form.report.from" => 'počáteční datum', -"form.report.to" => 'koncové datum', "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', "form.report.th.empllist" => 'uzivatel', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5d52e894a..aa83db433 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3919 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3920 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3af3b5dfe6e2b8808e799ef696e866b38e4793e4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 00:08:01 +0000 Subject: [PATCH 0461/2515] Some more recycling in translations. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 4 +--- WEB-INF/resources/et.lang.php | 13 ++++--------- WEB-INF/resources/hu.lang.php | 10 ++-------- WEB-INF/resources/ja.lang.php | 12 +++--------- WEB-INF/resources/ko.lang.php | 12 +++--------- WEB-INF/resources/no.lang.php | 9 +++------ WEB-INF/resources/pt.lang.php | 13 ++++++------- WEB-INF/resources/ro.lang.php | 17 ++++++----------- WEB-INF/resources/tr.lang.php | 11 ++++------- WEB-INF/resources/zh-cn.lang.php | 7 ++----- WEB-INF/resources/zh-tw.lang.php | 3 --- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 35 insertions(+), 79 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index fe254d921..3bd5ed809 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -465,7 +465,6 @@ "form.people.th.rate" => 'Taxa', "form.people.manager" => 'Manejador', "form.people.comanager" => 'Auxiliar del manejador', -"form.people.empl" => 'Usuari', "form.people.rate" => 'Taxa per defecte en hores', "form.people.comanager" => 'Auxiliar del manejador', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7eede7a2b..6de4ec6e1 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -164,8 +164,8 @@ 'label.date' => 'Datum', 'label.start_date' => 'Počáteční datum', 'label.end_date' => 'Koncové datum', +'label.user' => 'Uživatel', // TODO: translate the following. -// 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', @@ -486,7 +486,6 @@ "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', "form.people.comanager" => 'spolumanažer', -"form.people.empl" => 'uživatel', "form.people.rate" => 'hodinová sazba', "form.people.comanager" => 'spolumanažer', @@ -494,7 +493,6 @@ // report attributes "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', -"form.report.th.empllist" => 'uzivatel', // mail form attributes "form.mail.from" => 'od', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2bb2da704..414596273 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -160,10 +160,10 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Teema', 'label.date' => 'Kuupäev', +'label.start_date' => 'Algab kuupäevast', +'label.end_date' => 'Lõpeb kuupäeval', +'label.user' => 'Kasutaja', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', -// 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', @@ -405,7 +405,7 @@ 'form.reports.group_by_project' => 'projekt', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => 'Ainult summad', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -485,17 +485,12 @@ "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', "form.people.comanager" => 'kaashaldur', -"form.people.empl" => 'kasutaja', "form.people.rate" => 'vaikimisi tunni hind', "form.people.comanager" => 'kaashaldur', // report attributes -"form.report.from" => 'algab kuupäevast', -"form.report.to" => 'lõpeb kuupäeval', -"form.report.totals_only" => 'ainult summad', "form.report.total" => 'tunde kokku', -"form.report.th.empllist" => 'kasutaja', // mail form attributes "form.mail.from" => 'kellelt', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 30d0c7369..8fb24753d 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -162,9 +162,9 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Tárgy', 'label.date' => 'Dátum', +'label.start_date' => 'Kezdő időpont', +'label.end_date' => 'Vég időpont', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', // 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', @@ -478,17 +478,12 @@ "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', "form.people.comanager" => 'helyettes', -"form.people.empl" => 'dolgozó', "form.people.rate" => 'általános óradíj', "form.people.comanager" => 'helyettes', // report attributes -"form.report.from" => 'kezdő időpont', -"form.report.to" => 'vég időpont', -"form.report.totals_only" => 'csak a teljes óraszám', "form.report.total" => 'összesített óraszám', -"form.report.th.empllist" => 'dolgozó', // mail form attributes "form.mail.from" => 'feladó', @@ -542,7 +537,6 @@ // labels "label.inv_str" => 'számla', -"label.set_empl" => 'válassz dolgozót', "label.sel_all" => 'mindenkit kijelöl', "label.sel_none" => 'senkit nem jelöl ki', "label.disable" => 'tiltva', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 7c5814bbf..63547003b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -160,9 +160,8 @@ // 'label.bcc' => 'Bcc', 'label.subject' => '主題', 'label.date' => '日付', -// TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', +'label.start_date' => '開始日付', +'label.end_date' => '終了日付', 'label.user' => 'ユーザー', 'label.users' => 'ユーザー', // TODO: translate the following. @@ -406,7 +405,7 @@ 'form.reports.group_by_project' => 'プロジェクト', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => '全体だけ', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -487,18 +486,13 @@ "form.people.th.rate" => '給料', "form.people.manager" => '管理者', "form.people.comanager" => '共同管理者', -"form.people.empl" => 'ユーザー', "form.people.rate" => 'デフォルト時間当り給料', "form.people.comanager" => '共同管理者', // report attributes "form.report.title" => 'レポート', -"form.report.from" => '開始日付', -"form.report.to" => '終了日付', -"form.report.totals_only" => '全体だけ', "form.report.total" => '合計時間', -"form.report.th.empllist" => 'ユーザー', // mail form attributes "form.mail.from" => 'から', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 230e55075..61f4f9289 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -160,9 +160,8 @@ // 'label.bcc' => 'Bcc', 'label.subject' => '제목', 'label.date' => '날짜', -// TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', +'label.start_date' => '시작 날짜', +'label.end_date' => '마감 날짜', 'label.user' => '사용자', 'label.users' => '사용자', // TODO: translate the following. @@ -406,7 +405,7 @@ 'form.reports.group_by_project' => '프로젝트', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => '오직 전체만', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -487,18 +486,13 @@ "form.people.th.rate" => '급여', "form.people.manager" => '관리자', "form.people.comanager" => '공동관리자', -"form.people.empl" => '사용자', "form.people.rate" => '디폴트 시간당 급여', "form.people.comanager" => '공동관리자', // report attributes "form.report.title" => '보고서', -"form.report.from" => '시작 날짜', -"form.report.to" => '마감 날짜', -"form.report.totals_only" => '오직 전체만', "form.report.total" => '시간 총합', -"form.report.th.empllist" => '사용자', // mail form attributes "form.mail.from" => '부터', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b6dde6118..fed52994e 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -162,8 +162,9 @@ // TODO: translate the following. // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', +'label.user' => 'Bruker', +'label.users' => 'Brukere', +// TODO: translate the following. // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -484,15 +485,11 @@ "form.people.th.role" => 'rolle', // Note to translators: the 2 strings below are missing and must be added and translated // "form.people.th.rate" => 'timesats', -"form.people.empl" => 'bruker', "form.people.rate" => 'timesats', // report attributes "form.report.title" => 'rapporter', -// Note to translators: the strings below must be translated -// "form.report.totals_only" => 'kun summer', "form.report.total" => 'totalt antall timer', -"form.report.th.empllist" => 'bruker', // mail form attributes "form.mail.from" => 'fra', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 81b389dda..0f8b27f15 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -59,7 +59,8 @@ 'menu.projects' => 'Projetos', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Usuários', +// TODO: translate the following. // 'menu.teams' => 'Teams', // 'menu.export' => 'Export', // 'menu.clients' => 'Clients', @@ -154,11 +155,11 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Assunto', 'label.date' => 'Data', +'label.start_date' => 'Data inicial', +'label.end_date' => 'Data final', +'label.user' => 'Usuário', +'label.users' => 'Usuários', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -455,8 +456,6 @@ // report attributes "form.report.title" => 'relatórios', -"form.report.from" => 'data inicial', -"form.report.to" => 'data final', "form.report.total" => 'horas totais', "form.report.th.empllist" => 'usuário', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index e14dca3dc..5dd44d37a 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -59,7 +59,7 @@ 'menu.projects' => 'Proiecte', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Utilizatori', 'menu.teams' => 'Echipe', // TODO: translate the following. // 'menu.export' => 'Export', @@ -164,11 +164,11 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Subiect', 'label.date' => 'Data', +'label.start_date' => 'Data inceput', +'label.end_date' => 'Data sfarsit', +'label.user' => 'Utilizator', +'label.users' => 'Utilizatori', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -402,7 +402,7 @@ 'form.reports.group_by_project' => 'proiect', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => 'Numai totaluri', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -480,18 +480,13 @@ "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', "form.people.comanager" => 'comanager', -"form.people.empl" => 'utilizator', "form.people.rate" => 'pret pe ora implicit', "form.people.comanager" => 'co-manager', // report attributes "form.report.title" => 'rapoarte', -"form.report.from" => 'data inceput', -"form.report.to" => 'data sfarsit', -"form.report.totals_only" => 'numai totaluri', "form.report.total" => 'ore total', -"form.report.th.empllist" => 'utilizator', // mail form attributes "form.mail.from" => 'de la', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 7fcb6bee3..f41dfd125 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -168,10 +168,10 @@ // 'label.bcc' => 'Bcc', 'label.subject' => 'Konu', 'label.date' => 'Tarih', +'label.start_date' => 'Başlangıç tarihi', +'label.end_date' => 'Son tarihi', +'label.user' => 'Kullanıcı', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', -// 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', @@ -413,7 +413,7 @@ 'form.reports.group_by_project' => 'proje', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', -// 'form.reports.totals_only' => 'Totals only', +'form.reports.totals_only' => 'Sadece toplamlar', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). @@ -500,9 +500,6 @@ // report attributes "form.report.title" => 'raporlar', -"form.report.from" => 'başlangıç tarihi', -"form.report.to" => 'son tarihi', -"form.report.totals_only" => 'sadece toplamlar', "form.report.total" => 'saat toplamı', "form.report.th.empllist" => 'kullanıcı', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 3a08ff6ec..3af46d981 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -149,9 +149,9 @@ // 'label.bcc' => 'Bcc', 'label.subject' => '主题', 'label.date' => '日期', +'label.start_date' => '开始日期', +'label.end_date' => '结束日期', // TODO: translate the following. -// 'label.start_date' => 'Start date', -// 'label.end_date' => 'End date', // 'label.user' => 'User', // 'label.users' => 'Users', // 'label.client' => 'Client', @@ -479,9 +479,6 @@ // report attributes "form.report.title" => '报告', -"form.report.from" => '开始日期', -"form.report.to" => '结束日期', -"form.report.totals_only" => '仅仅今天', "form.report.total" => '总计时间', "form.report.th.empllist" => '用户', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2a509d023..6c6dd25ef 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -487,9 +487,6 @@ // report attributes "form.report.title" => '報告', -"form.report.from" => '開始日期', -"form.report.to" => '結束日期', -"form.report.totals_only" => '僅僅今天', "form.report.total" => '總計時間', "form.report.th.empllist" => '用戶', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index aa83db433..c36729ee6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3920 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3921 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9505fe658c15ffd61a8fec48f07bc938274d2d44 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 00:50:09 +0000 Subject: [PATCH 0462/2515] Some more recycling. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 21 +++++++++------------ WEB-INF/resources/pt.lang.php | 15 ++++----------- WEB-INF/resources/tr.lang.php | 2 -- WEB-INF/resources/zh-cn.lang.php | 29 ++++++++++++----------------- WEB-INF/resources/zh-tw.lang.php | 30 +++++++++++++----------------- WEB-INF/templates/footer.tpl | 2 +- 7 files changed, 39 insertions(+), 61 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3bd5ed809..cbb246e50 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -491,7 +491,6 @@ "form.invoice.th.rate" => 'Taxa', "form.invoice.th.summ" => 'Quantitat', "form.invoice.subtotal" => 'Subtotal', -"form.invoice.customer" => 'Client', "form.invoice.mailinv_above" => 'Enviar aquesta factura per e-mail', "form.invoice.sending_str" => 'Factura enviada', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 6de4ec6e1..4f82e9802 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -167,8 +167,9 @@ 'label.user' => 'Uživatel', // TODO: translate the following. // 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', +'label.client' => 'Zákazník', +'label.clients' => 'Zákazníci', +// TODO: translate the following. // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => 'Projekt', @@ -293,10 +294,10 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Zákazníci', +'title.add_client' => 'Přidat zákazníka', +'title.edit_client' => 'Upravit zákazníka', +'title.delete_client' => 'Smazat zákazníka', // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -344,7 +345,8 @@ 'dropdown.projects' => 'projekty', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'zákazníci', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -531,11 +533,6 @@ "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', -"form.client.title" => 'zákazníci', -"form.client.add_title" => 'přidat zákazníka', -"form.client.edit_title" => 'upravit zákazníka', -"form.client.del_title" => 'smazat zákazníka', - // miscellaneous strings "forward.tocsvfile" => 'exportovat data do .csv souboru', "forward.toxmlfile" => 'exportovat data do .xml souboru', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 0f8b27f15..5db1f1ca1 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -276,10 +276,10 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.users' => 'Usuários', +'title.add_user' => 'Adicionando usuário', +'title.edit_user' => 'Editando usuário', +'title.delete_user' => 'Apagando usuário', // 'title.clients' => 'Clients', // 'title.add_client' => 'Adding Client', // 'title.edit_client' => 'Editing Client', @@ -445,19 +445,12 @@ "form.profile.edit_title" => 'editando perfil', // people form attributes -"form.people.ppl_str" => 'pessoas', -"form.people.createu_str" => 'adicionar novo usuário', -"form.people.edit_str" => 'editando usuário', -"form.people.del_str" => 'apagando usuário', - "form.people.th.role" => 'regra', "form.people.manager" => 'gerente', -"form.people.empl" => 'usuário', // report attributes "form.report.title" => 'relatórios', "form.report.total" => 'horas totais', -"form.report.th.empllist" => 'usuário', // mail form attributes "form.mail.from" => 'de', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index f41dfd125..6561b376e 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -493,7 +493,6 @@ "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', -"form.people.empl" => 'kullanıcı', "form.people.rate" => 'varsayılan saat ücreti', "form.people.comanager" => 'yardımcı yönetici', @@ -501,7 +500,6 @@ // report attributes "form.report.title" => 'raporlar', "form.report.total" => 'saat toplamı', -"form.report.th.empllist" => 'kullanıcı', // mail form attributes "form.mail.from" => 'kimden', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 3af46d981..f6f7ab9d4 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -151,11 +151,11 @@ 'label.date' => '日期', 'label.start_date' => '开始日期', 'label.end_date' => '结束日期', +'label.user' => '用户', +'label.users' => '用户', +'label.client' => '客户', +'label.clients' => '客户', // TODO: translate the following. -// 'label.user' => 'User', -// 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => '项目', @@ -274,14 +274,15 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => '用户', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => '客户', +'title.add_client' => '添加客户', +'title.edit_client' => '编辑客户', +'title.delete_client' => '删除客户', // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -329,7 +330,8 @@ 'dropdown.projects' => '项目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => '客户', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -472,7 +474,6 @@ "form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', -"form.people.empl" => '用户', "form.people.rate" => '默认小时收费', "form.people.comanager" => '合作经理人', @@ -480,7 +481,6 @@ // report attributes "form.report.title" => '报告', "form.report.total" => '总计时间', -"form.report.th.empllist" => '用户', // mail form attributes "form.mail.from" => '从', @@ -518,11 +518,6 @@ "form.migration.compression.gzip" => 'gzip格式', "form.migration.compression.bzip" => 'bzip格式', -"form.client.title" => '客户', -"form.client.add_title" => '添加客户', -"form.client.edit_title" => '编辑客户', -"form.client.del_title" => '删除客户', - // miscellaneous strings "forward.tocsvfile" => '将数据导出到.csv文件', "forward.toxmlfile" => '将数据导出到.xml文件', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 6c6dd25ef..c0f064b7b 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -160,10 +160,11 @@ // TODO: translate the following. // 'label.start_date' => 'Start date', // 'label.end_date' => 'End date', -// 'label.user' => 'User', -// 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', +'label.user' => '用戶', +'label.users' => '用戶', +'label.client' => '客戶', +'label.clients' => '客戶', +// TODO: translate the following. // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => '項目', @@ -282,14 +283,15 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => '用戶', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => '客戶', +'title.add_client' => '添加客戶', +'title.edit_client' => '編輯客戶', +'title.delete_client' => '刪除客戶', // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -337,7 +339,8 @@ 'dropdown.projects' => '項目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => '客戶', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -480,7 +483,6 @@ "form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', -"form.people.empl" => '用戶', "form.people.rate" => '默認小時收費', "form.people.comanager" => '合作經理人', @@ -488,7 +490,6 @@ // report attributes "form.report.title" => '報告', "form.report.total" => '總計時間', -"form.report.th.empllist" => '用戶', // mail form attributes "form.mail.from" => '從', @@ -526,11 +527,6 @@ "form.migration.compression.gzip" => 'gzip格式', "form.migration.compression.bzip" => 'bzip格式', -"form.client.title" => '客戶', -"form.client.add_title" => '添加客戶', -"form.client.edit_title" => '編輯客戶', -"form.client.del_title" => '刪除客戶', - // miscellaneous strings "forward.tocsvfile" => '將資料輸出到.csv文件', "forward.toxmlfile" => '將資料輸出到.xml文件', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c36729ee6..d51697ceb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3921 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3922 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6d27118f2299de142db85519411971a19f6dc256 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 01:21:40 +0000 Subject: [PATCH 0463/2515] More recycling. --- WEB-INF/resources/ca.lang.php | 3 +-- WEB-INF/resources/cs.lang.php | 22 +++++----------------- WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/hu.lang.php | 5 ++--- WEB-INF/resources/ja.lang.php | 8 ++++---- WEB-INF/resources/ko.lang.php | 28 ++++++++++++---------------- WEB-INF/resources/no.lang.php | 2 -- WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 25 insertions(+), 53 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index cbb246e50..9326ef32d 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -360,7 +360,7 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. -'form.reset_password.message' => 'S\\\'ha enviat la petició de restablir paraula de pas.', +'form.reset_password.message' => 'S\\\'ha enviat la petició de restablir paraula de pas.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Sol·licitud de restabliment de la paraula de pas de Anuko Time Tracker', // TODO: translate the following. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", @@ -450,7 +450,6 @@ "form.mytime.edit_title" => 'Modificant l\\\'historial de temps', "form.mytime.del_str" => 'Eliminant l\\\'historial de temps', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.daily" => 'Treball diari', "form.mytime.total" => 'Hores totals: ', "form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', "form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 4f82e9802..084a0ab1e 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -265,8 +265,9 @@ // TODO: translate the following. // 'title.change_password' => 'Changing Password', // 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.edit_time_record' => 'Upravit časový záznam', +'title.delete_time_record' => 'Smazat časový záznam', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -362,9 +363,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => 'Zaslán požadavek k vymazání hesla.', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Tracker požadavek na vymazání hesla', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -444,13 +445,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -"form.fpass.send_pass_str" => 'zaslán požadavek k vymazání hesla', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker požadavek na vymazání hesla', -// Note to translators: this string needs to be translated. -// "form.fpass.send_pass_body" => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "pro změnu hesla jej napište a zvolte uložit", - // administrator form "form.admin.title" => 'administrator', "form.admin.duty_text" => 'vytvořit nový tým prostřednictvím účtu týmového manažera.
můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody e-mailových adres!).', @@ -461,16 +455,10 @@ "form.admin.profile.th.active" => 'aktovní', // my time form attributes -"form.mytime.title" => 'můj deník', -"form.mytime.edit_title" => 'upravit časový záznam', -"form.mytime.del_str" => 'smazat časový záznam', -"form.mytime.daily" => 'denní práce', "form.mytime.total" => 'součet hodin: ', "form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', "form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', "form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', -// Note to translators: the string below is missing in the translation and must be added -// "form.mytime.uncompleted" => 'uncompleted', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 414596273..d85027da2 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -463,7 +463,6 @@ "form.mytime.title" => 'minu aeg', "form.mytime.edit_title" => 'ajakande muutmine', "form.mytime.del_str" => 'ajakande kustutamine', -"form.mytime.daily" => 'igapäevane töö', "form.mytime.total" => 'tunde kokku: ', "form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 8fb24753d..c86396db5 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -304,7 +304,8 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => 'Opciók', +// TODO: translate the following. // 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', @@ -452,14 +453,12 @@ "form.admin.profile.comment" => 'csoport törlése', "form.admin.profile.th.id" => 'azonosító', "form.admin.profile.th.active" => 'aktív', -"form.admin.options" => 'opciók', // my time form attributes "form.mytime.title" => 'munkaidőm', "form.mytime.edit_title" => 'szerkesztés', "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', -"form.mytime.daily" => 'napi munka', "form.mytime.total" => 'összesített óraszám: ', "form.mytime.del_yes" => 'a bejegyzés törölve', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 63547003b..d83a2824a 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -167,7 +167,8 @@ // TODO: translate the following. // 'label.client' => 'Client', // 'label.clients' => 'Clients', -// 'label.option' => 'Option', +'label.option' => 'オプション', +// TODO: translate the following. // 'label.invoice' => 'Invoice', 'label.project' => 'プロジェクト', 'label.projects' => 'プロジェクト', @@ -306,7 +307,8 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => 'オプション', +// TODO: translate the following. // 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', @@ -457,14 +459,12 @@ "form.admin.profile.comment" => 'チームの削除', "form.admin.profile.th.id" => '識別子', "form.admin.profile.th.active" => '活動内容', -"form.admin.options" => 'オプション', // my time form attributes "form.mytime.title" => '私の時間', "form.mytime.edit_title" => '時間レコードの編集', "form.mytime.del_str" => '時間レコードの削除', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.daily" => '日課', "form.mytime.total" => '合計時間: ', "form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 61f4f9289..f7b904c87 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -164,10 +164,10 @@ 'label.end_date' => '마감 날짜', 'label.user' => '사용자', 'label.users' => '사용자', +'label.client' => '클라이언트', +'label.clients' => '클라이언트', +'label.option' => '옵션', // TODO: translate the following. -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', -// 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => '프로젝트', 'label.projects' => '프로젝트', @@ -292,10 +292,11 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => '클라이언트', +'title.add_client' => '클라이언트 추가', +'title.edit_client' => '클라이언트 편집', +'title.delete_client' => '클라이언트 삭제', +// TODO: translate the following. // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -307,7 +308,8 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => '옵션', +// TODO: translate the following. // 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', @@ -343,7 +345,8 @@ 'dropdown.projects' => '프로젝트', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => '클라이언트', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -457,14 +460,12 @@ "form.admin.profile.comment" => '팀 삭제', "form.admin.profile.th.id" => '식별자', "form.admin.profile.th.active" => '활동내용', -"form.admin.options" => '옵션', // my time form attributes "form.mytime.title" => '나의 시간', "form.mytime.edit_title" => '시간기록을 편집하기', "form.mytime.del_str" => '시간기록을 삭제하기', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.daily" => '하루일과', "form.mytime.total" => '전체 시간: ', "form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', @@ -530,11 +531,6 @@ "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', -"form.client.title" => '클라이언트', -"form.client.add_title" => '클라이언트 추가', -"form.client.edit_title" => '클라이언트 편집', -"form.client.del_title" => '클라이언트 삭제', - // miscellaneous strings "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index fed52994e..df1df4b1e 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -437,7 +437,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => 'passordet er sendt', "form.fpass.send_pass_subj" => 'Anuko Time Tracker passordet ditt', // Note to translators: strings below need to be translated. // "form.fpass.send_pass_body" => "Kjære bruker,\n\nNoen, trolig deg, bad om å få ditt Anuko Time Tracker password resatt. Vær vennlig å besøk denne lenken dersom du ønsker at passordet ditt skal resettes.\n\n%s\n\nAnuko Time Tracker er et enkelt og brukervennlig system for tidsregistrering basert på åpen kildekode. Les mer på https://www.anuko.com.\n\n", @@ -461,7 +460,6 @@ // "form.mytime.edit_title" => 'endre tidsoppføringen', "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', -"form.mytime.daily" => 'daglig arbeide', "form.mytime.total" => 'totalt antall timer: ', // Note to translators: the strings below must be translated // "form.mytime.del_yes" => 'tidsoppføringen er slettet', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 5db1f1ca1..ae6fe2263 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -435,7 +435,6 @@ // my time form attributes "form.mytime.title" => 'adicionar período', -"form.mytime.daily" => 'trabalho diário', "form.mytime.total" => 'horas totais: ', "form.mytime.del_yes" => 'o período registrado foi apagado com sucesso', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 5dd44d37a..cff13b568 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -461,7 +461,6 @@ "form.mytime.edit_title" => 'editarea inregistrarii timpului', "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.daily" => 'activitatea zilnica', "form.mytime.total" => 'ore total: ', "form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 6561b376e..febc990b6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -471,13 +471,10 @@ "form.mytime.edit_title" => 'zaman kaydını düzenliyor', "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', -"form.mytime.daily" => 'günlük çalışma', "form.mytime.total" => 'toplam saat: ', "form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', "form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', -// Note to translators: the string below is missing and must be translated and added -// "form.mytime.uncompleted" => 'uncompleted', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index f6f7ab9d4..a48a2940e 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -452,7 +452,6 @@ "form.mytime.edit_title" => '编辑时间记录', "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', -"form.mytime.daily" => '每日工作', "form.mytime.total" => '总小时数: ', "form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index c0f064b7b..608fa92cb 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -461,7 +461,6 @@ "form.mytime.edit_title" => '編輯時間記錄', "form.mytime.del_str" => '刪除時間記錄', "form.mytime.time_form" => ' (時:分)', -"form.mytime.daily" => '每日工作', "form.mytime.total" => '總小時數: ', "form.mytime.del_yes" => '成功刪除時間記錄', "form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d51697ceb..bfb70079d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3922 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3923 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From ceb103409d123c30e3c1c485b1f06293d1fe7308 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 01:57:17 +0000 Subject: [PATCH 0464/2515] Some more recycling in translations. --- WEB-INF/resources/ca.lang.php | 3 ++- WEB-INF/resources/cs.lang.php | 4 ++-- WEB-INF/resources/et.lang.php | 28 +++++++++++++++------------- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 19 +++++++------------ WEB-INF/resources/ko.lang.php | 5 ++--- WEB-INF/resources/no.lang.php | 6 +++--- WEB-INF/resources/pt.lang.php | 3 ++- WEB-INF/resources/ro.lang.php | 3 ++- WEB-INF/resources/sl.lang.php | 3 ++- WEB-INF/resources/tr.lang.php | 3 ++- WEB-INF/resources/zh-cn.lang.php | 11 +++++------ WEB-INF/resources/zh-tw.lang.php | 3 +-- WEB-INF/templates/footer.tpl | 2 +- 14 files changed, 47 insertions(+), 48 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 9326ef32d..e5c5b810f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -307,7 +307,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Perfil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 084a0ab1e..72c2a1907 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -311,7 +311,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Profil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -504,7 +505,6 @@ "form.invoice.th.rate" => 'sazba', "form.invoice.th.summ" => 'množství', "form.invoice.subtotal" => 'subtotal', -"form.invoice.customer" => 'zákazník', "form.invoice.mailinv_above" => 'poslat fakturu e-mailem', "form.invoice.sending_str" => 'faktura odeslána', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d85027da2..d6850f26d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -165,8 +165,9 @@ 'label.user' => 'Kasutaja', // TODO: translate the following. // 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', +'label.client' => 'Klient', +'label.clients' => 'Kliendid', +// TODO: translate the following. // 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => 'Projekt', @@ -251,6 +252,10 @@ // 'label.week_list' => 'Week list', // Form titles. +// TODO: Improve titles for consistency, so that each title explains correctly what each +// page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. +// Compare with English file to see how it is done there and do Estonian titles similarly. +// Specifically: lisamine vs lisa, etc. 'title.login' => 'Login', // TODO: translate the following. // 'title.teams' => 'Teams', @@ -290,10 +295,11 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Kliendid', +'title.add_client' => 'Lisa klient', +'title.edit_client' => 'Muuda klienti', +'title.delete_client' => 'Kustuta klient', +// TODO: translate the following. // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -306,8 +312,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', 'title.options' => 'Suvandid', +'title.profile' => 'Profiili', // TODO: translate the following. -// 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -342,7 +348,8 @@ 'dropdown.projects' => 'projektid', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'kliendid', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -528,11 +535,6 @@ "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', -"form.client.title" => 'kliendid', -"form.client.add_title" => 'lisa klient', -"form.client.edit_title" => 'muuda klienti', -"form.client.del_title" => 'kustuta klient', - // miscellaneous strings "forward.tocsvfile" => 'ekspordi andmed .csv faili', "forward.toxmlfile" => 'ekspordi andmed .xml faili', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c86396db5..9b2f42b35 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -305,8 +305,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', 'title.options' => 'Opciók', +'title.profile' => 'Profil', // TODO: translate the following. -// 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index d83a2824a..6384565af 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -220,7 +220,7 @@ 'label.or' => 'あるいは', // TODO: translate the following. // 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.ldap_hint' => '下記のフィールドにあなたのWindowsのログインIDパスワードを入力してください。', 'label.required_fields' => '* 必須のフィールド', 'label.on_behalf' => 'を代表して', // TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm @@ -292,10 +292,11 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'クライアント', +'title.add_client' => 'クライアントの追加', +'title.edit_client' => 'クライアントの編集', +'title.delete_client' => 'クライアントの削除', +// TODO: translate the following. // 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', @@ -308,8 +309,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', 'title.options' => 'オプション', +'title.profile' => 'プロファイル', // TODO: translate the following. -// 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -530,11 +531,6 @@ "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', -"form.client.title" => 'クライアント', -"form.client.add_title" => 'クライアントの追加', -"form.client.edit_title" => 'クライアントの編集', -"form.client.del_title" => 'クライアントの削除', - // miscellaneous strings "forward.tocsvfile" => 'csvファイルにエクスポート', "forward.toxmlfile" => 'xmlファイルにエクスポート', @@ -558,5 +554,4 @@ "label.disable" => '使用中止', "label.enable" => '使用可能', "label.hrs" => '時間', -"label.ldap_hint" => '下記のフィールドにあなたのWindowsのログインIDパスワードを入力してください。', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f7b904c87..b650bdd62 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -219,7 +219,7 @@ 'label.or' => '혹은', // TODO: translate the following. // 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.ldap_hint' => '아래의 필드들에서 Windows 로그인암호 를 입력하십시오.', 'label.required_fields' => '* 필수 필드', 'label.on_behalf' => '을 대표하여', // TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm @@ -309,8 +309,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', 'title.options' => '옵션', +'title.profile' => '프로필', // TODO: translate the following. -// 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -554,5 +554,4 @@ "label.disable" => '무력화', "label.enable" => '가능화', "label.hrs" => '시간', -"label.ldap_hint" => '아래의 필드들에서 Windows 로그인암호 를 입력하십시오.', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index df1df4b1e..47f827ab7 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -218,7 +218,7 @@ 'label.or' => 'eller', // TODO: translate the following. // 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.ldap_hint' => 'Skriv din Windows login og passord i feltene nedenfor.', 'label.required_fields' => '* obligatoriske felt', 'label.on_behalf' => 'på vegne av', // TODO: translate the following. @@ -303,7 +303,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Profil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -559,7 +560,6 @@ // "label.disable" => 'slå av', // "label.enable" => 'slå på', // "label.hrs" => 'timer', -// "label.ldap_hint" => 'Skriv din Windows login og passord i feltene nedenfor.', // login hello text // "login.hello.text" => "Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.", diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index ae6fe2263..02e776c7c 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -296,7 +296,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Perfil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index cff13b568..5363dc148 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -307,7 +307,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Profil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 7bd9d0925..ae8f483c3 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -293,7 +293,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Profil', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index febc990b6..328ca55b4 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -315,7 +315,8 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', // 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.profile' => 'Profili', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a48a2940e..29e8fd53a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -155,8 +155,8 @@ 'label.users' => '用户', 'label.client' => '客户', 'label.clients' => '客户', +'label.option' => '选项', // TODO: translate the following. -// 'label.option' => 'Option', // 'label.invoice' => 'Invoice', 'label.project' => '项目', 'label.projects' => '项目', @@ -208,7 +208,7 @@ 'label.or' => '或', // TODO: translate the following. // 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.ldap_hint' => '在下面的栏目输入您的Windows用户名密码。', 'label.required_fields' => '* 必填栏目', 'label.on_behalf' => '代表', 'label.role_manager' => '(经理)', @@ -294,8 +294,9 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', -// 'title.profile' => 'Profile', +'title.options' => '选项', +'title.profile' => '简介', +// TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', // 'title.cf_edit_custom_field' => 'Editing Custom Field', @@ -445,7 +446,6 @@ "form.admin.profile.comment" => '删除团队', "form.admin.profile.th.id" => 'ID号', "form.admin.profile.th.active" => '启用', -"form.admin.options" => '选项', // my time form attributes "form.mytime.title" => '我的时间记录', @@ -541,7 +541,6 @@ "label.disable" => '禁用', "label.enable" => '启用', "label.hrs" => '小时', -"label.ldap_hint" => '在下面的栏目输入您的Windows用户名密码。', // login hello text "login.hello.text" => "anuko时间跟踪器是一种简单、易用、开放源代码的实时跟踪系统。", diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 608fa92cb..953c7bcfd 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -217,7 +217,7 @@ 'label.or' => '或', // TODO: translate the following. // 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.ldap_hint' => '在下麵的欄目輸入您的Windows用戶名密碼。', 'label.required_fields' => '* 必填欄目', 'label.on_behalf' => '代表', 'label.role_manager' => '(經理)', @@ -549,5 +549,4 @@ "label.disable" => '禁用', "label.enable" => '啟用', "label.hrs" => '小時', -"label.ldap_hint" => '在下麵的欄目輸入您的Windows用戶名密碼。', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bfb70079d..77afab265 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3923 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3924 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7fe1254bf2adce9f7c17f236f8acf2bddab01758 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 03:14:04 +0000 Subject: [PATCH 0465/2515] A bit more of recycling in translation files. --- WEB-INF/resources/cs.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 7 +------ WEB-INF/resources/ro.lang.php | 33 +++++++++++++++----------------- WEB-INF/resources/tr.lang.php | 2 -- WEB-INF/resources/zh-cn.lang.php | 8 +------- WEB-INF/resources/zh-tw.lang.php | 28 +++++++++++++-------------- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 31 insertions(+), 54 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 72c2a1907..7d5ecd69a 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -537,13 +537,10 @@ "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', -"label.fields" => 'zobrazit pole', -"label.group_title" => 'seskupit podle', "label.inv_str" => 'faktura', "label.set_empl" => 'výběr uživatelů', "label.sel_all" => 'vybrat všechno', "label.sel_none" => 'zrušit výběr', "label.disable" => 'zakázat', "label.enable" => 'povolit', -"label.hrs" => 'hodin', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6384565af..6406bc284 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -553,5 +553,4 @@ "label.sel_none" => 'すべて解除', "label.disable" => '使用中止', "label.enable" => '使用可能', -"label.hrs" => '時間', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index b650bdd62..63e51e534 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -553,5 +553,4 @@ "label.sel_none" => '모두 해제', "label.disable" => '무력화', "label.enable" => '가능화', -"label.hrs" => '시간', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 47f827ab7..1e96b457b 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -351,8 +351,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glemt passordet?', -// TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' =>'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. @@ -559,8 +558,4 @@ // "label.sel_none" => 'velg ingen', // "label.disable" => 'slå av', // "label.enable" => 'slå på', -// "label.hrs" => 'timer', - -// login hello text -// "login.hello.text" => "Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.", ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 5363dc148..b5eb16612 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -172,7 +172,7 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Factura', 'label.project' => 'Proiect', 'label.projects' => 'Proiecte', // TODO: translate the following. @@ -198,9 +198,9 @@ 'label.edit' => 'Editează', 'label.delete' => 'Șterge', 'label.configure' => 'Configureaza', +'label.select_all' => 'Selecteaza tot', +'label.select_none' => 'Deselecteaza tot', // TODO: translate the following. -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -275,7 +275,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Factura', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Proiecte', @@ -287,15 +288,16 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.users' => 'Utilizatori', +'title.add_user' => 'Adaugare utilizator', // TODO: is this correct? +'title.edit_user' => 'Editare utilizator', // TODO: is this correct? +'title.delete_user' => 'Stergere utilizator', // TODO: is this correct? // 'title.clients' => 'Clients', // 'title.add_client' => 'Adding Client', // 'title.edit_client' => 'Editing Client', // 'title.delete_client' => 'Deleting Client', -// 'title.invoices' => 'Invoices', +'title.invoices' => 'Facturi', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -341,12 +343,14 @@ // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', 'dropdown.projects' => 'proiecte', +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', // 'dropdown.clients' => 'clients', // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', -// 'dropdown.status_inactive' => 'inactive', +'dropdown.status_active' => 'activ', +'dropdown.status_inactive' => 'inactiv', +// TODO: translate the following. // 'dropdown.delete'=>'delete', // 'dropdown.do_not_delete'=>'do not delete', // 'dropdown.paid' => 'paid', @@ -541,11 +545,4 @@ "controls.per_lm" => 'luna trecuta', "controls.per_tw" => 'saptamana curenta', "controls.per_lw" => 'saptamana trecuta', - -"label.inv_str" => 'factura', -"label.set_empl" => 'alege utilizatori', -"label.sel_all" => 'selecteaza tot', -"label.sel_none" => 'deselecteaza tot', -"label.disable" => 'inactiv', -"label.enable" => 'activ', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 328ca55b4..4d0eed36d 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -552,8 +552,6 @@ "controls.per_td" => 'bugün', "controls.per_at" => 'tüm zamanlar', -"label.group_title" => 'gruplandırma kıstası', - "label.set_empl" => 'kullanıcıları seç', "label.sel_all" => 'tümünü seç', "label.sel_none" => 'hiçbirini seçme', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 29e8fd53a..365b35272 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -344,8 +344,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘记密码?', -// TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' =>'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. @@ -532,7 +531,6 @@ "controls.per_td" => '今天', "controls.per_at" => '全部时间', "controls.per_ty" => '今年', -"controls.sel_period" => '--- 选择时间段 ---', "label.inv_str" => '发票', "label.set_empl" => '选择用户', @@ -540,8 +538,4 @@ "label.sel_none" => '全部不选', "label.disable" => '禁用', "label.enable" => '启用', -"label.hrs" => '小时', - -// login hello text - "login.hello.text" => "anuko时间跟踪器是一种简单、易用、开放源代码的实时跟踪系统。", ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 953c7bcfd..0798ff23d 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -71,39 +71,38 @@ // This is a link to a webpage that describes how to contribute to the project. // Error messages. -// TODO: All error messages should be complete sentences with a period (full stop) in the end. Put them there. // TODO: translate the following. // 'error.access_denied' => 'Access denied.', // 'error.sys' => 'System error.', -'error.db' => '資料庫錯誤', -'error.field' => '不正確的"{0}"資料', -'error.empty' => '欄目"{0}"為空', -'error.not_equal' => '欄目"{0}"不等於欄目"{1}"', +'error.db' => '資料庫錯誤。', +'error.field' => '不正確的"{0}"資料。', +'error.empty' => '欄目"{0}"為空。', +'error.not_equal' => '欄目"{0}"不等於欄目"{1}"。', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -'error.project' => '選擇項目', +'error.project' => '選擇項目。', // TODO: translate the following. // 'error.task' => 'Select task.', -'error.client' => '選擇客戶', +'error.client' => '選擇客戶。', // TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', -'error.auth' => '不正確的用戶名或密碼', -'error.user_exists' => '該使用者登錄資訊已經存在', -'error.project_exists' => '該專案名稱已經存在', +'error.auth' => '不正確的用戶名或密碼。', +'error.user_exists' => '該使用者登錄資訊已經存在。', +'error.project_exists' => '該專案名稱已經存在。', // TODO: translate the following. // 'error.task_exists' => 'Task with this name already exists.', // 'error.client_exists' => 'Client with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', -'error.no_login' => '沒有該登錄資訊的使用者', +'error.no_login' => '沒有該登錄資訊的使用者。', // TODO: translate the following. // 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', -'error.upload' => '上傳文件出錯', +'error.upload' => '上傳文件出錯。', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', -'error.mail_send' => '發送郵件時出錯', -'error.no_email' => '沒有電子郵件與該用戶名關聯', +'error.mail_send' => '發送郵件時出錯。', +'error.no_email' => '沒有電子郵件與該用戶名關聯。', // TODO: translate the following. // 'error.uncompleted_exists' => 'Uncompleted entry already exists. Close or delete it.', // 'error.goto_uncompleted' => 'Go to uncompleted entry.', @@ -548,5 +547,4 @@ "label.sel_none" => '全部不選', "label.disable" => '禁用', "label.enable" => '啟用', -"label.hrs" => '小時', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 77afab265..e69e8e9a3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3924 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3925 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From fcb232f2236dd0105525b0239fa7b212aaf72a2a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 11:05:08 +0000 Subject: [PATCH 0466/2515] Recycled some more old strings. --- WEB-INF/resources/et.lang.php | 9 +-------- WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 31 ++++++++++++++---------------- WEB-INF/resources/ko.lang.php | 33 +++++++++++++++----------------- WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 4 ---- WEB-INF/resources/ro.lang.php | 7 ++----- WEB-INF/resources/tr.lang.php | 6 ++---- WEB-INF/resources/zh-cn.lang.php | 6 ++---- WEB-INF/resources/zh-tw.lang.php | 6 ++---- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 40 insertions(+), 68 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d6850f26d..8399c7857 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -365,8 +365,8 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => 'Salasõna tühjendamise käsk edastatud.', // TODO: add "by email" to match the English string. // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", @@ -448,13 +448,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -"form.fpass.send_pass_str" => 'salasõna tühjendamise käsk edastatud', -// Note to translators: the 3 strings below must be translated -// "form.fpass.send_pass_subj" => 'AnukoTime Tracker password reset request', -// "form.fpass.send_pass_body" => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -// "form.fpass.reset_comment" => "to reset your password please type it in and click on save", - // administrator form "form.admin.title" => 'administraator', // Note to translators: the string below must be translated diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 9b2f42b35..8847ee2d6 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -440,8 +440,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => 'jelszó alap állapotra állítása megkezdve', -"form.fpass.send_pass_subj" => 'A jelszó alap állapotra állítása a Anuko TimeTracker-ben', "form.fpass.reset_comment" => "a jelszót a megváltoztatásához írja be és mentse el", // administrator form diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6406bc284..0c1e1add7 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -73,38 +73,37 @@ // This is a link to a webpage that describes how to contribute to the project. // Error messages. -// TODO: All error messages should be complete sentences with a period (full stop) in the end. Put them there. // TODO: translate the following. // 'error.access_denied' => 'Access denied.', // 'error.sys' => 'System error.', -'error.db' => 'データベースのエラー', -'error.field' => '不正確な"{0}"データ', -'error.empty' => '"{0}"のフィールドが空白です', -'error.not_equal' => '"{0}"のフィールドは"{1}"のフィールドと違います', +'error.db' => 'データベースのエラー。', +'error.field' => '不正確な"{0}"データ。', +'error.empty' => '"{0}"のフィールドが空白です。', +'error.not_equal' => '"{0}"のフィールドは"{1}"のフィールドと違います。', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -'error.project' => 'プロジェクトの選択', +'error.project' => 'プロジェクトの選択。', // TODO: translate the following. // 'error.task' => 'Select task.', -'error.client' => 'クライアントの選択', +'error.client' => 'クライアントの選択。', // TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', -'error.auth' => '不正確なログインあるいはパスワードが不正確です', -'error.user_exists' => 'このログインと関連されたユーザーは既に存在します', -'error.project_exists' => 'この名前のプロジェクトは既に存在します', +'error.auth' => '不正確なログインあるいはパスワードが不正確です。', +'error.user_exists' => 'このログインと関連されたユーザーは既に存在します。', +'error.project_exists' => 'この名前のプロジェクトは既に存在します。', // TODO: translate the following. // 'error.task_exists' => 'Task with this name already exists.', // 'error.client_exists' => 'Client with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', -'error.no_login' => 'このログインと関連されたユーザーはいません', +'error.no_login' => 'このログインと関連されたユーザーはいません。', // TODO: translate the following. // 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', -'error.upload' => 'ファイルのアップロードのエラー', +'error.upload' => 'ファイルのアップロードのエラー。', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', -'error.mail_send' => 'メールの送信中のエラー', +'error.mail_send' => 'メールの送信中のエラー。', // TODO: translate the following. // 'error.no_email' => 'No email associated with this login.', // 'error.uncompleted_exists' => 'Uncompleted entry already exists. Close or delete it.', @@ -361,9 +360,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Trackerのパスワードの初期化の要求', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -445,8 +444,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => '送信したパスワードの初期化の要求', -"form.fpass.send_pass_subj" => 'Anuko Time Trackerのパスワードの初期化の要求', // Note to translators: the ending of this string below needs to be translated. "form.fpass.send_pass_body" => "尊敬なるお客様、\n\n誰から(多分あなた)あなたのAnuko Time Trackerのパスワードの初期化が要求されました。あなたのパスワードを初期化しようとこのリンクを押してください。\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "あなたのパスワードを初期化しようとパスワードを入力して保存をクリックしてください", diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 63e51e534..64aecba26 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -73,39 +73,38 @@ // This is a link to a webpage that describes how to contribute to the project. // Error messages. -// TODO: All error messages should be complete sentences with a period (full stop) in the end. Put them there. // TODO: translate the following. // 'error.access_denied' => 'Access denied.', // 'error.sys' => 'System error.', -'error.db' => '데이터베이스 오류', -'error.field' => '부정확한 "{0}" 의 데이터', -'error.empty' => '"{0}" 의 필드가 비어있습니다', -'error.not_equal' => '"{0}" 의 필드가 "{1}" 의 필드와 같지 않습니다', +'error.db' => '데이터베이스 오류.', +'error.field' => '부정확한 "{0}" 의 데이터.', +'error.empty' => '"{0}" 의 필드가 비어있습니다.', +'error.not_equal' => '"{0}" 의 필드가 "{1}" 의 필드와 같지 않습니다.', // TODO: translate the following. // 'error.interval' => 'Field "{0}" must be greater than "{1}".', -'error.project' => '프로젝트의 선택', +'error.project' => '프로젝트의 선택.', // TODO: translate the following. // 'error.task' => 'Select task.', -'error.client' => '클라이언트 선택', +'error.client' => '클라이언트 선택.', // TODO: translate the following. // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', -'error.auth' => '부정확한 로그인 혹은 암호가 틀립니다', -'error.user_exists' => '본 로그인과 연계된 사용자가 이미 있습니다', -'error.project_exists' => '본 이름과 연계된 프로젝트가 이미 있습니다', +'error.auth' => '부정확한 로그인 혹은 암호가 틀립니다.', +'error.user_exists' => '본 로그인과 연계된 사용자가 이미 있습니다.', +'error.project_exists' => '본 이름과 연계된 프로젝트가 이미 있습니다.', // TODO: translate the following. // 'error.task_exists' => 'Task with this name already exists.', // 'error.client_exists' => 'Client with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', -'error.no_login' => '본 로그인과 연계된 사용자가 없습니다', +'error.no_login' => '본 로그인과 연계된 사용자가 없습니다.', // TODO: translate the following. // 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', -'error.upload' => '파일 업로드 오류', +'error.upload' => '파일 업로드 오류.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', -'error.mail_send' => '메일 보내기에서의 오류', -'error.no_email' => '본 로그인과 연계된 이메일이 없습니다', +'error.mail_send' => '메일 보내기에서의 오류.', +'error.no_email' => '본 로그인과 연계된 이메일이 없습니다.', // TODO: translate the following. // 'error.uncompleted_exists' => 'Uncompleted entry already exists. Close or delete it.', // 'error.goto_uncompleted' => 'Go to uncompleted entry.', @@ -362,9 +361,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Tracker 암호 재설정 요청', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -445,8 +444,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => '송신한 암호 재설정 요청', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker 암호 재설정 요청', // Note to translators: the ending of this string below needs to be translated. "form.fpass.send_pass_body" => "사용자님께,\n\n누군가 (아마 당신) 가 당신의 Anuko Time Tracker 암호 재설정을 요청하였습니다. 당신의 암호를 재설정하기 바란다면 이 링크를 찾아주십시오. \n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "암호를 재설정하려면 암호를 입력하고 저장을 클릭하십시오", diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 1e96b457b..f468c4d4a 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -437,7 +437,7 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_subj" => 'Anuko Time Tracker passordet ditt', + // Note to translators: strings below need to be translated. // "form.fpass.send_pass_body" => "Kjære bruker,\n\nNoen, trolig deg, bad om å få ditt Anuko Time Tracker password resatt. Vær vennlig å besøk denne lenken dersom du ønsker at passordet ditt skal resettes.\n\n%s\n\nAnuko Time Tracker er et enkelt og brukervennlig system for tidsregistrering basert på åpen kildekode. Les mer på https://www.anuko.com.\n\n", // "form.fpass.reset_comment" => "vennligst skriv inn passordet og klikk på lagre for å resette passsordet.", diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 02e776c7c..30b49eb0b 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -427,10 +427,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -"form.fpass.send_pass_str" => 'senha foi enviada', -"form.fpass.send_pass_subj" => 'Sua senha do Anuko Time Tracker', - // administrator form "form.admin.options" => 'opções', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b5eb16612..ed7225065 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -362,9 +362,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Tracker - cerere de resetare a parolei', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -444,9 +444,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.login" => 'autentifica', -"form.fpass.send_pass_str" => 'cererea de resetare a parolei a fost trimisa', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker - cerere de resetare a parolei', // Note to translators: the ending of this string below needs to be translated. "form.fpass.send_pass_body" => "Draga Utilizator,\n\nCineva, posibil tu, a cerut resetarea parolei pentru contul Anuko Time Tracker. Te rog, viziteaza acesta legatura daca doresti sa iti resetezi parola.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "pentru resetarea parolei introdu-o si da click pe salveaza", diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 4d0eed36d..e6e45fffe 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -367,9 +367,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko Time Tracker parola sıfırlama talebi', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -451,8 +451,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => 'parola sıfırlama talebi yollandı', -"form.fpass.send_pass_subj" => 'Anuko Time Tracker parola sıfırlama talebi', // Note to translators: the ending of this string needs to be translated. "form.fpass.send_pass_body" => "Sayın Kullanıcı,\n\nBirisi, muhtemelen siz, Anuko Time Tracker parolanızın sıfırlanmasını istedi. Parolanızı sıfırlamak isterseniz lütfen bu bağlantıyı takip edin.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "parolanızı sıfırlamak için lütfen parolanızı yazın ve kaydedin", diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 365b35272..b3a15fa96 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -347,9 +347,9 @@ 'form.login.about' =>'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => '密码重设请求已经发送。', // TODO: Add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko时间追踪器密码重设请求', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -430,8 +430,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => '密码重设请求已经发送', -"form.fpass.send_pass_subj" => 'Anuko时间追踪器密码重设请求', // Note to translators: the ending of this string below needs to be translated. "form.fpass.send_pass_body" => "亲爱的用户,\n\n有人,也可能是您自己,请求重新设置您的Anuko时间追踪器密码。如果您希望重设您的密码,请访问下面的连结:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "要重设密码,请输入新密码并点击保存按钮", diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0798ff23d..1889cc2ce 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -355,9 +355,9 @@ // 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. +'form.reset_password.message' => '密碼重設請求已經發送。', // TODO: Add "by email" to match the English string. +'form.reset_password.email_subject' => 'Anuko時間追蹤器密碼重設請求', // TODO: translate the following. -// 'form.reset_password.message' => 'Password reset request sent by email.', -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', // 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. @@ -438,8 +438,6 @@ // TODO: refactoring ongoing down from here. // password reminder form attributes -"form.fpass.send_pass_str" => '密碼重設請求已經發送', -"form.fpass.send_pass_subj" => 'Anuko時間追蹤器密碼重設請求', // Note to translators: the ending of this string below needs to be translated. "form.fpass.send_pass_body" => "親愛的用戶,\n\n有人,也可能是您自己,請求重新設置您的Anuko時間追蹤器密碼。如果您希望重設您的密碼,請訪問下麵的連結:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", "form.fpass.reset_comment" => "要重設密碼,請輸入新密碼並點擊保存按鈕", diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e69e8e9a3..ed5e66d51 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3925 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3926 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6cf752f6b395625a732fa9009455aef292cb721d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 11:28:38 +0000 Subject: [PATCH 0467/2515] Some more cleanup and recycling. --- WEB-INF/resources/hu.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 10 +++------- WEB-INF/resources/ko.lang.php | 9 ++------- WEB-INF/resources/no.lang.php | 12 ++---------- WEB-INF/resources/pt.lang.php | 5 +---- WEB-INF/resources/ro.lang.php | 9 ++------- WEB-INF/resources/tr.lang.php | 9 ++------- WEB-INF/resources/zh-cn.lang.php | 9 ++------- WEB-INF/resources/zh-tw.lang.php | 12 +++--------- WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 18 insertions(+), 62 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 8847ee2d6..b35cb885b 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -439,9 +439,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -"form.fpass.reset_comment" => "a jelszót a megváltoztatásához írja be és mentse el", - // administrator form "form.admin.title" => 'Adminisztrátor', "form.admin.duty_text" => 'új csoport létrehozása egy csoport-vezetői jogosultsággal.
a csoport adatokat importálhatjuk XML-ből (csak az e-mail címek ne ütközzenek).', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 0c1e1add7..83f604e60 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -362,8 +362,9 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Trackerのパスワードの初期化の要求', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of this string. +'form.reset_password.email_body' => "尊敬なるお客様、\n\n誰から(多分あなた)あなたのAnuko Time Trackerのパスワードの初期化が要求されました。あなたのパスワードを初期化しようとこのリンクを押してください。\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", + // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -443,11 +444,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "尊敬なるお客様、\n\n誰から(多分あなた)あなたのAnuko Time Trackerのパスワードの初期化が要求されました。あなたのパスワードを初期化しようとこのリンクを押してください。\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "あなたのパスワードを初期化しようとパスワードを入力して保存をクリックしてください", - // administrator form "form.admin.title" => '管理者', "form.admin.duty_text" => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 64aecba26..6c1ff75f5 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -363,8 +363,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker 암호 재설정 요청', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of the following. +'form.reset_password.email_body' => "사용자님께,\n\n누군가 (아마 당신) 가 당신의 Anuko Time Tracker 암호 재설정을 요청하였습니다. 당신의 암호를 재설정하기 바란다면 이 링크를 찾아주십시오. \n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -443,11 +443,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "사용자님께,\n\n누군가 (아마 당신) 가 당신의 Anuko Time Tracker 암호 재설정을 요청하였습니다. 당신의 암호를 재설정하기 바란다면 이 링크를 찾아주십시오. \n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "암호를 재설정하려면 암호를 입력하고 저장을 클릭하십시오", - // administrator form "form.admin.title" => '관리자', "form.admin.duty_text" => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index f468c4d4a..33d592275 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -302,7 +302,7 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => 'Opsjoner', 'title.profile' => 'Profil', // TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', @@ -357,7 +357,7 @@ // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Kjære bruker,\n\nNoen, trolig deg, bad om å få ditt Anuko Time Tracker password resatt. Vær vennlig å besøk denne lenken dersom du ønsker at passordet ditt skal resettes.\n\n%s\n\nAnuko Time Tracker er et enkelt og brukervennlig system for tidsregistrering basert på åpen kildekode. Les mer på https://www.anuko.com.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -436,14 +436,7 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes - -// Note to translators: strings below need to be translated. -// "form.fpass.send_pass_body" => "Kjære bruker,\n\nNoen, trolig deg, bad om å få ditt Anuko Time Tracker password resatt. Vær vennlig å besøk denne lenken dersom du ønsker at passordet ditt skal resettes.\n\n%s\n\nAnuko Time Tracker er et enkelt og brukervennlig system for tidsregistrering basert på åpen kildekode. Les mer på https://www.anuko.com.\n\n", -// "form.fpass.reset_comment" => "vennligst skriv inn passordet og klikk på lagre for å resette passsordet.", - // Note to translators: the strings below must be translated -// // administrator form // "form.admin.title" => 'administrator', // "form.admin.duty_text" => 'opprett et nytt team ved å opprette en ny team manager konto.
du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', @@ -452,7 +445,6 @@ // "form.admin.profile.comment" => 'slett team', // "form.admin.profile.th.id" => 'id', // "form.admin.profile.th.active" => 'aktiv', -// "form.admin.options" => 'opsjoner', // my time form attributes // Note to translators: the 2 strings below must be translated diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 30b49eb0b..4604b0464 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -295,7 +295,7 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => 'Opções', 'title.profile' => 'Perfil', // TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', @@ -427,9 +427,6 @@ // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.options" => 'opções', - // my time form attributes "form.mytime.title" => 'adicionar período', "form.mytime.total" => 'horas totais: ', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index ed7225065..24b6e6f62 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -364,8 +364,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker - cerere de resetare a parolei', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of following. +'form.reset_password.email_body' => "Draga Utilizator,\n\nCineva, posibil tu, a cerut resetarea parolei pentru contul Anuko Time Tracker. Te rog, viziteaza acesta legatura daca doresti sa iti resetezi parola.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -443,11 +443,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "Draga Utilizator,\n\nCineva, posibil tu, a cerut resetarea parolei pentru contul Anuko Time Tracker. Te rog, viziteaza acesta legatura daca doresti sa iti resetezi parola.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "pentru resetarea parolei introdu-o si da click pe salveaza", - // administrator form "form.admin.title" => 'administrator', "form.admin.duty_text" => 'adauga o noua echipa prin adaugarea unui nou cont de tip manager.
deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru emailuri).', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e6e45fffe..9eeb6c6ae 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -369,8 +369,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker parola sıfırlama talebi', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of the following. +'form.reset_password.email_body' => "Sayın Kullanıcı,\n\nBirisi, muhtemelen siz, Anuko Time Tracker parolanızın sıfırlanmasını istedi. Parolanızı sıfırlamak isterseniz lütfen bu bağlantıyı takip edin.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -450,11 +450,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string needs to be translated. -"form.fpass.send_pass_body" => "Sayın Kullanıcı,\n\nBirisi, muhtemelen siz, Anuko Time Tracker parolanızın sıfırlanmasını istedi. Parolanızı sıfırlamak isterseniz lütfen bu bağlantıyı takip edin.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "parolanızı sıfırlamak için lütfen parolanızı yazın ve kaydedin", - // administrator form "form.admin.title" => 'yönetici', "form.admin.duty_text" => 'yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (e-posta çakışmalarına izin verilmemekte).', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b3a15fa96..7a5c2a5d2 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -349,8 +349,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密码重设请求已经发送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko时间追踪器密码重设请求', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of the following. +'form.reset_password.email_body' => "亲爱的用户,\n\n有人,也可能是您自己,请求重新设置您的Anuko时间追踪器密码。如果您希望重设您的密码,请访问下面的连结:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -429,11 +429,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "亲爱的用户,\n\n有人,也可能是您自己,请求重新设置您的Anuko时间追踪器密码。如果您希望重设您的密码,请访问下面的连结:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "要重设密码,请输入新密码并点击保存按钮", - // administrator form "form.admin.title" => '管理员', "form.admin.duty_text" => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 1889cc2ce..bd05c201b 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -302,7 +302,7 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => '選項', // 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', @@ -357,8 +357,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密碼重設請求已經發送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko時間追蹤器密碼重設請求', -// TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: translate the ending of the following. +'form.reset_password.email_body' => "親愛的用戶,\n\n有人,也可能是您自己,請求重新設置您的Anuko時間追蹤器密碼。如果您希望重設您的密碼,請訪問下麵的連結:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -437,11 +437,6 @@ // TODO: refactoring ongoing down from here. -// password reminder form attributes -// Note to translators: the ending of this string below needs to be translated. -"form.fpass.send_pass_body" => "親愛的用戶,\n\n有人,也可能是您自己,請求重新設置您的Anuko時間追蹤器密碼。如果您希望重設您的密碼,請訪問下麵的連結:\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -"form.fpass.reset_comment" => "要重設密碼,請輸入新密碼並點擊保存按鈕", - // administrator form "form.admin.title" => '管理員', "form.admin.duty_text" => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', @@ -451,7 +446,6 @@ "form.admin.profile.comment" => '刪除團隊', "form.admin.profile.th.id" => 'ID號', "form.admin.profile.th.active" => '啟動', -"form.admin.options" => '選項', // my time form attributes "form.mytime.title" => '我的時間記錄', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ed5e66d51..1243cf2c4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3926 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3927 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From dba881e5ec20207145c9377b2d6c0421da6607af Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 11:39:08 +0000 Subject: [PATCH 0468/2515] A bit of cleanup. --- WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/ro.lang.php | 7 +++---- WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 4 insertions(+), 14 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7d5ecd69a..98c94c0ff 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -447,7 +447,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => 'administrator', "form.admin.duty_text" => 'vytvořit nový tým prostřednictvím účtu týmového manažera.
můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody e-mailových adres!).', "form.admin.profile.title" => 'týmy', "form.admin.profile.noprofiles" => 'vaše databáze je prázdná. přihlašte se jako admin a vytvořte nový tým.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 8399c7857..62592e4a8 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -449,7 +449,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => 'administraator', // Note to translators: the string below must be translated // "form.admin.duty_text" => 'create a new meeskond by creating a new meeskond manager account.
you can also import meeskond data from an xml file from another Anuko time tracker server (no e-mail collisions are allowed).', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b35cb885b..e28e77bba 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -440,7 +440,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => 'Adminisztrátor', "form.admin.duty_text" => 'új csoport létrehozása egy csoport-vezetői jogosultsággal.
a csoport adatokat importálhatjuk XML-ből (csak az e-mail címek ne ütközzenek).', "form.admin.profile.title" => 'csoportok', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 83f604e60..bfa67d9a6 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -445,7 +445,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => '管理者', "form.admin.duty_text" => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', "form.admin.profile.title" => 'チーム', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 6c1ff75f5..322830d26 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -444,7 +444,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => '관리자', "form.admin.duty_text" => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', "form.admin.profile.title" => '팀', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 33d592275..818cad6f4 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -437,7 +437,6 @@ // TODO: refactoring ongoing down from here. // Note to translators: the strings below must be translated -// "form.admin.title" => 'administrator', // "form.admin.duty_text" => 'opprett et nytt team ved å opprette en ny team manager konto.
du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', // "form.admin.profile.title" => 'team', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 24b6e6f62..9fed88cfb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -224,10 +224,10 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* date obligatorii', 'label.on_behalf' => 'in numele', +'label.role_manager' => '(manager)', +'label.role_comanager' => '(co-manager)', +'label.role_admin' => '(administrator)', // TODO: translate the following. -// 'label.role_manager' => '(manager)', -// 'label.role_comanager' => '(co-manager)', -// 'label.role_admin' => '(administrator)', // 'label.page' => 'Page', // 'label.condition' => 'Condition', // 'label.yes' => 'yes', @@ -444,7 +444,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => 'administrator', "form.admin.duty_text" => 'adauga o noua echipa prin adaugarea unui nou cont de tip manager.
deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru emailuri).', "form.admin.profile.title" => 'echipe', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9eeb6c6ae..196e1e9b5 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -451,7 +451,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => 'yönetici', "form.admin.duty_text" => 'yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (e-posta çakışmalarına izin verilmemekte).', "form.admin.profile.title" => 'ekipler', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7a5c2a5d2..b4dcdcff5 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -430,7 +430,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => '管理员', "form.admin.duty_text" => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', "form.admin.profile.title" => '团队', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index bd05c201b..cf1142ca2 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -438,7 +438,6 @@ // TODO: refactoring ongoing down from here. // administrator form -"form.admin.title" => '管理員', "form.admin.duty_text" => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', "form.admin.profile.title" => '團隊', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1243cf2c4..325eae891 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3927 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3928 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 82dc211ecaaacc5350437cd5c0574953b627c77b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 15:11:08 +0000 Subject: [PATCH 0469/2515] A bit more cleanup and recycling. --- WEB-INF/resources/ca.lang.php | 8 ++------ WEB-INF/resources/cs.lang.php | 9 +++------ WEB-INF/resources/et.lang.php | 6 ++---- WEB-INF/resources/hu.lang.php | 9 +++------ WEB-INF/resources/ja.lang.php | 2 -- WEB-INF/resources/ko.lang.php | 2 -- WEB-INF/resources/no.lang.php | 2 -- WEB-INF/resources/tr.lang.php | 2 -- WEB-INF/resources/zh-cn.lang.php | 2 -- WEB-INF/resources/zh-tw.lang.php | 2 -- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 11 insertions(+), 35 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e5c5b810f..7500be451 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -193,9 +193,9 @@ 'label.edit' => 'Modificar', 'label.delete' => 'Eliminar', 'label.configure' => 'Configurar', +'label.select_all' => 'Seleccionar tots', +'label.select_none' => 'Treure totes las seleccions', // TODO: translate the following. -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -517,8 +517,4 @@ "controls.per_lw" => 'La setmana passada', "label.set_empl" => 'Seleccionar usuaris', -"label.sel_all" => 'Seleccionar tots', -"label.sel_none" => 'Treure totes las seleccions', -"label.disable" => 'Deshabilitar', -"label.enable" => 'Habilitar', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 98c94c0ff..517120558 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -199,8 +199,9 @@ 'label.delete' => 'Smazat', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => 'Vybrat všechno', +'label.select_none' => 'Zrušit výběr', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -538,8 +539,4 @@ "label.inv_str" => 'faktura', "label.set_empl" => 'výběr uživatelů', -"label.sel_all" => 'vybrat všechno', -"label.sel_none" => 'zrušit výběr', -"label.disable" => 'zakázat', -"label.enable" => 'povolit', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 62592e4a8..2cf77411e 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -196,9 +196,9 @@ 'label.edit' => 'Muuda', 'label.delete' => 'Kustuta', 'label.configure' => 'Konfigureeri', +'label.select_all' => 'Vali kõik', +'label.select_none' => 'Märgi kõik mittevalituks', // TODO: translate the following. -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -546,6 +546,4 @@ "label.set_empl" => 'vali kasutajad', "label.sel_all" => 'vali kõik', "label.sel_none" => 'märgi kõik mittevalituks', -"label.disable" => 'keela', -"label.enable" => 'luba', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e28e77bba..0915ecb25 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -197,8 +197,9 @@ 'label.delete' => 'Törlés', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +// TODO: translate the following. +'label.select_all' => 'Mindenkit kijelöl', +'label.select_none' => 'Senkit nem jelöl ki', // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -530,8 +531,4 @@ // labels "label.inv_str" => 'számla', -"label.sel_all" => 'mindenkit kijelöl', -"label.sel_none" => 'senkit nem jelöl ki', -"label.disable" => 'tiltva', -"label.enable" => 'engedélyezve', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index bfa67d9a6..4a7ab2843 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -543,6 +543,4 @@ "label.set_empl" => 'ユーザーの選択', "label.sel_all" => 'すべて選択', "label.sel_none" => 'すべて解除', -"label.disable" => '使用中止', -"label.enable" => '使用可能', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 322830d26..4f29656da 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -542,6 +542,4 @@ "label.set_empl" => '사용자들을 선택', "label.sel_all" => '모두 선택', "label.sel_none" => '모두 해제', -"label.disable" => '무력화', -"label.enable" => '가능화', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 818cad6f4..a68f50101 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -547,6 +547,4 @@ // Note to translators: the strings below are missing and must be translated and added // "label.sel_all" => 'velg alle', // "label.sel_none" => 'velg ingen', -// "label.disable" => 'slå av', -// "label.enable" => 'slå på', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 196e1e9b5..0adc1a670 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -547,6 +547,4 @@ "label.set_empl" => 'kullanıcıları seç', "label.sel_all" => 'tümünü seç', "label.sel_none" => 'hiçbirini seçme', -"label.disable" => 'devre dışı bırak', -"label.enable" => 'devreye sok', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b4dcdcff5..340334bcb 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -528,6 +528,4 @@ "label.set_empl" => '选择用户', "label.sel_all" => '全部选择', "label.sel_none" => '全部不选', -"label.disable" => '禁用', -"label.enable" => '启用', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index cf1142ca2..827428a25 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -536,6 +536,4 @@ "label.set_empl" => '選擇用戶', "label.sel_all" => '全部選擇', "label.sel_none" => '全部不選', -"label.disable" => '禁用', -"label.enable" => '啟用', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 325eae891..d1abb888c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3928 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3929 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From cf1529ffd0e143b1d4e279755f1b6372c6cba8f6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 15:21:07 +0000 Subject: [PATCH 0470/2515] More recycling. --- WEB-INF/resources/et.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 7 +++---- WEB-INF/resources/ko.lang.php | 7 +++---- WEB-INF/resources/no.lang.php | 8 +++----- WEB-INF/resources/tr.lang.php | 7 +++---- WEB-INF/resources/zh-cn.lang.php | 7 +++---- WEB-INF/resources/zh-tw.lang.php | 7 +++---- WEB-INF/templates/footer.tpl | 2 +- 8 files changed, 19 insertions(+), 28 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2cf77411e..049b60409 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -544,6 +544,4 @@ "label.inv_str" => 'arved', "label.set_empl" => 'vali kasutajad', -"label.sel_all" => 'vali kõik', -"label.sel_none" => 'märgi kõik mittevalituks', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 4a7ab2843..06e0a16a9 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -196,8 +196,9 @@ 'label.delete' => '削除', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => 'すべて選択', +'label.select_none' => 'すべて解除', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -541,6 +542,4 @@ "label.inv_str" => '送り状', "label.set_empl" => 'ユーザーの選択', -"label.sel_all" => 'すべて選択', -"label.sel_none" => 'すべて解除', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 4f29656da..184c64c55 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -195,8 +195,9 @@ 'label.delete' => '삭제', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => '모두 선택', +'label.select_none' => '모두 해제', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -540,6 +541,4 @@ "label.inv_str" => '송장', "label.set_empl" => '사용자들을 선택', -"label.sel_all" => '모두 선택', -"label.sel_none" => '모두 해제', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index a68f50101..c508e0533 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -196,8 +196,9 @@ 'label.delete' => 'Slett', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => 'Velg alle', +'label.select_none' => 'Velg ingen', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -544,7 +545,4 @@ "label.inv_str" => 'faktura', "label.set_empl" => 'velg brukere', -// Note to translators: the strings below are missing and must be translated and added -// "label.sel_all" => 'velg alle', -// "label.sel_none" => 'velg ingen', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 0adc1a670..bf4ce11a8 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -205,8 +205,9 @@ 'label.delete' => 'Sil', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => 'Tümünü seç', +'label.select_none' => 'Hiçbirini seçme', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -545,6 +546,4 @@ "controls.per_at" => 'tüm zamanlar', "label.set_empl" => 'kullanıcıları seç', -"label.sel_all" => 'tümünü seç', -"label.sel_none" => 'hiçbirini seçme', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 340334bcb..f2f3d6d66 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -185,8 +185,9 @@ 'label.delete' => '删除', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => '全部选择', +'label.select_none' => '全部不选', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -526,6 +527,4 @@ "label.inv_str" => '发票', "label.set_empl" => '选择用户', -"label.sel_all" => '全部选择', -"label.sel_none" => '全部不选', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 827428a25..4d71642f9 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -193,8 +193,9 @@ 'label.delete' => '刪除', // TODO: translate the following. // 'label.configure' => 'Configure', -// 'label.select_all' => 'Select all', -// 'label.select_none' => 'Deselect all', +'label.select_all' => '全部選擇', +'label.select_none' => '全部不選', +// TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', // 'label.id' => 'ID', @@ -534,6 +535,4 @@ "label.inv_str" => '發票', "label.set_empl" => '選擇用戶', -"label.sel_all" => '全部選擇', -"label.sel_none" => '全部不選', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d1abb888c..3226d3b23 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3929 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3930 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 466bac15266780623565e359e418411ed516915e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 15:44:47 +0000 Subject: [PATCH 0471/2515] More recycling in translations. --- WEB-INF/resources/ca.lang.php | 7 +++---- WEB-INF/resources/cs.lang.php | 9 ++++----- WEB-INF/resources/et.lang.php | 9 ++++----- WEB-INF/resources/ja.lang.php | 6 +++--- WEB-INF/resources/ko.lang.php | 6 +++--- WEB-INF/resources/no.lang.php | 6 +++--- WEB-INF/resources/tr.lang.php | 9 ++++----- WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 25 insertions(+), 31 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 7500be451..e82c354e8 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -57,7 +57,7 @@ 'menu.projects' => 'Projectes', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Usuaris', 'menu.teams' => 'Grups', // TODO: translate the following. // 'menu.export' => 'Export', @@ -286,7 +286,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'Usuaris', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -515,6 +516,4 @@ "controls.per_lw" => 'La setmana passada', "controls.per_td" => 'Aquest dia', "controls.per_lw" => 'La setmana passada', - -"label.set_empl" => 'Seleccionar usuaris', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 517120558..1a26b81d9 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -59,7 +59,7 @@ 'menu.projects' => 'Projekty', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Uživatelů', 'menu.teams' => 'Týmy', 'menu.export' => 'Export', 'menu.clients' => 'Zákazníci', @@ -165,8 +165,7 @@ 'label.start_date' => 'Počáteční datum', 'label.end_date' => 'Koncové datum', 'label.user' => 'Uživatel', -// TODO: translate the following. -// 'label.users' => 'Users', +'label.users' => 'Uživatelů', 'label.client' => 'Zákazník', 'label.clients' => 'Zákazníci', // TODO: translate the following. @@ -292,7 +291,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'Uživatelů', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -538,5 +538,4 @@ "controls.per_ty" => 'letos', "label.inv_str" => 'faktura', -"label.set_empl" => 'výběr uživatelů', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 049b60409..e5da5b588 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -59,7 +59,7 @@ 'menu.projects' => 'Projektid', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Kasutajad', 'menu.teams' => 'Meeskonnad', // TODO: translate the following. // 'menu.export' => 'Export', @@ -163,8 +163,7 @@ 'label.start_date' => 'Algab kuupäevast', 'label.end_date' => 'Lõpeb kuupäeval', 'label.user' => 'Kasutaja', -// TODO: translate the following. -// 'label.users' => 'Users', +'label.users' => 'Kasutajad', 'label.client' => 'Klient', 'label.clients' => 'Kliendid', // TODO: translate the following. @@ -291,7 +290,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'Kasutajad', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -543,5 +543,4 @@ "controls.per_at" => 'kõik ajad', "label.inv_str" => 'arved', -"label.set_empl" => 'vali kasutajad', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 06e0a16a9..a97a1ba8e 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -57,7 +57,7 @@ 'menu.projects' => 'プロジェクト', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'ユーザー', 'menu.teams' => 'チーム', // TODO: translate the following. // 'menu.export' => 'Export', @@ -288,7 +288,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'ユーザー', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -541,5 +542,4 @@ "controls.per_ty" => '今年', "label.inv_str" => '送り状', -"label.set_empl" => 'ユーザーの選択', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 184c64c55..d4b17f4c3 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -57,7 +57,7 @@ 'menu.projects' => '프로젝트', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => '사용자', 'menu.teams' => '팀', // TODO: translate the following. // 'menu.export' => 'Export', @@ -288,7 +288,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => '사용자', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -540,5 +541,4 @@ "controls.per_ty" => '올해', "label.inv_str" => '송장', -"label.set_empl" => '사용자들을 선택', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index c508e0533..2eeb92b11 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -57,7 +57,7 @@ 'menu.projects' => 'Prosjekter', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Brukere', // 'menu.teams' => 'Teams', 'menu.export' => 'Eksport', 'menu.clients' => 'Klienter', @@ -284,7 +284,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'Brukere', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -544,5 +545,4 @@ // "controls.per_ty" => 'dette årr', "label.inv_str" => 'faktura', -"label.set_empl" => 'velg brukere', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index bf4ce11a8..d3c8cfa92 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -59,7 +59,7 @@ 'menu.projects' => 'Projeler', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => 'Kullanıcılar', 'menu.teams' => 'Ekipler', // TODO: translate the following. // 'menu.export' => 'Export', @@ -171,8 +171,8 @@ 'label.start_date' => 'Başlangıç tarihi', 'label.end_date' => 'Son tarihi', 'label.user' => 'Kullanıcı', +'label.users' => 'Kullanıcılar', // TODO: translate the following. -// 'label.users' => 'Users', // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', @@ -295,7 +295,8 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -// 'title.users' => 'Users', +'title.users' => 'Kullanıcılar', +// TODO: translate the following. // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', @@ -544,6 +545,4 @@ "controls.per_lw" => 'geçen hafta', "controls.per_td" => 'bugün', "controls.per_at" => 'tüm zamanlar', - -"label.set_empl" => 'kullanıcıları seç', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index f2f3d6d66..af264423b 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -526,5 +526,4 @@ "controls.per_ty" => '今年', "label.inv_str" => '发票', -"label.set_empl" => '选择用户', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 4d71642f9..6412738af 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -534,5 +534,4 @@ "controls.per_ty" => '今年', "label.inv_str" => '發票', -"label.set_empl" => '選擇用戶', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3226d3b23..bd67e6714 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3930 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3931 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 37f2b382a91de6d58d5bac1f34f1a28b5c12b9ba Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 16:03:39 +0000 Subject: [PATCH 0472/2515] Some more recycling. --- WEB-INF/resources/cs.lang.php | 10 +++++----- WEB-INF/resources/et.lang.php | 9 ++++----- WEB-INF/resources/hu.lang.php | 11 +++++------ WEB-INF/resources/ja.lang.php | 10 ++++------ WEB-INF/resources/ko.lang.php | 10 ++++------ WEB-INF/resources/no.lang.php | 10 +++++----- WEB-INF/resources/zh-cn.lang.php | 11 +++++------ WEB-INF/resources/zh-tw.lang.php | 11 ++++++----- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 39 insertions(+), 45 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 1a26b81d9..3ef7f1963 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -170,7 +170,7 @@ 'label.clients' => 'Zákazníci', // TODO: translate the following. // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Faktura', 'label.project' => 'Projekt', 'label.projects' => 'Projekty', // TODO: translate the following. @@ -279,7 +279,8 @@ // TODO: translate the following. // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Faktura', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projekty', @@ -300,7 +301,8 @@ 'title.add_client' => 'Přidat zákazníka', 'title.edit_client' => 'Upravit zákazníka', 'title.delete_client' => 'Smazat zákazníka', -// 'title.invoices' => 'Invoices', +'title.invoices' => 'Faktury', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -536,6 +538,4 @@ "controls.per_td" => 'dnes', "controls.per_at" => 'od počátku', "controls.per_ty" => 'letos', - -"label.inv_str" => 'faktura', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e5da5b588..62e107135 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -168,7 +168,7 @@ 'label.clients' => 'Kliendid', // TODO: translate the following. // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Arve', 'label.project' => 'Projekt', 'label.projects' => 'Projektid', // TODO: translate the following. @@ -278,7 +278,8 @@ // TODO: translate the following. // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Arve', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projektid', @@ -299,8 +300,8 @@ 'title.add_client' => 'Lisa klient', 'title.edit_client' => 'Muuda klienti', 'title.delete_client' => 'Kustuta klient', +'title.invoices' => 'Arved', // TODO: translate the following. -// 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -541,6 +542,4 @@ "controls.per_lw" => 'eelmine nädal', "controls.per_td" => 'täna', "controls.per_at" => 'kõik ajad', - -"label.inv_str" => 'arved', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 0915ecb25..cbdbe1a65 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -170,7 +170,7 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Számla', 'label.project' => 'Projekt', 'label.projects' => 'Projektek', // TODO: translate the following. @@ -274,7 +274,8 @@ // TODO: translate the following. // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Számla', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Projektek', @@ -294,7 +295,8 @@ // 'title.add_client' => 'Adding Client', // 'title.edit_client' => 'Editing Client', // 'title.delete_client' => 'Deleting Client', -// 'title.invoices' => 'Invoices', +'title.invoices' => 'Számlák', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -528,7 +530,4 @@ "controls.per_lm" => 'múlt hónapban', "controls.per_tw" => 'ezen a héten', "controls.per_lw" => 'múlt héten', - -// labels -"label.inv_str" => 'számla', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index a97a1ba8e..a684e381b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -167,8 +167,7 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', 'label.option' => 'オプション', -// TODO: translate the following. -// 'label.invoice' => 'Invoice', +'label.invoice' => '送り状', 'label.project' => 'プロジェクト', 'label.projects' => 'プロジェクト', // TODO: translate the following. @@ -276,7 +275,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => '送り状', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'プロジェクト', @@ -297,8 +297,8 @@ 'title.add_client' => 'クライアントの追加', 'title.edit_client' => 'クライアントの編集', 'title.delete_client' => 'クライアントの削除', +'title.invoices' => '送り状', // TODO: translate the following. -// 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -540,6 +540,4 @@ "controls.per_td" => '今日', "controls.per_at" => 'すべての時間', "controls.per_ty" => '今年', - -"label.inv_str" => '送り状', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index d4b17f4c3..995bcc8fb 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -166,8 +166,7 @@ 'label.client' => '클라이언트', 'label.clients' => '클라이언트', 'label.option' => '옵션', -// TODO: translate the following. -// 'label.invoice' => 'Invoice', +'label.invoice' => '송장', 'label.project' => '프로젝트', 'label.projects' => '프로젝트', // TODO: translate the following. @@ -276,7 +275,8 @@ 'title.report' => '보고서', // TODO: translate the following. // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => '송장', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => '프로젝트', @@ -297,8 +297,8 @@ 'title.add_client' => '클라이언트 추가', 'title.edit_client' => '클라이언트 편집', 'title.delete_client' => '클라이언트 삭제', +'title.invoices' => '송장', // TODO: translate the following. -// 'title.invoices' => 'Invoices', // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -539,6 +539,4 @@ "controls.per_td" => '오늘', "controls.per_at" => '전시간', "controls.per_ty" => '올해', - -"label.inv_str" => '송장', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 2eeb92b11..60f0d5ca7 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -168,7 +168,7 @@ // 'label.client' => 'Client', // 'label.clients' => 'Clients', // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => 'Faktura', 'label.project' => 'Prosjekt', 'label.projects' => 'Prosjekter', // TODO: translate the following. @@ -272,7 +272,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => 'Faktura', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => 'Prosjekter', @@ -293,7 +294,8 @@ // 'title.add_client' => 'Adding Client', // 'title.edit_client' => 'Editing Client', // 'title.delete_client' => 'Deleting Client', -// 'title.invoices' => 'Invoices', +'title.invoices' => 'Fakturaer', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -543,6 +545,4 @@ // "controls.per_td" => 'i dag', // "controls.per_at" => 'all tid', // "controls.per_ty" => 'dette årr', - -"label.inv_str" => 'faktura', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index af264423b..773c3a76f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -156,8 +156,7 @@ 'label.client' => '客户', 'label.clients' => '客户', 'label.option' => '选项', -// TODO: translate the following. -// 'label.invoice' => 'Invoice', +'label.invoice' => '发票', 'label.project' => '项目', 'label.projects' => '项目', // TODO: translate the following. @@ -263,7 +262,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => '发票', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => '项目', @@ -284,7 +284,8 @@ 'title.add_client' => '添加客户', 'title.edit_client' => '编辑客户', 'title.delete_client' => '删除客户', -// 'title.invoices' => 'Invoices', +'title.invoices' => '发票', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -524,6 +525,4 @@ "controls.per_td" => '今天', "controls.per_at" => '全部时间', "controls.per_ty" => '今年', - -"label.inv_str" => '发票', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 6412738af..cab9daf1c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -165,7 +165,7 @@ 'label.clients' => '客戶', // TODO: translate the following. // 'label.option' => 'Option', -// 'label.invoice' => 'Invoice', +'label.invoice' => '發票', 'label.project' => '項目', 'label.projects' => '項目', // TODO: translate the following. @@ -271,7 +271,8 @@ // 'title.reports' => 'Reports', // 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', -// 'title.invoice' => 'Invoice', +'title.invoice' => '發票', +// TODO: translate the following. // 'title.send_invoice' => 'Sending Invoice', // 'title.charts' => 'Charts', 'title.projects' => '項目', @@ -292,7 +293,8 @@ 'title.add_client' => '添加客戶', 'title.edit_client' => '編輯客戶', 'title.delete_client' => '刪除客戶', -// 'title.invoices' => 'Invoices', +'title.invoices' => '發票', +// TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', // 'title.view_invoice' => 'Viewing Invoice', // 'title.delete_invoice' => 'Deleting Invoice', @@ -304,6 +306,7 @@ // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', 'title.options' => '選項', +// TODO: translate the following. // 'title.profile' => 'Profile', // 'title.cf_custom_fields' => 'Custom Fields', // 'title.cf_add_custom_field' => 'Adding Custom Field', @@ -532,6 +535,4 @@ "controls.per_td" => '今天', "controls.per_at" => '全部時間', "controls.per_ty" => '今年', - -"label.inv_str" => '發票', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bd67e6714..78ffed42b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3931 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3932 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 4f0f87f88dc93f04a9d1fa777c686c348b0875b0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 16:29:37 +0000 Subject: [PATCH 0473/2515] Recycling of some strings for dropdown options. --- WEB-INF/resources/ca.lang.php | 25 ++++++++++--------------- WEB-INF/resources/cs.lang.php | 33 +++++++++++++-------------------- WEB-INF/resources/es.lang.php | 8 +++----- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 27 insertions(+), 41 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e82c354e8..9bff72cff 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -328,15 +328,16 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_day' => 'avui', +'dropdown.previous_day' => 'ahir', +'dropdown.selected_day' => 'dia', +'dropdown.current_week' => 'aquestat setmana', +'dropdown.previous_week' => 'la setmana passada', +'dropdown.selected_week' => 'setmana', +'dropdown.current_month' => 'aquest mes', +'dropdown.previous_month' => 'el mes passat', +'dropdown.selected_month' => 'mes', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', @@ -510,10 +511,4 @@ "controls.project_bind" => '--- Tots ---', "controls.all" => '--- Tots ---', "controls.notbind" => '--- No ---', -"controls.per_tm" => 'Aquest mes', -"controls.per_lm" => 'El mes passat', -"controls.per_tw" => 'Aquestat setmana', -"controls.per_lw" => 'La setmana passada', -"controls.per_td" => 'Aquest dia', -"controls.per_lw" => 'La setmana passada', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 3ef7f1963..9807d6e18 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -334,19 +334,19 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', -// 'dropdown.current_year' => 'this year', -// 'dropdown.previous_year' => 'previous year', -// 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.current_day' => 'dnes', +'dropdown.previous_day' => 'včera', +'dropdown.selected_day' => 'den', +'dropdown.current_week' => 'tento týden', +'dropdown.previous_week' => 'minulý týden', +'dropdown.selected_week' => 'týden', +'dropdown.current_month' => 'tento měsíc', +'dropdown.previous_month' => 'minulý měsíc', +'dropdown.selected_month' => 'měsíc', +'dropdown.current_year' => 'tento rok', +'dropdown.previous_year' => 'minulý rok', +'dropdown.selected_year' => 'rok', +'dropdown.all_time' => 'od počátku', 'dropdown.projects' => 'projekty', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -531,11 +531,4 @@ "controls.project_bind" => '--- všechny ---', "controls.all" => '--- vše ---', "controls.notbind" => '--- nic ---', -"controls.per_tm" => 'tento měsíc', -"controls.per_lm" => 'minulý měsíc', -"controls.per_tw" => 'tento týden', -"controls.per_lw" => 'minulý týden', -"controls.per_td" => 'dnes', -"controls.per_at" => 'od počátku', -"controls.per_ty" => 'letos', ); diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 2de40587d..c145556f9 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -325,13 +325,11 @@ // Strings that are used in a single form must go to the specific form section. 'dropdown.all' => '--- todos ---', 'dropdown.no' => '--- no ---', -// TODO: translate the following. -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', +'dropdown.current_day' => 'hoy', +'dropdown.previous_day' => 'ayer', 'dropdown.selected_day' => 'dia', 'dropdown.current_week' => 'esta semana', -// TODO: translate the following. -// 'dropdown.previous_week' => 'previous week', +'dropdown.previous_week' => 'la semana pasada', 'dropdown.selected_week' => 'semana', 'dropdown.current_month' => 'este mes', 'dropdown.previous_month' => 'el mes pasado', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 78ffed42b..48ef8295e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3932 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3933 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3ae6d48c13a9e421c7b66bf7440a40da52ae79ff Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 16:52:02 +0000 Subject: [PATCH 0474/2515] More recycling. --- WEB-INF/resources/et.lang.php | 27 +++++++++++---------------- WEB-INF/resources/hu.lang.php | 14 ++++++-------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 62e107135..3b00b9ab1 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -333,19 +333,20 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_day' => 'täna', +'dropdown.previous_day' => 'eile', +'dropdown.selected_day' => 'päev', +'dropdown.current_week' => 'käesolev nädal', +'dropdown.previous_week' => 'eelmine nädal', +'dropdown.selected_week' => 'nädal', +'dropdown.current_month' => 'käesolev kuu', +'dropdown.previous_month' => 'eelmine kuu', +'dropdown.selected_month' => 'kuu', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.all_time' => 'kõik ajad', 'dropdown.projects' => 'projektid', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -536,10 +537,4 @@ "controls.project_bind" => '--- kõik ---', "controls.all" => '--- kõik ---', "controls.notbind" => '--- ei ---', -"controls.per_tm" => 'käesolev kuu', -"controls.per_lm" => 'eelmine kuu', -"controls.per_tw" => 'käesolev nädal', -"controls.per_lw" => 'eelmine nädal', -"controls.per_td" => 'täna', -"controls.per_at" => 'kõik ajad', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index cbdbe1a65..74306dc20 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -331,11 +331,13 @@ // 'dropdown.current_day' => 'today', // 'dropdown.previous_day' => 'yesterday', // 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', +'dropdown.current_week' => 'ezen a héten', +'dropdown.previous_week' => 'múlt héten', +// TODO: translate the following. // 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', +'dropdown.current_month' => 'ebben a hónapban', +'dropdown.previous_month' => 'múlt hónapban', +// TODO: translate the following. // 'dropdown.selected_month' => 'month', // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', @@ -526,8 +528,4 @@ "controls.project_bind" => '--- összes ---', "controls.all" => '--- összes ---', "controls.notbind" => '--- nincs ---', -"controls.per_tm" => 'ebben a hónapban', -"controls.per_lm" => 'múlt hónapban', -"controls.per_tw" => 'ezen a héten', -"controls.per_lw" => 'múlt héten', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 48ef8295e..470fa2766 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3933 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3934 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 50c5a3ad924edd81be8935033276e8c20172c9b1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 17:30:53 +0000 Subject: [PATCH 0475/2515] A bit more refactoring in translations. --- WEB-INF/resources/ca.lang.php | 16 +++++++++++ WEB-INF/resources/cs.lang.php | 16 +++++++++++ WEB-INF/resources/et.lang.php | 16 +++++++++++ WEB-INF/resources/hu.lang.php | 16 +++++++++++ WEB-INF/resources/ja.lang.php | 49 +++++++++++++++++++------------- WEB-INF/resources/ko.lang.php | 16 +++++++++++ WEB-INF/resources/no.lang.php | 16 +++++++++++ WEB-INF/resources/pt.lang.php | 16 +++++++++++ WEB-INF/resources/ro.lang.php | 16 +++++++++++ WEB-INF/resources/tr.lang.php | 16 +++++++++++ WEB-INF/resources/zh-cn.lang.php | 15 ++++++++++ WEB-INF/resources/zh-tw.lang.php | 16 +++++++++++ WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 205 insertions(+), 21 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 9bff72cff..abdca1e83 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -441,6 +441,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9807d6e18..f89f1830c 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -445,6 +445,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 3b00b9ab1..d057135cb 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -446,6 +446,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 74306dc20..c7be583ba 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -440,6 +440,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index a684e381b..e7c78d4d4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -330,19 +330,19 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', -// 'dropdown.current_year' => 'this year', -// 'dropdown.previous_year' => 'previous year', -// 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.current_day' => '今日', +'dropdown.previous_day' => '昨日', +'dropdown.selected_day' => '日', +'dropdown.current_week' => '今週', +'dropdown.previous_week' => '先週', +'dropdown.selected_week' => '週', +'dropdown.current_month' => '今月', +'dropdown.previous_month' => '先月', +'dropdown.selected_month' => '月', +'dropdown.current_year' => '今年', +'dropdown.previous_year' => '昨年', +'dropdown.selected_year' => '年', +'dropdown.all_time' => 'すべての時間', 'dropdown.projects' => 'プロジェクト', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -442,6 +442,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. @@ -533,11 +549,4 @@ "controls.project_bind" => '--- すべて ---', "controls.all" => '--- すべて ---', "controls.notbind" => '--- いいえ ---', -"controls.per_tm" => '今月', -"controls.per_lm" => '先月', -"controls.per_tw" => '今週', -"controls.per_lw" => '先週', -"controls.per_td" => '今日', -"controls.per_at" => 'すべての時間', -"controls.per_ty" => '今年', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 995bcc8fb..fa838b317 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -441,6 +441,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 60f0d5ca7..44704f268 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -436,6 +436,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 4604b0464..36777a55a 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -423,6 +423,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 9fed88cfb..5859f8445 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -439,6 +439,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index d3c8cfa92..720a94e61 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -448,6 +448,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 773c3a76f..7875a2094 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -427,6 +427,21 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index cab9daf1c..dd7e235dd 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -437,6 +437,22 @@ // 'form.tasks.active_tasks' => 'Active Tasks', // 'form.tasks.inactive_tasks' => 'Inactive Tasks', +// Users form. See example at https://timetracker.anuko.com/users.php +// TODO: translate the following. +// 'form.users.active_users' => 'Active Users', +// 'form.users.inactive_users' => 'Inactive Users', +// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +// 'form.users.role' => 'Role', +// 'form.users.manager' => 'Manager', +// 'form.users.comanager' => 'Co-manager', +// 'form.users.rate' => 'Rate', +// 'form.users.default_rate' => 'Default hourly rate', + +// Clients form. See example at https://timetracker.anuko.com/clients.php +// TODO: translate the following. +// 'form.clients.active_clients' => 'Active Clients', +// 'form.clients.inactive_clients' => 'Inactive Clients', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 470fa2766..650900274 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3934 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3935 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From d47d579964586e1edeb197882eca183600e4aaa1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 18:07:42 +0000 Subject: [PATCH 0476/2515] More recycling and refactoring in translations. --- WEB-INF/resources/ca.lang.php | 12 ++++++++++ WEB-INF/resources/cs.lang.php | 12 ++++++++++ WEB-INF/resources/et.lang.php | 12 ++++++++++ WEB-INF/resources/hu.lang.php | 12 ++++++++++ WEB-INF/resources/ja.lang.php | 12 ++++++++++ WEB-INF/resources/ko.lang.php | 41 +++++++++++++++++++------------- WEB-INF/resources/no.lang.php | 12 ++++++++++ WEB-INF/resources/ro.lang.php | 12 ++++++++++ WEB-INF/resources/tr.lang.php | 12 ++++++++++ WEB-INF/resources/zh-cn.lang.php | 13 ++++++++++ WEB-INF/resources/zh-tw.lang.php | 12 ++++++++++ WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 146 insertions(+), 18 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index abdca1e83..105ec95ac 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -457,6 +457,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index f89f1830c..78e34e505 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -461,6 +461,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d057135cb..255861d82 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -462,6 +462,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c7be583ba..1de1c4c55 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -456,6 +456,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index e7c78d4d4..8dc019fd5 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -458,6 +458,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index fa838b317..aea771abd 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -330,19 +330,21 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', +'dropdown.current_day' => '오늘', +// TODO: translate the following. // 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', -// 'dropdown.current_year' => 'this year', +'dropdown.selected_day' => '일', +'dropdown.current_week' => '이번주', +'dropdown.previous_week' => '전번주', +'dropdown.selected_week' => '주', +'dropdown.current_month' => '이번달', +'dropdown.previous_month' => '전번달', +'dropdown.selected_month' => '달', +'dropdown.current_year' => '올해', +// TODO: translate the following. // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.all_time' => '전시간', 'dropdown.projects' => '프로젝트', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -457,6 +459,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. @@ -548,11 +562,4 @@ "controls.project_bind" => '--- 전부 ---', "controls.all" => '--- 전부 ---', "controls.notbind" => '--- 아니 ---', -"controls.per_tm" => '이번달', -"controls.per_lm" => '전번달', -"controls.per_tw" => '이번주', -"controls.per_lw" => '전번주', -"controls.per_td" => '오늘', -"controls.per_at" => '전시간', -"controls.per_ty" => '올해', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 44704f268..b442aeaa4 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -452,6 +452,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 5859f8445..69dea60d7 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -455,6 +455,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 720a94e61..e6b439574 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -464,6 +464,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7875a2094..e49203e02 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -443,6 +443,19 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index dd7e235dd..71dcf324e 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -453,6 +453,18 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 650900274..0c87026b1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3935 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3936 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 2e4a702342faa75f359894297629610a8ad38192 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 18:24:02 +0000 Subject: [PATCH 0477/2515] Some more recycling and refactoring. --- WEB-INF/resources/ca.lang.php | 10 ++++++++ WEB-INF/resources/cs.lang.php | 10 ++++++++ WEB-INF/resources/et.lang.php | 10 ++++++++ WEB-INF/resources/hu.lang.php | 10 ++++++++ WEB-INF/resources/ja.lang.php | 10 ++++++++ WEB-INF/resources/ko.lang.php | 10 ++++++++ WEB-INF/resources/no.lang.php | 39 ++++++++++++++++---------------- WEB-INF/resources/pt.lang.php | 22 ++++++++++++++++++ WEB-INF/resources/ro.lang.php | 10 ++++++++ WEB-INF/resources/tr.lang.php | 10 ++++++++ WEB-INF/resources/zh-cn.lang.php | 10 ++++++++ WEB-INF/resources/zh-tw.lang.php | 10 ++++++++ WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 143 insertions(+), 20 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 105ec95ac..404ee616a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -469,6 +469,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 78e34e505..0f298e8f6 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -473,6 +473,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 255861d82..417d01a93 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -474,6 +474,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1de1c4c55..2574223bc 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -468,6 +468,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8dc019fd5..0fbb5889f 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -470,6 +470,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index aea771abd..563eb383e 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -471,6 +471,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b442aeaa4..29854b775 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -327,15 +327,16 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_day' => 'i dag', +'dropdown.previous_day' => 'i går', +'dropdown.selected_day' => 'dag', +'dropdown.current_week' => 'denne uken', +'dropdown.previous_week' => 'forrige uke', +'dropdown.selected_week' => 'uke', +'dropdown.current_month' => 'denne måneden', +'dropdown.previous_month' => 'forrige måned', +'dropdown.selected_month' => 'måned', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', @@ -464,6 +465,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. @@ -563,14 +574,4 @@ "controls.project_bind" => '--- alle ---', "controls.all" => '--- alle ---', -// Note to translators: the strings below are missing and must be translated and added -// "controls.notbind" => '--- no ---', -"controls.per_tm" => 'denne måneden', -"controls.per_lm" => 'forrige måned', -"controls.per_tw" => 'denne uken', -"controls.per_lw" => 'forrige uke', -// Note to translators: the strings below are missing and must be translated and added -// "controls.per_td" => 'i dag', -// "controls.per_at" => 'all tid', -// "controls.per_ty" => 'dette årr', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 36777a55a..0dc4ac6b3 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -439,6 +439,28 @@ // 'form.clients.active_clients' => 'Active Clients', // 'form.clients.inactive_clients' => 'Inactive Clients', +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// TODO: translate the following. +// 'form.client.client_to_delete' => 'Client to delete', +// 'form.client.client_entries' => 'Client entries', + +// Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: translate the following. +// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +// 'form.export.compression' => 'Compression', +// 'form.export.compression_none' => 'none', +// 'form.export.compression_bzip' => 'bzip', + +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 69dea60d7..ba4760b0d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -467,6 +467,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e6b439574..1891dcb34 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -476,6 +476,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index e49203e02..d419097fd 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -455,6 +455,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 71dcf324e..8d21eb2e0 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -465,6 +465,16 @@ // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', +// Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). +// TODO: translate the following. +// 'form.import.hint' => 'Import team data from an xml file.', +// 'form.import.file' => 'Select file', +// 'form.import.success' => 'Import completed successfully.', + +// Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). +// TODO: translate the following. +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0c87026b1..fb74544d9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3936 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3937 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e519afce092be6ee6d08516ca5d6b5e31de88006 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 18:45:48 +0000 Subject: [PATCH 0478/2515] More recycling in Chinese files. --- WEB-INF/resources/zh-cn.lang.php | 30 ++++++++++++------------------ WEB-INF/resources/zh-tw.lang.php | 32 +++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 26 insertions(+), 38 deletions(-) diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index d419097fd..43074f6f7 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -317,19 +317,20 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', -// 'dropdown.current_year' => 'this year', +'dropdown.current_day' => '今天', +'dropdown.previous_day' => '昨天', +'dropdown.selected_day' => '天', +'dropdown.current_week' => '本周', +'dropdown.previous_week' => '上周', +'dropdown.selected_week' => '周', +'dropdown.current_month' => '本月', +'dropdown.previous_month' => '上个月', // TODO: is this correct? Not 上月? +'dropdown.selected_month' => '月', +'dropdown.current_year' => '今年', +// TODO: translate the following. // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.all_time' => '全部时间', 'dropdown.projects' => '项目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -556,11 +557,4 @@ "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', "controls.notbind" => '--- 无 ---', -"controls.per_tm" => '本月', -"controls.per_lm" => '上个月', -"controls.per_tw" => '本周', -"controls.per_lw" => '上周', -"controls.per_td" => '今天', -"controls.per_at" => '全部时间', -"controls.per_ty" => '今年', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 8d21eb2e0..0cf020d72 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -326,19 +326,20 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', -// 'dropdown.current_year' => 'this year', +'dropdown.current_day' => '今天', +'dropdown.previous_day' => '昨天', +'dropdown.selected_day' => '天', +'dropdown.current_week' => '本周', +'dropdown.previous_week' => '上周', +'dropdown.selected_week' => '周', +'dropdown.current_month' => '本月', +'dropdown.previous_month' => '上個月', // TODO: is this corrtect? Not 上月? +'dropdown.selected_month' => '月', +'dropdown.current_year' => '今年', +// TODO: translate the following. // 'dropdown.previous_year' => 'previous year', -// 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.selected_year' => '年', +'dropdown.all_time' => '全部時間', 'dropdown.projects' => '項目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -566,11 +567,4 @@ "controls.project_bind" => '--- 全部 ---', "controls.all" => '--- 全部 ---', "controls.notbind" => '--- 無 ---', -"controls.per_tm" => '本月', -"controls.per_lm" => '上個月', -"controls.per_tw" => '本周', -"controls.per_lw" => '上周', -"controls.per_td" => '今天', -"controls.per_at" => '全部時間', -"controls.per_ty" => '今年', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fb74544d9..1009cc7f5 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3937 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3938 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a481d1e82262ba83e3598a743e53b7b95695d989 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 18:56:37 +0000 Subject: [PATCH 0479/2515] Some more recycling in translation files. --- WEB-INF/resources/pt.lang.php | 21 +++++++-------------- WEB-INF/resources/ro.lang.php | 17 +++++++---------- WEB-INF/resources/tr.lang.php | 27 +++++++++++---------------- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 0dc4ac6b3..c3a309295 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -319,12 +319,13 @@ // 'dropdown.current_day' => 'today', // 'dropdown.previous_day' => 'yesterday', // 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_week' => 'esta semana', +'dropdown.previous_week' => 'última semana', +'dropdown.selected_week' => 'semana', +'dropdown.current_month' => 'este mês', +'dropdown.previous_month' => 'último mês', +'dropdown.selected_month' => 'mês', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', @@ -487,12 +488,4 @@ "form.mail.from" => 'de', "form.mail.to" => 'para', "form.mail.above" => 'enviar este relatório por e-mail', -// Note to translators: the strings below must be translated -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -// "form.mail.sending_str" => 'the message has been sent', - -"controls.per_tm" => 'este mês', -"controls.per_lm" => 'último mês', -"controls.per_tw" => 'esta semana', -"controls.per_lw" => 'última semana', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index ba4760b0d..f59fa1508 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -332,12 +332,13 @@ // 'dropdown.current_day' => 'today', // 'dropdown.previous_day' => 'yesterday', // 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_week' => 'saptamana curenta', +'dropdown.previous_week' => 'saptamana trecuta', +'dropdown.selected_week' => 'saptamana', +'dropdown.current_month' => 'luna curenta', +'dropdown.previous_month' => 'luna trecuta', +'dropdown.selected_month' => 'luna', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', @@ -570,8 +571,4 @@ "controls.project_bind" => '--- toate ---', "controls.all" => '--- toate ---', "controls.notbind" => '--- nu ---', -"controls.per_tm" => 'luna curenta', -"controls.per_lm" => 'luna trecuta', -"controls.per_tw" => 'saptamana curenta', -"controls.per_lw" => 'saptamana trecuta', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 1891dcb34..e77a7c38c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -337,19 +337,20 @@ // TODO: translate the following. // 'dropdown.all' => '--- all ---', // 'dropdown.no' => '--- no ---', -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', -// 'dropdown.selected_day' => 'day', -// 'dropdown.current_week' => 'this week', -// 'dropdown.previous_week' => 'previous week', -// 'dropdown.selected_week' => 'week', -// 'dropdown.current_month' => 'this month', -// 'dropdown.previous_month' => 'previous month', -// 'dropdown.selected_month' => 'month', +'dropdown.current_day' => 'bugün', +'dropdown.previous_day' => 'dün', +'dropdown.selected_day' => 'gün', +'dropdown.current_week' => 'bu hafta', +'dropdown.previous_week' => 'geçen hafta', +'dropdown.selected_week' => 'hafta', +'dropdown.current_month' => 'bu ay', +'dropdown.previous_month' => 'geçen ay', +'dropdown.selected_month' => 'ay', +// TODO: translate the following. // 'dropdown.current_year' => 'this year', // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', -// 'dropdown.all_time' => 'all time', +'dropdown.all_time' => 'tüm zamanlar', 'dropdown.projects' => 'projeler', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', @@ -577,10 +578,4 @@ "controls.project_bind" => '--- tümü ---', "controls.all" => '--- tümü ---', "controls.notbind" => '--- hiç ---', -"controls.per_tm" => 'bu ay', -"controls.per_lm" => 'geçen ay', -"controls.per_tw" => 'bu hafta', -"controls.per_lw" => 'geçen hafta', -"controls.per_td" => 'bugün', -"controls.per_at" => 'tüm zamanlar', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1009cc7f5..27f12f9c4 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3938 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3939 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0d45a1d1514321c2a78b3f10ae5896d2ea1acdea Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 19:07:57 +0000 Subject: [PATCH 0480/2515] Some more recycling. --- WEB-INF/resources/ca.lang.php | 9 ++------- WEB-INF/resources/cs.lang.php | 9 ++------- WEB-INF/resources/et.lang.php | 9 ++------- WEB-INF/resources/hu.lang.php | 8 ++------ WEB-INF/resources/ja.lang.php | 9 ++------- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 11 insertions(+), 35 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 404ee616a..2bc1a0680 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -325,9 +325,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- tots ---', +'dropdown.no' => '--- no ---', 'dropdown.current_day' => 'avui', 'dropdown.previous_day' => 'ahir', 'dropdown.selected_day' => 'dia', @@ -545,8 +544,4 @@ // miscellaneous strings "forward.tocsvfile" => 'Exportar dades a un arxiu .csv', - -"controls.project_bind" => '--- Tots ---', -"controls.all" => '--- Tots ---', -"controls.notbind" => '--- No ---', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 0f298e8f6..9c14ba59b 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -331,9 +331,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- vše ---', +'dropdown.no' => '--- nic ---', 'dropdown.current_day' => 'dnes', 'dropdown.previous_day' => 'včera', 'dropdown.selected_day' => 'den', @@ -565,8 +564,4 @@ "forward.tocsvfile" => 'exportovat data do .csv souboru', "forward.toxmlfile" => 'exportovat data do .xml souboru', "forward.geninvoice" => 'vytvořit fakturu', - -"controls.project_bind" => '--- všechny ---', -"controls.all" => '--- vše ---', -"controls.notbind" => '--- nic ---', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 417d01a93..984d96b31 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -330,9 +330,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- kõik ---', +'dropdown.no' => '--- ei ---', 'dropdown.current_day' => 'täna', 'dropdown.previous_day' => 'eile', 'dropdown.selected_day' => 'päev', @@ -571,8 +570,4 @@ "forward.tocsvfile" => 'ekspordi andmed .csv faili', "forward.toxmlfile" => 'ekspordi andmed .xml faili', "forward.geninvoice" => 'loo arve', - -"controls.project_bind" => '--- kõik ---', -"controls.all" => '--- kõik ---', -"controls.notbind" => '--- ei ---', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 2574223bc..4d9c994eb 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -325,9 +325,9 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. +'dropdown.all' => '--- összes ---', +'dropdown.no' => '--- nincs ---', // TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', // 'dropdown.current_day' => 'today', // 'dropdown.previous_day' => 'yesterday', // 'dropdown.selected_day' => 'day', @@ -562,8 +562,4 @@ // miscellaneous strings "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', "forward.geninvoice" => 'számla készítés', - -"controls.project_bind" => '--- összes ---', -"controls.all" => '--- összes ---', -"controls.notbind" => '--- nincs ---', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 0fbb5889f..9639096c4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -327,9 +327,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- すべて ---', +'dropdown.no' => '--- いいえ ---', 'dropdown.current_day' => '今日', 'dropdown.previous_day' => '昨日', 'dropdown.selected_day' => '日', @@ -567,8 +566,4 @@ "forward.tocsvfile" => 'csvファイルにエクスポート', "forward.toxmlfile" => 'xmlファイルにエクスポート', "forward.geninvoice" => '送り状の作成', - -"controls.project_bind" => '--- すべて ---', -"controls.all" => '--- すべて ---', -"controls.notbind" => '--- いいえ ---', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 27f12f9c4..e45bbbad2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3939 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3940 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 2c3dea632b53be22bfa6c379df07fc99cb58d045 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 19:15:00 +0000 Subject: [PATCH 0481/2515] Some more recycling. --- WEB-INF/resources/ko.lang.php | 9 ++------- WEB-INF/resources/ro.lang.php | 8 ++------ WEB-INF/resources/tr.lang.php | 9 ++------- WEB-INF/resources/zh-cn.lang.php | 9 ++------- WEB-INF/resources/zh-tw.lang.php | 9 ++------- WEB-INF/templates/footer.tpl | 2 +- 6 files changed, 11 insertions(+), 35 deletions(-) diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 563eb383e..4ee461510 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -327,9 +327,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- 전부 ---', +'dropdown.no' => '--- 아니 ---', 'dropdown.current_day' => '오늘', // TODO: translate the following. // 'dropdown.previous_day' => 'yesterday', @@ -568,8 +567,4 @@ "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', "forward.geninvoice" => '송장 만들기', - -"controls.project_bind" => '--- 전부 ---', -"controls.all" => '--- 전부 ---', -"controls.notbind" => '--- 아니 ---', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f59fa1508..082e47fd7 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -326,9 +326,9 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. +'dropdown.all' => '--- toate ---', +'dropdown.no' => '--- nu ---', // TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', // 'dropdown.current_day' => 'today', // 'dropdown.previous_day' => 'yesterday', // 'dropdown.selected_day' => 'day', @@ -567,8 +567,4 @@ // miscellaneous strings "forward.tocsvfile" => 'exporta date in fisier .csv', "forward.geninvoice" => 'genereaza factura', - -"controls.project_bind" => '--- toate ---', -"controls.all" => '--- toate ---', -"controls.notbind" => '--- nu ---', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e77a7c38c..ea0e8d22a 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -334,9 +334,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- tümü ---', +'dropdown.no' => '--- hiç ---', 'dropdown.current_day' => 'bugün', 'dropdown.previous_day' => 'dün', 'dropdown.selected_day' => 'gün', @@ -574,8 +573,4 @@ "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', "forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', "forward.geninvoice" => 'fatura yarat', - -"controls.project_bind" => '--- tümü ---', -"controls.all" => '--- tümü ---', -"controls.notbind" => '--- hiç ---', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 43074f6f7..7da70ae75 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -314,9 +314,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- 全部 ---', +'dropdown.no' => '--- 无 ---', 'dropdown.current_day' => '今天', 'dropdown.previous_day' => '昨天', 'dropdown.selected_day' => '天', @@ -553,8 +552,4 @@ "forward.tocsvfile" => '将数据导出到.csv文件', "forward.toxmlfile" => '将数据导出到.xml文件', "forward.geninvoice" => '生成发票', - -"controls.project_bind" => '--- 全部 ---', -"controls.all" => '--- 全部 ---', -"controls.notbind" => '--- 无 ---', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0cf020d72..77dd40abf 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -323,9 +323,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- 全部 ---', +'dropdown.no' => '--- 無 ---', 'dropdown.current_day' => '今天', 'dropdown.previous_day' => '昨天', 'dropdown.selected_day' => '天', @@ -563,8 +562,4 @@ "forward.tocsvfile" => '將資料輸出到.csv文件', "forward.toxmlfile" => '將資料輸出到.xml文件', "forward.geninvoice" => '生成發票', - -"controls.project_bind" => '--- 全部 ---', -"controls.all" => '--- 全部 ---', -"controls.notbind" => '--- 無 ---', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e45bbbad2..f010499be 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3940 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3941 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From f7e902f80b1a95734b193374402164186d181bb3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 19:47:49 +0000 Subject: [PATCH 0482/2515] Some minor recycling in translations. --- WEB-INF/resources/ca.lang.php | 6 +----- WEB-INF/resources/cs.lang.php | 7 +++---- WEB-INF/resources/zh-tw.lang.php | 5 +---- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 2bc1a0680..5f1f8586b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -475,16 +475,12 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker (no està permès col·lisions de login).', // TODO: refactoring ongoing down from here. -// form.admin.duty_text is now used in form.teams.hint with email changed to login. -"form.teams.hint" => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker. (No està permès col·lisions de e-mail).', - // my time form attributes "form.mytime.title" => 'El meu temps', "form.mytime.edit_title" => 'Modificant l\\\'historial de temps', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9c14ba59b..2d9ca69ce 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -479,15 +479,14 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// TODO: translate the following. This part is not translated accurately from English: +// "Vytvořit nový tým prostřednictvím účtu týmového manažera." Improve and check the entire string for accuracy. +'form.teams.hint' => 'Vytvořit nový tým prostřednictvím účtu týmového manažera.
Můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody login).', // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.duty_text" => 'vytvořit nový tým prostřednictvím účtu týmového manažera.
můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody e-mailových adres!).', "form.admin.profile.title" => 'týmy', "form.admin.profile.noprofiles" => 'vaše databáze je prázdná. přihlašte se jako admin a vytvořte nový tým.', "form.admin.profile.comment" => 'smazat tým', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 77dd40abf..7cf4ea394 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -473,15 +473,12 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.duty_text" => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', - "form.admin.profile.title" => '團隊', "form.admin.profile.noprofiles" => '您的資料庫沒有任何記錄。請以管理員身份登錄並創建一個新團隊。', "form.admin.profile.comment" => '刪除團隊', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f010499be..6f0e29a1b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3941 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3942 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From fb81a964bfe18a4e6c63e4ed4afdc80bf34d187a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 20:25:31 +0000 Subject: [PATCH 0483/2515] More recycling in old translations. --- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 6 ++---- WEB-INF/resources/ja.lang.php | 5 +---- WEB-INF/resources/ko.lang.php | 5 +---- WEB-INF/resources/no.lang.php | 6 +----- WEB-INF/resources/ro.lang.php | 6 ++---- WEB-INF/resources/tr.lang.php | 6 ++---- WEB-INF/resources/zh-cn.lang.php | 5 +---- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 11 insertions(+), 33 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 984d96b31..74c69afc9 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -488,9 +488,6 @@ // TODO: refactoring ongoing down from here. // administrator form -// Note to translators: the string below must be translated -// "form.admin.duty_text" => 'create a new meeskond by creating a new meeskond manager account.
you can also import meeskond data from an xml file from another Anuko time tracker server (no e-mail collisions are allowed).', - "form.admin.profile.title" => 'meeskonnad', "form.admin.profile.noprofiles" => 'sinu andmebaas on tühi. logi adminina sisse ja loo uus meeskond.', "form.admin.profile.comment" => 'kustuta meeskond', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 4d9c994eb..a885f2ac7 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -475,16 +475,14 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// TODO: fix form.teams.hint by translating it properly from the English string. Note that the ending is not translated at all. +'form.teams.hint' => 'Új csoport létrehozása egy csoport-vezetői jogosultsággal.
A csoport adatokat importálhatjuk XML-ből (no login collisions are allowed).', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => 'új csoport létrehozása egy csoport-vezetői jogosultsággal.
a csoport adatokat importálhatjuk XML-ből (csak az e-mail címek ne ütközzenek).', - "form.admin.profile.title" => 'csoportok', "form.admin.profile.noprofiles" => 'az adatbázis üres. lépj be adminisztrátorként és hozz létre egyet.', "form.admin.profile.comment" => 'csoport törlése', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 9639096c4..25f7579b7 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -476,16 +476,13 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', - "form.admin.profile.title" => 'チーム', "form.admin.profile.noprofiles" => 'あなたのデータベースは空いています。管理者にログインして新規チームを作成してください。', "form.admin.profile.comment" => 'チームの削除', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 4ee461510..aa202f85b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -477,16 +477,13 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', - "form.admin.profile.title" => '팀', "form.admin.profile.noprofiles" => '당신의 데이터베이스는 비어있습니다. 관리자로 로그인하여 새로운 팀을 생성하십시오.', "form.admin.profile.comment" => '팀 삭제', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 29854b775..86ee83839 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -472,16 +472,12 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => 'Opprett et nytt team ved å opprette en ny team manager konto.
Du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', // TODO: refactoring ongoing down from here. -// Note to translators: the strings below must be translated -// "form.admin.duty_text" => 'opprett et nytt team ved å opprette en ny team manager konto.
du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', - // "form.admin.profile.title" => 'team', // "form.admin.profile.noprofiles" => 'databasen din er tom. logg inn som admin og opprett et nytt team.', // "form.admin.profile.comment" => 'slett team', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 082e47fd7..6f69f9b4c 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -475,16 +475,14 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// TODO: check form.teams.hint for accuracy. +'form.teams.hint' => 'Adauga o noua echipa prin adaugarea unui nou cont de tip manager.
Deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru login).', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => 'adauga o noua echipa prin adaugarea unui nou cont de tip manager.
deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru emailuri).', - "form.admin.profile.title" => 'echipe', "form.admin.profile.noprofiles" => 'baza de date este goala. intra ca admin si adauga o noua echipa.', "form.admin.profile.comment" => 'sterge echipa', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index ea0e8d22a..4eddcc736 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -483,16 +483,14 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// TODO: check form.teams.hint for accuracy. I did not not how to translate "login", so this may be garbage now. +'form.teams.hint' => 'Yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
Ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (login çakışmalarına izin verilmemekte).', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => 'yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (e-posta çakışmalarına izin verilmemekte).', - "form.admin.profile.title" => 'ekipler', "form.admin.profile.noprofiles" => 'veritabanınız boş. yeni bir ekip yaratmak için yönetici olarak giriş yapın.', "form.admin.profile.comment" => 'ekibi sil', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7da70ae75..83668fe68 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -462,16 +462,13 @@ // 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', // TODO: refactoring ongoing down from here. // administrator form -"form.admin.duty_text" => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', - "form.admin.profile.title" => '团队', "form.admin.profile.noprofiles" => '您的数据库没有任何记录。请以管理员身份登录并创建一个新团队。', "form.admin.profile.comment" => '删除团队', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 6f0e29a1b..e23485f5a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3942 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3943 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 33610845422adbcde3888bfd385e94bf8e612666 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Feb 2018 22:20:02 +0000 Subject: [PATCH 0484/2515] Some more recycling in translation files. --- WEB-INF/resources/cs.lang.php | 7 +------ WEB-INF/resources/et.lang.php | 9 +++------ WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/ja.lang.php | 7 +------ WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/no.lang.php | 9 ++------- WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 5 ----- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 8 insertions(+), 36 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2d9ca69ce..578da0170 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -416,8 +416,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Exportovat', // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -558,9 +558,4 @@ // "form.migration.compression.none" => 'none', "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', - -// miscellaneous strings -"forward.tocsvfile" => 'exportovat data do .csv souboru', -"forward.toxmlfile" => 'exportovat data do .xml souboru', -"forward.geninvoice" => 'vytvořit fakturu', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 74c69afc9..55cc12372 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -417,8 +417,10 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Eksportimine', // TODO: is this correct? We want a verb as in "Export XML" - see report export options. + // The current combined English string is "Export PDF, XML or CSV". + // Meaning: user can have a displayed report in these formats. // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -562,9 +564,4 @@ // "form.migration.compression.none" => 'none', "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', - -// miscellaneous strings -"forward.tocsvfile" => 'ekspordi andmed .csv faili', -"forward.toxmlfile" => 'ekspordi andmed .xml faili', -"forward.geninvoice" => 'loo arve', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a885f2ac7..0ce4c46d9 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -559,5 +559,4 @@ // miscellaneous strings "forward.tocsvfile" => 'az adatok exportálása CSV file-ba', -"forward.geninvoice" => 'számla készítés', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 25f7579b7..738cef4a4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -413,8 +413,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => '輸出する', // TODO: is this correct? // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -558,9 +558,4 @@ "form.migration.compression.none" => 'なし', "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', - -// miscellaneous strings -"forward.tocsvfile" => 'csvファイルにエクスポート', -"forward.toxmlfile" => 'xmlファイルにエクスポート', -"forward.geninvoice" => '送り状の作成', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index aa202f85b..b1fed8f43 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -563,5 +563,4 @@ // miscellaneous strings "forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', "forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', -"forward.geninvoice" => '송장 만들기', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 86ee83839..a6ea867ea 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -324,9 +324,8 @@ // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. -// TODO: translate the following. -// 'dropdown.all' => '--- all ---', -// 'dropdown.no' => '--- no ---', +'dropdown.all' => '--- alle ---', +'dropdown.no' => '--- nei ---', 'dropdown.current_day' => 'i dag', 'dropdown.previous_day' => 'i går', 'dropdown.selected_day' => 'dag', @@ -566,8 +565,4 @@ "forward.tocsvfile" => 'eksporter data til en .csv fil', // Note to translators: the strings below are missing and must be translated and added // "forward.toxmlfile" => 'eksporter data til en .xml fil', -// "forward.geninvoice" => 'lag faktura', - -"controls.project_bind" => '--- alle ---', -"controls.all" => '--- alle ---', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 6f69f9b4c..f47d1b558 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -564,5 +564,4 @@ // miscellaneous strings "forward.tocsvfile" => 'exporta date in fisier .csv', -"forward.geninvoice" => 'genereaza factura', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 4eddcc736..8ea3464b3 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -570,5 +570,4 @@ // miscellaneous strings "forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', "forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', -"forward.geninvoice" => 'fatura yarat', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 83668fe68..0f9b8586e 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -548,5 +548,4 @@ // miscellaneous strings "forward.tocsvfile" => '将数据导出到.csv文件', "forward.toxmlfile" => '将数据导出到.xml文件', -"forward.geninvoice" => '生成发票', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 7cf4ea394..bdf96e843 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -554,9 +554,4 @@ "form.migration.compression.none" => '不压缩', "form.migration.compression.gzip" => 'gzip格式', "form.migration.compression.bzip" => 'bzip格式', - -// miscellaneous strings -"forward.tocsvfile" => '將資料輸出到.csv文件', -"forward.toxmlfile" => '將資料輸出到.xml文件', -"forward.geninvoice" => '生成發票', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e23485f5a..845fb8100 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3943 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3944 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b454bd09414545118fff25fc67b8140edec0411c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 01:19:36 +0000 Subject: [PATCH 0485/2515] Recycled some more translations, hopefully correctly. --- WEB-INF/resources/ca.lang.php | 5 +---- WEB-INF/resources/hu.lang.php | 27 ++++++++++----------------- WEB-INF/resources/ko.lang.php | 6 +----- WEB-INF/resources/no.lang.php | 30 ++++++++++-------------------- WEB-INF/resources/ro.lang.php | 30 +++++++++++++----------------- WEB-INF/resources/tr.lang.php | 25 +++++++++++-------------- WEB-INF/resources/zh-cn.lang.php | 4 ---- WEB-INF/templates/footer.tpl | 2 +- 8 files changed, 47 insertions(+), 82 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 5f1f8586b..02b92aeb6 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -412,8 +412,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Exportar', // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -537,7 +537,4 @@ "form.migration.export.title" => 'Exportar dades', "form.migration.export.success" => 'Exportació finalitzada amb èxit', "form.migration.export.text" => 'Vosté pot exportar totes les dades del grup dins d\\\'un archivo xml. Això pot ser útil si necessita migrar dades al seu propi servidor.', - -// miscellaneous strings -"forward.tocsvfile" => 'Exportar dades a un arxiu .csv', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 0ce4c46d9..1dc7fe505 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -167,9 +167,9 @@ // TODO: translate the following. // 'label.user' => 'User', // 'label.users' => 'Users', -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', -// 'label.option' => 'Option', +'label.client' => 'Ügyfél', +'label.clients' => 'Ügyfelek', +'label.option' => 'Opció', 'label.invoice' => 'Számla', 'label.project' => 'Projekt', 'label.projects' => 'Projektek', @@ -291,10 +291,10 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Ügyfelek', +'title.add_client' => 'Ügyfél hozzáadása', +'title.edit_client' => 'Ügyfél szerkesztése', +'title.delete_client' => 'Ügyfél törlése', 'title.invoices' => 'Számlák', // TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', @@ -346,7 +346,8 @@ 'dropdown.projects' => 'projektek', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'ügyfelek', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -412,8 +413,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Exportálása', // TODO: is this correct? // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -551,12 +552,4 @@ "form.migration.export.title" => 'az adatok exportálása', "form.migration.export.success" => 'az exportálás sikeres volt', "form.migration.export.text" => 'kimentheted az összes felvitt csoport adatait egy XML file-ba, ami megkönnyíti a TimeTracker szerverek közötti adatátvitelt...', - -"form.client.title"=> 'ügyfelek', -"form.client.add_title" => 'új ügyfél hozzáadása', -"form.client.edit_title" => 'ügyfél adatainak szerkesztése', -"form.client.del_title" => 'ügyfél törlése', - -// miscellaneous strings -"forward.tocsvfile" => 'az adatok exportálása CSV file-ba', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index b1fed8f43..3113c837d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -414,8 +414,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => '익스포트', // TODO: is this correct? // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -559,8 +559,4 @@ "form.migration.compression.none" => '없음', "form.migration.compression.gzip" => 'gzip', "form.migration.compression.bzip" => 'bzip', - -// miscellaneous strings -"forward.tocsvfile" => '데이터를 .csv 파일로 익스포트', -"forward.toxmlfile" => '데이터를 .xml 파일로 익스포트', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index a6ea867ea..786e149b4 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -164,10 +164,9 @@ // 'label.end_date' => 'End date', 'label.user' => 'Bruker', 'label.users' => 'Brukere', -// TODO: translate the following. -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', -// 'label.option' => 'Option', +'label.client' => 'Klient', +'label.clients' => 'Klienter', +'label.option' => 'Opsjon', // TODO: is this correct? 'label.invoice' => 'Faktura', 'label.project' => 'Prosjekt', 'label.projects' => 'Prosjekter', @@ -290,10 +289,10 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Klienter', +'title.add_client' => 'Legg til klient', +'title.edit_client' => 'Endre klient', +'title.delete_client' => 'Slett klient', 'title.invoices' => 'Fakturaer', // TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', @@ -343,7 +342,8 @@ 'dropdown.projects' => 'prosjekter', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'klienter', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -408,8 +408,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Eksporter', // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -555,14 +555,4 @@ // "form.migration.compression.none" => 'ingen', // "form.migration.compression.gzip" => 'gzip', // "form.migration.compression.bzip" => 'bzip', - -// "form.client.title" => 'klienter', -// "form.client.add_title" => 'legg til klient', -// "form.client.edit_title" => 'endre klient', -// "form.client.del_title" => 'slett klient', - -// miscellaneous strings -"forward.tocsvfile" => 'eksporter data til en .csv fil', -// Note to translators: the strings below are missing and must be translated and added -// "forward.toxmlfile" => 'eksporter data til en .xml fil', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f47d1b558..b4ebf752f 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -168,9 +168,9 @@ 'label.end_date' => 'Data sfarsit', 'label.user' => 'Utilizator', 'label.users' => 'Utilizatori', +'label.client' => 'Client', +'label.clients' => 'Clienti', // TODO: translate the following. -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', // 'label.option' => 'Option', 'label.invoice' => 'Factura', 'label.project' => 'Proiect', @@ -253,6 +253,9 @@ // 'label.week_list' => 'Week list', // Form titles. +// TODO: Improve titles for consistency, so that each title explains correctly what each +// page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. +// Compare with English file to see how it is done there and do Romanian titles similarly. 'title.login' => 'Autentificare', // TODO: translate the following. // 'title.teams' => 'Teams', @@ -292,10 +295,10 @@ 'title.add_user' => 'Adaugare utilizator', // TODO: is this correct? 'title.edit_user' => 'Editare utilizator', // TODO: is this correct? 'title.delete_user' => 'Stergere utilizator', // TODO: is this correct? -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Clienti', +'title.add_client' => 'Adaugare client', // TODO: is this correct? +'title.edit_client' => 'Editare client', // TODO: is this correct? +'title.delete_client' => 'Stergere client', // TODO: is this correct? 'title.invoices' => 'Facturi', // TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', @@ -344,9 +347,10 @@ // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', 'dropdown.projects' => 'proiecte', -// TODO: translate the following. +// TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'clienti', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', 'dropdown.status_active' => 'activ', @@ -412,8 +416,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). +'form.report.export' => 'Exporta', // TODO: translate the following. -// 'form.report.export' => 'Export', // 'form.report.assign_to_invoice' => 'Assign to invoice', // Invoice form. See example at https://timetracker.anuko.com/invoice.php @@ -556,12 +560,4 @@ // "form.migration.compression.none" => 'none', // "form.migration.compression.gzip" => 'gzip', // "form.migration.compression.bzip" => 'bzip', - -"form.client.title" => 'clienti', -"form.client.add_title" => 'adauga client', -"form.client.edit_title" => 'editeaza client', -"form.client.del_title" => 'sterge client', - -// miscellaneous strings -"forward.tocsvfile" => 'exporta date in fisier .csv', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 8ea3464b3..e90ce38eb 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -260,6 +260,11 @@ // 'label.week_list' => 'Week list', // Form titles. +// Form titles. +// TODO: Improve titles for consistency, so that each title explains correctly what each +// page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. +// Compare with English file to see how it is done there and do Romanian titles similarly. +// Specifically: compare project and client titles and see how they differ. 'title.login' => 'Giriş', // TODO: translate the following. // 'title.teams' => 'Teams', @@ -300,10 +305,10 @@ // 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', // 'title.delete_user' => 'Deleting User', -// 'title.clients' => 'Clients', -// 'title.add_client' => 'Adding Client', -// 'title.edit_client' => 'Editing Client', -// 'title.delete_client' => 'Deleting Client', +'title.clients' => 'Müşteriler', +'title.add_client' => 'Müşteri ekle', +'title.edit_client' => 'Müşteriyi düzenle', +'title.delete_client' => 'Müşteriyi sil', 'title.invoices' => 'Faturalar', // TODO: translate the following. // 'title.add_invoice' => 'Adding Invoice', @@ -353,7 +358,8 @@ 'dropdown.projects' => 'projeler', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', -// 'dropdown.clients' => 'clients', +'dropdown.clients' => 'müşteriler', +// TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', @@ -561,13 +567,4 @@ "form.migration.export.title" => 'dışarı aktar', "form.migration.export.success" => 'dışarı aktarma başarıyla tamamlandı', "form.migration.export.text" => 'tüm ekip bilgilerinizi bir xml dosyasına aktarabilirsiniz. bu, kendi sunucunuza bilgi aktarmak istediğinizde faydalı olabilir.', - -"form.client.title" => 'müşteriler', -"form.client.add_title" => 'müşteri ekle', -"form.client.edit_title" => 'müşteriyi düzenle', -"form.client.del_title" => 'müşteriyi sil', - -// miscellaneous strings -"forward.tocsvfile" => 'bilgileri .csv dosyasına aktar', -"forward.toxmlfile" => 'bilgileri .xml dosyasına aktar', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 0f9b8586e..23c27f6be 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -544,8 +544,4 @@ "form.migration.compression.none" => '不压缩', "form.migration.compression.gzip" => 'gzip格式', "form.migration.compression.bzip" => 'bzip格式', - -// miscellaneous strings -"forward.tocsvfile" => '将数据导出到.csv文件', -"forward.toxmlfile" => '将数据导出到.xml文件', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 845fb8100..fce47afad 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3944 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3945 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From b18b24eeedac6e4e00de4843b98482af5d5a8a65 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 02:59:25 +0000 Subject: [PATCH 0486/2515] More recycling in translation files. --- WEB-INF/resources/cs.lang.php | 10 +++------- WEB-INF/resources/et.lang.php | 10 +++------- WEB-INF/resources/ja.lang.php | 10 +++------- WEB-INF/resources/ko.lang.php | 10 +++------- WEB-INF/resources/no.lang.php | 10 +++------- WEB-INF/resources/ro.lang.php | 4 ---- WEB-INF/resources/zh-cn.lang.php | 10 +++------- WEB-INF/resources/zh-tw.lang.php | 10 +++------- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 22 insertions(+), 54 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 578da0170..67b2b14d0 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -468,9 +468,10 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', +'form.export.compression' => 'Komprese', +// TODO: translate the following. // 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -546,7 +547,6 @@ "form.invoice.mailinv_above" => 'poslat fakturu e-mailem', "form.invoice.sending_str" => 'faktura odeslána', -"form.migration.zip" => 'komprese', "form.migration.file" => 'výběr souboru', "form.migration.import.title" => 'importovat data', "form.migration.import.success" => 'import byl úspěšně dokončen', @@ -554,8 +554,4 @@ "form.migration.export.title" => 'exportovat data', "form.migration.export.success" => 'export byl úspěšně dokončen', "form.migration.export.text" => 'můžete exportova týmová data do xml souboru. může se to hodit pro přesun na jiný server.', -// Note to translators: the string below is missing in the translation and must be added -// "form.migration.compression.none" => 'none', -"form.migration.compression.gzip" => 'gzip', -"form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 55cc12372..a9a75202b 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -471,9 +471,10 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', +'form.export.compression' => 'Pakkimine', +// TODO: translate the following. // 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -552,7 +553,6 @@ "form.invoice.mailinv_above" => 'saada see arve e-mailiga', "form.invoice.sending_str" => 'arve saadetud', -"form.migration.zip" => 'pakkimine', "form.migration.file" => 'vali fail', "form.migration.import.title" => 'impordi andmed', "form.migration.import.success" => 'andmed imporditud', @@ -560,8 +560,4 @@ "form.migration.export.title" => 'ekspordi andmed', "form.migration.export.success" => 'andmed eksporditud', "form.migration.export.text" => 'võid kogu meeskonna andmed eksportida xml-faili. sellest võib olla kasu kui vahetad serverit.', -// Note to translators: the string below must be translated and added -// "form.migration.compression.none" => 'none', -"form.migration.compression.gzip" => 'gzip', -"form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 738cef4a4..133be2d12 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -465,9 +465,9 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression' => '圧縮', +'form.export.compression_none' => 'なし', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -547,7 +547,6 @@ "form.invoice.mailinv_above" => '送り状をEメールで送信', "form.invoice.sending_str" => '送信した送り状', -"form.migration.zip" => '圧縮', "form.migration.file" => 'ファイルの選択', "form.migration.import.title" => 'データのインポート', "form.migration.import.success" => 'インポートが成功的に完了されました', @@ -555,7 +554,4 @@ "form.migration.export.title" => 'データのエクスポート', "form.migration.export.success" => 'エクスポートが成功的に完了されました', "form.migration.export.text" => 'あなたはすべてのチームのデータをxmlファイルにエクスポートすることができます。これはあなたの自分のサーバに移動する時に有用します。', -"form.migration.compression.none" => 'なし', -"form.migration.compression.gzip" => 'gzip', -"form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3113c837d..81bc86e7d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -466,9 +466,9 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression' => '압축', +'form.export.compression_none' => '없음', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -548,7 +548,6 @@ "form.invoice.mailinv_above" => '이 송장을 이메일로 송신', "form.invoice.sending_str" => '송신한 송장', -"form.migration.zip" => '압축', "form.migration.file" => '파일 선택', "form.migration.import.title" => '데이터 임포트', "form.migration.import.success" => '성과적으로 완료된 임포트', @@ -556,7 +555,4 @@ "form.migration.export.title" => '데이터 익스포트', "form.migration.export.success" => '성과적으로 완료된 익스포트', "form.migration.export.text" => '팀의 모든 데이터를 xml 파일로 익스포트 할수 있습니다. 이것은 데이터를 당신자신의 서버에로 옮길때 쓸모있을수 있습니다.', -"form.migration.compression.none" => '없음', -"form.migration.compression.gzip" => 'gzip', -"form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 786e149b4..256d6e862 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -460,9 +460,9 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression' => 'Komprimering', +'form.export.compression_none' => 'ingen', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -544,7 +544,6 @@ // Note to translators: "form.invoice.sending_str" => 'invoice has been sent', // the string must be translated // Note to translators: the strings below are missing and must be added and translated -// "form.migration.zip" => 'komprimering', // "form.migration.file" => 'velg fil', // "form.migration.import.title" => 'import data', // "form.migration.import.success" => 'import gjennomført vellykket', @@ -552,7 +551,4 @@ // "form.migration.export.title" => 'export data', // "form.migration.export.success" => 'eksport gjennomført vellykket', // "form.migration.export.text" => 'du kan eksportere alle team data til en XML fil. dette kan være nyttig dersom du skal migrere data til din egen server.', -// "form.migration.compression.none" => 'ingen', -// "form.migration.compression.gzip" => 'gzip', -// "form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b4ebf752f..3e4318dd6 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -556,8 +556,4 @@ "form.migration.export.title" => 'exporta date', "form.migration.export.success" => 'exportul s-a inchieat cu succes', "form.migration.export.text" => 'poti exporta toate datele despre echipa intr-un fisier xml. acesta poate fi folositor daca transferi datele pe alt server', -// Note to translators: the strings below are missing and must be added and translated -// "form.migration.compression.none" => 'none', -// "form.migration.compression.gzip" => 'gzip', -// "form.migration.compression.bzip" => 'bzip', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 23c27f6be..1b0254505 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -451,9 +451,9 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression' => '压缩', +'form.export.compression_none' => '不压缩', +'form.export.compression_bzip' => 'bzip格式', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -533,7 +533,6 @@ "form.invoice.mailinv_above" => '通过电子邮件发送此发票', "form.invoice.sending_str" => '发票已送出', -"form.migration.zip" => '压缩', "form.migration.file" => '选择档', "form.migration.import.title" => '导入数据', "form.migration.import.success" => '成功完成导入', @@ -541,7 +540,4 @@ "form.migration.export.title" => '导出数据', "form.migration.export.success" => '导出成功', "form.migration.export.text" => '您可以将所有团队数据导出到xml文件。如果您要将数据转移到您自己的服务器,这项操作很有用。', -"form.migration.compression.none" => '不压缩', -"form.migration.compression.gzip" => 'gzip格式', -"form.migration.compression.bzip" => 'bzip格式', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index bdf96e843..e4c75561f 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -461,9 +461,9 @@ // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php // TODO: translate the following. // 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression' => '壓縮', +'form.export.compression_none' => '不压缩', +'form.export.compression_bzip' => 'bzip格式', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). // TODO: translate the following. @@ -543,7 +543,6 @@ "form.invoice.mailinv_above" => '通過電子郵件發送此發票', "form.invoice.sending_str" => '發票已送出', -"form.migration.zip" => '壓縮', "form.migration.file" => '選擇檔', "form.migration.import.title" => '導入數據', "form.migration.import.success" => '成功完成導入', @@ -551,7 +550,4 @@ "form.migration.export.title" => '匯出數據', "form.migration.export.success" => '成功完成匯出', "form.migration.export.text" => '您可以將所有團隊資料匯出到xml檔。如果您要將資料轉移到您自己的伺服器,這項操作很有用。', -"form.migration.compression.none" => '不压缩', -"form.migration.compression.gzip" => 'gzip格式', -"form.migration.compression.bzip" => 'bzip格式', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fce47afad..2004a19fb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3945 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3946 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 931bb9bf1d48a1443bdeadfdf2482dabe72b64f5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 03:34:23 +0000 Subject: [PATCH 0487/2515] More recycling of strings from older translations. --- WEB-INF/resources/ca.lang.php | 6 ++---- WEB-INF/resources/cs.lang.php | 4 +--- WEB-INF/resources/et.lang.php | 4 +--- WEB-INF/resources/hu.lang.php | 8 ++++---- WEB-INF/resources/ja.lang.php | 4 +--- WEB-INF/resources/ko.lang.php | 4 +--- WEB-INF/resources/no.lang.php | 4 +--- WEB-INF/resources/ro.lang.php | 6 ++---- WEB-INF/resources/tr.lang.php | 6 ++---- WEB-INF/resources/zh-cn.lang.php | 4 +--- WEB-INF/resources/zh-tw.lang.php | 4 +--- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 18 insertions(+), 38 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 02b92aeb6..f8dcba446 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -462,9 +462,9 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +'form.export.hint' => 'Vosté pot exportar totes les dades del grup dins d\\\'un archivo xml. Això pot ser útil si necessita migrar dades al seu propi servidor.', +'form.export.compression' => 'Compressió', // TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', @@ -529,12 +529,10 @@ "form.invoice.mailinv_above" => 'Enviar aquesta factura per e-mail', "form.invoice.sending_str" => 'Factura enviada', -"form.migration.zip" => 'Comprimir', "form.migration.file" => 'Sel·leccioni l\\\'arxiu', "form.migration.import.title" => 'Importar dades', "form.migration.import.success" => 'Importació finalitzada amb èxit', "form.migration.import.text" => 'Importar dades del grup des d\\\'un arxiu xml', "form.migration.export.title" => 'Exportar dades', "form.migration.export.success" => 'Exportació finalitzada amb èxit', -"form.migration.export.text" => 'Vosté pot exportar totes les dades del grup dins d\\\'un archivo xml. Això pot ser útil si necessita migrar dades al seu propi servidor.', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 67b2b14d0..b5e22149d 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -466,8 +466,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => 'Můžete exportova týmová data do xml souboru. Může se to hodit pro přesun na jiný server.', 'form.export.compression' => 'Komprese', // TODO: translate the following. // 'form.export.compression_none' => 'none', @@ -553,5 +552,4 @@ "form.migration.import.text" => 'importovat týmová data z xml souboru', "form.migration.export.title" => 'exportovat data', "form.migration.export.success" => 'export byl úspěšně dokončen', -"form.migration.export.text" => 'můžete exportova týmová data do xml souboru. může se to hodit pro přesun na jiný server.', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index a9a75202b..cbc1d4afe 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -469,8 +469,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => 'Võid kogu meeskonna andmed eksportida xml-faili. Sellest võib olla kasu kui vahetad serverit.', 'form.export.compression' => 'Pakkimine', // TODO: translate the following. // 'form.export.compression_none' => 'none', @@ -559,5 +558,4 @@ "form.migration.import.text" => 'impordi meeskonna andmed xml-failist', "form.migration.export.title" => 'ekspordi andmed', "form.migration.export.success" => 'andmed eksporditud', -"form.migration.export.text" => 'võid kogu meeskonna andmed eksportida xml-faili. sellest võib olla kasu kui vahetad serverit.', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1dc7fe505..0f934c744 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -463,9 +463,11 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +// TODO: improve or check form.export.hint as the translation seems incorrect if we trust translate.google.com. +// Export does a single team export (all data in ONE team). +'form.export.hint' => 'Kimentheted az összes felvitt csoport adatait egy XML file-ba, ami megkönnyíti a TimeTracker szerverek közötti adatátvitelt.', +'form.export.compression' => 'Tömörítés', // TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', @@ -544,12 +546,10 @@ "form.invoice.mailinv_above" => 'küldjük el ezt a számlát e-mail-en', "form.invoice.sending_str" => 'a számla elküldve', -"form.migration.zip" => 'tömörítés', "form.migration.file" => 'válassz file-nevet', "form.migration.import.title" => 'adatok importálása', "form.migration.import.success" => 'az importálás sikeresen véget ért', "form.migration.import.text" => 'csoport adatok importja XML file-ból', "form.migration.export.title" => 'az adatok exportálása', "form.migration.export.success" => 'az exportálás sikeres volt', -"form.migration.export.text" => 'kimentheted az összes felvitt csoport adatait egy XML file-ba, ami megkönnyíti a TimeTracker szerverek közötti adatátvitelt...', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 133be2d12..ccfc50fc8 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -463,8 +463,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => 'あなたはすべてのチームのデータをxmlファイルにエクスポートすることができます。これはあなたの自分のサーバに移動する時に有用します。', 'form.export.compression' => '圧縮', 'form.export.compression_none' => 'なし', 'form.export.compression_bzip' => 'bzip', @@ -553,5 +552,4 @@ "form.migration.import.text" => 'xmlファイルからチームのデータをインポート', "form.migration.export.title" => 'データのエクスポート', "form.migration.export.success" => 'エクスポートが成功的に完了されました', -"form.migration.export.text" => 'あなたはすべてのチームのデータをxmlファイルにエクスポートすることができます。これはあなたの自分のサーバに移動する時に有用します。', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 81bc86e7d..79636344c 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -464,8 +464,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => '팀의 모든 데이터를 xml 파일로 익스포트 할수 있습니다. 이것은 데이터를 당신자신의 서버에로 옮길때 쓸모있을수 있습니다.', 'form.export.compression' => '압축', 'form.export.compression_none' => '없음', 'form.export.compression_bzip' => 'bzip', @@ -554,5 +553,4 @@ "form.migration.import.text" => 'xml 파일로부터 팀 데이터를 임포트', "form.migration.export.title" => '데이터 익스포트', "form.migration.export.success" => '성과적으로 완료된 익스포트', -"form.migration.export.text" => '팀의 모든 데이터를 xml 파일로 익스포트 할수 있습니다. 이것은 데이터를 당신자신의 서버에로 옮길때 쓸모있을수 있습니다.', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 256d6e862..27a4f3a87 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -458,8 +458,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => 'Du kan eksportere alle team data til en XML fil. Dette kan være nyttig dersom du skal migrere data til din egen server.', 'form.export.compression' => 'Komprimering', 'form.export.compression_none' => 'ingen', 'form.export.compression_bzip' => 'bzip', @@ -550,5 +549,4 @@ // "form.migration.import.text" => 'import team data fra en xml fil', // "form.migration.export.title" => 'export data', // "form.migration.export.success" => 'eksport gjennomført vellykket', -// "form.migration.export.text" => 'du kan eksportere alle team data til en XML fil. dette kan være nyttig dersom du skal migrere data til din egen server.', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 3e4318dd6..913e969a8 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -466,9 +466,9 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +'form.export.hint' => 'Poti exporta toate datele despre echipa intr-un fisier xml. Acesta poate fi folositor daca transferi datele pe alt server.', +'form.export.compression' => 'Compresie', // TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', @@ -548,12 +548,10 @@ "form.invoice.mailinv_above" => 'trimite aceasta factura pe email', "form.invoice.sending_str" => 'factura trimisa', -"form.migration.zip" => 'compresie', "form.migration.file" => 'alege fisier', "form.migration.import.title" => 'importa date', "form.migration.import.success" => 'importul s-a incheiat cu succes', "form.migration.import.text" => 'importa date echipa dintr-un fisier xml', "form.migration.export.title" => 'exporta date', "form.migration.export.success" => 'exportul s-a inchieat cu succes', -"form.migration.export.text" => 'poti exporta toate datele despre echipa intr-un fisier xml. acesta poate fi folositor daca transferi datele pe alt server', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e90ce38eb..146b0d03c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -476,9 +476,9 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php +'form.export.hint' => 'Tüm ekip bilgilerinizi bir xml dosyasına aktarabilirsiniz. Bu, kendi sunucunuza bilgi aktarmak istediğinizde faydalı olabilir.', +'form.export.compression' => 'Sıkıştırma', // TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', -// 'form.export.compression' => 'Compression', // 'form.export.compression_none' => 'none', // 'form.export.compression_bzip' => 'bzip', @@ -559,12 +559,10 @@ "form.invoice.mailinv_above" => 'bu faturayı e-posta ile yolla', "form.invoice.sending_str" => 'fatura yollandı', -"form.migration.zip" => 'sıkıştırma', "form.migration.file" => 'dosya seç', "form.migration.import.title" => 'veri içe aktar', "form.migration.import.success" => 'içe aktarma başarıyla tamamlandı', "form.migration.import.text" => 'ekip bilgileri bir xml dosyasından içe aktar', "form.migration.export.title" => 'dışarı aktar', "form.migration.export.success" => 'dışarı aktarma başarıyla tamamlandı', -"form.migration.export.text" => 'tüm ekip bilgilerinizi bir xml dosyasına aktarabilirsiniz. bu, kendi sunucunuza bilgi aktarmak istediğinizde faydalı olabilir.', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 1b0254505..c8cd2a5f5 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -449,8 +449,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => '您可以将所有团队数据导出到xml文件。如果您要将数据转移到您自己的服务器,这项操作很有用。', 'form.export.compression' => '压缩', 'form.export.compression_none' => '不压缩', 'form.export.compression_bzip' => 'bzip格式', @@ -539,5 +538,4 @@ "form.migration.import.text" => '从xml文件导入团队数据', "form.migration.export.title" => '导出数据', "form.migration.export.success" => '导出成功', -"form.migration.export.text" => '您可以将所有团队数据导出到xml文件。如果您要将数据转移到您自己的服务器,这项操作很有用。', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index e4c75561f..ffa1ac55b 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -459,8 +459,7 @@ // 'form.client.client_entries' => 'Client entries', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -// 'form.export.hint' => 'You can export all team data into an xml file. It could be useful if you are migrating data to your own server.', +'form.export.hint' => '您可以將所有團隊資料匯出到xml檔。如果您要將資料轉移到您自己的伺服器,這項操作很有用。', 'form.export.compression' => '壓縮', 'form.export.compression_none' => '不压缩', 'form.export.compression_bzip' => 'bzip格式', @@ -549,5 +548,4 @@ "form.migration.import.text" => '從xml檔導入團隊資料', "form.migration.export.title" => '匯出數據', "form.migration.export.success" => '成功完成匯出', -"form.migration.export.text" => '您可以將所有團隊資料匯出到xml檔。如果您要將資料轉移到您自己的伺服器,這項操作很有用。', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2004a19fb..0d5254144 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3946 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3947 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 950eb220d2ba58d4def650b4ae9bac1de09ffdd7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 03:46:32 +0000 Subject: [PATCH 0488/2515] Some more recycling in Romanian file. --- WEB-INF/resources/ro.lang.php | 14 +++----------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 913e969a8..f6e313793 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -473,10 +473,9 @@ // 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Importa date echipa dintr-un fisier xml.', +'form.import.file' => 'Alege fisier', +'form.import.success' => 'Importul s-a incheiat cu succes.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: check form.teams.hint for accuracy. @@ -547,11 +546,4 @@ "form.invoice.customer" => 'client', "form.invoice.mailinv_above" => 'trimite aceasta factura pe email', "form.invoice.sending_str" => 'factura trimisa', - -"form.migration.file" => 'alege fisier', -"form.migration.import.title" => 'importa date', -"form.migration.import.success" => 'importul s-a incheiat cu succes', -"form.migration.import.text" => 'importa date echipa dintr-un fisier xml', -"form.migration.export.title" => 'exporta date', -"form.migration.export.success" => 'exportul s-a inchieat cu succes', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0d5254144..b89d42d29 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3947 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3948 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 817c4398a992954d9c30bb78ddb3bf0edfccf3c3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 13:13:52 +0000 Subject: [PATCH 0489/2515] Work in progress recycling old translations. --- WEB-INF/resources/ca.lang.php | 14 +++----------- WEB-INF/resources/cs.lang.php | 14 +++----------- WEB-INF/resources/et.lang.php | 14 +++----------- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 10 insertions(+), 34 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f8dcba446..6b49cf154 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -469,10 +469,9 @@ // 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Importar dades del grup des d\\\'un arxiu xml.', +'form.import.file' => 'Sel·leccioni l\\\'arxiu', +'form.import.success' => 'Importació finalitzada amb èxit.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker (no està permès col·lisions de login).', @@ -528,11 +527,4 @@ "form.invoice.subtotal" => 'Subtotal', "form.invoice.mailinv_above" => 'Enviar aquesta factura per e-mail', "form.invoice.sending_str" => 'Factura enviada', - -"form.migration.file" => 'Sel·leccioni l\\\'arxiu', -"form.migration.import.title" => 'Importar dades', -"form.migration.import.success" => 'Importació finalitzada amb èxit', -"form.migration.import.text" => 'Importar dades del grup des d\\\'un arxiu xml', -"form.migration.export.title" => 'Exportar dades', -"form.migration.export.success" => 'Exportació finalitzada amb èxit', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index b5e22149d..5172818bb 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -473,10 +473,9 @@ 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Importovat týmová data z xml souboru.', +'form.import.file' => 'Výběr souboru', +'form.import.success' => 'Import byl úspěšně dokončen.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. This part is not translated accurately from English: @@ -545,11 +544,4 @@ "form.invoice.subtotal" => 'subtotal', "form.invoice.mailinv_above" => 'poslat fakturu e-mailem', "form.invoice.sending_str" => 'faktura odeslána', - -"form.migration.file" => 'výběr souboru', -"form.migration.import.title" => 'importovat data', -"form.migration.import.success" => 'import byl úspěšně dokončen', -"form.migration.import.text" => 'importovat týmová data z xml souboru', -"form.migration.export.title" => 'exportovat data', -"form.migration.export.success" => 'export byl úspěšně dokončen', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index cbc1d4afe..c53751291 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -476,10 +476,9 @@ 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Impordi meeskonna andmed xml-failist.', +'form.import.file' => 'Vali fail', +'form.import.success' => 'Andmed imporditud.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. @@ -551,11 +550,4 @@ "form.invoice.customer" => 'klient', "form.invoice.mailinv_above" => 'saada see arve e-mailiga', "form.invoice.sending_str" => 'arve saadetud', - -"form.migration.file" => 'vali fail', -"form.migration.import.title" => 'impordi andmed', -"form.migration.import.success" => 'andmed imporditud', -"form.migration.import.text" => 'impordi meeskonna andmed xml-failist', -"form.migration.export.title" => 'ekspordi andmed', -"form.migration.export.success" => 'andmed eksporditud', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b89d42d29..e1ea141e6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3948 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3949 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0ef7f9c7b95ed5fee6bb60352e2d1f6230284518 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 13:37:11 +0000 Subject: [PATCH 0490/2515] Some more recycling. --- WEB-INF/resources/hu.lang.php | 14 +++----------- WEB-INF/resources/ja.lang.php | 14 +++----------- WEB-INF/resources/ko.lang.php | 14 +++----------- WEB-INF/resources/no.lang.php | 16 +++------------- WEB-INF/resources/tr.lang.php | 14 +++----------- WEB-INF/resources/zh-cn.lang.php | 14 +++----------- WEB-INF/resources/zh-tw.lang.php | 14 +++----------- WEB-INF/templates/footer.tpl | 2 +- 8 files changed, 22 insertions(+), 80 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 0f934c744..72153326c 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -472,10 +472,9 @@ // 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Csoport adatok importja XML file-ból.', +'form.import.file' => 'Válassz file', +'form.import.success' => 'Az importálás sikeresen véget ért.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: fix form.teams.hint by translating it properly from the English string. Note that the ending is not translated at all. @@ -545,11 +544,4 @@ "form.invoice.customer" => 'Ügyfél', "form.invoice.mailinv_above" => 'küldjük el ezt a számlát e-mail-en', "form.invoice.sending_str" => 'a számla elküldve', - -"form.migration.file" => 'válassz file-nevet', -"form.migration.import.title" => 'adatok importálása', -"form.migration.import.success" => 'az importálás sikeresen véget ért', -"form.migration.import.text" => 'csoport adatok importja XML file-ból', -"form.migration.export.title" => 'az adatok exportálása', -"form.migration.export.success" => 'az exportálás sikeres volt', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index ccfc50fc8..ee2055cbd 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -469,10 +469,9 @@ 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'xmlファイルからチームのデータをインポート。', +'form.import.file' => 'ファイルの選択', +'form.import.success' => 'インポートが成功的に完了されました。', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', @@ -545,11 +544,4 @@ "form.invoice.customer" => 'クライアント', "form.invoice.mailinv_above" => '送り状をEメールで送信', "form.invoice.sending_str" => '送信した送り状', - -"form.migration.file" => 'ファイルの選択', -"form.migration.import.title" => 'データのインポート', -"form.migration.import.success" => 'インポートが成功的に完了されました', -"form.migration.import.text" => 'xmlファイルからチームのデータをインポート', -"form.migration.export.title" => 'データのエクスポート', -"form.migration.export.success" => 'エクスポートが成功的に完了されました', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 79636344c..4262f45e9 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -470,10 +470,9 @@ 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'xml 파일로부터 팀 데이터를 임포트.', +'form.import.file' => '파일 선택', +'form.import.success' => '성과적으로 완료된 임포트.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', @@ -546,11 +545,4 @@ "form.invoice.customer" => '클라이언트', "form.invoice.mailinv_above" => '이 송장을 이메일로 송신', "form.invoice.sending_str" => '송신한 송장', - -"form.migration.file" => '파일 선택', -"form.migration.import.title" => '데이터 임포트', -"form.migration.import.success" => '성과적으로 완료된 임포트', -"form.migration.import.text" => 'xml 파일로부터 팀 데이터를 임포트', -"form.migration.export.title" => '데이터 익스포트', -"form.migration.export.success" => '성과적으로 완료된 익스포트', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 27a4f3a87..dccc89fb3 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -464,10 +464,9 @@ 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Import team data fra en xml fil.', +'form.import.file' => 'Velg fil', +'form.import.success' => 'Import gjennomført vellykket.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => 'Opprett et nytt team ved å opprette en ny team manager konto.
Du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', @@ -540,13 +539,4 @@ "form.invoice.subtotal" => 'delsum', "form.invoice.customer" => 'kommentar', "form.invoice.mailinv_above" => 'send denne fakturaen som e-post', -// Note to translators: "form.invoice.sending_str" => 'invoice has been sent', // the string must be translated - -// Note to translators: the strings below are missing and must be added and translated -// "form.migration.file" => 'velg fil', -// "form.migration.import.title" => 'import data', -// "form.migration.import.success" => 'import gjennomført vellykket', -// "form.migration.import.text" => 'import team data fra en xml fil', -// "form.migration.export.title" => 'export data', -// "form.migration.export.success" => 'eksport gjennomført vellykket', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 146b0d03c..516ff514d 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -483,10 +483,9 @@ // 'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => 'Ekip bilgileri bir xml dosyasından içe aktar.', +'form.import.file' => 'Dosya seç', +'form.import.success' => 'Içe aktarma başarıyla tamamlandı.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: check form.teams.hint for accuracy. I did not not how to translate "login", so this may be garbage now. @@ -558,11 +557,4 @@ "form.invoice.customer" => 'müşteri', "form.invoice.mailinv_above" => 'bu faturayı e-posta ile yolla', "form.invoice.sending_str" => 'fatura yollandı', - -"form.migration.file" => 'dosya seç', -"form.migration.import.title" => 'veri içe aktar', -"form.migration.import.success" => 'içe aktarma başarıyla tamamlandı', -"form.migration.import.text" => 'ekip bilgileri bir xml dosyasından içe aktar', -"form.migration.export.title" => 'dışarı aktar', -"form.migration.export.success" => 'dışarı aktarma başarıyla tamamlandı', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index c8cd2a5f5..202d8c294 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -455,10 +455,9 @@ 'form.export.compression_bzip' => 'bzip格式', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => '从xml文件导入团队数据。', +'form.import.file' => '选择档', +'form.import.success' => '成功完成导入。', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', @@ -531,11 +530,4 @@ "form.invoice.customer" => '客户', "form.invoice.mailinv_above" => '通过电子邮件发送此发票', "form.invoice.sending_str" => '发票已送出', - -"form.migration.file" => '选择档', -"form.migration.import.title" => '导入数据', -"form.migration.import.success" => '成功完成导入', -"form.migration.import.text" => '从xml文件导入团队数据', -"form.migration.export.title" => '导出数据', -"form.migration.export.success" => '导出成功', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ffa1ac55b..6e8d84b3c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -465,10 +465,9 @@ 'form.export.compression_bzip' => 'bzip格式', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -// TODO: translate the following. -// 'form.import.hint' => 'Import team data from an xml file.', -// 'form.import.file' => 'Select file', -// 'form.import.success' => 'Import completed successfully.', +'form.import.hint' => '從xml檔導入團隊資料。', +'form.import.file' => '選擇檔', +'form.import.success' => '成功完成導入。', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. @@ -541,11 +540,4 @@ "form.invoice.customer" => '客戶', "form.invoice.mailinv_above" => '通過電子郵件發送此發票', "form.invoice.sending_str" => '發票已送出', - -"form.migration.file" => '選擇檔', -"form.migration.import.title" => '導入數據', -"form.migration.import.success" => '成功完成導入', -"form.migration.import.text" => '從xml檔導入團隊資料', -"form.migration.export.title" => '匯出數據', -"form.migration.export.success" => '成功完成匯出', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e1ea141e6..d7db9698a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3949 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3950 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9d5988b5f4dd00c801dbf8b4ba5bd8d58ab93ed0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 13:46:59 +0000 Subject: [PATCH 0491/2515] A bit of cleanup. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 3 --- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 3 --- WEB-INF/resources/ko.lang.php | 3 --- WEB-INF/resources/no.lang.php | 3 --- WEB-INF/resources/ro.lang.php | 3 --- WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 3 --- WEB-INF/resources/zh-tw.lang.php | 3 --- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 1 insertion(+), 32 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 6b49cf154..130c98805 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -516,7 +516,6 @@ "form.mail.sending_str" => 'Missatge enviat', // invoice attributes -"form.invoice.above" => 'Informació addicional per factura', "form.invoice.select_cust" => 'Seleccioni el client', "form.invoice.fillform" => 'Empleni els camps', "form.invoice.number" => 'Número de factura', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 5172818bb..1effad6e8 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -531,9 +531,6 @@ "form.mail.sending_str" => 'zpráva odeslána', // invoice attributes -"form.invoice.title" => 'faktura', -"form.invoice.caption" => 'faktura', -"form.invoice.above" => 'fakturační informace', "form.invoice.select_cust" => 'výběr firmy', "form.invoice.fillform" => 'vyplňte pole', "form.invoice.number" => 'faktura číslo', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index c53751291..e3350f641 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -536,9 +536,6 @@ "form.mail.sending_str" => 'teade saadetud', // invoice attributes -"form.invoice.title" => 'arve', -"form.invoice.caption" => 'arve', -"form.invoice.above" => 'lisainformatsioon arvele', "form.invoice.select_cust" => 'vali klient', "form.invoice.fillform" => 'täida väljad', "form.invoice.number" => 'arve number', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 72153326c..e9c72dde3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -530,9 +530,6 @@ "form.mail.sending_str" => 'az üzenet elküldve', // invoice attributes -"form.invoice.title" => 'számla', -"form.invoice.caption" => 'Számla', -"form.invoice.above" => 'a számlához tartozó adatok', "form.invoice.select_cust" => 'válassz ügyfelet', "form.invoice.fillform" => 'töltsd ki a mezőket', "form.invoice.number" => 'számla azonosító száma', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index ee2055cbd..7c3deced0 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -530,9 +530,6 @@ "form.mail.sending_str" => '送信したメッセージ', // invoice attributes -"form.invoice.title" => '送り状', -"form.invoice.caption" => '送り状', -"form.invoice.above" => '送り状の追加の情報', "form.invoice.select_cust" => 'クライアントの選択', "form.invoice.fillform" => 'フィールドの作成', "form.invoice.number" => '送り状の番号', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 4262f45e9..9198b6c1c 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -531,9 +531,6 @@ "form.mail.sending_str" => '송신된 메시지', // invoice attributes -"form.invoice.title" => '송장', -"form.invoice.caption" => '송장', -"form.invoice.above" => '송장에 대한 보충정보', "form.invoice.select_cust" => '클라이언트의 선택', "form.invoice.fillform" => '필드들을 채우십시오', "form.invoice.number" => '송장 번호', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index dccc89fb3..23b843ea3 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -525,9 +525,6 @@ // "form.mail.sending_str" => 'the message has been sent', // invoice attributes -"form.invoice.title" => 'faktura', -"form.invoice.caption" => 'faktura', -"form.invoice.above" => 'tilleggsinformasjon for faktura', // Note to translators: the strings below are missing and must be added and translated // "form.invoice.select_cust" => 'velg klient', // "form.invoice.fillform" => 'fyll inn i feltene', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f6e313793..b32d36d61 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -532,9 +532,6 @@ "form.mail.sending_str" => 'mesaj trimis', // invoice attributes -"form.invoice.title" => 'factura', -"form.invoice.caption" => 'factura', -"form.invoice.above" => 'informatii aditionale pentru factura', "form.invoice.select_cust" => 'alege client', "form.invoice.fillform" => 'comleteaza campurile', "form.invoice.number" => 'numar factura', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 516ff514d..2d502c372 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -543,9 +543,6 @@ "form.mail.sending_str" => 'ileti yollandı', // invoice attributes -"form.invoice.title" => 'fatura', -"form.invoice.caption" => 'fatura', -"form.invoice.above" => 'fatura için ek bilgi', "form.invoice.select_cust" => 'müşteri seç', "form.invoice.fillform" => 'alanları doldur', "form.invoice.number" => 'fatura numarası', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 202d8c294..0613860b1 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -516,9 +516,6 @@ "form.mail.sending_str" => '消息已发送', // invoice attributes -"form.invoice.title" => '发票', -"form.invoice.caption" => '发票', -"form.invoice.above" => '发票附加信息', "form.invoice.select_cust" => '选择客户', "form.invoice.fillform" => '填写该栏目', "form.invoice.number" => '发票号码', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 6e8d84b3c..8d5762d6c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -526,9 +526,6 @@ "form.mail.sending_str" => '消息已發送', // invoice attributes -"form.invoice.title" => '發票', -"form.invoice.caption" => '發票', -"form.invoice.above" => '發票附加資訊', "form.invoice.select_cust" => '選擇客戶', "form.invoice.fillform" => '填寫該欄目', "form.invoice.number" => '發票號碼', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d7db9698a..ddc1c917a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3950 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3951 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 887ff98dde2f444ef7f33b32fc7f550b5833b5e6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 14:20:07 +0000 Subject: [PATCH 0492/2515] A bit of cleanup and recycling. --- WEB-INF/resources/ca.lang.php | 10 ++++------ WEB-INF/resources/cs.lang.php | 10 ++++------ WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 2 ++ WEB-INF/resources/es.lang.php | 4 +++- WEB-INF/resources/et.lang.php | 4 ++-- WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 4 +++- WEB-INF/resources/hu.lang.php | 4 ++-- WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 4 ++-- WEB-INF/resources/ko.lang.php | 4 ++-- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 5 ++--- WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 2 ++ WEB-INF/resources/ro.lang.php | 4 ++-- WEB-INF/resources/ru.lang.php | 2 ++ WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 2 ++ WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 4 ++-- WEB-INF/resources/zh-cn.lang.php | 4 ++-- WEB-INF/resources/zh-tw.lang.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 30 files changed, 64 insertions(+), 35 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 130c98805..f1983350c 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -418,9 +418,11 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). +'form.invoice.number' => 'Número de factura', +'form.invoice.person' => 'Persona', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -516,10 +518,6 @@ "form.mail.sending_str" => 'Missatge enviat', // invoice attributes -"form.invoice.select_cust" => 'Seleccioni el client', -"form.invoice.fillform" => 'Empleni els camps', -"form.invoice.number" => 'Número de factura', -"form.invoice.th.username" => 'Persona', "form.invoice.th.time" => 'Hores', "form.invoice.th.rate" => 'Taxa', "form.invoice.th.summ" => 'Quantitat', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 1effad6e8..e5e7ddcaa 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -422,9 +422,11 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). +'form.invoice.number' => 'Faktura číslo', +'form.invoice.person' => 'Osoba', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -531,10 +533,6 @@ "form.mail.sending_str" => 'zpráva odeslána', // invoice attributes -"form.invoice.select_cust" => 'výběr firmy', -"form.invoice.fillform" => 'vyplňte pole', -"form.invoice.number" => 'faktura číslo', -"form.invoice.th.username" => 'osoba', "form.invoice.th.time" => 'hodin', "form.invoice.th.rate" => 'sazba', "form.invoice.th.summ" => 'množství', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 645b22e67..1feb503d9 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -370,6 +370,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Faktura der skal slettes', 'form.invoice.invoice_entries' => 'Faktura emner', // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 21dfb0b2b..314fe265a 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -364,7 +364,7 @@ 'form.invoice.number' => 'Rechnungsnummer', 'form.invoice.person' => 'Person', -// Invoice delete form. See example at https://timetracker.anuko.com/invoice_delete.php +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Zu löschende Rechnung', 'form.invoice.invoice_entries' => 'Rechnungseintrag', 'form.invoice.confirm_deleting_entries' => 'Bitte die Löschung von Rechnungseinträgen bestätigen.', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index b8d30f3ef..a5d835f40 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -366,6 +366,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Invoice number', 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Invoice to delete', 'form.invoice.invoice_entries' => 'Invoice entries', 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c145556f9..3097be246 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -427,7 +427,9 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Número de factura', 'form.invoice.person' => 'Persona', -// TODO: translate the following stings. + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php +// TODO: translate the following. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e3350f641..645447f01 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -428,6 +428,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -536,8 +538,6 @@ "form.mail.sending_str" => 'teade saadetud', // invoice attributes -"form.invoice.select_cust" => 'vali klient', -"form.invoice.fillform" => 'täida väljad', "form.invoice.number" => 'arve number', "form.invoice.th.username" => 'isik', "form.invoice.th.time" => 'tunde', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 749e8c751..3e77a65e6 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -396,6 +396,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'شماره فاکتور', 'form.invoice.person' => 'شخص', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // TODO: translate the following stings. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 594597729..4704047c5 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -376,6 +376,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Laskun numero', 'form.invoice.person' => 'Henkilö', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Poistettava lasku', 'form.invoice.invoice_entries' => 'Laskurivit', // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5a173b83d..95e7696c4 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -367,6 +367,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Numéro de facture', 'form.invoice.person' => 'Personne', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Facture à supprimer', 'form.invoice.invoice_entries' => 'Entrées de facture', // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5f464ad99..ddadd67fa 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -402,7 +402,9 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'מספר חשבונית', 'form.invoice.person' => 'משתמש', -// TODO: translate the following stings. + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php +// TODO: translate the following. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e9c72dde3..0a2d8109a 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -422,6 +422,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -530,8 +532,6 @@ "form.mail.sending_str" => 'az üzenet elküldve', // invoice attributes -"form.invoice.select_cust" => 'válassz ügyfelet', -"form.invoice.fillform" => 'töltsd ki a mezőket', "form.invoice.number" => 'számla azonosító száma', "form.invoice.th.username" => 'személy', "form.invoice.th.time" => 'óra', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 488fae227..e26da1c49 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -420,6 +420,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Numero fattura', 'form.invoice.person' => 'Persona', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // TODO: translate the following. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 7c3deced0..36540d3ce 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -422,6 +422,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -530,8 +532,6 @@ "form.mail.sending_str" => '送信したメッセージ', // invoice attributes -"form.invoice.select_cust" => 'クライアントの選択', -"form.invoice.fillform" => 'フィールドの作成', "form.invoice.number" => '送り状の番号', "form.invoice.th.username" => '個人', "form.invoice.th.time" => '時間', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 9198b6c1c..ccd1d134b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -423,6 +423,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -531,8 +533,6 @@ "form.mail.sending_str" => '송신된 메시지', // invoice attributes -"form.invoice.select_cust" => '클라이언트의 선택', -"form.invoice.fillform" => '필드들을 채우십시오', "form.invoice.number" => '송장 번호', "form.invoice.th.username" => '개인', "form.invoice.th.time" => '시간', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 721444403..af888d900 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -367,6 +367,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Factuur nummer', 'form.invoice.person' => 'Medewerker', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Te verwijderen factuur', 'form.invoice.invoice_entries' => 'Factuur gegevens', 'form.invoice.confirm_deleting_entries' => 'Bevestig het verwijderen van de facturen uit Time Tracker.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 23b843ea3..442947c63 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -417,6 +417,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -525,9 +527,6 @@ // "form.mail.sending_str" => 'the message has been sent', // invoice attributes -// Note to translators: the strings below are missing and must be added and translated -// "form.invoice.select_cust" => 'velg klient', -// "form.invoice.fillform" => 'fyll inn i feltene', "form.invoice.number" => 'fakturanummer', "form.invoice.th.username" => 'person', "form.invoice.th.time" => 'timer', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index ccb91b3e9..086386f24 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -379,6 +379,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Numer faktury', 'form.invoice.person' => 'Osoba', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Faktura do usunięcia', 'form.invoice.invoice_entries' => 'Wpisy dot. faktury', // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index b519706ed..4505b1fa5 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -374,6 +374,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Número da fatura', 'form.invoice.person' => 'Pessoa', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Fatura a ser apagada', 'form.invoice.invoice_entries' => 'Entradas de fatura', // TODO: translate the following. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index c3a309295..e07154872 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -405,6 +405,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b32d36d61..94359cbdb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -425,6 +425,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -532,8 +534,6 @@ "form.mail.sending_str" => 'mesaj trimis', // invoice attributes -"form.invoice.select_cust" => 'alege client', -"form.invoice.fillform" => 'comleteaza campurile', "form.invoice.number" => 'numar factura', "form.invoice.th.username" => 'persoana', "form.invoice.th.time" => 'ore', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index b36191c6a..67c28f816 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -364,6 +364,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Номер счёта', 'form.invoice.person' => 'Работник', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Счёт для удаления', 'form.invoice.invoice_entries' => 'Записи счёта', 'form.invoice.confirm_deleting_entries' => 'Подтвердите удаление записей из Time Tracker.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d636b5ac2..44492dc20 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -394,6 +394,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Číslo faktúry', 'form.invoice.person' => 'Osoba', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // TODO: translate the following. // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index ae8f483c3..56d4a4cb0 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -402,6 +402,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index f177cb9b5..86868c90f 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -377,6 +377,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Broj računa', 'form.invoice.person' => 'Osoba', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Račun za brisanje', 'form.invoice.invoice_entries' => 'Unos u račun', // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 7a3b2cfda..b4ea69d03 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -375,6 +375,8 @@ // (you can get to this form after generating a report). 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Fakturanummer', 'form.invoice.invoice_entries' => 'Relaterade tider och kostnader', // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 2d502c372..032cd8132 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -435,6 +435,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -543,8 +545,6 @@ "form.mail.sending_str" => 'ileti yollandı', // invoice attributes -"form.invoice.select_cust" => 'müşteri seç', -"form.invoice.fillform" => 'alanları doldur', "form.invoice.number" => 'fatura numarası', "form.invoice.th.username" => 'kişi', "form.invoice.th.time" => 'saatler', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 0613860b1..7696ae7db 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -408,6 +408,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -516,8 +518,6 @@ "form.mail.sending_str" => '消息已发送', // invoice attributes -"form.invoice.select_cust" => '选择客户', -"form.invoice.fillform" => '填写该栏目', "form.invoice.number" => '发票号码', "form.invoice.th.username" => '收费人', "form.invoice.th.time" => '小时数', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 8d5762d6c..2952a3b2d 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -418,6 +418,8 @@ // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', + +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', // 'form.invoice.invoice_entries' => 'Invoice entries', // 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', @@ -526,8 +528,6 @@ "form.mail.sending_str" => '消息已發送', // invoice attributes -"form.invoice.select_cust" => '選擇客戶', -"form.invoice.fillform" => '填寫該欄目', "form.invoice.number" => '發票號碼', "form.invoice.th.username" => '收費人', "form.invoice.th.time" => '小時數', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ddc1c917a..0a2921123 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3951 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3952 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From c4070353c14d9085dbea1ca429090d326bf731d9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 14:42:59 +0000 Subject: [PATCH 0493/2515] Some more recycling of invoice-related strings. --- WEB-INF/resources/et.lang.php | 7 ++----- WEB-INF/resources/hu.lang.php | 7 ++----- WEB-INF/resources/ja.lang.php | 7 ++----- WEB-INF/resources/ko.lang.php | 7 ++----- WEB-INF/resources/no.lang.php | 7 ++----- WEB-INF/resources/ro.lang.php | 7 ++----- WEB-INF/resources/tr.lang.php | 7 ++----- WEB-INF/resources/zh-cn.lang.php | 7 ++----- WEB-INF/resources/zh-tw.lang.php | 7 ++----- WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 19 insertions(+), 46 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 645447f01..e941e1ee0 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -425,9 +425,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => 'Arve number', +'form.invoice.person' => 'Isik', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -538,8 +537,6 @@ "form.mail.sending_str" => 'teade saadetud', // invoice attributes -"form.invoice.number" => 'arve number', -"form.invoice.th.username" => 'isik', "form.invoice.th.time" => 'tunde', "form.invoice.th.rate" => 'hind', "form.invoice.th.summ" => 'summa', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 0a2d8109a..48c8a40b2 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -419,9 +419,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => 'Számla azonosító száma', +'form.invoice.person' => 'Személy', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -532,8 +531,6 @@ "form.mail.sending_str" => 'az üzenet elküldve', // invoice attributes -"form.invoice.number" => 'számla azonosító száma', -"form.invoice.th.username" => 'személy', "form.invoice.th.time" => 'óra', "form.invoice.th.rate" => 'tarifa', "form.invoice.th.summ" => 'darab', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 36540d3ce..b98362a27 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -419,9 +419,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => '送り状の番号', +'form.invoice.person' => '個人', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -532,8 +531,6 @@ "form.mail.sending_str" => '送信したメッセージ', // invoice attributes -"form.invoice.number" => '送り状の番号', -"form.invoice.th.username" => '個人', "form.invoice.th.time" => '時間', "form.invoice.th.rate" => '給料', "form.invoice.th.summ" => '数量', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index ccd1d134b..a434ca4f1 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -420,9 +420,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => '송장 번호', +'form.invoice.person' => '개인', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -533,8 +532,6 @@ "form.mail.sending_str" => '송신된 메시지', // invoice attributes -"form.invoice.number" => '송장 번호', -"form.invoice.th.username" => '개인', "form.invoice.th.time" => '시간', "form.invoice.th.rate" => '급여', "form.invoice.th.summ" => '수량', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 442947c63..657e4299b 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -414,9 +414,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => 'Fakturanummer', +'form.invoice.person' => 'Person', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -527,8 +526,6 @@ // "form.mail.sending_str" => 'the message has been sent', // invoice attributes -"form.invoice.number" => 'fakturanummer', -"form.invoice.th.username" => 'person', "form.invoice.th.time" => 'timer', "form.invoice.th.rate" => 'sats', "form.invoice.th.summ" => 'antall', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 94359cbdb..b2fa77dc5 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -422,9 +422,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => 'Numar factura', +'form.invoice.person' => 'Persoana', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -534,8 +533,6 @@ "form.mail.sending_str" => 'mesaj trimis', // invoice attributes -"form.invoice.number" => 'numar factura', -"form.invoice.th.username" => 'persoana', "form.invoice.th.time" => 'ore', "form.invoice.th.rate" => 'rata', "form.invoice.th.summ" => 'valoare', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 032cd8132..d0957ed63 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -432,9 +432,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => 'Fatura numarası', +'form.invoice.person' => 'Kişi', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -545,8 +544,6 @@ "form.mail.sending_str" => 'ileti yollandı', // invoice attributes -"form.invoice.number" => 'fatura numarası', -"form.invoice.th.username" => 'kişi', "form.invoice.th.time" => 'saatler', "form.invoice.th.rate" => 'tarife', "form.invoice.th.summ" => 'tutar', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7696ae7db..edf1cc93a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -405,9 +405,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => '发票号码', +'form.invoice.person' => '人', // TODO: is this correct? // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -518,8 +517,6 @@ "form.mail.sending_str" => '消息已发送', // invoice attributes -"form.invoice.number" => '发票号码', -"form.invoice.th.username" => '收费人', "form.invoice.th.time" => '小时数', "form.invoice.th.rate" => '费率', "form.invoice.th.summ" => '账号', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2952a3b2d..267a62673 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -415,9 +415,8 @@ // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). -// TODO: translate the following. -// 'form.invoice.number' => 'Invoice number', -// 'form.invoice.person' => 'Person', +'form.invoice.number' => '發票號碼', +'form.invoice.person' => '人', // TODO: is this correct? // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php // 'form.invoice.invoice_to_delete' => 'Invoice to delete', @@ -528,8 +527,6 @@ "form.mail.sending_str" => '消息已發送', // invoice attributes -"form.invoice.number" => '發票號碼', -"form.invoice.th.username" => '收費人', "form.invoice.th.time" => '小時數', "form.invoice.th.rate" => '費率', "form.invoice.th.summ" => '帳號', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0a2921123..c0cf348c9 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3952 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3953 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From c370348dba4b65ae74dc2b8d5bf1b9c0ed5f19cc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 15:16:21 +0000 Subject: [PATCH 0494/2515] A bit more cleanup in translations. --- WEB-INF/resources/ca.lang.php | 11 ++++------- WEB-INF/resources/cs.lang.php | 10 +++------- WEB-INF/resources/et.lang.php | 8 +------- WEB-INF/resources/hu.lang.php | 8 +------- WEB-INF/resources/ja.lang.php | 13 +++---------- WEB-INF/resources/ko.lang.php | 11 +++-------- WEB-INF/resources/no.lang.php | 7 +------ WEB-INF/resources/ro.lang.php | 8 +------- WEB-INF/resources/tr.lang.php | 13 +++---------- WEB-INF/resources/zh-cn.lang.php | 5 ----- WEB-INF/resources/zh-tw.lang.php | 5 ----- WEB-INF/templates/footer.tpl | 2 +- 12 files changed, 21 insertions(+), 80 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f1983350c..419c32b4c 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -207,9 +207,9 @@ 'label.comment' => 'Comentari', 'label.status' => 'Estat', 'label.tax' => 'Impost', +'label.subtotal' => 'Subtotal', +'label.total' => 'Total', // TODO: translate the following. -// 'label.subtotal' => 'Subtotal', -// 'label.total' => 'Total', // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', 'label.or' => 'o', @@ -239,7 +239,8 @@ // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', -// 'label.quantity' => 'Quantity', +'label.quantity' => 'Quantitat', +// TODO: translate the following. // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', @@ -518,10 +519,6 @@ "form.mail.sending_str" => 'Missatge enviat', // invoice attributes -"form.invoice.th.time" => 'Hores', -"form.invoice.th.rate" => 'Taxa', -"form.invoice.th.summ" => 'Quantitat', -"form.invoice.subtotal" => 'Subtotal', "form.invoice.mailinv_above" => 'Enviar aquesta factura per e-mail', "form.invoice.sending_str" => 'Factura enviada', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index e5e7ddcaa..6d83a0644 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -213,8 +213,7 @@ 'label.comment' => 'Komentář', 'label.status' => 'Status', 'label.tax' => 'DPH', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => 'Subtotal', // TODO: is this correct? 'label.total' => 'Celkem', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -247,7 +246,8 @@ // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', -// 'label.quantity' => 'Quantity', +'label.quantity' => 'Množství', +// TODO: translate the following. // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', @@ -533,10 +533,6 @@ "form.mail.sending_str" => 'zpráva odeslána', // invoice attributes -"form.invoice.th.time" => 'hodin', -"form.invoice.th.rate" => 'sazba', -"form.invoice.th.summ" => 'množství', -"form.invoice.subtotal" => 'subtotal', "form.invoice.mailinv_above" => 'poslat fakturu e-mailem', "form.invoice.sending_str" => 'faktura odeslána', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e941e1ee0..919738a6b 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -209,8 +209,7 @@ 'label.comment' => 'Kommentaar', 'label.status' => 'Seisund', 'label.tax' => 'Maks', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => 'Vahesumma', 'label.total' => 'Kokku', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -537,11 +536,6 @@ "form.mail.sending_str" => 'teade saadetud', // invoice attributes -"form.invoice.th.time" => 'tunde', -"form.invoice.th.rate" => 'hind', -"form.invoice.th.summ" => 'summa', -"form.invoice.subtotal" => 'vahesumma', -"form.invoice.customer" => 'klient', "form.invoice.mailinv_above" => 'saada see arve e-mailiga', "form.invoice.sending_str" => 'arve saadetud', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 48c8a40b2..31f1f1f08 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -211,8 +211,7 @@ 'label.comment' => 'Megjegyzés', 'label.status' => 'Státusz', 'label.tax' => 'Adó', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => 'Részösszeg', 'label.total' => 'Összesen', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -531,11 +530,6 @@ "form.mail.sending_str" => 'az üzenet elküldve', // invoice attributes -"form.invoice.th.time" => 'óra', -"form.invoice.th.rate" => 'tarifa', -"form.invoice.th.summ" => 'darab', -"form.invoice.subtotal" => 'részösszeg', -"form.invoice.customer" => 'Ügyfél', "form.invoice.mailinv_above" => 'küldjük el ezt a számlát e-mail-en', "form.invoice.sending_str" => 'a számla elküldve', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b98362a27..c6b1851b4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -163,9 +163,8 @@ 'label.end_date' => '終了日付', 'label.user' => 'ユーザー', 'label.users' => 'ユーザー', -// TODO: translate the following. -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', +'label.client' => 'クライアント', +'label.clients' => 'クライアント', 'label.option' => 'オプション', 'label.invoice' => '送り状', 'label.project' => 'プロジェクト', @@ -210,8 +209,7 @@ 'label.comment' => 'コメント', 'label.status' => '状態', 'label.tax' => '税', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => '小計', 'label.total' => '合計', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -531,11 +529,6 @@ "form.mail.sending_str" => '送信したメッセージ', // invoice attributes -"form.invoice.th.time" => '時間', -"form.invoice.th.rate" => '給料', -"form.invoice.th.summ" => '数量', -"form.invoice.subtotal" => '小計', -"form.invoice.customer" => 'クライアント', "form.invoice.mailinv_above" => '送り状をEメールで送信', "form.invoice.sending_str" => '送信した送り状', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a434ca4f1..8496c06cb 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -209,8 +209,7 @@ 'label.comment' => '코멘트', 'label.status' => '상태', 'label.tax' => '세금', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => '소계', 'label.total' => '합계', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -244,7 +243,8 @@ // 'label.cron_schedule' => 'Cron schedule', // 'label.what_is_it' => 'What is it?', // 'label.expense' => 'Expense', -// 'label.quantity' => 'Quantity', +'label.quantity' => '수량', +// TODO: translate the following. // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', @@ -532,11 +532,6 @@ "form.mail.sending_str" => '송신된 메시지', // invoice attributes -"form.invoice.th.time" => '시간', -"form.invoice.th.rate" => '급여', -"form.invoice.th.summ" => '수량', -"form.invoice.subtotal" => '소계', -"form.invoice.customer" => '클라이언트', "form.invoice.mailinv_above" => '이 송장을 이메일로 송신', "form.invoice.sending_str" => '송신한 송장', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 657e4299b..0e6da8916 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -210,8 +210,8 @@ 'label.comment' => 'Kommentar', 'label.status' => 'Status', 'label.tax' => 'MVA', +'label.subtotal' => 'Delsum', // TODO: translate the following. -// 'label.subtotal' => 'Subtotal', // 'label.total' => 'Total', // 'label.client_name' => 'Client name', // 'label.client_address' => 'Client address', @@ -526,10 +526,5 @@ // "form.mail.sending_str" => 'the message has been sent', // invoice attributes -"form.invoice.th.time" => 'timer', -"form.invoice.th.rate" => 'sats', -"form.invoice.th.summ" => 'antall', -"form.invoice.subtotal" => 'delsum', -"form.invoice.customer" => 'kommentar', "form.invoice.mailinv_above" => 'send denne fakturaen som e-post', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b2fa77dc5..1e60ed3ff 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -212,8 +212,7 @@ 'label.comment' => 'Comentariu', 'label.status' => 'Stare', 'label.tax' => 'Taxa', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => 'Subtotal', 'label.total' => 'Total', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -533,11 +532,6 @@ "form.mail.sending_str" => 'mesaj trimis', // invoice attributes -"form.invoice.th.time" => 'ore', -"form.invoice.th.rate" => 'rata', -"form.invoice.th.summ" => 'valoare', -"form.invoice.subtotal" => 'subtotal', -"form.invoice.customer" => 'client', "form.invoice.mailinv_above" => 'trimite aceasta factura pe email', "form.invoice.sending_str" => 'factura trimisa', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index d0957ed63..82a0c824f 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -172,12 +172,11 @@ 'label.end_date' => 'Son tarihi', 'label.user' => 'Kullanıcı', 'label.users' => 'Kullanıcılar', +'label.client' => 'Müşteri', +'label.clients' => 'Müşteriler', // TODO: translate the following. -// 'label.client' => 'Client', -// 'label.clients' => 'Clients', // 'label.option' => 'Option', 'label.invoice' => 'Fatura', -// TODO: translate the following. 'label.project' => 'Proje', 'label.projects' => 'Projeler', // TODO: translate the following. @@ -219,8 +218,7 @@ 'label.comment' => 'Yorum', 'label.status' => 'Durum', 'label.tax' => 'Vergi', -// TODO: translate the following. -// 'label.subtotal' => 'Subtotal', +'label.subtotal' => 'Alt toplamı', 'label.total' => 'Toplam', // TODO: translate the following. // 'label.client_name' => 'Client name', @@ -544,11 +542,6 @@ "form.mail.sending_str" => 'ileti yollandı', // invoice attributes -"form.invoice.th.time" => 'saatler', -"form.invoice.th.rate" => 'tarife', -"form.invoice.th.summ" => 'tutar', -"form.invoice.subtotal" => 'alt toplamı', -"form.invoice.customer" => 'müşteri', "form.invoice.mailinv_above" => 'bu faturayı e-posta ile yolla', "form.invoice.sending_str" => 'fatura yollandı', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index edf1cc93a..324cb916a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -517,11 +517,6 @@ "form.mail.sending_str" => '消息已发送', // invoice attributes -"form.invoice.th.time" => '小时数', -"form.invoice.th.rate" => '费率', -"form.invoice.th.summ" => '账号', -"form.invoice.subtotal" => '共计', -"form.invoice.customer" => '客户', "form.invoice.mailinv_above" => '通过电子邮件发送此发票', "form.invoice.sending_str" => '发票已送出', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 267a62673..65661728c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -527,11 +527,6 @@ "form.mail.sending_str" => '消息已發送', // invoice attributes -"form.invoice.th.time" => '小時數', -"form.invoice.th.rate" => '費率', -"form.invoice.th.summ" => '帳號', -"form.invoice.subtotal" => '共計', -"form.invoice.customer" => '客戶', "form.invoice.mailinv_above" => '通過電子郵件發送此發票', "form.invoice.sending_str" => '發票已送出', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c0cf348c9..278c9d116 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.12.3953 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3954 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 59f683c39fc2fdcca12a94867543d0016e0f459a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 15:31:55 +0000 Subject: [PATCH 0495/2515] A bit of refactoring and cleanup in translations. --- WEB-INF/resources/ca.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/cs.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/de.lang.php | 8 +++++++ WEB-INF/resources/et.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/hu.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/ja.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/ko.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/no.lang.php | 37 +++++++++++++++++++++++++++++--- WEB-INF/resources/pt.lang.php | 34 +++++++++++++++++++++++++++++ WEB-INF/resources/ro.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/tr.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/zh-cn.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/resources/zh-tw.lang.php | 35 +++++++++++++++++++++++++++++- WEB-INF/templates/footer.tpl | 2 +- 14 files changed, 417 insertions(+), 14 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 419c32b4c..78c38db01 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -479,6 +479,40 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => 'Crear un nou grup, creant un nou compte del manejador de l\\\'equip.
També pot importar dades de grups, d\\\'un arxiu xml d\\\'un altre servidor Anuko Time Tracker (no està permès col·lisions de login).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -519,6 +553,5 @@ "form.mail.sending_str" => 'Missatge enviat', // invoice attributes -"form.invoice.mailinv_above" => 'Enviar aquesta factura per e-mail', "form.invoice.sending_str" => 'Factura enviada', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 6d83a0644..520aac795 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -484,6 +484,40 @@ // "Vytvořit nový tým prostřednictvím účtu týmového manažera." Improve and check the entire string for accuracy. 'form.teams.hint' => 'Vytvořit nový tým prostřednictvím účtu týmového manažera.
Můžete také importovat týmová data z xml souboru z jiného time tracker serveru (nejsou povoleny shody login).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -533,6 +567,5 @@ "form.mail.sending_str" => 'zpráva odeslána', // invoice attributes -"form.invoice.mailinv_above" => 'poslat fakturu e-mailem', "form.invoice.sending_str" => 'faktura odeslána', ); diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 314fe265a..3b7a471d0 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -443,4 +443,12 @@ 'form.mail.footer' => 'Anuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source
Zeitverwaltungs-System. Besuchen Sie www.anuko.com für weitere Informationen.', 'form.mail.report_sent' => 'Der Bericht wurde gesendet.', 'form.mail.invoice_sent' => 'Die Rechnung wurde gesendet.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 919738a6b..7d3de6bfe 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -484,6 +484,40 @@ // TODO: translate the following. // 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -536,6 +570,5 @@ "form.mail.sending_str" => 'teade saadetud', // invoice attributes -"form.invoice.mailinv_above" => 'saada see arve e-mailiga', "form.invoice.sending_str" => 'arve saadetud', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 31f1f1f08..f305d87e3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -480,6 +480,40 @@ // TODO: fix form.teams.hint by translating it properly from the English string. Note that the ending is not translated at all. 'form.teams.hint' => 'Új csoport létrehozása egy csoport-vezetői jogosultsággal.
A csoport adatokat importálhatjuk XML-ből (no login collisions are allowed).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -530,6 +564,5 @@ "form.mail.sending_str" => 'az üzenet elküldve', // invoice attributes -"form.invoice.mailinv_above" => 'küldjük el ezt a számlát e-mail-en', "form.invoice.sending_str" => 'a számla elküldve', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index c6b1851b4..6aab0c86d 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -475,6 +475,40 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '新規チームの管理者のアカウントを生成して新規チームを作成します。
あなたはなお他のAnuko Time Trackerサーバのxmlのファイルからチームデータをインポートすることができます(ログインの衝突は許可されません)。', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -529,6 +563,5 @@ "form.mail.sending_str" => '送信したメッセージ', // invoice attributes -"form.invoice.mailinv_above" => '送り状をEメールで送信', "form.invoice.sending_str" => '送信した送り状', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 8496c06cb..3b87b2003 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -478,6 +478,40 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '신규 팀관리자 계정을 생성하여 신규 팀을 생성합니다.
또한 다른 Anuko Time Tracker 서버 에서 xml 파일로부터 팀 데이터를 임포트할수 있습니다 (로그인 충돌은 허용되지 안음).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -532,6 +566,5 @@ "form.mail.sending_str" => '송신된 메시지', // invoice attributes -"form.invoice.mailinv_above" => '이 송장을 이메일로 송신', "form.invoice.sending_str" => '송신한 송장', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 0e6da8916..05a4664bc 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -472,6 +472,40 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => 'Opprett et nytt team ved å opprette en ny team manager konto.
Du kan også importere team data fra en xml fil fra en annen Anuko Time Tracker server (ingen login kollisjoner er tillatt).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -524,7 +558,4 @@ // Note to translators: the strings below must be translated // "form.mail.footer_str" => 'Anuko Time Tracker is et enkelt, brukervennlig tidsregistreringssystem
basert på åpen kildekode. Besøk www.anuko.com for flere opplysninger.', // "form.mail.sending_str" => 'the message has been sent', - -// invoice attributes -"form.invoice.mailinv_above" => 'send denne fakturaen som e-post', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index e07154872..eb5212b06 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -464,6 +464,40 @@ // TODO: translate the following. // 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 1e60ed3ff..087d55a00 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -481,6 +481,40 @@ // TODO: check form.teams.hint for accuracy. 'form.teams.hint' => 'Adauga o noua echipa prin adaugarea unui nou cont de tip manager.
Deasemeni poti importa datele despre echipa dintr-un fisier xml generat de un alt server Anuko Time Tracker (nu sunt permise duplicate pentru login).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -532,6 +566,5 @@ "form.mail.sending_str" => 'mesaj trimis', // invoice attributes -"form.invoice.mailinv_above" => 'trimite aceasta factura pe email', "form.invoice.sending_str" => 'factura trimisa', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 82a0c824f..81001c30a 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -490,6 +490,40 @@ // TODO: check form.teams.hint for accuracy. I did not not how to translate "login", so this may be garbage now. 'form.teams.hint' => 'Yeni bir ekip yönetimi hesabı yaratarak yeni bir ekibi yaratın.
Ayrıca başka bir Anuko Time Tracker sunucusundan ekip bilgilerini bir xml dosyasından aktarabilirsiniz (login çakışmalarına izin verilmemekte).', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -542,6 +576,5 @@ "form.mail.sending_str" => 'ileti yollandı', // invoice attributes -"form.invoice.mailinv_above" => 'bu faturayı e-posta ile yolla', "form.invoice.sending_str" => 'fatura yollandı', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 324cb916a..53eda04d0 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -463,6 +463,40 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). 'form.teams.hint' => '通过创建新的团队经理账号来创建新团队。
您也可以从其它的Anuko时间追踪器服务器的xml文件导入团队数据(登录信息不能发生冲突)。', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -517,6 +551,5 @@ "form.mail.sending_str" => '消息已发送', // invoice attributes -"form.invoice.mailinv_above" => '通过电子邮件发送此发票', "form.invoice.sending_str" => '发票已送出', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 65661728c..25e4364f6 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -474,6 +474,40 @@ // TODO: translate the following. 'form.teams.hint' => '通過創建新的團隊經理帳號來創建新團隊。
您也可以從其它的Anuko時間追蹤器伺服器的xml檔導入團隊資料(登錄資訊不能發生衝突)。', +// Profile form. See example at https://timetracker.anuko.com/profile_edit.php. +// TODO: translate the following. +// 'form.profile.12_hours' => '12 hours', +// 'form.profile.24_hours' => '24 hours', +// 'form.profile.tracking_mode' => 'Tracking mode', +// 'form.profile.mode_time' => 'time', +// 'form.profile.mode_projects' => 'projects', +// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', +// 'form.profile.record_type' => 'Record type', +// 'form.profile.type_all' => 'all', +// 'form.profile.type_start_finish' => 'start and finish', +// 'form.profile.type_duration' => 'duration', +// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', +// 'form.profile.uncompleted_indicators_none' => 'do not show', +// 'form.profile.uncompleted_indicators_show' => 'show', +// 'form.profile.plugins' => 'Plugins', + +// Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +// TODO: translate the following. +// 'form.mail.from' => 'From', +// 'form.mail.to' => 'To', +// 'form.mail.report_subject' => 'Time Tracker Report', +// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.report_sent' => 'Report sent.', +// 'form.mail.invoice_sent' => 'Invoice sent.', + +// Quotas configuration form. +// TODO: translate the following. +// 'form.quota.year' => 'Year', +// 'form.quota.month' => 'Month', +// 'form.quota.quota' => 'Quota', +// 'form.quota.workday_hours' => 'Hours in work day', +// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', + // TODO: refactoring ongoing down from here. @@ -527,6 +561,5 @@ "form.mail.sending_str" => '消息已發送', // invoice attributes -"form.invoice.mailinv_above" => '通過電子郵件發送此發票', "form.invoice.sending_str" => '發票已送出', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 278c9d116..d95e5207e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- -{if defined('CUSTOM_TRANSLATION_DEBUG')} -{/if}
 Anuko Time Tracker 1.17.12.3954 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3955 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3d3375d59d89359453c6bd42e6b07f7d0354b448 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 15:58:30 +0000 Subject: [PATCH 0496/2515] A bit more recycling in translations. --- WEB-INF/resources/ca.lang.php | 17 +++-------------- WEB-INF/resources/cs.lang.php | 17 +++-------------- WEB-INF/resources/et.lang.php | 17 +++-------------- WEB-INF/resources/hu.lang.php | 17 +++-------------- WEB-INF/resources/ja.lang.php | 17 +++-------------- WEB-INF/resources/ko.lang.php | 17 +++-------------- WEB-INF/resources/no.lang.php | 12 ++---------- WEB-INF/resources/pt.lang.php | 9 ++------- WEB-INF/resources/ro.lang.php | 17 +++-------------- WEB-INF/resources/tr.lang.php | 17 +++-------------- WEB-INF/resources/zh-cn.lang.php | 17 +++-------------- WEB-INF/resources/zh-tw.lang.php | 17 +++-------------- WEB-INF/templates/footer.tpl | 2 +- 13 files changed, 35 insertions(+), 158 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 78c38db01..a835a37b0 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -497,13 +497,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'De', +'form.mail.to' => 'Per a', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'Factura enviada.', // Quotas configuration form. // TODO: translate the following. @@ -543,15 +543,4 @@ // report attributes "form.report.totals_only" => 'Només totals', "form.report.total" => 'Hores Totals', - -// mail form attributes -"form.mail.from" => 'De', -"form.mail.to" => 'Per a', -"form.mail.above" => 'Enviar aquest report por e-mail', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'Missatge enviat', - -// invoice attributes -"form.invoice.sending_str" => 'Factura enviada', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 520aac795..d36896949 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -502,13 +502,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Od', +'form.mail.to' => 'Komu', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'Faktura odeslána.', // Quotas configuration form. // TODO: translate the following. @@ -557,15 +557,4 @@ // report attributes "form.report.totals_only" => 'pouze součty', "form.report.total" => 'součty hodin', - -// mail form attributes -"form.mail.from" => 'od', -"form.mail.to" => 'komu', -"form.mail.above" => 'poslat sestavu e-mailem', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'zpráva odeslána', - -// invoice attributes -"form.invoice.sending_str" => 'faktura odeslána', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7d3de6bfe..dc67f8c0f 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -502,13 +502,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Kellelt', +'form.mail.to' => 'Kellele', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'Arve saadetud.', // Quotas configuration form. // TODO: translate the following. @@ -560,15 +560,4 @@ // report attributes "form.report.total" => 'tunde kokku', - -// mail form attributes -"form.mail.from" => 'kellelt', -"form.mail.to" => 'kellele', -"form.mail.above" => 'saada aruanne e-mailiga', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'teade saadetud', - -// invoice attributes -"form.invoice.sending_str" => 'arve saadetud', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index f305d87e3..94f3f25b4 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -498,13 +498,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Feladó', +'form.mail.to' => 'Címzett', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'A számla elküldve.', // Quotas configuration form. // TODO: translate the following. @@ -554,15 +554,4 @@ // report attributes "form.report.total" => 'összesített óraszám', - -// mail form attributes -"form.mail.from" => 'feladó', -"form.mail.to" => 'címzett', -"form.mail.above" => 'küldjük el ezt a riportot e-mail-ben...', -// Note to translators: the string below must be translated -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'az üzenet elküldve', - -// invoice attributes -"form.invoice.sending_str" => 'a számla elküldve', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6aab0c86d..266ed1bc4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -493,13 +493,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'から', +'form.mail.to' => 'まで', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => '送信した送り状。', // Quotas configuration form. // TODO: translate the following. @@ -553,15 +553,4 @@ // report attributes "form.report.title" => 'レポート', "form.report.total" => '合計時間', - -// mail form attributes -"form.mail.from" => 'から', -"form.mail.to" => 'まで', -"form.mail.above" => 'このレポートをEメールで送信', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => '送信したメッセージ', - -// invoice attributes -"form.invoice.sending_str" => '送信した送り状', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3b87b2003..c29cef869 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -496,13 +496,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => '부터', +'form.mail.to' => '까지', // TODO: is this correct? The meaning is that we send an email TO this person. // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => '송신한 송장.', // Quotas configuration form. // TODO: translate the following. @@ -556,15 +556,4 @@ // report attributes "form.report.title" => '보고서', "form.report.total" => '시간 총합', - -// mail form attributes -"form.mail.from" => '부터', -"form.mail.to" => '까지', -"form.mail.above" => '이 보고서를 이메일로 송신', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => '송신된 메시지', - -// invoice attributes -"form.invoice.sending_str" => '송신한 송장', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 05a4664bc..30e74cc58 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -490,9 +490,9 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Fra', +'form.mail.to' => 'Til', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', @@ -550,12 +550,4 @@ // report attributes "form.report.title" => 'rapporter', "form.report.total" => 'totalt antall timer', - -// mail form attributes -"form.mail.from" => 'fra', -"form.mail.to" => 'til', -"form.mail.above" => 'send denne rapporten som e-post', -// Note to translators: the strings below must be translated -// "form.mail.footer_str" => 'Anuko Time Tracker is et enkelt, brukervennlig tidsregistreringssystem
basert på åpen kildekode. Besøk www.anuko.com for flere opplysninger.', -// "form.mail.sending_str" => 'the message has been sent', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index eb5212b06..a63dded84 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -482,9 +482,9 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'De', +'form.mail.to' => 'Para', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', @@ -519,9 +519,4 @@ // report attributes "form.report.title" => 'relatórios', "form.report.total" => 'horas totais', - -// mail form attributes -"form.mail.from" => 'de', -"form.mail.to" => 'para', -"form.mail.above" => 'enviar este relatório por e-mail', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 087d55a00..643b8eb62 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -499,13 +499,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'De la', +'form.mail.to' => 'Catre', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'Factura trimisa.', // Quotas configuration form. // TODO: translate the following. @@ -556,15 +556,4 @@ // report attributes "form.report.title" => 'rapoarte', "form.report.total" => 'ore total', - -// mail form attributes -"form.mail.from" => 'de la', -"form.mail.to" => 'catre', -"form.mail.above" => 'trimite acest raport pe e-mail', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'mesaj trimis', - -// invoice attributes -"form.invoice.sending_str" => 'factura trimisa', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 81001c30a..0d4a1c30c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -508,13 +508,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => 'Kimden', +'form.mail.to' => 'Kime', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => 'Fatura yollandı.', // Quotas configuration form. // TODO: translate the following. @@ -566,15 +566,4 @@ // report attributes "form.report.title" => 'raporlar', "form.report.total" => 'saat toplamı', - -// mail form attributes -"form.mail.from" => 'kimden', -"form.mail.to" => 'kime', -"form.mail.above" => 'bu raporu e-posta ile yolla', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => 'ileti yollandı', - -// invoice attributes -"form.invoice.sending_str" => 'fatura yollandı', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 53eda04d0..7adc40769 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -481,13 +481,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => '从', +'form.mail.to' => '到', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => '发票已送出。', // Quotas configuration form. // TODO: translate the following. @@ -541,15 +541,4 @@ // report attributes "form.report.title" => '报告', "form.report.total" => '总计时间', - -// mail form attributes -"form.mail.from" => '从', -"form.mail.to" => '到', -"form.mail.above" => '通过电子邮件发送该报告', -// Note to translators: this string needs to be translated. -"form.mail.footer_str" => 'anuko时间跟踪器是一种简单、易用、开放源码的时间跟踪系统。 看 www.anuko网更多信息。', -"form.mail.sending_str" => '消息已发送', - -// invoice attributes -"form.invoice.sending_str" => '发票已送出', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 25e4364f6..ae4cb3f33 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -492,13 +492,13 @@ // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. +'form.mail.from' => '從', +'form.mail.to' => '到', // TODO: translate the following. -// 'form.mail.from' => 'From', -// 'form.mail.to' => 'To', // 'form.mail.report_subject' => 'Time Tracker Report', // 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', -// 'form.mail.invoice_sent' => 'Invoice sent.', +'form.mail.invoice_sent' => '發票已送出。', // Quotas configuration form. // TODO: translate the following. @@ -551,15 +551,4 @@ // report attributes "form.report.title" => '報告', "form.report.total" => '總計時間', - -// mail form attributes -"form.mail.from" => '從', -"form.mail.to" => '到', -"form.mail.above" => '通過電子郵件發送該報告', -// Note to translators: this string needs to be translated. -// "form.mail.footer_str" => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -"form.mail.sending_str" => '消息已發送', - -// invoice attributes -"form.invoice.sending_str" => '發票已送出', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d95e5207e..48403427a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if defined('CUSTOM_TRANSLATION_DEBUG')} + + + + + +{/if}
 Anuko Time Tracker 1.17.12.3955 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3956 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 33fe605aa1936612a3e358102b59e411a0a30f07 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 17:11:25 +0000 Subject: [PATCH 0497/2515] A bit of cleanup to keep things lean. --- WEB-INF/resources/ca.lang.php | 8 +------- WEB-INF/resources/cs.lang.php | 6 ------ WEB-INF/resources/da.lang.php | 2 -- WEB-INF/resources/de.lang.php | 2 -- WEB-INF/resources/en.lang.php | 2 -- WEB-INF/resources/es.lang.php | 3 +-- WEB-INF/resources/et.lang.php | 5 ----- WEB-INF/resources/fa.lang.php | 2 -- WEB-INF/resources/fi.lang.php | 2 -- WEB-INF/resources/fr.lang.php | 2 -- WEB-INF/resources/he.lang.php | 2 -- WEB-INF/resources/hu.lang.php | 5 ----- WEB-INF/resources/it.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 11 +++-------- WEB-INF/resources/ko.lang.php | 8 +------- WEB-INF/resources/nl.lang.php | 2 -- WEB-INF/resources/no.lang.php | 10 ++-------- WEB-INF/resources/pl.lang.php | 2 -- WEB-INF/resources/pt-br.lang.php | 2 -- WEB-INF/resources/pt.lang.php | 8 +------- WEB-INF/resources/ro.lang.php | 11 +++-------- WEB-INF/resources/ru.lang.php | 2 -- WEB-INF/resources/sk.lang.php | 2 -- WEB-INF/resources/sl.lang.php | 2 -- WEB-INF/resources/sr.lang.php | 2 -- WEB-INF/resources/sv.lang.php | 2 -- WEB-INF/resources/tr.lang.php | 11 +++-------- WEB-INF/resources/zh-cn.lang.php | 11 +++-------- WEB-INF/resources/zh-tw.lang.php | 11 +++-------- WEB-INF/templates/footer.tpl | 2 +- 30 files changed, 22 insertions(+), 120 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a835a37b0..2f12be3eb 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -186,9 +186,7 @@ // 'label.day_total' => 'Day total', // 'label.week_total' => 'Week total', // 'label.month_total' => 'Month total', -// 'label.today' => 'Today', -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', +'label.today' => 'Avui', // 'label.view' => 'View', 'label.edit' => 'Modificar', 'label.delete' => 'Eliminar', @@ -539,8 +537,4 @@ "form.people.rate" => 'Taxa per defecte en hores', "form.people.comanager" => 'Auxiliar del manejador', - -// report attributes -"form.report.totals_only" => 'Només totals', -"form.report.total" => 'Hores Totals', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d36896949..a6102e135 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -191,8 +191,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Dnes', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Upravit', 'label.delete' => 'Smazat', @@ -553,8 +551,4 @@ "form.people.rate" => 'hodinová sazba', "form.people.comanager" => 'spolumanažer', - -// report attributes -"form.report.totals_only" => 'pouze součty', -"form.report.total" => 'součty hodin', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 1feb503d9..d1b71bad4 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -162,8 +162,6 @@ 'label.week_total' => 'Ugens total', 'label.month_total' => 'Måneds total', 'label.today' => 'Idag', -'label.total_hours' => 'Timer total', -'label.total_cost' => 'Total pris', 'label.view' => 'Udseende', 'label.edit' => 'Rediger', 'label.delete' => 'Slet', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 3b7a471d0..bd41ecadf 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -160,8 +160,6 @@ 'label.week_total' => 'Summe (Woche)', 'label.month_total' => 'Summe (Monat)', 'label.today' => 'Heute', -'label.total_hours' => 'Gesamtstunden', -'label.total_cost' => 'Totale Kosten', 'label.view' => 'Ansicht', 'label.edit' => 'Editieren', 'label.delete' => 'Löschen', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index a5d835f40..365ff0e82 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -160,8 +160,6 @@ 'label.week_total' => 'Week total', 'label.month_total' => 'Month total', 'label.today' => 'Today', -'label.total_hours' => 'Total hours', -'label.total_cost' => 'Total cost', 'label.view' => 'View', 'label.edit' => 'Edit', 'label.delete' => 'Delete', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 3097be246..51ed5abc6 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -184,8 +184,7 @@ // 'label.week_total' => 'Week total', // 'label.month_total' => 'Month total', 'label.today' => 'Hoy', -'label.total_hours' => 'Horas totales', -// 'label.total_cost' => 'Total cost', +// TODO: translate the following. // 'label.view' => 'View', 'label.edit' => 'Modificar', 'label.delete' => 'Eliminar', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index dc67f8c0f..d78bf0fc4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -189,8 +189,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Täna', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Muuda', 'label.delete' => 'Kustuta', @@ -557,7 +555,4 @@ "form.people.rate" => 'vaikimisi tunni hind', "form.people.comanager" => 'kaashaldur', - -// report attributes -"form.report.total" => 'tunde kokku', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 3e77a65e6..d78445503 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -173,8 +173,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'امروز', -'label.total_hours' => 'مجموع ساعت', -'label.total_cost' => 'مجموع هزینه ها', 'label.view' => 'نمایش', 'label.edit' => 'ویرایش', 'label.delete' => 'حذف', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 4704047c5..946e1e63a 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -165,8 +165,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Tänään', -'label.total_hours' => 'Tunnit yhteensä', -'label.total_cost' => 'Hinta yhteensä', 'label.view' => 'Näytä', 'label.edit' => 'Muokkaa', 'label.delete' => 'Poista', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 95e7696c4..96034f7c7 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -161,8 +161,6 @@ 'label.week_total' => 'Total hebdomadaire', 'label.month_total' => 'Total mensuel', 'label.today' => 'Aujourd\\\'hui', -'label.total_hours' => 'Total des heures', -'label.total_cost' => 'Coût total', 'label.view' => 'Visionner', 'label.edit' => 'Modifier', 'label.delete' => 'Supprimer', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index ddadd67fa..be6be0b68 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -182,8 +182,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'היום', -'label.total_hours' => 'סך הכל שעות', -'label.total_cost' => 'סך הכל עלות', 'label.view' => 'הצג', 'label.edit' => 'ערוך', 'label.delete' => 'מחק', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 94f3f25b4..afc35d01f 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -190,8 +190,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Ma', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Szerkesztés', 'label.delete' => 'Törlés', @@ -551,7 +549,4 @@ "form.people.rate" => 'általános óradíj', "form.people.comanager" => 'helyettes', - -// report attributes -"form.report.total" => 'összesített óraszám', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index e26da1c49..7b747c568 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -185,9 +185,7 @@ // 'label.week_total' => 'Week total', // 'label.month_total' => 'Month total', 'label.today' => 'Oggi', -'label.total_hours' => 'Ore totali', // TODO: translate the following. -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Modifica', 'label.delete' => 'Elimina', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 266ed1bc4..6e4c10c2f 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -187,8 +187,6 @@ // 'label.month_total' => 'Month total', 'label.today' => '今日', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => '編集', 'label.delete' => '削除', @@ -270,8 +268,9 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => 'レポート', +'title.report' => 'レポート', +// TODO: translate the following. // 'title.send_report' => 'Sending Report', 'title.invoice' => '送り状', // TODO: translate the following. @@ -549,8 +548,4 @@ "form.people.rate" => 'デフォルト時間当り給料', "form.people.comanager" => '共同管理者', - -// report attributes -"form.report.title" => 'レポート', -"form.report.total" => '合計時間', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index c29cef869..f3d1a94dc 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -187,8 +187,6 @@ // 'label.month_total' => 'Month total', 'label.today' => '오늘', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => '편집', 'label.delete' => '삭제', @@ -271,7 +269,7 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', +'title.reports' => '보고서', 'title.report' => '보고서', // TODO: translate the following. // 'title.send_report' => 'Sending Report', @@ -552,8 +550,4 @@ "form.people.rate" => '디폴트 시간당 급여', "form.people.comanager" => '공동관리자', - -// report attributes -"form.report.title" => '보고서', -"form.report.total" => '시간 총합', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index af888d900..f4d0fec5a 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -160,8 +160,6 @@ 'label.week_total' => 'Week totaal', 'label.month_total' => 'Maand totaal', 'label.today' => 'Vandaag', -'label.total_hours' => 'Uren totaal', -'label.total_cost' => 'Totale kosten', 'label.view' => 'Bekijk', 'label.edit' => 'Wijzig', 'label.delete' => 'Verwijderen', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 30e74cc58..71d6ab135 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -188,8 +188,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'I dag', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Endre', 'label.delete' => 'Slett', @@ -268,8 +266,8 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => 'Rapporter', +'title.report' => 'Rapport', // 'title.send_report' => 'Sending Report', 'title.invoice' => 'Faktura', // TODO: translate the following. @@ -546,8 +544,4 @@ // Note to translators: the 2 strings below are missing and must be added and translated // "form.people.th.rate" => 'timesats', "form.people.rate" => 'timesats', - -// report attributes -"form.report.title" => 'rapporter', -"form.report.total" => 'totalt antall timer', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 086386f24..237d1e7aa 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -167,8 +167,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Dziś', -'label.total_hours' => 'Całkowita liczba godzin', -'label.total_cost' => 'Koszt całkowity', 'label.view' => 'Widok', 'label.edit' => 'Edycja', 'label.delete' => 'Usuń', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 4505b1fa5..12761d516 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -164,8 +164,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Hoje', -'label.total_hours' => 'Total de horas', -'label.total_cost' => 'Custo total', 'label.view' => 'Ver', 'label.edit' => 'Editar', 'label.delete' => 'Apagar', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index a63dded84..ff9c84fd6 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -182,8 +182,6 @@ // 'label.week_total' => 'Week total', // 'label.month_total' => 'Month total', // 'label.today' => 'Today', -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Editar', 'label.delete' => 'Apagar', @@ -261,8 +259,8 @@ // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', 'title.reports' => 'Relatórios', +'title.report' => 'Relatório', // TODO: translate the following. -// 'title.report' => 'Report', // 'title.send_report' => 'Sending Report', // 'title.invoice' => 'Invoice', // 'title.send_invoice' => 'Sending Invoice', @@ -515,8 +513,4 @@ // people form attributes "form.people.th.role" => 'regra', "form.people.manager" => 'gerente', - -// report attributes -"form.report.title" => 'relatórios', -"form.report.total" => 'horas totais', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 643b8eb62..cc705d551 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -191,8 +191,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Astazi', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', // TODO: confirm that label.edit and label.delete are translated correctly. 'label.edit' => 'Editează', @@ -274,8 +272,9 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => 'Rapoarte', +'title.report' => 'Raport', +// TODO: translate the following. // 'title.send_report' => 'Sending Report', 'title.invoice' => 'Factura', // TODO: translate the following. @@ -552,8 +551,4 @@ "form.people.rate" => 'pret pe ora implicit', "form.people.comanager" => 'co-manager', - -// report attributes -"form.report.title" => 'rapoarte', -"form.report.total" => 'ore total', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 67c28f816..b9493b467 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -160,8 +160,6 @@ 'label.week_total' => 'Итог за неделю', 'label.month_total' => 'Итог за месяц', 'label.today' => 'Сегодня', -'label.total_hours' => 'Итого часов', -'label.total_cost' => 'Итоговая стоимость', 'label.view' => 'Посмотреть', 'label.edit' => 'Редактировать', 'label.delete' => 'Удалить', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 44492dc20..b12e00a6b 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -173,8 +173,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Dnes', -'label.total_hours' => 'Hodín celkom', -'label.total_cost' => 'Náklady celkom', 'label.view' => 'Zobraziť', 'label.edit' => 'Upraviť', 'label.delete' => 'Vymazať', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 56d4a4cb0..74bd4b7ab 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -181,8 +181,6 @@ // 'label.week_total' => 'Week total', // 'label.month_total' => 'Month total', // 'label.today' => 'Today', -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Uredi', 'label.delete' => 'Izbriši', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 86868c90f..bdd8952e2 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -164,8 +164,6 @@ // TODO: translate the following. // 'label.month_total' => 'Month total', 'label.today' => 'Danas', -'label.total_hours' => 'Ukupno časova', -'label.total_cost' => 'Ukupna cena', 'label.view' => 'Pregledaj', 'label.edit' => 'Izmeni', 'label.delete' => 'Obriši', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index b4ea69d03..586957848 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -162,8 +162,6 @@ 'label.week_total' => 'Veckototal', 'label.month_total' => 'Månadstotal', 'label.today' => 'Idag', -'label.total_hours' => 'Totalt antal timmar', -'label.total_cost' => 'Total kostnad', 'label.view' => 'Visa', 'label.edit' => 'Redigera', 'label.delete' => 'Ta bort', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 0d4a1c30c..b1a372ca3 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -197,8 +197,6 @@ // 'label.month_total' => 'Month total', 'label.today' => 'Bugün', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => 'Düzenle', 'label.delete' => 'Sil', @@ -282,8 +280,9 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => 'Raporlar', +'title.report' => 'Rapor', +// TODO: translate the following. // 'title.send_report' => 'Sending Report', 'title.invoice' => 'Fatura', // TODO: translate the following. @@ -562,8 +561,4 @@ "form.people.rate" => 'varsayılan saat ücreti', "form.people.comanager" => 'yardımcı yönetici', - -// report attributes -"form.report.title" => 'raporlar', -"form.report.total" => 'saat toplamı', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7adc40769..60a89ad73 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -177,8 +177,6 @@ // 'label.month_total' => 'Month total', 'label.today' => '今天', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => '编辑', 'label.delete' => '删除', @@ -259,8 +257,9 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => '报告', +'title.report' => '报告', +// TODO: translate the following. // 'title.send_report' => 'Sending Report', 'title.invoice' => '发票', // TODO: translate the following. @@ -537,8 +536,4 @@ "form.people.rate" => '默认小时收费', "form.people.comanager" => '合作经理人', - -// report attributes -"form.report.title" => '报告', -"form.report.total" => '总计时间', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index ae4cb3f33..f149f63ba 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -186,8 +186,6 @@ // 'label.month_total' => 'Month total', 'label.today' => '今天', // TODO: translate the following. -// 'label.total_hours' => 'Total hours', -// 'label.total_cost' => 'Total cost', // 'label.view' => 'View', 'label.edit' => '編輯', 'label.delete' => '刪除', @@ -268,8 +266,9 @@ // 'title.add_predefined_expense' => 'Adding Predefined Expense', // 'title.edit_predefined_expense' => 'Editing Predefined Expense', // 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', +'title.reports' => '報告', +'title.report' => '報告', +// TODO: translate the following. // 'title.send_report' => 'Sending Report', 'title.invoice' => '發票', // TODO: translate the following. @@ -547,8 +546,4 @@ "form.people.rate" => '默認小時收費', "form.people.comanager" => '合作經理人', - -// report attributes -"form.report.title" => '報告', -"form.report.total" => '總計時間', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 48403427a..4371d4479 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3956 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3957 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 42c4dbf15f79f0b387b2ba05ed13f87929bdad17 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Feb 2018 17:43:13 +0000 Subject: [PATCH 0498/2515] Refactored Catalan translation. --- WEB-INF/resources/ca.lang.php | 74 +++++++++----------------------- WEB-INF/resources/cs.lang.php | 6 +-- WEB-INF/resources/da.lang.php | 4 +- WEB-INF/resources/de.lang.php | 4 +- WEB-INF/resources/en.lang.php | 4 +- WEB-INF/resources/es.lang.php | 4 +- WEB-INF/resources/et.lang.php | 6 +-- WEB-INF/resources/fa.lang.php | 4 +- WEB-INF/resources/fi.lang.php | 4 +- WEB-INF/resources/fr.lang.php | 4 +- WEB-INF/resources/he.lang.php | 4 +- WEB-INF/resources/hu.lang.php | 6 +-- WEB-INF/resources/it.lang.php | 4 +- WEB-INF/resources/ja.lang.php | 6 +-- WEB-INF/resources/ko.lang.php | 6 +-- WEB-INF/resources/nl.lang.php | 4 +- WEB-INF/resources/no.lang.php | 4 +- WEB-INF/resources/pl.lang.php | 4 +- WEB-INF/resources/pt.lang.php | 4 +- WEB-INF/resources/ro.lang.php | 6 +-- WEB-INF/resources/ru.lang.php | 4 +- WEB-INF/resources/sk.lang.php | 4 +- WEB-INF/resources/sl.lang.php | 4 +- WEB-INF/resources/sr.lang.php | 4 +- WEB-INF/resources/tr.lang.php | 6 +-- WEB-INF/resources/zh-cn.lang.php | 6 +-- WEB-INF/resources/zh-tw.lang.php | 6 +-- WEB-INF/templates/footer.tpl | 2 +- 28 files changed, 74 insertions(+), 124 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 2f12be3eb..3dd011aab 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -48,8 +48,8 @@ // TODO: translate the following. // 'menu.create_team' => 'Create Team', 'menu.profile' => 'Perfil', +'menu.time' => 'Temps', // TODO: translate the following. -// 'menu.time' => 'Time', // 'menu.expenses' => 'Expenses', 'menu.reports' => 'Informes', // TODO: translate the following. @@ -62,8 +62,7 @@ // TODO: translate the following. // 'menu.export' => 'Export', 'menu.clients' => 'Clients', -// TODO: translate the following. -// 'menu.options' => 'Options', +'menu.options' => 'Opcions', // Footer - strings on the bottom of most pages. // TODO: translate the following. @@ -115,8 +114,7 @@ 'button.login' => 'Iniciar sessió', 'button.now' => 'Ara', 'button.save' => 'Guardar', -// TODO: translate the following. -// 'button.copy' => 'Copy', +'button.copy' => 'Copiar', 'button.cancel' => 'Cancel·lar', 'button.submit' => 'Enviar', 'button.add_user' => 'Agregar usuari', @@ -166,8 +164,7 @@ 'label.users' => 'Usuaris', 'label.client' => 'Client', 'label.clients' => 'Clients', -// TODO: translate the following. -// 'label.option' => 'Option', +'label.option' => 'Opció', 'label.invoice' => 'Factura', 'label.project' => 'Projecte', 'label.projects' => 'Projectes', @@ -259,9 +256,10 @@ 'title.reset_password' => 'Restablir paraula de pas', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.time' => 'Temps', +'title.edit_time_record' => 'Modificant l\\\'historial de temps', +'title.delete_time_record' => 'Eliminant l\\\'historial de temps', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -286,10 +284,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Usuaris', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => 'Agregant usuari', +'title.edit_user' => 'Modificant usuari', +'title.delete_user' => 'Eliminant usuari', 'title.clients' => 'Clients', 'title.add_client' => 'Agregar client', 'title.edit_client' => 'Modificar client', @@ -306,7 +303,7 @@ // 'title.monthly_quotas' => 'Monthly Quotas', // 'title.export' => 'Exporting Team Data', // 'title.import' => 'Importing Team Data', -// 'title.options' => 'Options', +'title.options' => 'Opcions', 'title.profile' => 'Perfil', // TODO: translate the following. // 'title.cf_custom_fields' => 'Custom Fields', @@ -350,8 +347,8 @@ 'dropdown.status_active' => 'actiu', // TODO: translate the following. // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -370,8 +367,7 @@ 'form.change_password.tip' => 'Per restablir la paraula de pas, si us plau escrigui-la i faci clic en guardar.', // Time form. See example at https://timetracker.anuko.com/time.php. -// TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(hh:mm o 0.0h)', 'form.time.billable' => 'Facturable', // TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', @@ -379,8 +375,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -446,11 +441,11 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.role' => 'Rol', +'form.users.manager' => 'Manejador', +'form.users.comanager' => 'Auxiliar del manejador', +'form.users.rate' => 'Taxa', +'form.users.default_rate' => 'Taxa per defecte per hora', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -510,31 +505,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// my time form attributes -"form.mytime.title" => 'El meu temps', -"form.mytime.edit_title" => 'Modificant l\\\'historial de temps', -"form.mytime.del_str" => 'Eliminant l\\\'historial de temps', -"form.mytime.time_form" => ' (hh:mm)', -"form.mytime.total" => 'Hores totals: ', -"form.mytime.del_yes" => 'L\\\'historial de temps s\\\'ha eliminat amb èxit', -"form.mytime.no_finished_rec" => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error. Finalitzi sessió si ho necessita.', - -// people form attributes -"form.people.ppl_str" => 'Persones', -"form.people.createu_str" => 'Creant nou usuari', -"form.people.edit_str" => 'Modificant usuari', -"form.people.del_str" => 'Eliminant usuari', -"form.people.th.email" => 'e-mail', -"form.people.th.role" => 'Rol', -"form.people.th.rate" => 'Taxa', -"form.people.manager" => 'Manejador', -"form.people.comanager" => 'Auxiliar del manejador', - -"form.people.rate" => 'Taxa per defecte en hores', -"form.people.comanager" => 'Auxiliar del manejador', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index a6102e135..cbd56bd67 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -353,8 +353,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -548,7 +548,5 @@ "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', "form.people.comanager" => 'spolumanažer', - "form.people.rate" => 'hodinová sazba', -"form.people.comanager" => 'spolumanažer', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index d1b71bad4..1624695ef 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -307,8 +307,8 @@ 'dropdown.select_invoice' => '--- Vælg faktura ---', 'dropdown.status_active' => 'Aktive', 'dropdown.status_inactive' => 'Inaktive', -'dropdown.delete'=>'Slet', -'dropdown.do_not_delete'=>'Slet ikke', +'dropdown.delete' => 'Slet', +'dropdown.do_not_delete' => 'Slet ikke', // TODO: translate the following. // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index bd41ecadf..a3d13850c 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -297,8 +297,8 @@ 'dropdown.select_invoice' => '--- Rechnung auswählen ---', 'dropdown.status_active' => 'aktiv', 'dropdown.status_inactive' => 'inaktiv', -'dropdown.delete'=>'löschen', -'dropdown.do_not_delete'=>'nicht löschen', +'dropdown.delete' => 'löschen', +'dropdown.do_not_delete' => 'nicht löschen', 'dropdown.paid' => 'bezahlt', 'dropdown.not_paid' => 'nicht bezahlt', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 365ff0e82..bcdbd0195 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -301,8 +301,8 @@ 'dropdown.select_invoice' => '--- select invoice ---', 'dropdown.status_active' => 'active', 'dropdown.status_inactive' => 'inactive', -'dropdown.delete'=>'delete', -'dropdown.do_not_delete'=>'do not delete', +'dropdown.delete' => 'delete', +'dropdown.do_not_delete' => 'do not delete', 'dropdown.paid' => 'paid', 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 51ed5abc6..4befd52a6 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -348,8 +348,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d78bf0fc4..cdebba2ae 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -352,8 +352,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -552,7 +552,5 @@ "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', "form.people.comanager" => 'kaashaldur', - "form.people.rate" => 'vaikimisi tunni hind', -"form.people.comanager" => 'kaashaldur', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index d78445503..9ec505cfe 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -324,8 +324,8 @@ 'dropdown.status_active' => 'فعال', 'dropdown.status_inactive' => 'غیرفعال', // TODO: translate the following. -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 946e1e63a..b12941804 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -307,8 +307,8 @@ 'dropdown.select_invoice' => '--- valitse lasku ---', 'dropdown.status_active' => 'aktiivinen', 'dropdown.status_inactive' => 'inaktiivinen', -'dropdown.delete'=>'poista', -'dropdown.do_not_delete'=>'älä poista', +'dropdown.delete' => 'poista', +'dropdown.do_not_delete' => 'älä poista', // TODO: translate the following. // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 96034f7c7..23b1d9871 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -299,8 +299,8 @@ 'dropdown.select_invoice' => '--- selectionnez facture ---', 'dropdown.status_active' => 'actif', 'dropdown.status_inactive' => 'inactif', -'dropdown.delete'=>'supprimer', -'dropdown.do_not_delete'=>'ne pas supprimer', +'dropdown.delete' => 'supprimer', +'dropdown.do_not_delete' => 'ne pas supprimer', // TODO: translate the following. // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index be6be0b68..526610d56 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -332,8 +332,8 @@ 'dropdown.status_active' => 'פעיל', 'dropdown.status_inactive' => 'לא פעיל', // TODO: translate the following. -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index afc35d01f..1ee0c3154 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -349,8 +349,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -545,8 +545,6 @@ "form.people.th.role" => 'szerepkör', "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', -"form.people.comanager" => 'helyettes', - "form.people.rate" => 'általános óradíj', "form.people.comanager" => 'helyettes', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 7b747c568..687795ab6 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -344,8 +344,8 @@ 'dropdown.status_active' => 'attivo', 'dropdown.status_inactive' => 'inattivo', // TODO: translate the following. -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6e4c10c2f..316f9f38c 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -347,8 +347,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -544,8 +544,6 @@ "form.people.th.role" => 'ルール', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', -"form.people.comanager" => '共同管理者', - "form.people.rate" => 'デフォルト時間当り給料', "form.people.comanager" => '共同管理者', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f3d1a94dc..0e5a96a10 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -351,8 +351,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -546,8 +546,6 @@ "form.people.th.role" => '직위', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', -"form.people.comanager" => '공동관리자', - "form.people.rate" => '디폴트 시간당 급여', "form.people.comanager" => '공동관리자', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index f4d0fec5a..ddc13fbc5 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -301,8 +301,8 @@ 'dropdown.select_invoice' => '--- kies factuur ---', 'dropdown.status_active' => 'actief', 'dropdown.status_inactive' => 'inactief', -'dropdown.delete'=>'verwijderen', -'dropdown.do_not_delete'=>'niet verwijderen', +'dropdown.delete' => 'verwijderen', +'dropdown.do_not_delete' => 'niet verwijderen', 'dropdown.paid' => 'betaald', 'dropdown.not_paid' => 'niet betaald', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 71d6ab135..a4f6e34a3 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -346,8 +346,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 237d1e7aa..2f41e579e 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -310,8 +310,8 @@ 'dropdown.select_invoice' => '--- wybierz fakturę ---', 'dropdown.status_active' => 'aktywny', 'dropdown.status_inactive' => 'nieaktywny', -'dropdown.delete'=>'usuń', -'dropdown.do_not_delete'=>'nie usuwaj', +'dropdown.delete' => 'usuń', +'dropdown.do_not_delete' => 'nie usuwaj', // TODO: translate the following. // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index ff9c84fd6..70b934b45 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -336,8 +336,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index cc705d551..9bd8ea608 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -354,8 +354,8 @@ 'dropdown.status_active' => 'activ', 'dropdown.status_inactive' => 'inactiv', // TODO: translate the following. -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -548,7 +548,5 @@ "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', "form.people.comanager" => 'comanager', - "form.people.rate" => 'pret pe ora implicit', -"form.people.comanager" => 'co-manager', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index b9493b467..da15dfab2 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -299,8 +299,8 @@ 'dropdown.select_invoice' => '--- выберите счёт ---', 'dropdown.status_active' => 'активный', 'dropdown.status_inactive' => 'неактивный', -'dropdown.delete'=>'удалить', -'dropdown.do_not_delete'=>'не удалять', +'dropdown.delete' => 'удалить', +'dropdown.do_not_delete' => 'не удалять', 'dropdown.paid' => 'оплачено', 'dropdown.not_paid' => 'не оплачено', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index b12e00a6b..ff4948bd3 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -324,8 +324,8 @@ 'dropdown.status_active' => 'aktívny', 'dropdown.status_inactive' => 'neaktívny', // TODO: translate the following. -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 74bd4b7ab..ac7fea2c8 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -332,8 +332,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index bdd8952e2..4bd5d66a0 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -308,8 +308,8 @@ 'dropdown.select_invoice' => '--- odaberi račun ---', 'dropdown.status_active' => 'aktivan', 'dropdown.status_inactive' => 'neaktivan', -'dropdown.delete'=>'obriši', -'dropdown.do_not_delete'=>'nemoj obrisati', +'dropdown.delete' => 'obriši', +'dropdown.do_not_delete' => 'nemoj obrisati', // TODO: translate the following. // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b1a372ca3..a10282a6b 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -361,8 +361,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -558,7 +558,5 @@ "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', - "form.people.rate" => 'varsayılan saat ücreti', -"form.people.comanager" => 'yardımcı yönetici', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 60a89ad73..11e2a94ea 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -338,8 +338,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -533,7 +533,5 @@ "form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', - "form.people.rate" => '默认小时收费', -"form.people.comanager" => '合作经理人', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index f149f63ba..29cc38653 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -347,8 +347,8 @@ // 'dropdown.select_invoice' => '--- select invoice ---', // 'dropdown.status_active' => 'active', // 'dropdown.status_inactive' => 'inactive', -// 'dropdown.delete'=>'delete', -// 'dropdown.do_not_delete'=>'do not delete', +// 'dropdown.delete' => 'delete', +// 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', // 'dropdown.not_paid' => 'not paid', @@ -543,7 +543,5 @@ "form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', - "form.people.rate" => '默認小時收費', -"form.people.comanager" => '合作經理人', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4371d4479..6cf926fac 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} -{if isTrue('FILTER_BY_NOTES_DEBUG')} -{/if}
 Anuko Time Tracker 1.17.12.3957 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3958 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 85ffa2b2c0dfa383b1fbcf1c80ed9bf1ee3e7d0d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 9 Feb 2018 23:56:18 +0000 Subject: [PATCH 0499/2515] Minor improvement in Italian translation. --- WEB-INF/resources/it.lang.php | 5 +++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 687795ab6..51bb09fab 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -50,8 +50,8 @@ // 'menu.create_team' => 'Create Team', 'menu.profile' => 'Profilo', 'menu.time' => 'Tempo', +'menu.expenses' => 'Spese', // TODO: translate the following. -// 'menu.expenses' => 'Expenses', // 'menu.reports' => 'Reports', 'menu.charts' => 'Grafici', 'menu.projects' => 'Progetti', @@ -259,7 +259,8 @@ // 'title.time' => 'Time', // 'title.edit_time_record' => 'Editing Time Record', // 'title.delete_time_record' => 'Deleting Time Record', -// 'title.expenses' => 'Expenses', +'title.expenses' => 'Spese', +// TODO: translate the following. // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', // 'title.predefined_expenses' => 'Predefined Expenses', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 6cf926fac..c52c890ee 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3958 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3959 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 983deb02101ef03810b3b5e176bc382004225234 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 00:19:51 +0000 Subject: [PATCH 0500/2515] Minor recylcing in Czech file. --- WEB-INF/resources/cs.lang.php | 13 +++++++------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index cbd56bd67..cb8bbcaf8 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -253,6 +253,10 @@ // 'label.week_list' => 'Week list', // Form titles. +// TODO: Improve titles for consistency, so that each title explains correctly what each +// page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. +// Compare with English file to see how it is done there and do Czech titles similarly. +// Specifically: Vytváření vs Pridat, etc. 'title.login' => 'Přihlásit', // TODO: translate the following. // 'title.teams' => 'Teams', @@ -291,10 +295,11 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Uživatelů', +'title.add_user' => 'Vytváření uživatele', // TODO: Need to be consistent with all titles. // TODO: translate the following. -// 'title.add_user' => 'Adding User', // 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.delete_user' => 'Smazat uživatele', +// TODO: translate the following. 'title.clients' => 'Zákazníci', 'title.add_client' => 'Přidat zákazníka', 'title.edit_client' => 'Upravit zákazníka', @@ -540,10 +545,6 @@ "form.profile.showchart" => 'zobrazuj grafy', // people form attributes -"form.people.ppl_str" => 'pracovnící', -"form.people.createu_str" => 'vytváření nového uživatele', -"form.people.edit_str" => 'nastavení uživatele', -"form.people.del_str" => 'smazat uživatele', "form.people.th.role" => 'role', "form.people.th.rate" => 'sazba', "form.people.manager" => 'manažer', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c52c890ee..ab06c723a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + - + {/if} +{if isTrue('FILTER_BY_NOTES_DEBUG')} + + + + + + +{/if}
 Anuko Time Tracker 1.17.12.3959 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3960 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6eec0ced202722200058b15618edeae6b36541e8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 01:35:07 +0000 Subject: [PATCH 0501/2515] Finished refactoring Czech translation. --- WEB-INF/resources/cs.lang.php | 52 ++++++++--------------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index cb8bbcaf8..8639a9ab1 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -101,7 +101,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', // 'error.no_login' => 'No user with this login.', -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'Vaše databáze je prázdná. Přihlašte se jako admin a vytvořte nový tým.', 'error.upload' => 'Chyba přenosu souboru.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -201,7 +201,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID', 'label.language' => 'Jazyk', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -224,7 +224,7 @@ // TODO: translate the following. // 'label.on_behalf' => 'on behalf of', 'label.role_manager' => '(manažer)', -'label.role_comanager' => '(co-manažer)', +'label.role_comanager' => '(spolumanažer)', 'label.role_admin' => '(administrator)', // TODO: translate the following. // 'label.page' => 'Page', @@ -258,11 +258,11 @@ // Compare with English file to see how it is done there and do Czech titles similarly. // Specifically: Vytváření vs Pridat, etc. 'title.login' => 'Přihlásit', +'title.teams' => 'Týmy', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Smazat tým', 'title.reset_password' => 'Resetovat heslo', // TODO: translate the following. // 'title.change_password' => 'Changing Password', @@ -387,8 +387,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Záznam byl uložen pouze s časem zahájení. Není to chyba.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -454,10 +453,11 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', +'form.users.role' => 'Role', +'form.users.manager' => 'Manažer', +'form.users.comanager' => 'Spolumanažer', +'form.users.rate' => 'Sazba', +// TODO: translate the following. // 'form.users.default_rate' => 'Default hourly rate', // Clients form. See example at https://timetracker.anuko.com/clients.php @@ -520,34 +520,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -"form.admin.profile.title" => 'týmy', -"form.admin.profile.noprofiles" => 'vaše databáze je prázdná. přihlašte se jako admin a vytvořte nový tým.', -"form.admin.profile.comment" => 'smazat tým', -"form.admin.profile.th.id" => 'id', -"form.admin.profile.th.active" => 'aktovní', - -// my time form attributes -"form.mytime.total" => 'součet hodin: ', -"form.mytime.del_yes" => 'časový záznam úspěšně odstraněn', -"form.mytime.no_finished_rec" => 'záznam byl uložen pouze s časem zahájení. není to chyba. můžete se odhlásit, potřebujete-li.', -"form.mytime.warn_tozero_rec" => 'tento záznam musí být smazán, neboť období je uzamčeno', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'vytvořit nový manažerský účet', -"form.profile.edit_title" => 'upravit profil', - -"form.profile.showchart" => 'zobrazuj grafy', - -// people form attributes -"form.people.th.role" => 'role', -"form.people.th.rate" => 'sazba', -"form.people.manager" => 'manažer', -"form.people.comanager" => 'spolumanažer', -"form.people.rate" => 'hodinová sazba', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ab06c723a..b07014be3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- -{if constant('2FA_DEBUG')} @@ -51,7 +50,6 @@ License: See license.txt *} {$i18n.label.what_is_it} -{/if} diff --git a/initialize.php b/initialize.php index d56c43b36..f3138065a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.2.5667"); +define("APP_VERSION", "1.21.2.5668"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index a097c8883..69377fed2 100644 --- a/login.php +++ b/login.php @@ -43,8 +43,12 @@ // Check user login. $loginSucceeded = $auth->doLogin($cl_login, $cl_password); - if (!$loginSucceeded) + if ($loginSucceeded) { + // Remember user login in a cookie. + setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); + } else { $err->add($i18n->get('error.auth')); + } } // Do we have to use 2FA? @@ -114,9 +118,6 @@ if ($current_user_date) $_SESSION['date'] = $current_user_date; - // Remember user login in a cookie. - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - // Redirect, depending on user role. if ($user->can('administer_site')) { header('Location: admin_groups.php'); From e4f35b788164da94bbbdbb9f376d9e3ee970ed1a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 19 Mar 2022 14:16:55 +0000 Subject: [PATCH 2361/2515] Starting work on allowing multiple uncompleted entries. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/group_edit.tpl | 11 +++++++++++ group_edit.php | 6 ++++++ initialize.php | 2 +- 33 files changed, 53 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 5db492323..8b3182047 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -593,6 +593,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index c689bafbc..fd4ba142b 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -605,6 +605,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index e2a0da44e..4e41f9dd3 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -571,6 +571,7 @@ 'form.group_edit.type_duration' => 'Varighed', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', 'form.group_edit.uncompleted_indicators' => 'Uafsluttede indikatore', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 10c6cba46..989afc571 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -546,6 +546,8 @@ 'form.group_edit.type_start_finish' => 'Start und Ende', 'form.group_edit.type_duration' => 'Dauer', 'form.group_edit.punch_mode' => 'Stechuhr-Modus', +// TODO: translate the following. +// 'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Erlaube Überschneidung', 'form.group_edit.future_entries' => 'Einträge in der Zukunft', 'form.group_edit.uncompleted_indicators' => 'Zeige unfertige Einträge', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index fb31f0f85..576be5b97 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -526,6 +526,7 @@ 'form.group_edit.type_start_finish' => 'start and finish', 'form.group_edit.type_duration' => 'duration', 'form.group_edit.punch_mode' => 'Punch mode', +'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Allow overlap', 'form.group_edit.future_entries' => 'Future entries', 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index bbb923fd3..3f815af04 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -607,6 +607,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e698f9391..76417e948 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -580,6 +580,8 @@ 'form.group_edit.type_start_finish' => 'algus ja lõpp', 'form.group_edit.type_duration' => 'vahemik', 'form.group_edit.punch_mode' => 'Kellast-kellani režiim', +// TODO: translate the following. +// 'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Luba ajaline ülekate', 'form.group_edit.future_entries' => 'Tuleviku kirjed', 'form.group_edit.uncompleted_indicators' => 'Lõpetamata kirjete indikaator', // TODO: Fix this. Indicators (plural), not indicator. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 7a2e8fbca..d4a52de89 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -594,6 +594,7 @@ 'form.group_edit.type_duration' => 'مدت زمان', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 4b6a1832d..d4850d85f 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -578,6 +578,7 @@ 'form.group_edit.type_duration' => 'kesto', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index b6d170271..7d2bb08cc 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -568,6 +568,7 @@ 'form.group_edit.type_duration' => 'Durée', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index a7eec7329..222c98b05 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -558,6 +558,8 @@ 'form.group_edit.type_start_finish' => 'αρχή και τέλος', 'form.group_edit.type_duration' => 'διάρκεια', 'form.group_edit.punch_mode' => 'Λειτουργία διάτρησης', +// TODO: translate the following. +// 'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Επικάλυψη επιτρεπτή', 'form.group_edit.future_entries' => 'Μελλοντικές καταχωρήσεις', 'form.group_edit.uncompleted_indicators' => 'Μη ολοκληρωμένες ενδείξεις', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index e4ebe5198..450fa5859 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -598,6 +598,7 @@ 'form.group_edit.type_duration' => 'משך זמן', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 7c761eec5..3b4069a31 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -597,6 +597,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index a873bb477..d1925e638 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -573,6 +573,7 @@ 'form.group_edit.type_duration' => 'durata', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', 'form.group_edit.uncompleted_indicators' => 'Indicatori incompleti', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 9d5807078..602427b16 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -600,6 +600,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 59222f086..2200b7080 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -598,6 +598,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 6503da028..497d941ef 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -516,6 +516,8 @@ 'form.group_edit.type_start_finish' => 'begin en einde', 'form.group_edit.type_duration' => 'duur', 'form.group_edit.punch_mode' => 'Start/stop modus', +// TODO: translate the following. +// 'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Sta overlapping van tijden toe', 'form.group_edit.future_entries' => 'Toevoegingen toestaan in de toekomst', 'form.group_edit.uncompleted_indicators' => 'Onvolledige indicatoren', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 255495601..f45cbf120 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -600,6 +600,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 3a91e417d..e6bf9b24d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -580,6 +580,7 @@ 'form.group_edit.type_duration' => 'czas trwania', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index af1c6e943..36a20c20b 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -514,6 +514,8 @@ 'form.group_edit.type_start_finish' => 'início e fim', 'form.group_edit.type_duration' => 'duração', 'form.group_edit.punch_mode' => 'Modo punch', +// TODO: translate the following. +// 'form.group_edit.one_uncompleted' => 'One uncompleted', 'form.group_edit.allow_overlap' => 'Permitir sobreposição', 'form.group_edit.future_entries' => 'Entradas futuros', 'form.group_edit.uncompleted_indicators' => 'Indicadores incompletos', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 8b915d4db..5def67598 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -578,6 +578,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 5f267efa1..05e6fe5a7 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -601,6 +601,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index c64c8e9c4..2fbe0dfbe 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -513,6 +513,7 @@ 'form.group_edit.type_start_finish' => 'начало и конец', 'form.group_edit.type_duration' => 'длительность', 'form.group_edit.punch_mode' => 'Пробивать время', +'form.group_edit.one_uncompleted' => 'Одна незавершённая', 'form.group_edit.allow_overlap' => 'Возможное перекрывание', 'form.group_edit.future_entries' => 'Будущие записи', 'form.group_edit.uncompleted_indicators' => 'Индикаторы незавершения', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 98d429610..440944c78 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -584,6 +584,7 @@ 'form.group_edit.type_duration' => 'trvanie', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 0f757c7d2..7ad63d0ec 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -574,6 +574,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 60c504ca0..1fc9691fb 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -580,6 +580,7 @@ 'form.group_edit.type_duration' => 'trajanje', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 06e7f46af..f3a943154 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -577,6 +577,7 @@ 'form.group_edit.type_duration' => 'Varaktighet', // TODO: translate the following. // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', 'form.group_edit.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9d8ef4111..b8763bf2c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -614,6 +614,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 1a91e596f..4c797a3c5 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -589,6 +589,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0a2f8510c..1cf542d9e 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -592,6 +592,7 @@ // 'form.group_edit.type_start_finish' => 'start and finish', // 'form.group_edit.type_duration' => 'duration', // 'form.group_edit.punch_mode' => 'Punch mode', +// 'form.group_edit.one_uncompleted' => 'One uncompleted', // 'form.group_edit.allow_overlap' => 'Allow overlap', // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index 05a134dd9..673af5e23 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -110,6 +110,17 @@ function chLocation(newLocation) { document.location = newLocation; } {$i18n.label.what_is_it} +{if constant('ONE_UNCOMPLETED_DEBUG')} + + + + + + +{/if} diff --git a/group_edit.php b/group_edit.php index ab3065d52..dbfca56bb 100644 --- a/group_edit.php +++ b/group_edit.php @@ -66,6 +66,7 @@ $cl_project_required = $request->getParameter('project_required'); $cl_record_type = $request->getParameter('record_type'); $cl_punch_mode = (bool)$request->getParameter('punch_mode'); + $cl_one_uncompleted = (bool)$request->getParameter('one_uncompleted'); $cl_allow_overlap = (bool)$request->getParameter('allow_overlap'); $cl_future_entries = (bool)$request->getParameter('future_entries'); $cl_uncompleted_indicators = (bool)$request->getParameter('uncompleted_indicators'); @@ -82,6 +83,7 @@ $cl_project_required = $group['project_required']; $cl_record_type = $group['record_type']; $cl_punch_mode = $config->getDefinedValue('punch_mode'); + $cl_one_uncompleted = $config->getDefinedValue('one_uncompleted'); $cl_allow_overlap = $config->getDefinedValue('allow_overlap'); $cl_future_entries = $config->getDefinedValue('future_entries'); $cl_uncompleted_indicators = $config->getDefinedValue('uncompleted_indicators'); @@ -166,6 +168,9 @@ // Punch mode checkbox. $form->addInput(array('type'=>'checkbox','name'=>'punch_mode','value'=>$cl_punch_mode)); +// One uncompleted. +$form->addInput(array('type'=>'checkbox','name'=>'one_uncompleted','value'=>$cl_one_uncompleted)); + // Allow overlap checkbox. $form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap)); @@ -200,6 +205,7 @@ if ($err->no()) { // Update config. $config->setDefinedValue('punch_mode', $cl_punch_mode); + $config->setDefinedValue('one_uncompleted', $cl_one_uncompleted); $config->setDefinedValue('allow_overlap', $cl_allow_overlap); $config->setDefinedValue('future_entries', $cl_future_entries); $config->setDefinedValue('uncompleted_indicators', $cl_uncompleted_indicators); diff --git a/initialize.php b/initialize.php index f3138065a..0295c2bc6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.2.5668"); +define("APP_VERSION", "1.21.2.5669"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 630f9ded901a89ccdf665405bf708961540eb6d3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Mar 2022 15:25:17 +0000 Subject: [PATCH 2362/2515] Implemented multiple uncompleted entries with config option. --- WEB-INF/lib/ttTimeHelper.class.php | 44 ++++++++++++++++++++++++++---- WEB-INF/templates/group_edit.tpl | 2 -- WEB-INF/templates/puncher.tpl | 6 ++-- WEB-INF/templates/time.tpl | 6 ---- WEB-INF/templates/time_script.tpl | 16 +++++++++++ initialize.php | 2 +- puncher.php | 20 ++++++++------ time.php | 4 ++- time_edit.php | 4 ++- 9 files changed, 77 insertions(+), 27 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index b45c6d17f..fa110fa40 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -449,7 +449,6 @@ static function insert($fields) } else { $duration = ttTimeHelper::toDuration($start, $finish); if ($duration === false) $duration = 0; - if (!$duration && ttTimeHelper::getUncompleted($user_id)) return false; $sql = "insert into tt_log (user_id, group_id, org_id, date, start, duration, client_id, project_id, task_id, invoice_id, comment, billable, paid, created, created_ip, created_by) ". "values ($user_id, $group_id, $org_id, ".$mdb2->quote($date).", '$start', '$duration', ".$mdb2->quote($client).", ".$mdb2->quote($project).", ".$mdb2->quote($task).", ".$mdb2->quote($invoice).", ".$mdb2->quote($note).", $billable, $paid $created_v)"; @@ -512,9 +511,9 @@ static function update($fields) $duration = ttTimeHelper::toDuration($start, $finish); if ($duration === false) $duration = 0; - $uncompleted = ttTimeHelper::getUncompleted($user_id); - if (!$duration && $uncompleted && ($uncompleted['id'] != $id)) - return false; + //$uncompleted = ttTimeHelper::getUncompleted($user_id); + //if (!$duration && $uncompleted && ($uncompleted['id'] != $id)) +// return false; $sql = "UPDATE tt_log SET start = '$start', duration = '$duration', client_id = ".$mdb2->quote($client).", project_id = ".$mdb2->quote($project).", task_id = ".$mdb2->quote($task).", ". "comment = ".$mdb2->quote($note)."$billable_part $paid_part $modified_part, date = '$date' WHERE id = $id and user_id = $user_id and group_id = $group_id and org_id = $org_id"; @@ -673,10 +672,43 @@ static function getTimeForMonth2($date) { // getUncompleted - retrieves an uncompleted record for user, if one exists. static function getUncompleted($user_id) { + + global $user; + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $mdb2 = getConnection(); + + $sql = "select id, start, date from tt_log". + " where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1". + " and group_id = $group_id and org_id = $org_id"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + if (!$res->numRows()) { + return false; + } + if ($val = $res->fetchRow()) { + return $val; + } + } + return false; + } + + // getFirstUncompletedForDate - retrieves first found uncompleted record for user for a specific date, if one exists. + static function getFirstUncompletedForDate($user_id, $date) { + + $user_id = (int) $user_id; // Protection against sql injection. + + global $user; + $group_id = $user->getGroup(); + $org_id = $user->org_id; + $mdb2 = getConnection(); $sql = "select id, start, date from tt_log". - " where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1"; + " where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1". + " and group_id = $group_id and org_id = $org_id and date = ".$mdb2->quote($date). + " order by start"; // Ordering by start time to get the eraliest uncompleted for date. $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { if (!$res->numRows()) { @@ -740,6 +772,8 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { // getRecord - retrieves a time record identified by its id. static function getRecord($id) { global $user; + + $id = (int) $id; // Protection against sql injections. $user_id = $user->getUser(); $group_id = $user->getGroup(); diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index 673af5e23..909b485e6 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -110,7 +110,6 @@ function chLocation(newLocation) { document.location = newLocation; } {$i18n.label.what_is_it} -{if constant('ONE_UNCOMPLETED_DEBUG')} @@ -120,7 +119,6 @@ function chLocation(newLocation) { document.location = newLocation; } {$i18n.label.what_is_it} -{/if} diff --git a/WEB-INF/templates/puncher.tpl b/WEB-INF/templates/puncher.tpl index 8060c2ff5..9190af396 100644 --- a/WEB-INF/templates/puncher.tpl +++ b/WEB-INF/templates/puncher.tpl @@ -48,11 +48,11 @@ function stopTimer() { } -{if $uncompleted} +{if $uncompleted_today} + {if $show_navigation}
{$i18n.label.day_view} @@ -113,6 +121,9 @@ License: See license.txt *}
 Anuko Time Tracker 1.17.12.3960 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3961 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 21bd99dd548c6dfb2b50d8056f36a7c9fd6f22ee Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 13:56:38 +0000 Subject: [PATCH 0502/2515] Some recycling work in Chinese translations. --- WEB-INF/resources/zh-cn.lang.php | 13 ++++--------- WEB-INF/resources/zh-tw.lang.php | 13 ++++--------- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 11e2a94ea..0e22e6c6d 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -239,8 +239,8 @@ // Form titles. 'title.login' => '登录', +'title.teams' => '团队', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', @@ -275,10 +275,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => '用户', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => '添加用户', // TODO: is this correct? +'title.edit_user' => '编辑用户', +'title.delete_user' => '删除用户', 'title.clients' => '客户', 'title.add_client' => '添加客户', 'title.edit_client' => '编辑客户', @@ -525,10 +524,6 @@ "form.profile.showchart" => '显示饼状图', // people form attributes -"form.people.ppl_str" => '人员', -"form.people.createu_str" => '新建用户', -"form.people.edit_str" => '编辑用户', -"form.people.del_str" => '删除用户', "form.people.th.role" => '角色', "form.people.th.rate" => '费率', "form.people.manager" => '经理', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 29cc38653..6bd81db95 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -248,8 +248,8 @@ // Form titles. 'title.login' => '登錄', +'title.teams' => '團隊', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', @@ -284,10 +284,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => '用戶', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => '添加用戶', // TODO: is this correct? +'title.edit_user' => '編輯用戶', +'title.delete_user' => '刪除用戶', 'title.clients' => '客戶', 'title.add_client' => '添加客戶', 'title.edit_client' => '編輯客戶', @@ -535,10 +534,6 @@ "form.profile.showchart" => '顯示餅狀圖', // people form attributes -"form.people.ppl_str" => '人員', -"form.people.createu_str" => '新建用戶', -"form.people.edit_str" => '編輯用戶', -"form.people.del_str" => '刪除用戶', "form.people.th.role" => '角色', "form.people.th.rate" => '費率', "form.people.manager" => '經理', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b07014be3..210546a4e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3961 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3962 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From cd2030962fdd5e3a3069d085acef37278e2e58eb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 14:16:48 +0000 Subject: [PATCH 0503/2515] A bit more recycling in translations. --- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 13 ++++--------- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 9 files changed, 12 insertions(+), 17 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index cdebba2ae..f7343e9c4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -253,8 +253,8 @@ // Compare with English file to see how it is done there and do Estonian titles similarly. // Specifically: lisamine vs lisa, etc. 'title.login' => 'Login', +'title.teams' => 'Meeskonnad', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1ee0c3154..0de7b8756 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -250,8 +250,8 @@ // Form titles. 'title.login' => 'Bejelentkezés', +'title.teams' => 'Csoportok', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 316f9f38c..2c942fd81 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -250,8 +250,8 @@ // Form titles. 'title.login' => 'ログイン', +'title.teams' => 'チーム', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 0e5a96a10..f57502288 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -251,8 +251,8 @@ // Form titles. 'title.login' => '로그인', +'title.teams' => '팀', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 9bd8ea608..7eb1ab2cb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -254,8 +254,8 @@ // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. // Compare with English file to see how it is done there and do Romanian titles similarly. 'title.login' => 'Autentificare', +'title.teams' => 'Echipe', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index ac7fea2c8..bceace78d 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -238,8 +238,8 @@ // Form titles. 'title.login' => 'Prijava', +'title.teams' => 'Timi', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a10282a6b..679c410e2 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -262,8 +262,8 @@ // Compare with English file to see how it is done there and do Romanian titles similarly. // Specifically: compare project and client titles and see how they differ. 'title.login' => 'Giriş', +'title.teams' => 'Ekipler', // TODO: translate the following. -// 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', // 'title.delete_team' => 'Deleting Team', @@ -298,10 +298,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Kullanıcılar', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => 'Kullanıcı yarat', // TODO: we need consistency with all titles. Why not ekleniyor? +'title.edit_user' => 'Kullanıcı düzenleniyor', +'title.delete_user' => 'Kullanıcı siliniyor', 'title.clients' => 'Müşteriler', 'title.add_client' => 'Müşteri ekle', 'title.edit_client' => 'Müşteriyi düzenle', @@ -550,10 +549,6 @@ "form.profile.edit_title" => 'profili düzenliyor', // people form attributes -"form.people.ppl_str" => 'insanlar', -"form.people.createu_str" => 'yeni kullanıcı yarat', -"form.people.edit_str" => 'kullanıcı düzenleniyor', -"form.people.del_str" => 'kullanıcı siliniyor', "form.people.th.role" => 'rol', "form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 6bd81db95..c40d31cc3 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -56,7 +56,7 @@ 'menu.projects' => '項目', // TODO: translate the following. // 'menu.tasks' => 'Tasks', -// 'menu.users' => 'Users', +'menu.users' => '用戶', 'menu.teams' => '團隊', 'menu.export' => '輸出資料', 'menu.clients' => '客戶', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 210546a4e..fc5ce2efb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if constant('PASSWORD_COMPLEXITY_DEBUG')} + + + + + + +{/if} diff --git a/group_advanced_edit.php b/group_advanced_edit.php index d08017576..a950b8d22 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -22,11 +22,13 @@ $cl_description = trim($request->getParameter('description')); $cl_bcc_email = trim($request->getParameter('bcc_email')); $cl_allow_ip = trim($request->getParameter('allow_ip')); + $cl_password_compexity = trim($request->getParameter('password_complexity')); } else { $cl_group = $group['name']; $cl_description = $group['description']; $cl_bcc_email = $group['bcc_email']; $cl_allow_ip = $group['allow_ip']; + $cl_password_compexity = $group['password_complexity']; } $form = new Form('groupAdvancedForm'); @@ -34,6 +36,7 @@ $form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'bcc_email','value'=>$cl_bcc_email)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'allow_ip','value'=>$cl_allow_ip)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'password_complexity','value'=>$cl_password_complexity)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -44,6 +47,7 @@ if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc')); if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.allow_ip')); + // TODO: add validation for password complexity field. // Finished validating user input. if ($err->no()) { @@ -51,7 +55,8 @@ 'name' => $cl_group, 'description' => $cl_description, 'bcc_email' => $cl_bcc_email, - 'allow_ip' => $cl_allow_ip))) { + 'allow_ip' => $cl_allow_ip, + 'password_complexity' => $cl_password_complexity))) { header('Location: success.php'); exit(); } else From 26c4bcf64643c64b6bd3c5e36f0b3e99ede56b38 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 13 Mar 2022 17:27:48 +0000 Subject: [PATCH 2342/2515] Some mnore progress on password complexity. --- WEB-INF/lib/common.lib.php | 10 ++++++++++ WEB-INF/lib/ttUser.class.php | 3 ++- group_advanced_edit.php | 6 +++--- initialize.php | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 6702919b7..365452f88 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -396,6 +396,16 @@ function ttValidHolidays($val) return true; } +// ttValidPasswordComplexity is used to check user input for password complexity field. +function ttValidPasswordComplexity($val) +{ + // Password complexity example may contain a-z, A-Z, 0-9, and a #. + if (!preg_match('/^[a-zA-Z0-9#]*$/', $val)) + return false; + + return true; +} + // ttAccessAllowed checks whether user is allowed access to a particular page. // It is used as an initial check on all publicly available pages // (except login.php, register.php, and others where we don't have to check). diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index f1eb3e094..ff9295d04 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -693,6 +693,7 @@ function updateGroup($fields) { if (isset($fields['record_type'])) $record_type_part = ', record_type = '.(int) $fields['record_type']; if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); if (isset($fields['allow_ip'])) $allow_ip_part = ', allow_ip = '.$mdb2->quote($fields['allow_ip']); + if (isset($fields['password_complexity'])) $password_complexity_part = ', password_complexity = '.$mdb2->quote($fields['password_complexity']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); if (isset($fields['custom_css'])) $custom_css_part = ', custom_css = '.$mdb2->quote($fields['custom_css']); @@ -703,7 +704,7 @@ function updateGroup($fields) { $parts = trim($name_part.$description_part.$currency_part.$lang_part.$decimal_mark_part.$date_format_part. $time_format_part.$week_start_part.$tracking_mode_part.$project_required_part.$record_type_part. - $bcc_email_part.$allow_ip_part.$plugins_part.$config_part.$custom_css_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); + $bcc_email_part.$allow_ip_part.$password_complexity_part.$plugins_part.$config_part.$custom_css_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); $sql = "update tt_groups set $parts where id = $group_id and org_id = $this->org_id"; $affected = $mdb2->exec($sql); diff --git a/group_advanced_edit.php b/group_advanced_edit.php index a950b8d22..7683d879c 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -22,13 +22,13 @@ $cl_description = trim($request->getParameter('description')); $cl_bcc_email = trim($request->getParameter('bcc_email')); $cl_allow_ip = trim($request->getParameter('allow_ip')); - $cl_password_compexity = trim($request->getParameter('password_complexity')); + $cl_password_complexity = trim($request->getParameter('password_complexity')); } else { $cl_group = $group['name']; $cl_description = $group['description']; $cl_bcc_email = $group['bcc_email']; $cl_allow_ip = $group['allow_ip']; - $cl_password_compexity = $group['password_complexity']; + $cl_password_complexity = $group['password_complexity']; } $form = new Form('groupAdvancedForm'); @@ -47,7 +47,7 @@ if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc')); if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.allow_ip')); - // TODO: add validation for password complexity field. + if (!ttValidPasswordComplexity($cl_password_complexity, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.password_complexity')); // Finished validating user input. if ($err->no()) { diff --git a/initialize.php b/initialize.php index d9e800df7..8a7e9390c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.0.5651"); +define("APP_VERSION", "1.21.0.5652"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a7c55a3af569745243e29dcc3e45125a27e70fd6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 13 Mar 2022 18:13:27 +0000 Subject: [PATCH 2343/2515] Introduced error.weak_password to translation files. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 2 ++ WEB-INF/resources/ko.lang.php | 2 ++ WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 2 ++ WEB-INF/resources/zh-tw.lang.php | 2 ++ initialize.php | 2 +- user_add.php | 3 +++ 32 files changed, 54 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a9937cea6..f1a31d7db 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -74,6 +74,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Usuari o parula de pas incorrecta.', // TODO: translate the following. +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9d5331736..c54d09d62 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -76,6 +76,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nesprávné jméno nebo heslo.', // TODO: translate the following. +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 22aba0ded..84ec205c5 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -66,6 +66,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Forkert brugernavn eller adgangskode.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Brugernavn eksistere allerede.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 9a845d1f0..6a79d3978 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -64,6 +64,8 @@ 'error.report' => 'Bericht auswählen.', 'error.record' => 'Eintrag auswählen.', 'error.auth' => 'Benutzername oder Passwort ungültig.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Benutzer mit diesem Konto ist bereits vorhanden.', 'error.object_exists' => 'Objekt mit diesem Namen ist bereits vorhanden.', 'error.invoice_exists' => 'Rechnung mit dieser Nummer existiert bereits.', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index ab7769558..3a4b699c0 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -60,6 +60,7 @@ 'error.report' => 'Select report.', 'error.record' => 'Select record.', 'error.auth' => 'Incorrect login or password.', +'error.weak_password' => 'Weak password.', 'error.user_exists' => 'User with this login already exists.', 'error.object_exists' => 'Object with this name already exists.', 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b7942fbeb..d622d857d 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -72,6 +72,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Usuario o contraseña incorrecta.', // TODO: translate the following. +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e14416bc1..6a6d5d02c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -65,6 +65,8 @@ 'error.report' => 'Vali raport.', 'error.record' => 'Vali kirje.', 'error.auth' => 'Autentimine ebaõnnestus.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Selle nimega kasutaja on juba kasutusel.', 'error.object_exists' => 'Sellise nimega objekt on juba olemas.', 'error.invoice_exists' => 'Arve number on juba kasutusel.', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 8ccc29f08..bde6ab03d 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -71,6 +71,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'نام کاربری یا رمز عبور اشتباه است.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'کاربری با این نام کاربری موجود است.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 26c150880..db49d601e 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -68,6 +68,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Virheellinen käyttäjänimi tai salasana.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Tämä käyttäjänimi on jo olemassa.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 892b0291f..73d9ae28a 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -66,6 +66,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Nom d\\\'utilisateur ou mot de passe incorrect.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Un utilisateur avec cet identifiant existe déjà.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index f1dbbc3c5..d8cf3d68f 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -63,6 +63,8 @@ 'error.report' => 'Επιλογή αναφοράς.', 'error.record' => 'Επιλογή εγγραφής.', 'error.auth' => 'Λανθασμένο όνομα εισόδου ή κωδικός.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Ο χρήστης με αυτήν τη σύνδεση υπάρχει ήδη.', 'error.object_exists' => 'Το αντικείμενο με αυτό το όνομα υπάρχει ήδη.', 'error.invoice_exists' => 'Το τιμολόγιο με αυτόν τον αριθμό υπάρχει ήδη.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 4f2a49236..0a6074693 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -81,6 +81,8 @@ // 'error.report' => 'Select report.' // 'error.record' => 'Select record.', 'error.auth' => 'שם משתמש או סיסמה שגויים', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'שם משתמש כבר קיים', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 924b4acc9..172e49fa4 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -74,6 +74,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 383b1ab13..8dc205860 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -65,6 +65,8 @@ 'error.report' => 'Seleziona rapporto.', 'error.record' => 'Seleziona record.', 'error.auth' => 'Login o password errati.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Esiste già un utente con questo username.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b3fd57f48..cc9edc0d3 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -73,6 +73,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正確なログインあるいはパスワードが不正確です。', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'このログインと関連されたユーザーは既に存在します。', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index d182519a3..18b6ec6c2 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -73,6 +73,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '부정확한 로그인 혹은 암호가 틀립니다.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => '본 로그인과 연계된 사용자가 이미 있습니다.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 8c1afa7fb..6e93f166c 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -59,6 +59,8 @@ 'error.report' => 'Kies rapport.', 'error.record' => 'Kies record.', 'error.auth' => 'Onjuiste inlognaam of wachtwoord.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Een gebruiker met deze inlognaam bestaat al.', 'error.object_exists' => 'Een object met deze naam bestaat al.', 'error.invoice_exists' => 'Dit nummer is al eens toegekend aan een factuur.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8b5e13f0f..1e38bd0c1 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -74,6 +74,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Feil brukernavn eller passord.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Bruker med et slikt brukernavn eksisterer allerede.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 97ac1e0da..2fc57348b 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -69,6 +69,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Błędny login lub hasło.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Użytkownik o takiej nazwie już istnieje.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index b01e94d32..7f5601efe 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -59,6 +59,8 @@ 'error.report' => 'Selecione relatório.', 'error.record' => 'Selecione o registro.', 'error.auth' => 'Usuário ou senha incorretos.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Já existe usuário com este login.', 'error.object_exists' => 'Já existe um objeto com este nome.', 'error.invoice_exists' => 'Já existe fatura com este número.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 7c724cd29..2806b8437 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -72,6 +72,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 33c4547dc..8619ea27d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -78,6 +78,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nume de utilizator sau parola incorecta.', // TODO: translate the following. +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 3707ce74a..41c95c845 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -59,6 +59,7 @@ 'error.report' => 'Выберите отчёт.', 'error.record' => 'Выберите запись.', 'error.auth' => 'Неправильно введен логин или пароль.', +'error.weak_password' => 'Слабый пароль.', 'error.user_exists' => 'Пользователь с таким логином уже существует.', 'error.object_exists' => 'Объект с таким именем уже есть.', 'error.invoice_exists' => 'Счёт с таким номером уже есть.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 345666d8f..e45b06512 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -70,6 +70,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => 'Nesprávne prihlasovacie meno alebo heslo.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Používateľ s týmto prihlasovacím menom už existuje.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index d5b56f4a0..4e519bcf0 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -69,6 +69,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 652eaa893..7aa5f1008 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -66,6 +66,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Pogrešno korisničko ime ili lozinka.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Korisnik pod ovim imenom već postoji.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index b39366bc1..f641ef690 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -65,6 +65,8 @@ // TODO: translate the following. // 'error.record' => 'Select record.', 'error.auth' => 'Ogiltigt användarnamn eller lösenord.', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Det finns redan en användare med det här användarnamnet.', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 2aae8ed9c..9691b950f 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -81,6 +81,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Hatalı kullanıcı adı veya parola.', // TODO: translate the following. +// 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', // 'error.invoice_exists' => 'Invoice with this number already exists.', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index f423fab84..afe7588ab 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -68,6 +68,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正确的用户名或密码。', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => '该用户登录信息已经存在。', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 92f5dbf52..294312892 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -71,6 +71,8 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', 'error.auth' => '不正確的用戶名或密碼。', +// TODO: translate the following. +// 'error.weak_password' => 'Weak password.', 'error.user_exists' => '該使用者登錄資訊已經存在。', // TODO: translate the following. // 'error.object_exists' => 'Object with this name already exists.', diff --git a/initialize.php b/initialize.php index 8a7e9390c..7d6e96ba2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.0.5652"); +define("APP_VERSION", "1.21.0.5653"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_add.php b/user_add.php index 8d584afb7..f294cf71b 100644 --- a/user_add.php +++ b/user_add.php @@ -158,6 +158,9 @@ function render(&$table, $value, $row, $column, $selected = false) { if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); if ($cl_password1 !== $cl_password2) $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + // Check password complexity. + // if (!ttCheckPasswordComplexity($cl_password1)) + // $err->add($i18n->get('error.weak_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); // Require selection of a client for a client role. From 596e07d7c3164ea98083b60bf9dec22df87bb5f6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 13 Mar 2022 21:05:17 +0000 Subject: [PATCH 2344/2515] Added a capability and enforcement of password complexity for users. --- WEB-INF/lib/common.lib.php | 42 ++++++++++++++++++++++++++++++++++-- WEB-INF/lib/ttUser.class.php | 5 +++++ initialize.php | 2 +- password_change.php | 3 +++ profile_edit.php | 3 +++ user_add.php | 4 ++-- user_edit.php | 3 +++ 7 files changed, 57 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 365452f88..122987f1a 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -397,15 +397,53 @@ function ttValidHolidays($val) } // ttValidPasswordComplexity is used to check user input for password complexity field. -function ttValidPasswordComplexity($val) +function ttValidPasswordComplexity($complexityExample) { // Password complexity example may contain a-z, A-Z, 0-9, and a #. - if (!preg_match('/^[a-zA-Z0-9#]*$/', $val)) + if (!preg_match('/^[a-zA-Z0-9#]*$/', $complexityExample)) return false; return true; } +// ttCheckPasswordComplexity checks password complexity. +function ttCheckPasswordComplexity($password) +{ + global $user; + $complexity = $user->getPasswordComplexity(); + if (empty($complexity)) + return true; + + // Password complexity must be enforced. + if (strlen($password) < strlen($complexity)) + return false; // Password is too short. + + $numDigitsRequired = preg_match_all( "/[0-9]/", $complexity); + $numDigitsSupplied = preg_match_all( "/[0-9]/", $password); + if ($numDigitsSupplied < $numDigitsRequired) + return false; // Number of digits in password is less than required number in complexity example. + + $numCapitalsRequired = preg_match_all( "/[A-Z]/", $complexity); + $numCapitalsSupplied = preg_match_all( "/[A-Z]/", $password); + if ($numCapitalsSupplied < $numCapitalsRequired) + return false; // Number of capitals A-Z in password is less than required number in complexity example. + + $numLowercaseRequired = preg_match_all( "/[a-z]/", $complexity); + $numLowercaseSupplied = preg_match_all( "/[a-z]/", $password); + if ($numLowercaseSupplied < $numLowercaseRequired) + return false; // Number of lowercase letter a-z in password is less than required number in complexity example. + + // Finally check the number of "all other" characters that are not alphanumeric. This includes utf-8 characters. + $numNotAlphanumericRequired = preg_match_all( "/[#]/", $complexity); + $passwordRemainder = preg_replace("/[a-zA-Z0-9]/", "", $password); + $numNotAlphanumericSupplied = mb_strlen($passwordRemainder); + if ($numNotAlphanumericSupplied < $numNotAlphanumericRequired) + return false; + + return true; +} + + // ttAccessAllowed checks whether user is allowed access to a particular page. // It is used as an initial check on all publicly available pages // (except login.php, register.php, and others where we don't have to check). diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index ff9295d04..7114bc7c6 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -169,6 +169,11 @@ function getEmail() { return ($this->behalfUser ? $this->behalfUser->email : $this->email); } + // getPasswordComplexity returns password complexity for active user. + function getPasswordComplexity() { + return ($this->behalfUser ? $this->behalfUser->password_complexity : $this->password_complexity); + } + // The getGroup returns group id on behalf of which the current user is operating. function getGroup() { return ($this->behalfGroup ? $this->behalfGroup->id : $this->group_id); diff --git a/initialize.php b/initialize.php index 7d6e96ba2..a4df18dda 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.0.5653"); +define("APP_VERSION", "1.21.1.5654"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/password_change.php b/password_change.php index 992bdd87b..d395b6396 100644 --- a/password_change.php +++ b/password_change.php @@ -49,6 +49,9 @@ if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); if ($cl_password1 !== $cl_password2) $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + // Check password complexity. + if (!ttCheckPasswordComplexity($cl_password1)) + $err->add($i18n->get('error.weak_password')); if ($err->no()) { // Use the "limit" plugin if we have one. Ignore include errors. diff --git a/profile_edit.php b/profile_edit.php index a9f11fc2d..3958a4018 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -67,6 +67,9 @@ if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); if ($cl_password1 !== $cl_password2) $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + // Check password complexity. + if (!ttCheckPasswordComplexity($cl_password1)) + $err->add($i18n->get('error.weak_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); // Finished validating user input. diff --git a/user_add.php b/user_add.php index f294cf71b..e75e0901d 100644 --- a/user_add.php +++ b/user_add.php @@ -159,8 +159,8 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($cl_password1 !== $cl_password2) $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); // Check password complexity. - // if (!ttCheckPasswordComplexity($cl_password1)) - // $err->add($i18n->get('error.weak_password')); + if (!ttCheckPasswordComplexity($cl_password1)) + $err->add($i18n->get('error.weak_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); // Require selection of a client for a client role. diff --git a/user_edit.php b/user_edit.php index 57133eb39..6bdbef693 100644 --- a/user_edit.php +++ b/user_edit.php @@ -190,6 +190,9 @@ function render(&$table, $value, $row, $column, $selected = false) { if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); if ($cl_password1 !== $cl_password2) $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + // Check password complexity. + if (!ttCheckPasswordComplexity($cl_password1)) + $err->add($i18n->get('error.weak_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); // Require selection of a client for a client role. From 0261c3ffa9017327d54d0be9f315057707b43d91 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 13 Mar 2022 21:08:34 +0000 Subject: [PATCH 2345/2515] Removed a debug condition for password complextity feature. --- WEB-INF/templates/group_advanced_edit.tpl | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl index 66fa41035..528daf465 100644 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ b/WEB-INF/templates/group_advanced_edit.tpl @@ -32,7 +32,6 @@ License: See license.txt *} {$i18n.label.what_is_it} -{if constant('PASSWORD_COMPLEXITY_DEBUG')} @@ -42,7 +41,6 @@ License: See license.txt *} {$i18n.label.what_is_it} -{/if} diff --git a/initialize.php b/initialize.php index a4df18dda..73b693410 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5654"); +define("APP_VERSION", "1.21.1.5655"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 76667fa583dc775400db420fe77973f890b36954 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 14 Mar 2022 13:56:25 +0000 Subject: [PATCH 2346/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 6 ++---- initialize.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 6e93f166c..5d866e617 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -59,8 +59,7 @@ 'error.report' => 'Kies rapport.', 'error.record' => 'Kies record.', 'error.auth' => 'Onjuiste inlognaam of wachtwoord.', -// TODO: translate the following. -// 'error.weak_password' => 'Weak password.', +'error.weak_password' => 'Zwak wachtwoord.', 'error.user_exists' => 'Een gebruiker met deze inlognaam bestaat al.', 'error.object_exists' => 'Een object met deze naam bestaat al.', 'error.invoice_exists' => 'Dit nummer is al eens toegekend aan een factuur.', @@ -508,8 +507,7 @@ 'form.group_edit.uncompleted_indicators' => 'Onvolledige indicatoren', 'form.group_edit.confirm_save' => 'Bevestigen dat je wilt opslaan', 'form.group_edit.allow_ip' => 'Toegestane IP adressen', -// TODO: translate the following. -// 'form.group_edit.password_complexity' => 'Password complexity', +'form.group_edit.password_complexity' => 'Wachtwoord complexiteit', 'form.group_edit.advanced_settings' => 'Geavanceerde instellingen', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/initialize.php b/initialize.php index 73b693410..eb15642a8 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5655"); +define("APP_VERSION", "1.21.1.5656"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1990edf7a7cc17f520c98f8ff929b54d509203e2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 14 Mar 2022 14:53:20 +0000 Subject: [PATCH 2347/2515] Improved password complexity specification by allowing an asterisk in there for better password length control. --- WEB-INF/lib/common.lib.php | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 122987f1a..db00923ab 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -399,8 +399,8 @@ function ttValidHolidays($val) // ttValidPasswordComplexity is used to check user input for password complexity field. function ttValidPasswordComplexity($complexityExample) { - // Password complexity example may contain a-z, A-Z, 0-9, and a #. - if (!preg_match('/^[a-zA-Z0-9#]*$/', $complexityExample)) + // Password complexity example may contain a-z, A-Z, 0-9, #, and *. + if (!preg_match('/^[a-zA-Z0-9#*]*$/', $complexityExample)) return false; return true; diff --git a/initialize.php b/initialize.php index eb15642a8..23e3c733f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5656"); +define("APP_VERSION", "1.21.1.5657"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 4ce11322cefcf172b8103ae23b3c1c9684dd91ee Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Mar 2022 15:32:34 +0000 Subject: [PATCH 2348/2515] Starting work on 2fa. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + initialize.php | 2 +- 31 files changed, 32 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f1a31d7db..e862f97f6 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -586,6 +586,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index c54d09d62..d73ef53d7 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -598,6 +598,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 84ec205c5..4c1f1b248 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -565,6 +565,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 6a79d3978..cbe69a211 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -540,6 +540,7 @@ 'form.group_edit.allow_ip' => 'Erlaube IP', // TODO: translate the following. // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 3a4b699c0..4c2b74b42 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -522,6 +522,7 @@ 'form.group_edit.confirm_save' => 'Confirm saving', 'form.group_edit.allow_ip' => 'Allow IP', 'form.group_edit.password_complexity' => 'Password complexity', +'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index d622d857d..80683acc6 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -600,6 +600,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 6a6d5d02c..9c2a1c610 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -574,6 +574,7 @@ 'form.group_edit.allow_ip' => 'Luba IP', // TODO: translate the following. // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index bde6ab03d..1deb75471 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -587,6 +587,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index db49d601e..82c84df89 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -571,6 +571,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 73d9ae28a..b39b0aadc 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -561,6 +561,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index d8cf3d68f..d30201fc7 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -552,6 +552,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 0a6074693..19ce37687 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -591,6 +591,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 172e49fa4..83b82426d 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -590,6 +590,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 8dc205860..acf7cc5b7 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -567,6 +567,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index cc9edc0d3..3f68a935a 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -593,6 +593,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 18b6ec6c2..60b307f77 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -591,6 +591,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 5d866e617..f2b0da6fa 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -508,6 +508,8 @@ 'form.group_edit.confirm_save' => 'Bevestigen dat je wilt opslaan', 'form.group_edit.allow_ip' => 'Toegestane IP adressen', 'form.group_edit.password_complexity' => 'Wachtwoord complexiteit', +// TODO: translate the following. +// form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Geavanceerde instellingen', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 1e38bd0c1..281f17689 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -594,6 +594,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 2fc57348b..b6610eef4 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -573,6 +573,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 7f5601efe..334db5ca7 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -508,6 +508,7 @@ 'form.group_edit.allow_ip' => 'Permitir IP', // TODO: translate the following. // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Configurações avançadas', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 2806b8437..d3aac4e3d 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -572,6 +572,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 8619ea27d..170642ef2 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -594,6 +594,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 41c95c845..e186fbef4 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -509,6 +509,7 @@ 'form.group_edit.confirm_save' => 'Предупреждать при сохранении', 'form.group_edit.allow_ip' => 'Разрешить доступ с IP', 'form.group_edit.password_complexity' => 'Сложность пароля', +'form.group_edit.2fa' => 'Двухфакторная аутентификация', 'form.group_edit.advanced_settings' => 'Продвинутые настройки', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e45b06512..7fcc99405 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -577,6 +577,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 4e519bcf0..88aee6946 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -567,6 +567,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 7aa5f1008..2aead0d8c 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -573,6 +573,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index f641ef690..87b062f50 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -571,6 +571,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9691b950f..cf2694c40 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -607,6 +607,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index afe7588ab..5686e2682 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -582,6 +582,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 294312892..62a9e9ced 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -585,6 +585,7 @@ // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', // 'form.group_edit.password_complexity' => 'Password complexity', +// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/initialize.php b/initialize.php index 23e3c733f..faf98ef38 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5657"); +define("APP_VERSION", "1.21.1.5658"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 992a7adb6f2001a5639605f8bb1e64dc68d0edd5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Mar 2022 16:06:13 +0000 Subject: [PATCH 2349/2515] Refactoring in translation files. --- WEB-INF/resources/ca.lang.php | 6 ++++++ WEB-INF/resources/cs.lang.php | 6 ++++++ WEB-INF/resources/da.lang.php | 6 ++++++ WEB-INF/resources/de.lang.php | 6 ++++++ WEB-INF/resources/en.lang.php | 5 +++++ WEB-INF/resources/es.lang.php | 6 ++++++ WEB-INF/resources/et.lang.php | 6 ++++++ WEB-INF/resources/fa.lang.php | 6 ++++++ WEB-INF/resources/fi.lang.php | 6 ++++++ WEB-INF/resources/fr.lang.php | 6 ++++++ WEB-INF/resources/gr.lang.php | 6 ++++++ WEB-INF/resources/he.lang.php | 6 ++++++ WEB-INF/resources/hu.lang.php | 6 ++++++ WEB-INF/resources/it.lang.php | 6 ++++++ WEB-INF/resources/ja.lang.php | 6 ++++++ WEB-INF/resources/ko.lang.php | 6 ++++++ WEB-INF/resources/nl.lang.php | 6 ++++++ WEB-INF/resources/no.lang.php | 6 ++++++ WEB-INF/resources/pl.lang.php | 6 ++++++ WEB-INF/resources/pt-br.lang.php | 6 ++++++ WEB-INF/resources/pt.lang.php | 6 ++++++ WEB-INF/resources/ro.lang.php | 6 ++++++ WEB-INF/resources/ru.lang.php | 5 +++++ WEB-INF/resources/sk.lang.php | 6 ++++++ WEB-INF/resources/sl.lang.php | 6 ++++++ WEB-INF/resources/sr.lang.php | 6 ++++++ WEB-INF/resources/sv.lang.php | 6 ++++++ WEB-INF/resources/tr.lang.php | 6 ++++++ WEB-INF/resources/zh-cn.lang.php | 6 ++++++ WEB-INF/resources/zh-tw.lang.php | 6 ++++++ initialize.php | 2 +- 31 files changed, 179 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e862f97f6..dbbeb403a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -589,6 +589,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d73ef53d7..8b5e5006c 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -601,6 +601,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 4c1f1b248..6860b8e37 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -568,6 +568,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index cbe69a211..10431c2a6 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -543,6 +543,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Erlaube IP', +// TODO: Translate the following. +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Sind Sie sicher, dass Sie die gesamte Gruppe löschen möchten?', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 4c2b74b42..7505043ce 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -525,6 +525,11 @@ 'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Allow IP', +'form.group_advanced_edit.password_complexity' => 'Password complexity', +'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 80683acc6..0e94644a9 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -603,6 +603,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9c2a1c610..4177bfffa 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -577,6 +577,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Luba IP', +// TODO: Translate the following. +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Oled kindel, et soovid kogu gruppi kustutada?', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 1deb75471..f37c789c1 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -590,6 +590,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 82c84df89..e124c61ac 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -574,6 +574,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index b39b0aadc..503327a92 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -564,6 +564,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index d30201fc7..310d6bd02 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -555,6 +555,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 19ce37687..95175c930 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -594,6 +594,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 83b82426d..c4745c0a0 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -593,6 +593,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index acf7cc5b7..5676164e3 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -570,6 +570,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 3f68a935a..f8f80c4f8 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -596,6 +596,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 60b307f77..f578659b2 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -594,6 +594,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index f2b0da6fa..a3e415b16 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -512,6 +512,12 @@ // form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Geavanceerde instellingen', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Toegestane IP adressen', +'form.group_advanced_edit.password_complexity' => 'Wachtwoord complexiteit', +// TODO: Translate the following. +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Bent u er zeker van dat u de hele groep wilt verwijderen?', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 281f17689..82fca5f14 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -597,6 +597,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index b6610eef4..d4a5be37e 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -576,6 +576,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 334db5ca7..195cbc850 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -511,6 +511,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Configurações avançadas', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Permitir IP', +// TODO: Translate the following. +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php. 'form.group_delete.hint' => 'Tem certeza de que deseja excluir todo o grupo?', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d3aac4e3d..fa8c83846 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -575,6 +575,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 170642ef2..eab876d08 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -597,6 +597,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index e186fbef4..30737a76a 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -512,6 +512,11 @@ 'form.group_edit.2fa' => 'Двухфакторная аутентификация', 'form.group_edit.advanced_settings' => 'Продвинутые настройки', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +'form.group_advanced_edit.allow_ip' => 'Разрешить доступ с IP', +'form.group_advanced_edit.password_complexity' => 'Сложность пароля', +'form.group_advanced_edit.2fa' => 'Двухфакторная аутентификация', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Вы уверены, что хотите удалить всю группу?', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 7fcc99405..ae1a0376f 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -580,6 +580,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 88aee6946..d6499cb1b 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -570,6 +570,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 2aead0d8c..d05a97eeb 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -576,6 +576,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 87b062f50..80f6657bd 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -574,6 +574,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index cf2694c40..ca1dacaed 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -610,6 +610,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 5686e2682..068ed52a8 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -585,6 +585,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 62a9e9ced..34e18441e 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -588,6 +588,12 @@ // 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', +// Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. +// TODO: Translate the following. +// 'form.group_advanced_edit.allow_ip' => 'Allow IP', +// 'form.group_advanced_edit.password_complexity' => 'Password complexity', +// 'form.group_advanced_edit.2fa' => 'Two factor authentication', + // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php // TODO: translate the following. // 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', diff --git a/initialize.php b/initialize.php index faf98ef38..3389203ce 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5658"); +define("APP_VERSION", "1.21.1.5659"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bc1c36f9fa327aa478b71ecb7beb1a34f3ba405a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Mar 2022 16:29:36 +0000 Subject: [PATCH 2350/2515] Refactoring of translation files. --- WEB-INF/resources/ca.lang.php | 3 --- WEB-INF/resources/cs.lang.php | 3 --- WEB-INF/resources/da.lang.php | 3 --- WEB-INF/resources/de.lang.php | 3 --- WEB-INF/resources/en.lang.php | 2 -- WEB-INF/resources/es.lang.php | 3 --- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/fa.lang.php | 3 --- WEB-INF/resources/fi.lang.php | 3 --- WEB-INF/resources/fr.lang.php | 3 --- WEB-INF/resources/gr.lang.php | 3 --- WEB-INF/resources/he.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 3 --- WEB-INF/resources/it.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 3 --- WEB-INF/resources/ko.lang.php | 3 --- WEB-INF/resources/nl.lang.php | 4 ---- WEB-INF/resources/no.lang.php | 3 --- WEB-INF/resources/pl.lang.php | 3 --- WEB-INF/resources/pt-br.lang.php | 4 ---- WEB-INF/resources/pt.lang.php | 3 --- WEB-INF/resources/ro.lang.php | 3 --- WEB-INF/resources/ru.lang.php | 3 --- WEB-INF/resources/sk.lang.php | 3 --- WEB-INF/resources/sl.lang.php | 3 --- WEB-INF/resources/sr.lang.php | 3 --- WEB-INF/resources/sv.lang.php | 3 --- WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 3 --- WEB-INF/resources/zh-tw.lang.php | 3 --- WEB-INF/templates/group_advanced_edit.tpl | 8 ++++---- group_advanced_edit.php | 4 ++-- initialize.php | 2 +- 33 files changed, 7 insertions(+), 98 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index dbbeb403a..e1f9a191e 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -584,9 +584,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 8b5e5006c..562253c40 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -596,9 +596,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 6860b8e37..6070d5ab7 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -563,9 +563,6 @@ 'form.group_edit.uncompleted_indicators' => 'Uafsluttede indikatore', // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 10431c2a6..f627e77f4 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -537,10 +537,7 @@ 'form.group_edit.future_entries' => 'Einträge in der Zukunft', 'form.group_edit.uncompleted_indicators' => 'Zeige unfertige Einträge', 'form.group_edit.confirm_save' => 'Speichern bestätigen', -'form.group_edit.allow_ip' => 'Erlaube IP', // TODO: translate the following. -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 7505043ce..1cd30f07d 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -520,9 +520,7 @@ 'form.group_edit.future_entries' => 'Future entries', 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', 'form.group_edit.confirm_save' => 'Confirm saving', -'form.group_edit.allow_ip' => 'Allow IP', 'form.group_edit.password_complexity' => 'Password complexity', -'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 0e94644a9..9cc4aabdc 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -598,9 +598,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 4177bfffa..9dd7d02df 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -571,10 +571,7 @@ 'form.group_edit.future_entries' => 'Tuleviku kirjed', 'form.group_edit.uncompleted_indicators' => 'Lõpetamata kirjete indikaator', // TODO: Fix this. Indicators (plural), not indicator. 'form.group_edit.confirm_save' => 'Kinnita salvestamine', -'form.group_edit.allow_ip' => 'Luba IP', // TODO: translate the following. -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index f37c789c1..a7560fc4e 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -585,9 +585,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index e124c61ac..1f483ef1c 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -569,9 +569,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 503327a92..22132849e 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -559,9 +559,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 310d6bd02..f2606c41c 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -550,9 +550,6 @@ 'form.group_edit.uncompleted_indicators' => 'Μη ολοκληρωμένες ενδείξεις', // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 95175c930..52892dbcf 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -589,9 +589,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c4745c0a0..b880b22f5 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -588,9 +588,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 5676164e3..40bca63ed 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -565,9 +565,6 @@ 'form.group_edit.uncompleted_indicators' => 'Indicatori incompleti', // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index f8f80c4f8..518c42696 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -591,9 +591,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f578659b2..dde934023 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -589,9 +589,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index a3e415b16..bd1ad69c4 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -506,10 +506,6 @@ 'form.group_edit.future_entries' => 'Toevoegingen toestaan in de toekomst', 'form.group_edit.uncompleted_indicators' => 'Onvolledige indicatoren', 'form.group_edit.confirm_save' => 'Bevestigen dat je wilt opslaan', -'form.group_edit.allow_ip' => 'Toegestane IP adressen', -'form.group_edit.password_complexity' => 'Wachtwoord complexiteit', -// TODO: translate the following. -// form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Geavanceerde instellingen', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 82fca5f14..c38c74dd4 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -592,9 +592,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index d4a5be37e..865562299 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -571,9 +571,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 195cbc850..bbabafcbc 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -505,10 +505,6 @@ 'form.group_edit.future_entries' => 'Entradas futuros', 'form.group_edit.uncompleted_indicators' => 'Indicadores incompletos', 'form.group_edit.confirm_save' => 'Confirme o salvamento', -'form.group_edit.allow_ip' => 'Permitir IP', -// TODO: translate the following. -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', 'form.group_edit.advanced_settings' => 'Configurações avançadas', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index fa8c83846..41e06c0fc 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -570,9 +570,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index eab876d08..7f3168d41 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -592,9 +592,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 30737a76a..359666167 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -507,9 +507,6 @@ 'form.group_edit.future_entries' => 'Будущие записи', 'form.group_edit.uncompleted_indicators' => 'Индикаторы незавершения', 'form.group_edit.confirm_save' => 'Предупреждать при сохранении', -'form.group_edit.allow_ip' => 'Разрешить доступ с IP', -'form.group_edit.password_complexity' => 'Сложность пароля', -'form.group_edit.2fa' => 'Двухфакторная аутентификация', 'form.group_edit.advanced_settings' => 'Продвинутые настройки', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index ae1a0376f..c52d54601 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -575,9 +575,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index d6499cb1b..1302ccd6f 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -565,9 +565,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index d05a97eeb..ba65b4615 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -571,9 +571,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 80f6657bd..bd815b257 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -569,9 +569,6 @@ 'form.group_edit.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index ca1dacaed..a2f503308 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -605,9 +605,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 068ed52a8..7932da3bd 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -580,9 +580,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 34e18441e..78e3b25bf 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -583,9 +583,6 @@ // 'form.group_edit.future_entries' => 'Future entries', // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.password_complexity' => 'Password complexity', -// 'form.group_edit.2fa' => 'Two factor authentication', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl index 528daf465..4bcaedf49 100644 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ b/WEB-INF/templates/group_advanced_edit.tpl @@ -24,18 +24,18 @@ License: See license.txt *} - + - + - + - + +{if constant('2FA_DEBUG')} + + + + + + +{/if} diff --git a/group_advanced_edit.php b/group_advanced_edit.php index a4cf540e3..26134c789 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -16,6 +16,7 @@ // End of access checks. $group = ttGroupHelper::getGroupAttrs($user->getGroup()); +$config = $user->getConfigHelper(); if ($request->isPost()) { $cl_group = trim($request->getParameter('group_name')); @@ -23,12 +24,14 @@ $cl_bcc_email = trim($request->getParameter('bcc_email')); $cl_allow_ip = trim($request->getParameter('allow_ip')); $cl_password_complexity = trim($request->getParameter('password_complexity')); + $cl_2fa = (bool) $request->getParameter('2fa'); } else { $cl_group = $group['name']; $cl_description = $group['description']; $cl_bcc_email = $group['bcc_email']; $cl_allow_ip = $group['allow_ip']; $cl_password_complexity = $group['password_complexity']; + $cl_2fa = $config->getDefinedValue('2fa'); } $form = new Form('groupAdvancedForm'); @@ -37,6 +40,7 @@ $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'bcc_email','value'=>$cl_bcc_email)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'allow_ip','value'=>$cl_allow_ip)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'password_complexity','value'=>$cl_password_complexity)); +$form->addInput(array('type'=>'checkbox','name'=>'2fa','value'=>$cl_2fa)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -51,12 +55,17 @@ // Finished validating user input. if ($err->no()) { + // Update config. + $config->setDefinedValue('2fa', $cl_2fa); + + // Update group. if ($user->updateGroup(array( 'name' => $cl_group, 'description' => $cl_description, 'bcc_email' => $cl_bcc_email, 'allow_ip' => $cl_allow_ip, - 'password_complexity' => $cl_password_complexity))) { + 'password_complexity' => $cl_password_complexity, + 'config' => $config->getConfig()))) { header('Location: success.php'); exit(); } else diff --git a/initialize.php b/initialize.php index 74d3da0ad..1eb308b01 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5660"); +define("APP_VERSION", "1.21.1.5661"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 178417e79adcf25143ab28b2a4505f625136f3ea Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 16 Mar 2022 14:54:46 +0000 Subject: [PATCH 2352/2515] Work in progress on 2fa. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 5 +++-- WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 2 ++ WEB-INF/resources/zh-tw.lang.php | 1 + initialize.php | 2 +- login.php | 13 +++++++++++++ 32 files changed, 62 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e1f9a191e..6c577de0b 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -418,6 +418,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Ha oblidat la seva paraula de pas?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 562253c40..feee22377 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -425,6 +425,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zapomenuté heslo?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 6070d5ab7..6a598edb7 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -402,6 +402,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Har du glemt din adgangskode?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker er et open source tidsregistrerings system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index f627e77f4..ad6727fba 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -389,6 +389,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Passwort vergessen?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker ist ein Open-Source Zeiterfassungssystem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1cd30f07d..8df7601de 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -371,6 +371,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Forgot password?', +'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 9cc4aabdc..441b42586 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -422,6 +422,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Olvido su contraseña?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9dd7d02df..715b68bc4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -410,6 +410,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Unustasid salasõna?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker on avatud lähtekoodiga ajaarvestussüsteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index a7560fc4e..f470be335 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -419,8 +419,9 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'بازیابی رمز عبور؟', -// TODO: translate form.login.about. -'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'درخواست بازیابی رمزعبور به ایمیل فرستاده شد.', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 1f483ef1c..db157940c 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -407,6 +407,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Salasana unohtunut?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: check translation of form.login.about - is open source "vapaan koodin"? 'form.login.about' => 'Anuko Time Tracker on vapaan koodin tuntiseurantaohjelmisto.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 22132849e..d68e4cb44 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -399,6 +399,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Mot de passe oublié?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index f2606c41c..7c8e39562 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -398,6 +398,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Ξεχάσατε τον κωδικό πρόσβασης;', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 52892dbcf..fddf8d50b 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -424,6 +424,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'שכחת סיסמה?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b880b22f5..d3cbd7f93 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -419,6 +419,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Elfelejtetted a jelszót?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 40bca63ed..8d2cfaa00 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -408,6 +408,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Password dimenticata?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker è un sistema open source per registrare i tempi di lavoro.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 518c42696..3dc0b8773 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -420,6 +420,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'パスワードを忘れましたか?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index dde934023..63999c23f 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -424,6 +424,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '암호를 잊으셨습니까?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index bd1ad69c4..131d79935 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -363,6 +363,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Wachtwoord vergeten?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker is een open source tijdregistratiesysteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index c38c74dd4..d2a934ee7 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -421,6 +421,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glemt passordet?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 865562299..4316435a3 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -410,6 +410,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Nie pamiętasz hasła?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker jest otwartoźródłowym systemem śledzenia czasu.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index bbabafcbc..c5a670a0d 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -362,6 +362,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker é um sistema de código aberto de rastreamento do tempo.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 41e06c0fc..a40d8ed83 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -403,6 +403,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 7f3168d41..97c9a854f 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -424,6 +424,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parola pierduta?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 359666167..faa1c7aba 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -364,6 +364,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Забыли пароль?', +'form.login.2fa_code' => '2FA код', 'form.login.about' => 'Anuko Time Tracker - это открытая (open source) система трекинга рабочего времени.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index c52d54601..356e4e0a9 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -413,6 +413,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zabudnuté heslo?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 1302ccd6f..2bcba2362 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -396,6 +396,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. // TODO: translate the following. // 'form.login.forgot_password' => 'Forgot password?', +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index ba65b4615..dff5f2623 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -408,6 +408,8 @@ // Forma prijave. Pogledajte primer na https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zaboravili ste lozinku?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index bd815b257..62a747e10 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -406,6 +406,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glömt lösenordet?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a2f503308..e0a291f09 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -432,6 +432,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parolanızı unuttunuz mu?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7932da3bd..7dc37961c 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -413,6 +413,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘记密码?', +// TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 78e3b25bf..2497f7ce7 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -418,6 +418,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘記密碼?', // TODO: translate the following. +// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/initialize.php b/initialize.php index 1eb308b01..2f537eb6b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5661"); +define("APP_VERSION", "1.21.1.5662"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index 93b1cd084..5ea77d185 100644 --- a/login.php +++ b/login.php @@ -48,6 +48,19 @@ setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); $user = new ttUser(null, $auth->getUserId()); + + // Determine if we have to additionally use two-factor authentication. + $config = $user->getConfigHelper(); + $use2FA = $config->getDefinedValue('2fa'); + if ($use2FA) { + + // TODO: send 2fa code to user. + $auth->doLogout(); + + header('Location: 2fa.php'); + exit(); + } + // Redirect, depending on user role. if ($user->can('administer_site')) { header('Location: admin_groups.php'); From f2fbe6e5a6251cf86be04f5aa8baa8c1bee038c7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 16 Mar 2022 15:25:33 +0000 Subject: [PATCH 2353/2515] Some refactoring in translation files related to 2fa. --- 2fa.php | 87 ++++++++++++++++++++++++++++++++ WEB-INF/resources/ca.lang.php | 5 +- WEB-INF/resources/cs.lang.php | 5 +- WEB-INF/resources/da.lang.php | 6 ++- WEB-INF/resources/de.lang.php | 6 ++- WEB-INF/resources/en.lang.php | 3 ++ WEB-INF/resources/es.lang.php | 5 +- WEB-INF/resources/et.lang.php | 6 ++- WEB-INF/resources/fa.lang.php | 5 +- WEB-INF/resources/fi.lang.php | 8 +-- WEB-INF/resources/fr.lang.php | 6 ++- WEB-INF/resources/gr.lang.php | 6 ++- WEB-INF/resources/he.lang.php | 6 ++- WEB-INF/resources/hu.lang.php | 5 +- WEB-INF/resources/it.lang.php | 6 ++- WEB-INF/resources/ja.lang.php | 5 +- WEB-INF/resources/ko.lang.php | 5 +- WEB-INF/resources/nl.lang.php | 6 ++- WEB-INF/resources/no.lang.php | 6 ++- WEB-INF/resources/pl.lang.php | 6 ++- WEB-INF/resources/pt-br.lang.php | 6 ++- WEB-INF/resources/pt.lang.php | 5 +- WEB-INF/resources/ro.lang.php | 5 +- WEB-INF/resources/ru.lang.php | 4 +- WEB-INF/resources/sk.lang.php | 6 ++- WEB-INF/resources/sl.lang.php | 5 +- WEB-INF/resources/sr.lang.php | 6 ++- WEB-INF/resources/sv.lang.php | 6 ++- WEB-INF/resources/tr.lang.php | 5 +- WEB-INF/resources/zh-cn.lang.php | 6 ++- WEB-INF/resources/zh-tw.lang.php | 5 +- WEB-INF/templates/2fa.tpl | 24 +++++++++ 32 files changed, 230 insertions(+), 46 deletions(-) create mode 100644 2fa.php create mode 100644 WEB-INF/templates/2fa.tpl diff --git a/2fa.php b/2fa.php new file mode 100644 index 000000000..7c1728d28 --- /dev/null +++ b/2fa.php @@ -0,0 +1,87 @@ +isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} +// End of access checks. + +$cl_2fa_code = $request->getParameter('2fa_code'); +$cl_password = $request->getParameter('password'); + +$form = new Form('2faForm'); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'2fa_code','value'=>$cl_2fa_code)); +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_login click. +$form->addInput(array('type'=>'submit','name'=>'btn_login','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.login'))); + +if ($request->isPost()) { + // Validate user input. + if (!ttValidString($cl_2fa_code)) $err->add($i18n->get('error.field'), $i18n->get('fprm.2fa.2fa_code')); + + if ($err->no()) { + // Use the "limit" plugin if we have one. Ignore include errors. + // The "limit" plugin is not required for normal operation of Time Tracker. + @include('plugins/limit/access_check.php'); + + if ($auth->doLogin($cl_login, $cl_password)) { + // Set current user date (as determined by user browser) into session. + $current_user_date = $request->getParameter('browser_today', null); + if ($current_user_date) + $_SESSION['date'] = $current_user_date; + + // Remember user login in a cookie. + setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); + + $user = new ttUser(null, $auth->getUserId()); + + // Determine if we have to additionally use two-factor authentication. + $config = $user->getConfigHelper(); + $use2FA = $config->getDefinedValue('2fa'); + if ($use2FA) { + + // TODO: send 2fa code to user. + $auth->doLogout(); + + header('Location: 2fa.php'); + exit(); + } + + // Redirect, depending on user role. + if ($user->can('administer_site')) { + header('Location: admin_groups.php'); + } elseif ($user->isClient()) { + header('Location: reports.php'); + } else { + header('Location: time.php'); + } + exit(); + } else + $err->add($i18n->get('error.auth')); + } +} // isPost + +if(!isTrue('MULTIORG_MODE') && !ttOrgHelper::getOrgs()) + $err->add($i18n->get('error.no_groups')); + +// Determine whether to show login hint. It is currently used only for Windows LDAP authentication. +$show_hint = ('ad' == isset($GLOBALS['AUTH_MODULE_PARAMS']['type']) ? $GLOBALS['AUTH_MODULE_PARAMS']['type'] : null); + +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('show_hint', $show_hint); +$smarty->assign('onload', 'onLoad="document.loginForm.'.(!$cl_login?'login':'password').'.focus()"'); +$smarty->assign('about_text', $i18n->get('form.login.about')); +$smarty->assign('title', $i18n->get('title.login')); +$smarty->assign('content_page_name', '2fa.tpl'); +$smarty->display('index.tpl'); diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 6c577de0b..3bd936dd1 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -418,9 +418,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Ha oblidat la seva paraula de pas?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'S\\\'ha enviat la petició de restablir paraula de pas.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Sol·licitud de restabliment de la paraula de pas de Anuko Time Tracker', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index feee22377..a4f116022 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -425,9 +425,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zapomenuté heslo?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zaslán požadavek k vymazání hesla.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker požadavek na vymazání hesla', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 6a598edb7..d1b991f41 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -402,10 +402,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Har du glemt din adgangskode?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker er et open source tidsregistrerings system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Nulstilling af adgangskode er sendt på email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker - Anmodning om nulstilling af adgangskode', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index ad6727fba..75c2c0a72 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -389,10 +389,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Passwort vergessen?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker ist ein Open-Source Zeiterfassungssystem.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Anfrage zur Zurücksetzung des Passwortes wurde per E-mail gesendet.', 'form.reset_password.email_subject' => 'Anuko Time Tracker Anfrage zur Zurücksetzung des Passwortes', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 8df7601de..7adaceadc 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -374,6 +374,9 @@ 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Password reset request sent by email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 441b42586..a78f1e6f2 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -422,9 +422,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Olvido su contraseña?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: check / improve translation of form.reset_password.message. // English form is: 'form.reset_password.message' => 'Password reset request sent by email.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 715b68bc4..854a52e00 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -410,10 +410,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Unustasid salasõna?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker on avatud lähtekoodiga ajaarvestussüsteem.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasõna tühistamise teade on saadetud e-postile.', 'form.reset_password.email_subject' => 'Anuko Time Tracker, parooli tühistamise nõue', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index f470be335..bda4a4758 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -420,9 +420,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'بازیابی رمز عبور؟', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'درخواست بازیابی رمزعبور به ایمیل فرستاده شد.', // TODO: check translation of form.reset_password.email_subject. This is the subject for email message for password reset. Below is the English original. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index db157940c..1d90ef233 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -407,11 +407,13 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Salasana unohtunut?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', - // TODO: check translation of form.login.about - is open source "vapaan koodin"? +// TODO: check translation of form.login.about - is open source "vapaan koodin"? 'form.login.about' => 'Anuko Time Tracker on vapaan koodin tuntiseurantaohjelmisto.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasanan nollauspyyntöviesti lähetetty.', 'form.reset_password.email_subject' => 'Anuko Time Tracker -salasanan nollauspyyntö', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index d68e4cb44..ccb429359 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -399,10 +399,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Mot de passe oublié?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Une demande de réinitialisation du mot de passe a été envoyé par courriel.', 'form.reset_password.email_subject' => 'Demande de réinitialisation de mot de passe Anuko Time Tracker', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 7c8e39562..4cf1f64f9 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -398,10 +398,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Ξεχάσατε τον κωδικό πρόσβασης;', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Το αίτημα επαναφοράς κωδικού πρόσβασης αποστέλλεται μέσω ηλεκτρονικού ταχυδρομείου.', 'form.reset_password.email_subject' => 'Αίτημα επαναφοράς κωδικού Anuko Time Tracker', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index fddf8d50b..4342ea846 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -424,12 +424,14 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'שכחת סיסמה?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'הבקשה לאיפוס בסיסמה נשלחה בדואר אלקטרוני.', 'form.reset_password.email_subject' => 'בקשה לאיפוס סיסמה למערכת Anuko Time Tracker', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index d3cbd7f93..b105d2483 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -419,9 +419,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Elfelejtetted a jelszót?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 8d2cfaa00..16727cfe7 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -408,10 +408,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Password dimenticata?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker è un sistema open source per registrare i tempi di lavoro.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Richiesta di reset password inviata via mail.', 'form.reset_password.email_subject' => 'Richiesta reset password per Anuko Time Tracker', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 3dc0b8773..46c705532 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -420,9 +420,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'パスワードを忘れましたか?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Trackerのパスワードの初期化の要求', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 63999c23f..a82356937 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -424,9 +424,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '암호를 잊으셨습니까?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker 암호 재설정 요청', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 131d79935..9a7c1707d 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -363,10 +363,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Wachtwoord vergeten?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker is een open source tijdregistratiesysteem.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Het verzoek om het wachtwoord te herstellen is verzonden per email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker wachtwoord herstel verzoek', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index d2a934ee7..b7500bbaa 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -421,12 +421,14 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glemt passordet?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 4316435a3..0e482eebe 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -410,10 +410,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Nie pamiętasz hasła?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker jest otwartoźródłowym systemem śledzenia czasu.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Instrukcje zmiany hasła zostały wysłane na adres e-mail połączony z kontem.', 'form.reset_password.email_subject' => 'Anuko Time Tracker - żądanie zmiany hasła', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index c5a670a0d..f0b564de9 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -362,10 +362,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker é um sistema de código aberto de rastreamento do tempo.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Pedido para resetar a senha enviado por e-mail.', 'form.reset_password.email_subject' => 'Pedido de alteração de senha no Anuko Time Tracker', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index a40d8ed83..dcb0d0357 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -403,9 +403,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 97c9a854f..7a5b41a3d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -424,9 +424,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parola pierduta?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker - cerere de resetare a parolei', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index faa1c7aba..da8d8b0f9 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -364,9 +364,11 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Забыли пароль?', -'form.login.2fa_code' => '2FA код', 'form.login.about' => 'Anuko Time Tracker - это открытая (open source) система трекинга рабочего времени.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +'form.2fa.2fa_code' => '2FA код', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Запрос на сброс пароля отослан по e-mail.', 'form.reset_password.email_subject' => 'Сброс пароля к Anuko Time Tracker', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 356e4e0a9..3bdc0e4bd 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -413,10 +413,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zabudnuté heslo?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Žiadosť o obnovenie hesla bola odoslaná e-mailom.', 'form.reset_password.email_subject' => 'Žiadosť o obnovenie hesla do Anuko Time Tracker', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 2bcba2362..d7406f37a 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -396,9 +396,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. // TODO: translate the following. // 'form.login.forgot_password' => 'Forgot password?', -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahteva za razveljavitev gesla je bila poslana.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker zahteva za razveljavitev gesla', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index dff5f2623..b26d4f04a 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -408,12 +408,14 @@ // Forma prijave. Pogledajte primer na https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zaboravili ste lozinku?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Izmena forme za lozinku. Pogledajte primer na https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahtev za izmenu lozinke je poslat mejlom.', 'form.reset_password.email_subject' => 'Anuko Time Tracker zahtev za izmenu lozinke', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 62a747e10..1c139a0e4 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -406,12 +406,14 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glömt lösenordet?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Begäran om att återställa lösenordet skickades via e-post.', 'form.reset_password.email_subject' => 'Återställning av lösenord för Anuko Time Tracker begärd', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e0a291f09..9f57fa3e0 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -432,9 +432,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parolanızı unuttunuz mu?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker parola sıfırlama talebi', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7dc37961c..400529f60 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -413,12 +413,14 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘记密码?', -// TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // TODO: re-translate form.login.about as it has changed. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密码重设请求已经发送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko时间追踪器密码重设请求', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2497f7ce7..3ece1f0fc 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -418,9 +418,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘記密碼?', // TODO: translate the following. -// 'form.login.2fa_code' => '2FA code', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +// TODO: translate the following. +// 'form.2fa.2fa_code' => '2FA code', + // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密碼重設請求已經發送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko時間追蹤器密碼重設請求', diff --git a/WEB-INF/templates/2fa.tpl b/WEB-INF/templates/2fa.tpl new file mode 100644 index 000000000..e634b624b --- /dev/null +++ b/WEB-INF/templates/2fa.tpl @@ -0,0 +1,24 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{$forms.2faForm.open} +
 Anuko Time Tracker 1.17.12.3962 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3963 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 0ea4e5ef48ebaf1899363575e0308381fe27ee14 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 14:39:57 +0000 Subject: [PATCH 0504/2515] Some more recycling in translations. --- WEB-INF/resources/et.lang.php | 11 +++-------- WEB-INF/resources/hu.lang.php | 4 ---- WEB-INF/resources/ja.lang.php | 11 +++-------- WEB-INF/resources/ko.lang.php | 14 +++++--------- WEB-INF/resources/no.lang.php | 11 +++-------- WEB-INF/resources/ro.lang.php | 8 ++------ WEB-INF/templates/footer.tpl | 2 +- 7 files changed, 17 insertions(+), 44 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index f7343e9c4..982ef866b 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -289,10 +289,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Kasutajad', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => 'Kasutaja lisamine', // TODO: is this correct? +'title.edit_user' => 'Kasutaja muutmine', +'title.delete_user' => 'Kasutaja kustutamine', 'title.clients' => 'Kliendid', 'title.add_client' => 'Lisa klient', 'title.edit_client' => 'Muuda klienti', @@ -544,10 +543,6 @@ "form.profile.edit_title" => 'profiili muutmine', // people form attributes -"form.people.ppl_str" => 'inimesed', -"form.people.createu_str" => 'loo uus kasutaja', -"form.people.edit_str" => 'kasutaja muutmine', -"form.people.del_str" => 'kasutaja kustutamine', "form.people.th.role" => 'roll', "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 0de7b8756..552a102c9 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -538,10 +538,6 @@ "form.profile.edit_title" => 'profil szerkesztése', // people form attributes -"form.people.ppl_str" => 'munkatársak', -"form.people.createu_str" => 'új munkatárs hozzáadása', -"form.people.edit_str" => 'munkatárs adatainak szerkesztése', -"form.people.del_str" => 'munkatárs adatainak törlése', "form.people.th.role" => 'szerepkör', "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 2c942fd81..eb07cb65b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -286,10 +286,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'ユーザー', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => 'ユーザーの作成', +'title.edit_user' => 'ユーザーの編集', +'title.delete_user' => 'ユーザーの削除', 'title.clients' => 'クライアント', 'title.add_client' => 'クライアントの追加', 'title.edit_client' => 'クライアントの編集', @@ -537,10 +536,6 @@ "form.profile.showchart" => 'パイ図表の表示', // people form attributes -"form.people.ppl_str" => 'メンバー', -"form.people.createu_str" => '新規ユーザーの作成', -"form.people.edit_str" => 'ユーザーの編集', -"form.people.del_str" => 'ユーザーの削除', "form.people.th.role" => 'ルール', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f57502288..199342e7d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -286,11 +286,11 @@ // 'title.add_task' => 'Adding Task', // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', -'title.users' => '사용자', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.users' => '사용자', // TODO: is this correct? Not 사용자를 as below? title.users is for many (plural) users. + // title.add, title.edit, and title.delete are for a single user. +'title.add_user' => '사용자를 추가하기', // TODO: is this correct? +'title.edit_user' => '사용자를 편집하기', +'title.delete_user' => '사용자를 삭제하기', 'title.clients' => '클라이언트', 'title.add_client' => '클라이언트 추가', 'title.edit_client' => '클라이언트 편집', @@ -539,10 +539,6 @@ "form.profile.showchart" => '원 그래프를 보기', // people form attributes -"form.people.ppl_str" => '멤버', -"form.people.createu_str" => '신규 사용자를 만들기', -"form.people.edit_str" => '사용자를 편집하기', -"form.people.del_str" => '사용자를 삭제하기', "form.people.th.role" => '직위', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index a4f6e34a3..7b77c0b07 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -283,10 +283,9 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Brukere', -// TODO: translate the following. -// 'title.add_user' => 'Adding User', -// 'title.edit_user' => 'Editing User', -// 'title.delete_user' => 'Deleting User', +'title.add_user' => 'Legg til bruker', +'title.edit_user' => 'Endre bruker', +'title.delete_user' => 'Slett bruker', 'title.clients' => 'Klienter', 'title.add_client' => 'Legg til klient', 'title.edit_client' => 'Endre klient', @@ -536,10 +535,6 @@ // "form.profile.showchart" => 'vis kakediagram', // people form attributes -"form.people.ppl_str" => 'personer', -"form.people.createu_str" => 'legg til ny bruker', -"form.people.edit_str" => 'endre bruker', -"form.people.del_str" => 'slett bruker', "form.people.th.role" => 'rolle', // Note to translators: the 2 strings below are missing and must be added and translated // "form.people.th.rate" => 'timesats', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 7eb1ab2cb..c93abceaf 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -290,8 +290,8 @@ // 'title.edit_task' => 'Editing Task', // 'title.delete_task' => 'Deleting Task', 'title.users' => 'Utilizatori', -'title.add_user' => 'Adaugare utilizator', // TODO: is this correct? -'title.edit_user' => 'Editare utilizator', // TODO: is this correct? +'title.add_user' => 'Adaugare utilizator', +'title.edit_user' => 'Editare utilizator', 'title.delete_user' => 'Stergere utilizator', // TODO: is this correct? 'title.clients' => 'Clienti', 'title.add_client' => 'Adaugare client', // TODO: is this correct? @@ -540,10 +540,6 @@ "form.profile.edit_title" => 'editeaza profilul', // people form attributes -"form.people.ppl_str" => 'persoane', -"form.people.createu_str" => 'adaugare untilizator nou', -"form.people.edit_str" => 'editare utilizator', -"form.people.del_str" => 'stergee utilizator', "form.people.th.role" => 'functie', "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fc5ce2efb..b047eca4f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3963 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3964 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6237c1e3261d3d7d1f9510259421cd9418a2a2d5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 15:18:16 +0000 Subject: [PATCH 0505/2515] A bit more recycling in translations. --- WEB-INF/resources/et.lang.php | 4 ++-- WEB-INF/resources/hu.lang.php | 4 ++-- WEB-INF/resources/ja.lang.php | 3 +-- WEB-INF/resources/ko.lang.php | 3 +-- WEB-INF/resources/no.lang.php | 6 ++---- WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 4 ++-- WEB-INF/resources/tr.lang.php | 10 ++++------ WEB-INF/resources/zh-cn.lang.php | 8 ++++---- WEB-INF/resources/zh-tw.lang.php | 8 ++++---- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 23 insertions(+), 30 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 982ef866b..2187758a4 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -449,7 +449,8 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => 'Roll', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -543,7 +544,6 @@ "form.profile.edit_title" => 'profiili muutmine', // people form attributes -"form.people.th.role" => 'roll', "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', "form.people.comanager" => 'kaashaldur', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 552a102c9..e7df2f36c 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -444,7 +444,8 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => 'Szerepkör', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -538,7 +539,6 @@ "form.profile.edit_title" => 'profil szerkesztése', // people form attributes -"form.people.th.role" => 'szerepkör', "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', "form.people.rate" => 'általános óradíj', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index eb07cb65b..246b8c6e5 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -443,7 +443,7 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => '役割', // TODO: is this correct? // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -536,7 +536,6 @@ "form.profile.showchart" => 'パイ図表の表示', // people form attributes -"form.people.th.role" => 'ルール', "form.people.th.rate" => '給料', "form.people.manager" => '管理者', "form.people.rate" => 'デフォルト時間当り給料', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 199342e7d..51e28bff0 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -446,7 +446,7 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => '직위', // TODO: is this correct? The term "role" describes user function, as in "team manager role". // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -539,7 +539,6 @@ "form.profile.showchart" => '원 그래프를 보기', // people form attributes -"form.people.th.role" => '직위', "form.people.th.rate" => '급여', "form.people.manager" => '관리자', "form.people.rate" => '디폴트 시간당 급여', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 7b77c0b07..5c0db5c87 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -439,7 +439,8 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => 'Rolle', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -535,8 +536,5 @@ // "form.profile.showchart" => 'vis kakediagram', // people form attributes -"form.people.th.role" => 'rolle', -// Note to translators: the 2 strings below are missing and must be added and translated -// "form.people.th.rate" => 'timesats', "form.people.rate" => 'timesats', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 70b934b45..d24ed4255 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -511,6 +511,5 @@ "form.profile.edit_title" => 'editando perfil', // people form attributes -"form.people.th.role" => 'regra', "form.people.manager" => 'gerente', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index c93abceaf..041a30e5d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -448,7 +448,8 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => 'Functie', // TODO: is "Rol" a better term here? +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', @@ -540,7 +541,6 @@ "form.profile.edit_title" => 'editeaza profilul', // people form attributes -"form.people.th.role" => 'functie', "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', "form.people.comanager" => 'comanager', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 679c410e2..cb23b8902 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -456,11 +456,12 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => 'Rol', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.rate' => 'Tarife', // TODO: is this correct? +'form.users.default_rate' => 'Varsayılan saat ücreti', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -549,9 +550,6 @@ "form.profile.edit_title" => 'profili düzenliyor', // people form attributes -"form.people.th.role" => 'rol', -"form.people.th.rate" => 'tarife', "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', -"form.people.rate" => 'varsayılan saat ücreti', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 0e22e6c6d..0ccdff6d4 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -431,10 +431,12 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => '角色', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', +'form.users.rate' => '费率', +// TODO: translate the following. // 'form.users.default_rate' => 'Default hourly rate', // Clients form. See example at https://timetracker.anuko.com/clients.php @@ -524,8 +526,6 @@ "form.profile.showchart" => '显示饼状图', // people form attributes -"form.people.th.role" => '角色', -"form.people.th.rate" => '费率', "form.people.manager" => '经理', "form.people.comanager" => '合作经理人', "form.people.rate" => '默认小时收费', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index c40d31cc3..a12c8e296 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -441,10 +441,12 @@ // 'form.users.active_users' => 'Active Users', // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.role' => '角色', +// TODO: translate the following. // 'form.users.manager' => 'Manager', // 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', +'form.users.rate' => '費率', +// TODO: translate the following. // 'form.users.default_rate' => 'Default hourly rate', // Clients form. See example at https://timetracker.anuko.com/clients.php @@ -534,8 +536,6 @@ "form.profile.showchart" => '顯示餅狀圖', // people form attributes -"form.people.th.role" => '角色', -"form.people.th.rate" => '費率', "form.people.manager" => '經理', "form.people.comanager" => '合作經理人', "form.people.rate" => '默認小時收費', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b047eca4f..75aa1b5ad 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts'))) && + {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts') || $user->can('view_all_charts'))) && (constant('MODE_PROJECTS') == $user->getTrackingMode() || constant('MODE_PROJECTS_AND_TASKS') == $user->getTrackingMode() || $user->isPluginEnabled('cl'))} diff --git a/WEB-INF/templates/site_map.tpl b/WEB-INF/templates/site_map.tpl index 54ff8818d..8688f7677 100644 --- a/WEB-INF/templates/site_map.tpl +++ b/WEB-INF/templates/site_map.tpl @@ -37,7 +37,7 @@ {if $user->exists() && $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->can('view_client_invoices'))} {/if} - {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts'))) && + {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts') || $user->can('view_all_charts'))) && (constant('MODE_PROJECTS') == $user->getTrackingMode() || constant('MODE_PROJECTS_AND_TASKS') == $user->getTrackingMode() || $user->isPluginEnabled('cl'))} diff --git a/charts.php b/charts.php index 88878f6b0..cfd01c5fe 100644 --- a/charts.php +++ b/charts.php @@ -13,8 +13,10 @@ import('ttUserHelper'); import('ttTeamHelper'); +define('ALL_USERS_OPTION_ID', -1); // An identifier for "all users" seclection in User dropdown. + // Access checks. -if (!(ttAccessAllowed('view_own_charts') || ttAccessAllowed('view_charts'))) { +if (!(ttAccessAllowed('view_own_charts') || ttAccessAllowed('view_charts') || ttAccessAllowed('view_all_charts'))) { header('Location: access_denied.php'); exit(); } @@ -26,7 +28,7 @@ header('Location: access_denied.php'); // Nobody to display a chart for. exit(); } -if ($user->behalf_id && (!$user->can('view_charts') || !$user->checkBehalfId())) { +if ($user->behalf_id && (!($user->can('view_charts') || $user->can('view_all_charts')) || !$user->checkBehalfId())) { header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. exit(); } @@ -34,8 +36,13 @@ header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to view on behalf. exit(); } +$userDropdownSelectionId = (int) $request->getParameter('user'); // Resused below access checks. if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid((int)$request->getParameter('user'))) { + if ($userDropdownSelectionId == constant('ALL_USERS_OPTION_ID') && !ttAccessAllowed('view_all_charts')) { + header('Location: access_denied.php'); // All users option is only for users with view_all_charts access right. + exit(); + } + if ($userDropdownSelectionId != constant('ALL_USERS_OPTION_ID') && !$user->isUserValid($userDropdownSelectionId)) { header('Location: access_denied.php'); // Wrong user id on post. exit(); } @@ -47,13 +54,16 @@ } // End of access checks. -// Determine user for which we display this page. -$userChanged = (int)$request->getParameter('user_changed'); -if ($request->isPost() && $userChanged) { - $user_id = (int)$request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); +// Determine user for whom we display this page. +$userChanged = (int) $request->getParameter('user_changed'); +if ($request->isPost() && $userChanged ) { + if ($userDropdownSelectionId != constant('ALL_USERS_OPTION_ID')) { + $user->setOnBehalfUser($userDropdownSelectionId); + } +} +if ($request->isGet()) { + $userDropdownSelectionId = $user->getUser(); + // Note that this may change to ALL_USERS_OPTION_ID below from session. } $uc = new ttUserConfig(); @@ -77,6 +87,9 @@ if (!$cl_type) $cl_type = ttChartHelper::adjustType($cl_type); $_SESSION['chart_type'] = $cl_type; $uc->setValue(SYSC_CHART_TYPE, $cl_type); + + // Remember all users selection in session. + $_SESSION['chart_all_users'] = $userDropdownSelectionId == constant('ALL_USERS_OPTION_ID') ? true : false; } else { // Initialize chart interval. $cl_interval = @$_SESSION['chart_interval']; @@ -89,6 +102,11 @@ if (!$cl_type) $cl_type = $uc->getValue(SYSC_CHART_TYPE); $cl_type = ttChartHelper::adjustType($cl_type); $_SESSION['chart_type'] = $cl_type; + + // Set user selection to all users, if necessary. + $allUsersSetInSession = @$_SESSION['chart_all_users']; + if ($allUsersSetInSession) + $userDropdownSelectionId = constant('ALL_USERS_OPTION_ID'); } // Elements of chartForm. @@ -96,18 +114,22 @@ $largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. // User dropdown. Changes the user "on behalf" of whom we are working. -if ($user->can('view_charts')) { +if ($user->can('view_charts') || $user->can('view_all_charts')) { $rank = $user->getMaxRankForGroup($user->getGroup()); if ($user->can('view_own_charts')) $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); else $options = array('status'=>ACTIVE,'max_rank'=>$rank); $user_list = $user->getUsers($options); + // Add the --- all --- option to dropdown. + if ($user->can('view_all_charts')) { + $user_list[] = array('id'=>'-1','group_id'=>$user->getGroup(), 'name'=>$i18n->get('dropdown.all'), 'rights'=>''); + } if (count($user_list) >= 1) { $chart_form->addInput(array('type'=>'combobox', 'onchange'=>'this.form.user_changed.value=1;this.form.submit();', 'name'=>'user', - 'value'=>$user_id, + 'value'=>$userDropdownSelectionId, 'data'=>$user_list, 'datakeys'=>array('id','name'), )); @@ -159,7 +181,7 @@ $chart_form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar // Get data for our chart. -$totals = ttChartHelper::getTotals($user_id, $cl_type, $cl_date, $cl_interval); +$totals = ttChartHelper::getTotals($userDropdownSelectionId, $cl_type, $cl_date, $cl_interval); $smarty->assign('totals', $totals); // Prepare chart for drawing. diff --git a/dbinstall.php b/dbinstall.php index a3168bbfa..182910ada 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1151,7 +1151,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to12000"]) { + if ($_POST["convert11900to12100"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1191,6 +1191,8 @@ function ttGenerateKeys() { ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.19.29') set rights = replace(rights, 'swap_roles,update_work', 'swap_roles') where `rank` >= 12"); ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.19.29') set rights = replace(rights, 'view_all_reports,manage_work,bid_on_work', 'view_all_reports') where `rank` >= 68"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.20.0', modified = now() where param_name = 'version_db' and param_value = '1.19.29'"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.20.0') set rights = replace(rights, 'manage_basic_settings,view_all_reports', 'manage_basic_settings,view_all_charts,view_all_reports') where `rank` >= 68"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.0', modified = now() where param_name = 'version_db' and param_value = '1.20.0'"); } if ($_POST["cleanup"]) { @@ -1241,7 +1243,7 @@ function ttGenerateKeys() {

DB Install

 Anuko Time Tracker 1.17.12.3964 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3965 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 00733333adc4c294d2fdd7b8a29aaa7a419f14f9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 16:15:49 +0000 Subject: [PATCH 0506/2515] Finished refactoring Chinese Traditional translation. --- WEB-INF/resources/et.lang.php | 5 --- WEB-INF/resources/hu.lang.php | 2 - WEB-INF/resources/ja.lang.php | 6 +-- WEB-INF/resources/ko.lang.php | 6 +-- WEB-INF/resources/no.lang.php | 6 +-- WEB-INF/resources/pt.lang.php | 2 - WEB-INF/resources/ro.lang.php | 2 - WEB-INF/resources/tr.lang.php | 3 -- WEB-INF/resources/zh-cn.lang.php | 6 +-- WEB-INF/resources/zh-tw.lang.php | 63 +++++++------------------------- WEB-INF/templates/footer.tpl | 2 +- 11 files changed, 18 insertions(+), 85 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2187758a4..8f79accdd 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -531,12 +531,7 @@ "form.mytime.title" => 'minu aeg', "form.mytime.edit_title" => 'ajakande muutmine', "form.mytime.del_str" => 'ajakande kustutamine', -"form.mytime.total" => 'tunde kokku: ', -"form.mytime.del_yes" => 'ajakanne kustutatud', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', -"form.mytime.warn_tozero_rec" => 'see ajakanne tuleb kustutada kuna see ajaperiood on lukustatud', -// Note to translators: the string below must be translated and added -// "form.mytime.uncompleted" => 'uncompleted', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e7df2f36c..ca7f62657 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -529,8 +529,6 @@ "form.mytime.edit_title" => 'szerkesztés', "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', -"form.mytime.total" => 'összesített óraszám: ', -"form.mytime.del_yes" => 'a bejegyzés törölve', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', // profile form attributes diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 246b8c6e5..d7b1c0eae 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -371,8 +371,8 @@ // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', 'form.time.billable' => '請求できる', +'form.time.uncompleted' => '未完成の', // TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -523,11 +523,7 @@ "form.mytime.edit_title" => '時間レコードの編集', "form.mytime.del_str" => '時間レコードの削除', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.total" => '合計時間: ', -"form.mytime.del_yes" => '時間レコードが成功的に削除されました', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', -"form.mytime.warn_tozero_rec" => 'この時間レコードの期間が満了されましたから、この時間レコードは削除されることが必要です', -"form.mytime.uncompleted" => '未完成の', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 51e28bff0..36f392ebb 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -375,8 +375,8 @@ // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', 'form.time.billable' => '청구가능', +'form.time.uncompleted' => '완성되지 않은', // TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -526,11 +526,7 @@ "form.mytime.edit_title" => '시간기록을 편집하기', "form.mytime.del_str" => '시간기록을 삭제하기', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.total" => '전체 시간: ', -"form.mytime.del_yes" => '성과적으로 삭제된 시간기록', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', -"form.mytime.warn_tozero_rec" => '이 시간기간이 로크되었으므로 이 시간기록은 삭제되어야 합니다', -"form.mytime.uncompleted" => '완성되지 않은', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 5c0db5c87..de06b8f90 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -368,8 +368,8 @@ // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', 'form.time.billable' => 'Fakturerbar', +'form.time.uncompleted' => 'Uferdig', // TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -520,12 +520,8 @@ // "form.mytime.edit_title" => 'endre tidsoppføringen', "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', -"form.mytime.total" => 'totalt antall timer: ', // Note to translators: the strings below must be translated -// "form.mytime.del_yes" => 'tidsoppføringen er slettet', // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', -// "form.mytime.warn_tozero_rec" => 'Denne oppføringen må slettes fordi tidsperioden er låst', -// "form.mytime.uncompleted" => 'uferdig', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d24ed4255..387063d8d 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -502,8 +502,6 @@ // my time form attributes "form.mytime.title" => 'adicionar período', -"form.mytime.total" => 'horas totais: ', -"form.mytime.del_yes" => 'o período registrado foi apagado com sucesso', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 041a30e5d..9df63a38b 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -531,8 +531,6 @@ "form.mytime.edit_title" => 'editarea inregistrarii timpului', "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', -"form.mytime.total" => 'ore total: ', -"form.mytime.del_yes" => 'inregistrarea timului a fost stearsa cu succes', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', // profile form attributes diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index cb23b8902..722ac97a4 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -539,10 +539,7 @@ "form.mytime.edit_title" => 'zaman kaydını düzenliyor', "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', -"form.mytime.total" => 'toplam saat: ', -"form.mytime.del_yes" => 'zaman kaydı başarıyla silindi', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', -"form.mytime.warn_tozero_rec" => 'bu zaman kaydı silinmeli çünkü zaman aralığı kilitli', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 0ccdff6d4..cd6ec4b66 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -360,8 +360,8 @@ // TODO: translate the following. // 'form.time.duration_format' => '(hh:mm or 0.0h)', 'form.time.billable' => '计费时间', +'form.time.uncompleted' => '未完成', // TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', @@ -513,11 +513,7 @@ "form.mytime.edit_title" => '编辑时间记录', "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', -"form.mytime.total" => '总小时数: ', -"form.mytime.del_yes" => '成功删除时间记录', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', -"form.mytime.warn_tozero_rec" => '由于这段时间是锁定的,该时间记录必须删除', -"form.mytime.uncompleted" => '未完成', // profile form attributes // Note to translators: we need a more accurate translation of form.profile.create_title diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index a12c8e296..01b71c3da 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -96,8 +96,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', 'error.no_login' => '沒有該登錄資訊的使用者。', -// TODO: translate the following. -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => '您的資料庫沒有任何記錄。請以管理員身份登錄並創建一個新團隊。', 'error.upload' => '上傳文件出錯。', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -163,8 +162,7 @@ 'label.users' => '用戶', 'label.client' => '客戶', 'label.clients' => '客戶', -// TODO: translate the following. -// 'label.option' => 'Option', +'label.option' => '選項', 'label.invoice' => '發票', 'label.project' => '項目', 'label.projects' => '項目', @@ -196,7 +194,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID號', 'label.language' => '語言', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -252,13 +250,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => '刪除團隊', 'title.reset_password' => '重設密碼', // TODO: translate the following. // 'title.change_password' => 'Changing Password', // 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.edit_time_record' => '編輯時間記錄', +'title.delete_time_record' => '刪除時間記錄', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -367,17 +366,15 @@ // 'form.change_password.tip' => 'Type new password and click on Save.', // Time form. See example at https://timetracker.anuko.com/time.php. -// TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(時:分 或 0.0h)', 'form.time.billable' => '計費時間', +'form.time.uncompleted' => '未完成', // TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => '該記錄只保存了開始時間。這不是錯誤。', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -442,12 +439,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => '角色', -// TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', +'form.users.manager' => '經理', +'form.users.comanager' => '合作經理人', 'form.users.rate' => '費率', -// TODO: translate the following. -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.default_rate' => '默認小時收費', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -507,36 +502,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -"form.admin.profile.title" => '團隊', -"form.admin.profile.noprofiles" => '您的資料庫沒有任何記錄。請以管理員身份登錄並創建一個新團隊。', -"form.admin.profile.comment" => '刪除團隊', -"form.admin.profile.th.id" => 'ID號', -"form.admin.profile.th.active" => '啟動', - -// my time form attributes -"form.mytime.title" => '我的時間記錄', -"form.mytime.edit_title" => '編輯時間記錄', -"form.mytime.del_str" => '刪除時間記錄', -"form.mytime.time_form" => ' (時:分)', -"form.mytime.total" => '總小時數: ', -"form.mytime.del_yes" => '成功刪除時間記錄', -"form.mytime.no_finished_rec" => '該記錄只保存了開始時間。這不是錯誤。如果需要,請登出。', -"form.mytime.warn_tozero_rec" => '由於這段時間是鎖定的,該時間記錄必須刪除', -"form.mytime.uncompleted" => '未完成', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => '創建新管理帳號', -"form.profile.edit_title" => '編輯簡介', -"form.profile.showchart" => '顯示餅狀圖', - -// people form attributes -"form.people.manager" => '經理', -"form.people.comanager" => '合作經理人', -"form.people.rate" => '默認小時收費', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 75aa1b5ad..80732a7b2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- "; } else { $html .= ""; @@ -188,7 +188,7 @@ function getHtml() { // Finished printing calendar table. // Print Today link. - $html .= " \n"; + $html .= " \n"; $html .= "
 Anuko Time Tracker 1.17.12.3965 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3966 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 7658ab94a01fcdc894c8e4e5541b2c10efcd5799 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 16:35:52 +0000 Subject: [PATCH 0507/2515] More recycling. Finished refactoring Portuguese file. --- WEB-INF/resources/et.lang.php | 5 ----- WEB-INF/resources/hu.lang.php | 5 ----- WEB-INF/resources/ja.lang.php | 6 ------ WEB-INF/resources/ko.lang.php | 6 ------ WEB-INF/resources/no.lang.php | 8 -------- WEB-INF/resources/pt.lang.php | 18 ++---------------- WEB-INF/resources/ro.lang.php | 5 ----- WEB-INF/resources/tr.lang.php | 5 ----- WEB-INF/resources/zh-cn.lang.php | 19 +++---------------- WEB-INF/templates/footer.tpl | 2 +- 10 files changed, 6 insertions(+), 73 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 8f79accdd..5b128b3eb 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -533,11 +533,6 @@ "form.mytime.del_str" => 'ajakande kustutamine', "form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'loo uus halduri konto', -"form.profile.edit_title" => 'profiili muutmine', - // people form attributes "form.people.th.rate" => 'hind', "form.people.manager" => 'haldur', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index ca7f62657..c8808bdf3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -531,11 +531,6 @@ "form.mytime.time_form" => ' (óó:pp)', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'új vezetői jogosultság létrehozása', -"form.profile.edit_title" => 'profil szerkesztése', - // people form attributes "form.people.th.rate" => 'tarifa', "form.people.manager" => 'vezető', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index d7b1c0eae..6cb169e7b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -525,12 +525,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => '新規管理者のアカウントの作成', -"form.profile.edit_title" => 'プロファイルの編集', -"form.profile.showchart" => 'パイ図表の表示', - // people form attributes "form.people.th.rate" => '給料', "form.people.manager" => '管理者', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 36f392ebb..06b04c2fa 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -528,12 +528,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => '신규 관리자 계정을 생성', -"form.profile.edit_title" => '프로필을 편집하기', -"form.profile.showchart" => '원 그래프를 보기', - // people form attributes "form.people.th.rate" => '급여', "form.people.manager" => '관리자', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index de06b8f90..bd42ca20e 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -523,14 +523,6 @@ // Note to translators: the strings below must be translated // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'lag ny adminkonto', -"form.profile.edit_title" => 'endre profil', - -// Note to translators: the strings below are missing and must be added and translated -// "form.profile.showchart" => 'vis kakediagram', - // people form attributes "form.people.rate" => 'timesats', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 387063d8d..c5ef6fd75 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -430,7 +430,8 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', // 'form.users.role' => 'Role', -// 'form.users.manager' => 'Manager', +'form.users.manager' => 'Gerente', +// TODO: translate the following. // 'form.users.comanager' => 'Co-manager', // 'form.users.rate' => 'Rate', // 'form.users.default_rate' => 'Default hourly rate', @@ -495,19 +496,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// my time form attributes -"form.mytime.title" => 'adicionar período', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'criar nova conta de gerência', -"form.profile.edit_title" => 'editando perfil', - -// people form attributes -"form.people.manager" => 'gerente', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 9df63a38b..20bd59caa 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -533,11 +533,6 @@ "form.mytime.time_form" => ' (hh:mm)', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'creazaun nou cont de tip manager', -"form.profile.edit_title" => 'editeaza profilul', - // people form attributes "form.people.th.rate" => 'rata', "form.people.manager" => 'manager', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 722ac97a4..90a24ab90 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -541,11 +541,6 @@ "form.mytime.time_form" => ' (ss:dd)', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => 'yeni yönetici hesabı yarat', -"form.profile.edit_title" => 'profili düzenliyor', - // people form attributes "form.people.manager" => 'yönetici', "form.people.comanager" => 'yardımcı yönetici', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index cd6ec4b66..7c9bcde75 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -432,12 +432,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => '角色', -// TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', +'form.users.manager' => '经理', +'form.users.comanager' => '合作经理人', 'form.users.rate' => '费率', -// TODO: translate the following. -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.default_rate' => '默认小时收费', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -514,15 +512,4 @@ "form.mytime.del_str" => '删除时间记录', "form.mytime.time_form" => ' (时:分)', "form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', - -// profile form attributes -// Note to translators: we need a more accurate translation of form.profile.create_title -"form.profile.create_title" => '新建管理账号', -"form.profile.edit_title" => '编辑简介', -"form.profile.showchart" => '显示饼状图', - -// people form attributes -"form.people.manager" => '经理', -"form.people.comanager" => '合作经理人', -"form.people.rate" => '默认小时收费', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 80732a7b2..9effb77b6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - - - -
 Anuko Time Tracker 1.17.12.3966 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3967 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 247c7d60fc4d70f7b308111bc483b98496ac5d8e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 16:46:04 +0000 Subject: [PATCH 0508/2515] Finished refactoring Chinese Simplified file. --- WEB-INF/resources/zh-cn.lang.php | 36 +++++++------------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 9 insertions(+), 29 deletions(-) diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7c9bcde75..7d35e157f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -91,8 +91,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', 'error.no_login' => '没有该登录信息的用户。', -// TODO: translate the following. -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => '您的数据库没有任何记录。请以管理员身份登录并创建一个新团队。', 'error.upload' => '上传文件出错。', 'error.range_locked' => '日期范围锁定。', 'error.mail_send' => '发送邮件时出错。', @@ -187,7 +186,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID号', 'label.language' => '语言', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -243,13 +242,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => '删除团队', 'title.reset_password' => '重设密码', // TODO: translate the following. // 'title.change_password' => 'Changing Password', // 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.edit_time_record' => '编辑时间记录', +'title.delete_time_record' => '删除时间记录', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -357,8 +357,7 @@ // 'form.change_password.tip' => 'Type new password and click on Save.', // Time form. See example at https://timetracker.anuko.com/time.php. -// TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(时:分 或 0.0h)', 'form.time.billable' => '计费时间', 'form.time.uncompleted' => '未完成', // TODO: translate the following. @@ -366,8 +365,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => '该记录只保存了开始时间。这不是错误。', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -494,22 +492,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// administrator form -"form.admin.profile.title" => '团队', -"form.admin.profile.noprofiles" => '您的数据库没有任何记录。请以管理员身份登录并创建一个新团队。', -"form.admin.profile.comment" => '删除团队', -"form.admin.profile.th.id" => 'ID号', -"form.admin.profile.th.active" => '启用', - -// my time form attributes -"form.mytime.title" => '我的时间记录', -"form.mytime.edit_title" => '编辑时间记录', -"form.mytime.del_str" => '删除时间记录', -"form.mytime.time_form" => ' (时:分)', -"form.mytime.no_finished_rec" => '该记录只保存了开始时间。这不是错误。如果需要,请注销。', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9effb77b6..5a2250b79 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - {if $user->isPluginEnabled('wk') && ($user->can('update_work') || $user->can('bid_on_work') || $user->can('manage_work')) && $user->exists()} - - {/if} {if $user->can('export_data')} {/if} diff --git a/WEB-INF/templates/work/header.tpl b/WEB-INF/templates/work/header.tpl index 75a0d586f..6b767a16a 100644 --- a/WEB-INF/templates/work/header.tpl +++ b/WEB-INF/templates/work/header.tpl @@ -141,9 +141,6 @@ {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))} {$i18n.menu.clients} {/if} - {if $user->isPluginEnabled('wk') && ($user->can('update_work') || $user->can('bid_on_work') || $user->can('manage_work')) && $user->exists()} - {$i18n.title.work} - {/if} {if $user->can('export_data')} {$i18n.menu.export} {/if} diff --git a/initialize.php b/initialize.php index c4fccc0f4..16f3a5b1e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5611"); +define("APP_VERSION", "1.19.34.5612"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 4a289fddb562e738b03c4f8f5e2be4d1b53b3f81 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 14:54:56 +0000 Subject: [PATCH 2299/2515] Removed code for Remote Work plugin. --- WEB-INF/lib/ttAdminWorkHelper.class.php | 1028 ------------ WEB-INF/lib/ttWorkHelper.class.php | 1617 ------------------- WEB-INF/templates/header.tpl | 3 - WEB-INF/templates/site_map.tpl | 3 - WEB-INF/templates/work/admin_offer_edit.tpl | 70 - WEB-INF/templates/work/admin_work.tpl | 104 -- WEB-INF/templates/work/admin_work_edit.tpl | 67 - WEB-INF/templates/work/footer_old.tpl | 29 - WEB-INF/templates/work/header.tpl | 204 --- WEB-INF/templates/work/index.tpl | 5 - WEB-INF/templates/work/offer_add.tpl | 74 - WEB-INF/templates/work/offer_delete.tpl | 20 - WEB-INF/templates/work/offer_edit.tpl | 67 - WEB-INF/templates/work/offer_message.tpl | 32 - WEB-INF/templates/work/offer_view.tpl | 47 - WEB-INF/templates/work/offer_view_own.tpl | 42 - WEB-INF/templates/work/work.tpl | 140 -- WEB-INF/templates/work/work_add.tpl | 62 - WEB-INF/templates/work/work_delete.tpl | 20 - WEB-INF/templates/work/work_edit.tpl | 73 - WEB-INF/templates/work/work_message.tpl | 32 - WEB-INF/templates/work/work_offer_view.tpl | 57 - WEB-INF/templates/work/work_offers.tpl | 41 - WEB-INF/templates/work/work_view.tpl | 47 - WEB-INF/templates/work/work_view_own.tpl | 38 - work/admin_offer_delete.php | 71 - work/admin_offer_edit.php | 171 -- work/admin_work.php | 53 - work/admin_work_delete.php | 71 - work/admin_work_edit.php | 168 -- work/offer_add.php | 120 -- work/offer_delete.php | 75 - work/offer_edit.php | 135 -- work/offer_message.php | 90 -- work/offer_view.php | 81 - work/offer_view_own.php | 77 - work/work.php | 65 - work/work_add.php | 122 -- work/work_delete.php | 75 - work/work_edit.php | 151 -- work/work_message.php | 90 -- work/work_offer_view.php | 123 -- work/work_offers.php | 56 - work/work_view.php | 74 - work/work_view_own.php | 79 - 45 files changed, 5869 deletions(-) delete mode 100644 WEB-INF/lib/ttAdminWorkHelper.class.php delete mode 100644 WEB-INF/lib/ttWorkHelper.class.php delete mode 100644 WEB-INF/templates/work/admin_offer_edit.tpl delete mode 100644 WEB-INF/templates/work/admin_work.tpl delete mode 100644 WEB-INF/templates/work/admin_work_edit.tpl delete mode 100644 WEB-INF/templates/work/footer_old.tpl delete mode 100644 WEB-INF/templates/work/header.tpl delete mode 100644 WEB-INF/templates/work/index.tpl delete mode 100644 WEB-INF/templates/work/offer_add.tpl delete mode 100644 WEB-INF/templates/work/offer_delete.tpl delete mode 100644 WEB-INF/templates/work/offer_edit.tpl delete mode 100644 WEB-INF/templates/work/offer_message.tpl delete mode 100644 WEB-INF/templates/work/offer_view.tpl delete mode 100644 WEB-INF/templates/work/offer_view_own.tpl delete mode 100644 WEB-INF/templates/work/work.tpl delete mode 100644 WEB-INF/templates/work/work_add.tpl delete mode 100644 WEB-INF/templates/work/work_delete.tpl delete mode 100644 WEB-INF/templates/work/work_edit.tpl delete mode 100644 WEB-INF/templates/work/work_message.tpl delete mode 100644 WEB-INF/templates/work/work_offer_view.tpl delete mode 100644 WEB-INF/templates/work/work_offers.tpl delete mode 100644 WEB-INF/templates/work/work_view.tpl delete mode 100644 WEB-INF/templates/work/work_view_own.tpl delete mode 100644 work/admin_offer_delete.php delete mode 100644 work/admin_offer_edit.php delete mode 100644 work/admin_work.php delete mode 100644 work/admin_work_delete.php delete mode 100644 work/admin_work_edit.php delete mode 100644 work/offer_add.php delete mode 100644 work/offer_delete.php delete mode 100644 work/offer_edit.php delete mode 100644 work/offer_message.php delete mode 100644 work/offer_view.php delete mode 100644 work/offer_view_own.php delete mode 100644 work/work.php delete mode 100644 work/work_add.php delete mode 100644 work/work_delete.php delete mode 100644 work/work_edit.php delete mode 100644 work/work_message.php delete mode 100644 work/work_offer_view.php delete mode 100644 work/work_offers.php delete mode 100644 work/work_view.php delete mode 100644 work/work_view_own.php diff --git a/WEB-INF/lib/ttAdminWorkHelper.class.php b/WEB-INF/lib/ttAdminWorkHelper.class.php deleted file mode 100644 index 22098b277..000000000 --- a/WEB-INF/lib/ttAdminWorkHelper.class.php +++ /dev/null @@ -1,1028 +0,0 @@ -errors = &$errors; - - $this->work_server_uri = defined('WORK_SERVER_URI') ? WORK_SERVER_URI : "https://www.anuko.com/work/"; - $this->register_uri = $this->work_server_uri.'register'; - $this->get_work_item_uri = $this->work_server_uri.'admin_getworkitem'; - $this->update_work_item_uri = $this->work_server_uri.'admin_updateworkitem'; - $this->delete_work_item_uri = $this->work_server_uri.'admin_deleteworkitem'; - $this->approve_work_item_uri = $this->work_server_uri.'admin_approveworkitem'; - $this->approve_work_item_on_offer_uri = $this->work_server_uri.'admin_approveworkitemonoffer'; - $this->disapprove_work_item_uri = $this->work_server_uri.'admin_disapproveworkitem'; - $this->disapprove_work_item_on_offer_uri = $this->work_server_uri.'admin_disapproveworkitemonoffer'; - $this->get_offer_uri = $this->work_server_uri.'admin_getoffer'; - $this->update_offer_uri = $this->work_server_uri.'admin_updateoffer'; - $this->delete_offer_uri = $this->work_server_uri.'admin_deleteoffer'; - $this->approve_offer_uri = $this->work_server_uri.'admin_approveoffer'; - $this->disapprove_offer_uri = $this->work_server_uri.'admin_disapproveoffer'; - $this->get_pending_work_items_uri = $this->work_server_uri.'admin_getpendingworkitems'; - $this->get_pending_offers_uri = $this->work_server_uri.'admin_getpendingoffers'; - $this->get_items_uri = $this->work_server_uri.'admin_getitems'; - $this->checkSiteRegistration(); - } - - // checkSiteRegistration - obtains site id and key from local database. - // If not found, it tries to register with remote work server. - function checkSiteRegistration() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - // Obtain site id. - $sql = "select param_value as id from tt_site_config where param_name = 'worksite_id'"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - if (!$val) { - // No site id found, need to register. - $fields = array('lang' => urlencode($user->lang), - 'name' => urlencode('time tracker'), - 'origin' => urlencode('time tracker source')); - - // Urlify the data for the POST. - foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->register_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $reg_status = $result_array['reg_status']; // Registration status. - if ($reg_status['site_id'] && $reg_status['site_key']) { - $this->site_id = $reg_status['site_id']; - $this->site_key = $reg_status['site_key']; - - // Registration successful. Store id and key locally for future use. - $sql = "insert into tt_site_config values('worksite_id', $this->site_id, now(), null)"; - $mdb2->exec($sql); - $sql = "insert into tt_site_config values('worksite_key', ".$mdb2->quote($this->site_key).", now(), null)"; - $mdb2->exec($sql); - } else { - $this->errors->add($i18n->get('error.remote_work')); - } - } else { - // Site id found. - $this->site_id = $val['id']; - - // Obtain site key. - $sql = "select param_value as site_key from tt_site_config where param_name = 'worksite_key'"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - $this->site_key = $val['site_key']; - } - } - - // getPendingOffers - obtains a list of offers pending approval. - function getPendingOffers() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_pending_offers_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $pending_offers = $result_array['pending_offers']; - return $pending_offers; - } - - // getPendingWorkItems - obtains a list of work items pending approval. - function getPendingWorkItems() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_pending_work_items_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $pending_work = $result_array['pending_work']; - return $pending_work; - } - - // getWorkItem - gets work item details from remote work server. - function getWorkItem($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($work_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $work_item = $result_array['work_item']; - return $work_item; - } - - // deleteWorkItem - deletes work item from remote work server. - function deleteWorkItem($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($work_id), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->delete_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // deleteOffer - deletes an offer from remote work server. - function deleteOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'offer_id' => urlencode($offer_id), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->delete_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getOffer - gets offer details from remote work server. - function getOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'offer_id' => urlencode($offer_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $offer = $result_array['offer']; - return $offer; - } - - // updateWorkItem - updates a work item in remote work server. - function updateWorkItem($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($fields['work_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->update_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // approveWorkItem - approves work item in remote work server. - function approveWorkItem($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($fields['work_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->approve_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // disapproveWorkItem - disapproves work item in remote work server. - function disapproveWorkItem($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($fields['work_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->disapprove_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // disapproveWorkItemOnOffer - disapproves work item posted on offer in remote work server. - function disapproveWorkItemOnOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($fields['work_id']), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->disapprove_work_item_on_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // approveWorkItemOnOffer - approves work item posted on offer in remote work server. - function approveWorkItemOnOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'work_id' => urlencode($fields['work_id']), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->approve_work_item_on_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // updateOffer - updates an offer in remote work server. - function updateOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'offer_id' => urlencode($fields['offer_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'payment_info' => urlencode(base64_encode($fields['payment_info'])), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->update_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // approveOffer - approves offer in remote work server. - function approveOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'offer_id' => urlencode($fields['offer_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->approve_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - - // disapproveOffer - disapproves offer in remote work server. - function disapproveOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id), - 'offer_id' => urlencode($fields['offer_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'moderator_comment' => urlencode(base64_encode($fields['moderator_comment'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->disapprove_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getItems - obtains a list of all items relevant to admin in one API call to Remote Work Server. - function getItems() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'user_id' => urlencode($user->id) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_items_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - unset($result_array['call_status']); // Remove call_status element. - return $result_array; - } -} diff --git a/WEB-INF/lib/ttWorkHelper.class.php b/WEB-INF/lib/ttWorkHelper.class.php deleted file mode 100644 index 6ddf87513..000000000 --- a/WEB-INF/lib/ttWorkHelper.class.php +++ /dev/null @@ -1,1617 +0,0 @@ -errors = &$errors; - - $this->work_server_uri = defined('WORK_SERVER_URI') ? WORK_SERVER_URI : "https://www.anuko.com/work/"; - - // Note: at some point a need will arise for API versioning. - // When this happens, we will append an API version number to the end of URI, - // for example: register_0_1 instead of register. - // This should theoretically allow a remote work server to be able to work with - // a complete variety of deployed clients, including those without versions. - $this->register_uri = $this->work_server_uri.'register'; // register_0_0 - $this->put_own_work_item_uri = $this->work_server_uri.'putownworkitem'; - $this->get_own_work_item_uri = $this->work_server_uri.'getownworkitem'; - $this->get_own_work_item_offer_uri = $this->work_server_uri.'getownworkitemoffer'; - $this->get_own_work_item_offers_uri = $this->work_server_uri.'getownworkitemoffers'; - $this->get_own_work_items_uri = $this->work_server_uri.'getownworkitems'; - $this->get_available_work_items_uri = $this->work_server_uri.'getavailableworkitems'; - $this->get_available_work_item_uri = $this->work_server_uri.'getavailableworkitem'; - $this->delete_own_work_item_uri = $this->work_server_uri.'deleteownworkitem'; - $this->accept_own_work_item_offer_uri = $this->work_server_uri.'acceptownworkitemoffer'; - $this->decline_own_work_item_offer_uri = $this->work_server_uri.'declineownworkitemoffer'; - $this->update_own_work_item_uri = $this->work_server_uri.'updateownworkitem'; - $this->update_own_work_item_on_offer_uri = $this->work_server_uri.'updateownworkitemonoffer'; - $this->put_own_offer_uri = $this->work_server_uri.'putownoffer'; - $this->get_own_offer_uri = $this->work_server_uri.'getownoffer'; - $this->get_own_offers_uri = $this->work_server_uri.'getownoffers'; - - $this->get_available_offers_uri = $this->work_server_uri.'getavailableoffers'; - $this->get_available_offer_uri = $this->work_server_uri.'getavailableoffer'; - $this->get_group_items_uri = $this->work_server_uri.'getgroupitems'; - $this->delete_own_offer_uri = $this->work_server_uri.'deleteownoffer'; - $this->update_own_offer_uri = $this->work_server_uri.'updateownoffer'; - $this->send_message_to_work_owner_uri = $this->work_server_uri.'sendmessagetoworkowner'; - $this->send_message_to_offer_owner_uri = $this->work_server_uri.'sendmessagetoofferowner'; - $this->checkSiteRegistration(); - } - - // checkSiteRegistration - obtains site id and key from local database. - // If not found, it tries to register with remote work server. - function checkSiteRegistration() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - // Obtain site id. - $sql = "select param_value as id from tt_site_config where param_name = 'worksite_id'"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - if (!$val) { - // No site id found, need to register. - $group_id = $user->getGroup(); - $org_id = $user->org_id; - $fields = array('lang' => urlencode($user->lang), - 'name' => urlencode('time tracker'), - 'origin' => urlencode('time tracker source'), - 'org_id' => urlencode($org_id), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'user_id' => urlencode($user->getUser()), - 'user_name' => urlencode(base64_encode($user->getName())), - 'user_email' => urlencode(base64_encode($user->getEmail())), - 'user_ip' => urlencode($_SERVER['REMOTE_ADDR'])); - - // Urlify the data for the POST. - foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->register_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $reg_status = $result_array['reg_status']; // Registration status. - if ($reg_status['site_id'] && $reg_status['site_key']) { - $this->site_id = $reg_status['site_id']; - $this->site_key = $reg_status['site_key']; - - // Registration successful. Store id and key locally for future use. - $sql = "insert into tt_site_config values('worksite_id', $this->site_id, now(), null)"; - $mdb2->exec($sql); - $sql = "insert into tt_site_config values('worksite_key', ".$mdb2->quote($this->site_key).", now(), null)"; - $mdb2->exec($sql); - } else { - $this->errors->add($i18n->get('error.remote_work')); - } - } else { - // Site id found. - $this->site_id = $val['id']; - - // Obtain site key. - $sql = "select param_value as site_key from tt_site_config where param_name = 'worksite_key'"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - $this->site_key = $val['site_key']; - } - } - - // putOwnWorkItem - publishes a work item in remote work server. - // - // Note about some fields using additional base64 encoding. - // There is a problem with data posted by curl calls on the server side for - // some languages. Data arrives corrupted. - // - // For example: consider a case for a single Russian letter ф in the subject field. - // UTF-8 encoding for ф: 0xD1 0x84 (2 bytes). - // urlencoded ф: %D1%84 - a string of 6 characters. - // If we use a curl call like here with only urlencoded ф, what arrives on the server in POST is "C3 91 C2 84" - // no idea what it is. - // - // A workaround for now is to use use an additional base64 encoding for all text fields, - // which are decoded back to utf-8 strings on the server side. - function putOwnWorkItem($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($fields['offer_id']), - 'type' => urlencode($fields['type']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'created_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'created_by' => urlencode($user->getUser()), - 'created_by_name' => urlencode(base64_encode($user->getName())), - 'created_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->put_own_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // updateOwnWorkItem - updates a work item in remote work server. - function updateOwnWorkItem($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($fields['work_id']), - 'type' => urlencode($fields['type']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->update_own_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // updateOwnWorkItemOnOffer - updates own work item posted on offer in remote work server. - function updateOwnWorkItemOnOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($fields['work_id']), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->update_own_work_item_on_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getOwnWorkItems - obtains a list of work items this group is currently outsourcing. - function getOwnWorkItems() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_work_items_iri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $active_work = $result_array['active_work']; - return $active_work; - } - - // getAvailableWorkItems - obtains a list of available work items this group can bid on. - function getAvailableWorkItems() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_available_work_items_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $available_work = $result_array['available_work']; - return $available_work; - } - - // getOwnWorkItem - gets work item details from remote work server. - function getOwnWorkItem($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($work_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $work_item = $result_array['work_item']; - return $work_item; - } - - // getOwnWorkItemOffers - gets offers on own work item from remote work server. - function getOwnWorkItemOffers($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($work_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_work_item_offers_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $work_item_offers = $result_array['work_item_offers']; - return $work_item_offers; - } - - // deleteOwnWorkItem - deletes work item from remote work server. - function deleteOwnWorkItem($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($work_id), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->delete_own_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // putOwnOffer - publishes an offer in remote work server. - function putOwnOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($fields['work_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'payment_info' => urlencode(base64_encode($fields['payment_info'])), - 'created_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'created_by' => urlencode($user->getUser()), - 'created_by_name' => urlencode(base64_encode($user->getName())), - 'created_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->put_own_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getOwnOffers - obtains a list of offers this group made available to other groups. - function getOwnOffers() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_offers_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $active_offers = $result_array['active_offers']; - return $active_offers; - } - - // getAvailableOffers - obtains a list of available offers from other organizations. - function getAvailableOffers() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_available_offers_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $available_offers = $result_array['available_offers']; - return $available_offers; - } - - // getOwnOffer - gets offer details from remote work server. - function getOwnOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($offer_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $offer = $result_array['offer']; - return $offer; - } - - // updateOwnOffer - updates an offer in remote work server. - function updateOwnOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($fields['offer_id']), - 'subject' => urlencode(base64_encode($fields['subject'])), - 'descr_short' => urlencode(base64_encode($fields['descr_short'])), - 'descr_long' => urlencode(base64_encode($fields['descr_long'])), - 'currency' => urlencode($fields['currency']), - 'amount' => urlencode($fields['amount']), - 'payment_info' => urlencode(base64_encode($fields['payment_info'])), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail())) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->update_own_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // deleteOwnOffer - deletes an offer from remote work server. - function deleteOwnOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($offer_id), - 'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'modified_by' => urlencode($user->getUser()), - 'modified_by_name' => urlencode(base64_encode($user->getName())), - 'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->delete_own_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getOwnWorkItemOffer - gets offer details from remote work server - // for an offer posted on own work item. - function getOwnWorkItemOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($offer_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_own_work_item_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $offer = $result_array['offer']; - return $offer; - } - - // declineOwnWorkItemOffer - declines an offer posted on own work item in remote work server. - function declineOwnWorkItemOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($fields['offer_id']), - 'client_comment' => urlencode(base64_encode($fields['client_comment']))); - //'modified_ip' => urlencode($_SERVER['REMOTE_ADDR']), - //'modified_by' => urlencode($user->getUser()), - //'modified_by_name' => urlencode(base64_encode($user->getName())), - //'modified_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->decline_own_work_item_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // acceptOwnWorkItemOffer - accepts an offer posted on own work item in remote work server. - function acceptOwnWorkItemOffer($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($fields['offer_id']), - 'client_comment' => urlencode(base64_encode($fields['client_comment'])), - 'accepted_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'accepted_by' => urlencode($user->getUser()), - 'accepted_by_name' => urlencode(base64_encode($user->getName())), - 'accepted_by_email' => urlencode(base64_encode($user->getEmail()))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->accept_own_work_item_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // getCurrencies - obtains a list of supported currencies. - static function getCurrencies() { - $mdb2 = getConnection(); - - $sql = "select id, name from tt_work_currencies order by id"; - $res = $mdb2->query($sql); - if (is_a($res, 'PEAR_Error')) return false; - - while ($val = $res->fetchRow()) { - $result[] = array('id'=>$val['id'], 'name'=>$val['name']); - } - return $result; - } - - // getCurrencyID - obtains an ID for currency. - static function getCurrencyID($currency) { - $mdb2 = getConnection(); - - $currency_id = null; - $sql = "select id from tt_work_currencies where name = ".$mdb2->quote($currency); - $res = $mdb2->query($sql); - if (is_a($res, 'PEAR_Error')) return null; - - if($val = $res->fetchRow()) { - $currency_id = $val['id']; - } - return $currency_id; - } - - // getCurrencyName - obtains currency name using its id. - static function getCurrencyName($currency_id) { - $mdb2 = getConnection(); - - $currency_name = null; - $sql = "select name from tt_work_currencies where id = $currency_id"; - $res = $mdb2->query($sql); - if (is_a($res, 'PEAR_Error')) return null; - - if($val = $res->fetchRow()) { - $currency_name = $val['name']; - } - return $currency_name; - } - - // getGroupItems - obtains a list of all items relevant to group in one API call to Remote Work Server. - function getGroupItems() { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_key' => urlencode($user->getGroupKey()) - ); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_group_items_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - unset($result_array['call_status']); // Remove call_status element, - return $result_array; - } - - // getAvailableWorkItem - gets available work item details from remote work server. - function getAvailableWorkItem($work_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'user_id' => urlencode($user->getUser()), - 'user_name' => urlencode(base64_encode($user->getName())), - 'user_email' => urlencode(base64_encode($user->getEmail())), - 'user_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'work_id' => urlencode($work_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_available_work_item_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $work_item = $result_array['work_item']; - return $work_item; - } - - // getAvailableOffer - gets available offer details from remote work server. - function getAvailableOffer($offer_id) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'user_id' => urlencode($user->getUser()), - 'user_name' => urlencode(base64_encode($user->getName())), - 'user_email' => urlencode(base64_encode($user->getEmail())), - 'user_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'offer_id' => urlencode($offer_id)); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->get_available_offer_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - $offer = $result_array['offer']; - return $offer; - } - - // sendMessageToWorkOwner - sends a message to work owner via remote work server. - function sendMessageToWorkOwner($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'work_id' => urlencode($fields['work_id']), - 'sender_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'sender_user_id' => urlencode($user->getUser()), - 'sender_name' => urlencode(base64_encode($user->getName())), - 'sender_email' => urlencode(base64_encode($user->getEmail())), - 'message_body' => urlencode(base64_encode($fields['message_body']))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->send_message_to_work_owner_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } - - // sendMessageToOfferOwner - sends a message to offer owner via remote work server. - function sendMessageToOfferOwner($fields) { - global $i18n; - global $user; - $mdb2 = getConnection(); - - $group_id = $user->getGroup(); - $org_id = $user->org_id; - - $curl_fields = array('lang' => urlencode($user->lang), - 'site_id' => urlencode($this->site_id), - 'site_key' => urlencode($this->site_key), - 'org_id' => urlencode($org_id), - 'org_key' => urlencode($user->getOrgKey()), - 'group_id' => urlencode($group_id), - 'group_name' => urlencode(base64_encode($user->getGroupName())), - 'group_key' => urlencode($user->getGroupKey()), - 'offer_id' => urlencode($fields['offer_id']), - 'sender_ip' => urlencode($_SERVER['REMOTE_ADDR']), - 'sender_user_id' => urlencode($user->getUser()), - 'sender_name' => urlencode(base64_encode($user->getName())), - 'sender_email' => urlencode(base64_encode($user->getEmail())), - 'message_body' => urlencode(base64_encode($fields['message_body']))); - - // url-ify the data for the POST. - foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } - $fields_string = rtrim($fields_string, '&'); - - // Open connection. - $ch = curl_init(); - - // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->send_message_to_offer_owner_uri); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // Execute a post request. - $result = curl_exec($ch); - - // Close connection. - curl_close($ch); - - if (!$result) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - - $result_array = json_decode($result, true); - - // Check for errors. - $call_status = $result_array['call_status']; - if (!$call_status) { - $this->errors->add($i18n->get('error.remote_work')); - return false; - } - if ($call_status['code'] != TT_CURL_SUCCESS) { - $this->errors->add($call_status['error']); - return false; - } - - return true; - } -} diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 372b18d46..a189e50e5 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -63,9 +63,6 @@ - {if isTrue('WORK_SERVER_ADMINISTRATION')} - - {/if}
 Anuko Time Tracker 1.17.12.3967 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3968 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 37adacf99cad90fc79db538747af8a44d8ae78cb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 17:00:40 +0000 Subject: [PATCH 0509/2515] Finished refactoring Korean translation. --- WEB-INF/resources/ko.lang.php | 54 +++++++++-------------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 06b04c2fa..bf5d7633e 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -48,8 +48,8 @@ // TODO: translate the following. // 'menu.create_team' => 'Create Team', 'menu.profile' => '프로필', +'menu.time' => '시간', // TODO: translate the following. -// 'menu.time' => 'Time', // 'menu.expenses' => 'Expenses', 'menu.reports' => '보고서', // TODO: translate the following. @@ -98,8 +98,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', 'error.no_login' => '본 로그인과 연계된 사용자가 없습니다.', -// TODO: translate the following. -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => '당신의 데이터베이스는 비어있습니다. 관리자로 로그인하여 새로운 팀을 생성하십시오.', 'error.upload' => '파일 업로드 오류.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -197,7 +196,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => '식별자', 'label.language' => '언어', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -255,13 +254,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => '팀 삭제', 'title.reset_password' => '암호 재설정', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.time' => '시간', +'title.edit_time_record' => '시간기록을 편집하기', +'title.delete_time_record' => '시간기록을 삭제하기', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -372,8 +372,7 @@ // 'form.change_password.tip' => 'Type new password and click on Save.', // Time form. See example at https://timetracker.anuko.com/time.php. -// TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(hh:mm 혹은 0.0h)', // TODO: is there a better term for hh:mm as a hint to user what to enter? 'form.time.billable' => '청구가능', 'form.time.uncompleted' => '완성되지 않은', // TODO: translate the following. @@ -381,8 +380,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -447,10 +445,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => '직위', // TODO: is this correct? The term "role" describes user function, as in "team manager role". -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.manager' => '관리자', +'form.users.comanager' => '공동관리자', +'form.users.rate' => '급여', +'form.users.default_rate' => '디폴트 시간당 급여', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -509,28 +507,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// administrator form -"form.admin.profile.title" => '팀', -"form.admin.profile.noprofiles" => '당신의 데이터베이스는 비어있습니다. 관리자로 로그인하여 새로운 팀을 생성하십시오.', -"form.admin.profile.comment" => '팀 삭제', -"form.admin.profile.th.id" => '식별자', -"form.admin.profile.th.active" => '활동내용', - -// my time form attributes -"form.mytime.title" => '나의 시간', -"form.mytime.edit_title" => '시간기록을 편집하기', -"form.mytime.del_str" => '시간기록을 삭제하기', -"form.mytime.time_form" => ' (hh:mm)', -"form.mytime.no_finished_rec" => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다. 필요하면 로그아웃 하십시오.', - -// people form attributes -"form.people.th.rate" => '급여', -"form.people.manager" => '관리자', -"form.people.rate" => '디폴트 시간당 급여', -"form.people.comanager" => '공동관리자', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5a2250b79..6d00a6037 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - - - - -
 Anuko Time Tracker 1.17.12.3968 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3969 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e084a6970e53f78b942d6a5603a65316d7a1069c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 17:12:23 +0000 Subject: [PATCH 0510/2515] Finished refactoring Japanese translation. --- WEB-INF/resources/ja.lang.php | 51 +++++++++-------------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 14 insertions(+), 39 deletions(-) diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 6cb169e7b..bc25f01fc 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -98,8 +98,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', 'error.no_login' => 'このログインと関連されたユーザーはいません。', -// TODO: translate the following. -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'あなたのデータベースは空いています。管理者にログインして新規チームを作成してください。', 'error.upload' => 'ファイルのアップロードのエラー。', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -197,7 +196,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => '識別子', 'label.language' => '言語', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -254,13 +253,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'チームの削除', 'title.reset_password' => 'パスワードの初期化', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.time' => '時間', +'title.edit_time_record' => '時間レコードの編集', +'title.delete_time_record' => '時間レコードの削除', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -369,7 +369,7 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(hh:mm あるいは 0.0h)', // TODO: is there a better term for hh:mm as a hint to user what to enter? 'form.time.billable' => '請求できる', 'form.time.uncompleted' => '未完成の', // TODO: translate the following. @@ -377,8 +377,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'このレコードは開始時間だけで保存されました。これはエラーではありません。', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -444,10 +443,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => '役割', // TODO: is this correct? -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.manager' => '管理者', +'form.users.comanager' => '共同管理者', +'form.users.rate' => '給料', +'form.users.default_rate' => 'デフォルト時間当り給料', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -506,28 +505,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// administrator form -"form.admin.profile.title" => 'チーム', -"form.admin.profile.noprofiles" => 'あなたのデータベースは空いています。管理者にログインして新規チームを作成してください。', -"form.admin.profile.comment" => 'チームの削除', -"form.admin.profile.th.id" => '識別子', -"form.admin.profile.th.active" => '活動内容', - -// my time form attributes -"form.mytime.title" => '私の時間', -"form.mytime.edit_title" => '時間レコードの編集', -"form.mytime.del_str" => '時間レコードの削除', -"form.mytime.time_form" => ' (hh:mm)', -"form.mytime.no_finished_rec" => 'このレコードは開始時間だけで保存されました。これはエラーではありません。もし必要があればログアウトしてください。', - -// people form attributes -"form.people.th.rate" => '給料', -"form.people.manager" => '管理者', -"form.people.rate" => 'デフォルト時間当り給料', -"form.people.comanager" => '共同管理者', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 6d00a6037..299e1b4b7 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3969 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3970 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a215f8b83c542b031bec3131d26a225fa1e27aae Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 17:50:27 +0000 Subject: [PATCH 0511/2515] Finished refactoring Estonian translation. --- WEB-INF/resources/et.lang.php | 54 +++++++++++------------------------ WEB-INF/resources/hu.lang.php | 15 +++------- WEB-INF/resources/ro.lang.php | 15 +++------- WEB-INF/resources/tr.lang.php | 8 ++---- WEB-INF/templates/footer.tpl | 2 +- 5 files changed, 27 insertions(+), 67 deletions(-) diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 5b128b3eb..ce8516427 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -48,7 +48,7 @@ // 'menu.forum' => 'Forum', 'menu.help' => 'Abiinfo', // TODO: translate the following. -'menu.create_team' => 'Create Team', +// 'menu.create_team' => 'Create Team', 'menu.profile' => 'Profiili', 'menu.time' => 'Aeg', // TODO: translate the following. @@ -101,7 +101,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', // 'error.no_login' => 'No user with this login.', -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'Sinu andmebaas on tühi. Logi adminina sisse ja loo uus meeskond.', 'error.upload' => 'Viga faili vastuvõtmisel.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -198,7 +198,8 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID', +// TODO: translate the following. // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', // 'label.date_format' => 'Date format', @@ -257,13 +258,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Kustuta meeskond', 'title.reset_password' => 'Tühjenda salasõna', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.time' => 'Aeg', +'title.edit_time_record' => 'Ajakande muutmine', +'title.delete_time_record' => 'Ajakande kustutamine', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -349,7 +351,8 @@ // TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', +'dropdown.status_active' => 'aktiivne', +// TODO: translate the following. // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', @@ -381,8 +384,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Kanne salvestati ainult alguse ajaga. See ei ole viga.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -450,11 +452,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Roll', -// TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.manager' => 'Haldur', +'form.users.comanager' => 'Kaashaldur', +'form.users.rate' => 'Hind', +'form.users.default_rate' => 'Vaikimisi tunni hind', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -515,27 +516,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// administrator form -"form.admin.profile.title" => 'meeskonnad', -"form.admin.profile.noprofiles" => 'sinu andmebaas on tühi. logi adminina sisse ja loo uus meeskond.', -"form.admin.profile.comment" => 'kustuta meeskond', -"form.admin.profile.th.id" => 'id', -"form.admin.profile.th.active" => 'aktiivne', - -// my time form attributes -"form.mytime.title" => 'minu aeg', -"form.mytime.edit_title" => 'ajakande muutmine', -"form.mytime.del_str" => 'ajakande kustutamine', -"form.mytime.no_finished_rec" => 'kanne salvestati ainult alguse ajaga. see ei ole viga. logi välja kui vaja peaks olema.', - -// people form attributes -"form.people.th.rate" => 'hind', -"form.people.manager" => 'haldur', -"form.people.comanager" => 'kaashaldur', -"form.people.rate" => 'vaikimisi tunni hind', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index c8808bdf3..2860399d1 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -445,11 +445,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Szerepkör', -// TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.manager' => 'Vezető', +'form.users.comanager' => 'Helyettes', +'form.users.rate' => 'Tarifa', +'form.users.default_rate' => 'Általános óradíj', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -530,10 +529,4 @@ "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', "form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', - -// people form attributes -"form.people.th.rate" => 'tarifa', -"form.people.manager" => 'vezető', -"form.people.rate" => 'általános óradíj', -"form.people.comanager" => 'helyettes', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 20bd59caa..95a61fefb 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -449,11 +449,10 @@ // 'form.users.inactive_users' => 'Inactive Users', // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Functie', // TODO: is "Rol" a better term here? -// TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', -// 'form.users.rate' => 'Rate', -// 'form.users.default_rate' => 'Default hourly rate', +'form.users.manager' => 'Manager', +'form.users.comanager' => 'Co-manager', +'form.users.rate' => 'Rată', +'form.users.default_rate' => 'Pret pe ora implicit', // Clients form. See example at https://timetracker.anuko.com/clients.php // TODO: translate the following. @@ -532,10 +531,4 @@ "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', "form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', - -// people form attributes -"form.people.th.rate" => 'rata', -"form.people.manager" => 'manager', -"form.people.comanager" => 'comanager', -"form.people.rate" => 'pret pe ora implicit', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 90a24ab90..95899eddb 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -458,8 +458,8 @@ // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', 'form.users.role' => 'Rol', // TODO: translate the following. -// 'form.users.manager' => 'Manager', -// 'form.users.comanager' => 'Co-manager', +'form.users.manager' => 'Yönetici', +'form.users.comanager' => 'Yardımcı yönetici', 'form.users.rate' => 'Tarife', // TODO: is this correct? 'form.users.default_rate' => 'Varsayılan saat ücreti', @@ -540,8 +540,4 @@ "form.mytime.del_str" => 'zaman kaydını siliyor', "form.mytime.time_form" => ' (ss:dd)', "form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', - -// people form attributes -"form.people.manager" => 'yönetici', -"form.people.comanager" => 'yardımcı yönetici', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 299e1b4b7..5426c0913 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- '; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) { $colspan++; $html .= ''; } // User custom field labels. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -139,7 +140,7 @@ if ($bean->getAttribute('chproject')) { $colspan++; $html .= ''; } if ($bean->getAttribute('chtask')) { $colspan++; $html .= ''; } // Time custom field labels. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -174,7 +175,7 @@ $html .= ''; } // User custom fields. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -197,7 +198,7 @@ $html .= ''; } // Time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -242,7 +243,7 @@ $html .= ''; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $html .= ''; // User custom fields. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -253,7 +254,7 @@ if ($bean->getAttribute('chproject')) $html .= ''; if ($bean->getAttribute('chtask')) $html .= ''; // Time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -314,7 +315,7 @@ $html .= ''; } // User custom fields. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -337,7 +338,7 @@ $html .= ''; } // Time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -371,7 +372,7 @@ $html .= ''; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $html .= ''; // User custom fields. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_control_name = 'show_'.$field_name; @@ -382,7 +383,7 @@ if ($bean->getAttribute('chproject')) $html .= ''; if ($bean->getAttribute('chtask')) $html .= ''; // Time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_control_name = 'show_'.$field_name; From c90d809986888e191292af4ce5660a64f12c040a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 19 May 2021 18:58:44 +0000 Subject: [PATCH 2255/2515] Eliminated 2 more php8 warnings. --- WEB-INF/lib/ttFavReportHelper.class.php | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index d1cce7240..be23f6a39 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -304,7 +304,7 @@ static function loadReport(&$bean) { if ($val['report_spec']) { $report_spec = $val['report_spec']; // Time custom field settings. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_field_name = 'show_'.$field_name; @@ -315,7 +315,7 @@ static function loadReport(&$bean) { } } // User custom field settings. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_field_name = 'show_'.$field_name; diff --git a/initialize.php b/initialize.php index 2493a2154..3d348f59a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5572"); +define("APP_VERSION", "1.19.28.5573"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 273e129c8e1a28ce5d8d0a425caf3865332d3bda Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 15:22:58 +0000 Subject: [PATCH 2256/2515] Starting to integrate newly translated pt-br strings from pr #111. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/da.lang.php | 1 - WEB-INF/resources/de.lang.php | 2 -- WEB-INF/resources/en.lang.php | 1 - WEB-INF/resources/es.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/fa.lang.php | 1 - WEB-INF/resources/fi.lang.php | 1 - WEB-INF/resources/fr.lang.php | 1 - WEB-INF/resources/gr.lang.php | 2 -- WEB-INF/resources/he.lang.php | 1 - WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/resources/it.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/nl.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/pl.lang.php | 1 - WEB-INF/resources/pt-br.lang.php | 21 +++++++-------------- WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/ru.lang.php | 1 - WEB-INF/resources/sk.lang.php | 1 - WEB-INF/resources/sl.lang.php | 1 - WEB-INF/resources/sr.lang.php | 1 - WEB-INF/resources/sv.lang.php | 2 -- WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - initialize.php | 2 +- 31 files changed, 8 insertions(+), 49 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index b1fbd33ce..333d78abe 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -40,7 +40,6 @@ 'menu.users' => 'Usuaris', 'menu.groups' => 'Grups', // TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'Clients', 'menu.options' => 'Opcions', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 97f37507f..a7a3fbdb5 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -41,7 +41,6 @@ 'menu.users' => 'Uživatelů', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Export', 'menu.clients' => 'Zákazníci', // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index dd185700f..f2e0ff43e 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Brugere', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Eksport', 'menu.clients' => 'Kunder', 'menu.options' => 'Indstillinger', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index ed2d2587a..7a8318646 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -37,8 +37,6 @@ 'menu.tasks' => 'Aufgaben', 'menu.users' => 'Personen', 'menu.groups' => 'Gruppen', -// TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Exportieren', 'menu.clients' => 'Kunden', 'menu.options' => 'Optionen', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 80ef82777..4da63222f 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -21,7 +21,6 @@ 'menu.register' => 'Register', 'menu.profile' => 'Profile', 'menu.group' => 'Group', -'menu.subgroups' => 'Subgroups', 'menu.plugins' => 'Plugins', 'menu.time' => 'Time', 'menu.puncher' => 'Punch', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c50f388b9..571c167c8 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -39,7 +39,6 @@ 'menu.users' => 'Personas', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'Clientes', 'menu.options' => 'Opciones', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 573d684c6..15888784d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -38,7 +38,6 @@ 'menu.tasks' => 'Tööülesanded', 'menu.users' => 'Kasutajad', 'menu.groups' => 'Grupid', -'menu.subgroups' => 'Alamgrupid', 'menu.export' => 'Eksport', // TODO: is this a correct term as an opposite of "Import"? 'menu.clients' => 'Kliendid', 'menu.options' => 'Suvandid', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 2e2718eb7..f9ae9a082 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -39,7 +39,6 @@ 'menu.users' => 'کاربران', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'پشتیبانی', 'menu.clients' => 'مشتری ها', 'menu.options' => 'تنظیمات', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 534a94b8c..bcfe62417 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Käyttäjät', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Vie', 'menu.clients' => 'Asiakkaat', 'menu.options' => 'Optiot', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 0b55172df..d0170ebda 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Utilisateurs', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Exporter', 'menu.clients' => 'Clients', 'menu.options' => 'Options', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index f8bdb0dc5..b8e6789c0 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -36,8 +36,6 @@ 'menu.tasks' => 'Εργασίες', 'menu.users' => 'Χρήστες', 'menu.groups' => 'Ομάδες', -// TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Εξαγωγή', 'menu.clients' => 'Πελάτες', 'menu.options' => 'Επιλογές', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 7505f0965..011b5f573 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -39,7 +39,6 @@ 'menu.users' => 'משתמשים', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'ייצוא', 'menu.clients' => 'לקוחות', 'menu.options' => 'אפשרויות', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 052dbe72e..f8fb388d6 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -41,8 +41,6 @@ // 'menu.users' => 'Users', 'menu.groups' => 'Csoportok', // TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', -// TODO: translate the following. // 'menu.export' => 'Export', 'menu.clients' => 'Ügyfelek', 'menu.options' => 'Opciók', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 55faab87c..4e2bdfb2f 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -38,8 +38,6 @@ 'menu.tasks' => 'Compiti', 'menu.users' => 'Utenti', 'menu.groups' => 'Gruppi', -// TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Esportazione', 'menu.clients' => 'Clienti', 'menu.options' => 'Opzioni', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 57f5592df..15db98a04 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -40,7 +40,6 @@ 'menu.users' => 'ユーザー', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'クライアント', 'menu.options' => 'オプション', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 832464fbc..8f22ae323 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -40,7 +40,6 @@ 'menu.users' => '사용자', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => '클라이언트', 'menu.options' => '옵션', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 66c32ea5a..378216466 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -34,7 +34,6 @@ 'menu.tasks' => 'Taken', 'menu.users' => 'Medewerkers', 'menu.groups' => 'Groepen', -'menu.subgroups' => 'Subgroepen', 'menu.export' => 'Exporteren', 'menu.clients' => 'Klanten', 'menu.options' => 'Opties', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 3929ac4bc..b13b942f5 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -41,7 +41,6 @@ 'menu.users' => 'Brukere', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Eksport', 'menu.clients' => 'Klienter', 'menu.options' => 'Opsjoner', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 98018f677..144ea434d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Użytkownicy', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Eksport', 'menu.clients' => 'Klienci', 'menu.options' => 'Opcje', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3fdfae2d1..a67633ab7 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -5,7 +5,7 @@ // Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. -$i18n_language = 'Portuguese (Português brasileiro)'; +$i18n_language = 'Portuguese (Português Brasileiro)'; $i18n_months = array('Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'); $i18n_weekdays = array('Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado'); $i18n_weekdays_short = array('Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'); @@ -18,27 +18,20 @@ 'menu.logout' => 'Logout', 'menu.forum' => 'Fórum', 'menu.help' => 'Ajuda', -// TODO: translate the following. -// 'menu.register' => 'Register', +'menu.register' => 'Registro', 'menu.profile' => 'Perfil', -// TODO: translate the following. -// 'menu.group' => 'Group', +'menu.group' => 'Grupo', 'menu.plugins' => 'Plugins', 'menu.time' => 'Tempo', -// TODO: translate the following. -// 'menu.puncher' => 'Punch', -// 'menu.week' => 'Week', -'menu.expenses' => 'Gastos', +'menu.puncher' => 'Punch', +'menu.week' => 'Semana', +'menu.expenses' => 'Despesas', 'menu.reports' => 'Relatórios', -// TODO: translate the following. -// 'menu.timesheets' => 'Timesheets', +'menu.timesheets' => 'Planilha de horas', 'menu.charts' => 'Gráficos', 'menu.projects' => 'Projetos', 'menu.tasks' => 'Tarefas', 'menu.users' => 'Usuários', -// TODO: translate the following. -// 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Exportar', 'menu.clients' => 'Clientes', 'menu.options' => 'Opções', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 9cdaffd82..585db686f 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -42,7 +42,6 @@ 'menu.users' => 'Usuários', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', // 'menu.clients' => 'Clients', 'menu.options' => 'Opções', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 7e42575c3..eb99020fa 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -42,7 +42,6 @@ 'menu.users' => 'Utilizatori', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'Clienti', // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index c74e45bc5..e5e767ff4 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -33,7 +33,6 @@ 'menu.tasks' => 'Задачи', 'menu.users' => 'Пользователи', 'menu.groups' => 'Группы', -'menu.subgroups' => 'Подгруппы', 'menu.export' => 'Экспорт', 'menu.clients' => 'Клиенты', 'menu.options' => 'Опции', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 574a283f5..dcdcb8c81 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Používatelia', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Export', 'menu.clients' => 'Klienti', 'menu.options' => 'Nastavenia', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index a2ce91ee7..095b12f30 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -40,7 +40,6 @@ // 'menu.tasks' => 'Tasks', // 'menu.users' => 'Users', // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'Stranke', 'menu.options' => 'Možnosti', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index b876161b5..73a1dce54 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -38,7 +38,6 @@ 'menu.users' => 'Korisnici', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Izvoz', 'menu.clients' => 'Klijenti', 'menu.options' => 'Opcije', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 3f4cc33bc..764671820 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -36,8 +36,6 @@ 'menu.tasks' => 'Arbetsuppgifter', 'menu.users' => 'Användare', 'menu.groups' => 'Grupper', -// TODO: translate the following. -// 'menu.subgroups' => 'Subgroups', 'menu.export' => 'Exportera', 'menu.clients' => 'Kunder', 'menu.options' => 'Alternativ', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index bf768a1b6..5e7ee26d1 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -42,7 +42,6 @@ 'menu.users' => 'Kullanıcılar', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', // 'menu.export' => 'Export', 'menu.clients' => 'Müşteriler', // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 00095186b..d10d1c7c3 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -38,7 +38,6 @@ 'menu.users' => '用户', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => '导出数据', 'menu.clients' => '客户', 'menu.options' => '选项', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index d4fa2a9f8..f1a6a6e30 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -38,7 +38,6 @@ 'menu.users' => '用戶', // TODO: translate the following. // 'menu.groups' => 'Groups', -// 'menu.subgroups' => 'Subgroups', 'menu.export' => '輸出資料', 'menu.clients' => '客戶', 'menu.options' => '選項', diff --git a/initialize.php b/initialize.php index 3d348f59a..c47a19f44 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5573"); +define("APP_VERSION", "1.19.28.5574"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 5ff85207b6b74ed20d665de27263d8256bbab5e1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 16:00:41 +0000 Subject: [PATCH 2257/2515] Work in progress integrating changes from pr #111. --- WEB-INF/resources/pt-br.lang.php | 51 ++++++++++++++------------------ initialize.php | 2 +- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index a67633ab7..b7203dea6 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -32,6 +32,7 @@ 'menu.projects' => 'Projetos', 'menu.tasks' => 'Tarefas', 'menu.users' => 'Usuários', +'menu.groups' => 'Grupos', 'menu.export' => 'Exportar', 'menu.clients' => 'Clientes', 'menu.options' => 'Opções', @@ -46,59 +47,51 @@ 'error.access_denied' => 'Acesso negado.', 'error.sys' => 'Erro no sistema.', 'error.db' => 'Erro no banco de dados.', -// TODO: translate the following. -// 'error.registered_recently' => 'Registered recently.', -// 'error.feature_disabled' => 'Feature is disabled.', +'error.registered_recently' => 'Registrado recentemente.', +'error.feature_disabled' => 'Recurso desabilitado.', 'error.field' => 'Dados incorretos "{0}".', 'error.empty' => 'Campo "{0}" está vazio.', 'error.not_equal' => 'Campo "{0}" é diferente do campo "{1}".', -// TODO: translate the following. -// 'error.interval' => 'Field "{0}" must be greater than "{1}".', +'error.interval' => 'Campo "{0}" precisa ser maior que "{1}".', 'error.project' => 'Selecione projeto.', 'error.task' => 'Selecione tarefa.', 'error.client' => 'Selecione cliente.', 'error.report' => 'Selecione relatório.', -// TODO: translate the following. -// 'error.record' => 'Select record.', +'error.record' => 'Selecione o registro.', 'error.auth' => 'Usuário ou senha incorretos.', 'error.user_exists' => 'Já existe usuário com este login.', -// TODO: translate the following. -// 'error.object_exists' => 'Object with this name already exists.', +'error.object_exists' => 'Já existe um objeto com este nome.', 'error.invoice_exists' => 'Já existe fatura com este número.', -// TODO: translate the following. -// 'error.role_exists' => 'Role with this rank already exists.', +// TODO: improve translation of the word "role" in error.role_exists. função here, papel elsewhere? +'error.role_exists' => 'Já existe uma função com este rank.', 'error.no_invoiceable_items' => 'Não há items faturáveis.', -// TODO: translate the following. -// 'error.no_records' => 'There are no records.', +'error.no_records' => 'Não há registros.', 'error.no_login' => 'Não há usuário com este login.', -'error.no_groups' => 'Sua base de dados está vazia. Entre como admin e crie uma equipe nova.', // TODO: replace "team" with "group". +'error.no_groups' => 'Sua base de dados está vazia. Entre como admin e crie um grupo novo.', 'error.upload' => 'Erro no envio do arquivo.', 'error.range_locked' => 'Período está bloqueado.', 'error.mail_send' => 'Erro enviando o e-mail.', -// TODO: improve the translation above by adding MAIL_SMTP_DEBUG part. -// 'error.mail_send' => 'Error sending mail. Use MAIL_SMTP_DEBUG for diagnostics.', +// TODO: is "Use" in error.mail_send translated correctly? +'error.mail_send' => 'Erro ao enviar e-mail. Use MAIL_SMTP_DEBUG para diagnósticos.', 'error.no_email' => 'Não há e-mail associado a este login.', 'error.uncompleted_exists' => 'Entrada incompleta existente. Feche ou remova-a.', 'error.goto_uncompleted' => 'Ir até a entrada incompleta.', 'error.overlap' => 'O intervalo se sobrepõe com entradas já existentes.', 'error.future_date' => 'Data é no futuro.', -// TODO: translate the following. -// 'error.xml' => 'Error in XML file at line %d: %s.', -// 'error.cannot_import' => 'Cannot import: %s.', -// 'error.format' => 'Invalid file format.', -// 'error.user_count' => 'Limit on user count.', -// 'error.expired' => 'Expiration date reached.', -// 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. +'error.xml' => 'Erro no arquivo XML, linha line %d: %s.', +'error.cannot_import' => 'Não foi possível importar: %s.', +'error.format' => 'Formato de arquivo inválido.', +'error.user_count' => 'Limite na contagem de usuários.', +'error.expired' => 'Data de expiração atingida.', +'error.file_storage' => 'Erro relacionado ao servidor de armazenamento de arquivos.', +'error.remote_work' => 'Erro relacionado ao servidor responsável pelo plugin work.', // Warning messages. -// TODO: translate the following. -// 'warn.sure' => 'Are you sure?', -// 'warn.confirm_save' => 'Date has changed. Confirm saving, not copying this item.', +'warn.sure' => 'Tem certeza?', +'warn.confirm_save' => 'A data mudou. Confirme salvando, não copiando este item.', // Success messages. -// TODO: translate the following. -// 'msg.success' => 'Operation completed successfully.', +'msg.success' => 'Operação concluída com sucesso.', // Labels for buttons. 'button.login' => 'Login', diff --git a/initialize.php b/initialize.php index c47a19f44..88b47d256 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5574"); +define("APP_VERSION", "1.19.28.5575"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 565d1b835511f1af29f945d3c944645a0bda57d3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 17:57:11 +0000 Subject: [PATCH 2258/2515] A bit more progress integrating pr #111. --- WEB-INF/resources/ca.lang.php | 2 - WEB-INF/resources/cs.lang.php | 2 - WEB-INF/resources/da.lang.php | 2 - WEB-INF/resources/de.lang.php | 2 - WEB-INF/resources/en.lang.php | 2 - WEB-INF/resources/es.lang.php | 2 - WEB-INF/resources/et.lang.php | 2 - WEB-INF/resources/fa.lang.php | 2 - WEB-INF/resources/fi.lang.php | 2 - WEB-INF/resources/fr.lang.php | 2 - WEB-INF/resources/gr.lang.php | 2 - WEB-INF/resources/he.lang.php | 2 - WEB-INF/resources/hu.lang.php | 2 - WEB-INF/resources/it.lang.php | 2 - WEB-INF/resources/ja.lang.php | 2 - WEB-INF/resources/ko.lang.php | 2 - WEB-INF/resources/nl.lang.php | 2 - WEB-INF/resources/no.lang.php | 2 - WEB-INF/resources/pl.lang.php | 2 - WEB-INF/resources/pt-br.lang.php | 97 ++++++++++++++------------------ WEB-INF/resources/pt.lang.php | 2 - WEB-INF/resources/ro.lang.php | 2 - WEB-INF/resources/ru.lang.php | 2 - WEB-INF/resources/sk.lang.php | 2 - WEB-INF/resources/sl.lang.php | 2 - WEB-INF/resources/sr.lang.php | 2 - WEB-INF/resources/sv.lang.php | 2 - WEB-INF/resources/tr.lang.php | 2 - WEB-INF/resources/zh-cn.lang.php | 2 - WEB-INF/resources/zh-tw.lang.php | 2 - initialize.php | 2 +- 31 files changed, 42 insertions(+), 115 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 333d78abe..1f735771e 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -260,8 +260,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index a7a3fbdb5..b180b884e 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -270,8 +270,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index f2e0ff43e..9c6aea90d 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -252,8 +252,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktive Brugere', 'label.inactive_users' => 'Inaktive Brugere', // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 7a8318646..d2dff2a08 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -244,8 +244,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktive Nutzer', 'label.inactive_users' => 'Inaktive Nutzer', // TODO: translate the following or confirm that "Details" is also correct for German (exactly as the English string). diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 4da63222f..d7fb49ac4 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -234,8 +234,6 @@ 'label.attachments' => 'Attachments', 'label.files' => 'Files', 'label.file' => 'File', -'label.image' => 'Image', -'label.download' => 'Download', 'label.active_users' => 'Active Users', 'label.inactive_users' => 'Inactive Users', 'label.details' => 'Details', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 571c167c8..c352f5d9a 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -263,8 +263,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 15888784d..c4ab61d3a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -260,8 +260,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktiivsed kasutajad', 'label.inactive_users' => 'Mitteaktiivsed kasutajad', // TODO: translate the following. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index f9ae9a082..dfff12bd2 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -263,8 +263,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'کاربران فعال', 'label.inactive_users' => 'کاربران غیرفعال', // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index bcfe62417..f624a91d1 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -256,8 +256,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktiiviset käyttäjät', 'label.inactive_users' => 'Ei-aktiiviset käyttäjät', // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index d0170ebda..f3e0c862a 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -250,8 +250,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Utilisateurs actifs', 'label.inactive_users' => 'Utilisateurs inactifs', // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index b8e6789c0..b5ba3bf3e 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -245,8 +245,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Ενεργοί χρήστες', 'label.inactive_users' => 'Ανενεργοί χρήστες', // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 011b5f573..f85fbb544 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -271,8 +271,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'משתמשים פעילים', 'label.inactive_users' => 'משתמשים לא פעילים', // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index f8fb388d6..791105b34 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -265,8 +265,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 4e2bdfb2f..2654c6398 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -249,8 +249,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Utenti attivi', 'label.inactive_users' => 'Utenti inattivi', // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 15db98a04..b9d84a9ac 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -270,8 +270,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 8f22ae323..f1cff3fc4 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -270,8 +270,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 378216466..dfd469993 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -228,8 +228,6 @@ 'label.attachments' => 'Bijlagen', 'label.files' => 'Bestanden', 'label.file' => 'Bestand', -'label.image' => 'Afbeelding', -'label.download' => 'Download', 'label.active_users' => 'Actieve medewerkers', 'label.inactive_users' => 'Inactieve medewerkers', 'label.details' => 'Details', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b13b942f5..3511faec7 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -267,8 +267,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 144ea434d..dd4deeadd 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -257,8 +257,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktywni użytkownicy', 'label.inactive_users' => 'Nieaktywni użytkownicy', // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index b7203dea6..40f7a8362 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -110,16 +110,13 @@ 'button.export' => 'Exportar equipe', // TODO: replace "team" with "group". 'button.import' => 'Importar equipe', // TODO: replace "team" with "group". 'button.close' => 'Fechar', -// TODO: translate the following. -// 'button.start' => 'Start', +'button.start' => 'Iniciar', 'button.stop' => 'Parar', -// TODO: translate the following. -// 'button.approve' => 'Approve', -// 'button.disapprove' => 'Disapprove', +'button.approve' => 'Aprovar', +'button.disapprove' => 'Desaprovar', // Labels for controls on forms. Labels in this section are used on multiple forms. -// TODO: translate the following. -// 'label.menu' => 'Menu', +'label.menu' => 'Menu', 'label.group_name' => 'Nome da equipe', // TODO: replace "team" with "group". 'label.address' => 'Endereço', 'label.currency' => 'Moeda', @@ -132,18 +129,16 @@ 'label.confirm_password' => 'Confirme a senha', 'label.email' => 'E-mail', 'label.cc' => 'Cc', -// TODO: translate the following. -// 'label.bcc' => 'Bcc', +'label.bcc' => 'Bcc', 'label.subject' => 'Assunto', 'label.date' => 'Data', 'label.start_date' => 'Data inicial', 'label.end_date' => 'Data final', 'label.user' => 'Usuário', 'label.users' => 'Usuários', -// TODO: translate the following. -// 'label.group' => 'Group', -// 'label.subgroups' => 'Subgroups', -// 'label.roles' => 'Roles', +'label.group' => 'Grupo', +'label.subgroups' => 'Subgrupos', +'label.roles' => 'Papéis', 'label.client' => 'Cliente', 'label.clients' => 'Clientes', 'label.option' => 'Opção', @@ -157,16 +152,13 @@ 'label.finish' => 'Fim', 'label.duration' => 'Duração', 'label.note' => 'Anotação', -// TODO: translate the following. -// 'label.notes' => 'Notes', +'label.notes' => 'Anotações', 'label.item' => 'Item', 'label.cost' => 'Custo', -// TODO: translate the following. -// 'label.ip' => 'IP', +'label.ip' => 'IP', 'label.day_total' => 'Total diário', 'label.week_total' => 'Total semanal', -// TODO: translate the following. -// 'label.month_total' => 'Month total', +'label.month_total' => 'Total mensal', 'label.today' => 'Hoje', 'label.view' => 'Ver', 'label.edit' => 'Editar', @@ -174,10 +166,9 @@ 'label.configure' => 'Configurar', 'label.select_all' => 'Selecionar todos', 'label.select_none' => 'Desmarcar todos', -// TODO: translate the following. -// 'label.day_view' => 'Day view', -// 'label.week_view' => 'Week view', -// 'label.puncher' => 'Puncher', +'label.day_view' => 'Visão diária', +'label.week_view' => 'Visão semanal', +'label.puncher' => 'Puncher', 'label.id' => 'ID', 'label.language' => 'Idioma', 'label.decimal_mark' => 'Ponto decimal', @@ -200,17 +191,14 @@ 'label.role_comanager' => '(coordenador)', 'label.role_admin' => '(administrador)', 'label.page' => 'Página', -// TODO: translate the following. -// 'label.condition' => 'Condition', -// 'label.yes' => 'yes', -// 'label.no' => 'no', -// 'label.sort' => 'Sort', +'label.condition' => 'Condição', +'label.yes' => 'sim', +'label.no' => 'não', +'label.sort' => 'Ordenar', // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Campos personalizados', -// Translate the following. -// 'label.monthly_quotas' => 'Monthly quotas', -// TODO: translate the following. -// 'label.entity' => 'Entity', +'label.monthly_quotas' => 'Cotas mensais', +'label.entity' => 'Entidade', 'label.type' => 'Tipo', 'label.type_dropdown' => 'lista suspensa', 'label.type_text' => 'texto', @@ -218,31 +206,28 @@ 'label.fav_report' => 'Relatório favorito', 'label.schedule' => 'Agenda', 'label.what_is_it' => 'O que é?', -// 'label.expense' => 'Expense', -// 'label.quantity' => 'Quantity', -// 'label.paid_status' => 'Paid status', -// 'label.paid' => 'Paid', -// 'label.mark_paid' => 'Mark paid', -// 'label.week_note' => 'Week note', -// 'label.week_list' => 'Week list', -// 'label.work_units' => 'Work units', -// 'label.work_units_short' => 'Units', +'label.expense' => 'Despesa', +'label.quantity' => 'Quantidade', +'label.paid_status' => 'Status pago', +'label.paid' => 'Pago', +'label.mark_paid' => 'Marcar como pago', +'label.week_note' => 'Anotação da semana', +'label.week_list' => 'Lista da semana', +'label.work_units' => 'Unidades de trabalho', +'label.work_units_short' => 'Unidades', 'label.totals_only' => 'Somente totais', -// TODO: translate the following. -// 'label.quota' => 'Quota', -// 'label.timesheet' => 'Timesheet', -// 'label.submitted' => 'Submitted', -// 'label.approved' => 'Approved', -// 'label.approval' => 'Report approval', -// 'label.mark_approved' => 'Mark approved', -// 'label.template' => 'Template', -// 'label.bind_templates_with_projects' => 'Bind templates with projects', -// 'label.prepopulate_note' => 'Prepopulate Note field', -// 'label.attachments' => 'Attachments', -// 'label.files' => 'Files', -// 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', +'label.quota' => 'Cota', +'label.timesheet' => 'Planilha de horas', +'label.submitted' => 'Enviado', +'label.approved' => 'Aprovado', +'label.approval' => 'Aprovação de relatório', +'label.mark_approved' => 'Marcar como aprovado', +'label.template' => 'Modelo', +'label.bind_templates_with_projects' => 'Vincular modelos com projetos', +'label.prepopulate_note' => 'Pré-preencher campo de anotação', +'label.attachments' => 'Anexos', +'label.files' => 'Arquivos', +'label.file' => 'Arquivo', 'label.active_users' => 'Usuários ativos', 'label.inactive_users' => 'Usuários inativos', // TODO: translate the following. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 585db686f..374cf4da6 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -255,8 +255,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index eb99020fa..cdca51cc1 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -267,8 +267,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index e5e767ff4..abfff9a20 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -225,8 +225,6 @@ 'label.attachments' => 'Приложения', 'label.files' => 'Файлы', 'label.file' => 'Файл', -'label.image' => 'Изображение', -'label.download' => 'Скачать', 'label.active_users' => 'Активные пользователи', 'label.inactive_users' => 'Неактивные пользователи', 'label.details' => 'Детали', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index dcdcb8c81..8c9717270 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -260,8 +260,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktívny používatelia', 'label.inactive_users' => 'Neaktívny používatelia', // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 095b12f30..e45e43a52 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -250,8 +250,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 73a1dce54..cd9ff6182 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -255,8 +255,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktivni korisnik', 'label.inactive_users' => 'Neaktivni korisnik', // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 764671820..5a9b86787 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -251,8 +251,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', 'label.active_users' => 'Aktiva användare', 'label.inactive_users' => 'Inaktiva användare', // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 5e7ee26d1..a1b4b0d84 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -274,8 +274,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index d10d1c7c3..fc07dc618 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -260,8 +260,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index f1a6a6e30..1b20c2d11 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -265,8 +265,6 @@ // 'label.attachments' => 'Attachments', // 'label.files' => 'Files', // 'label.file' => 'File', -// 'label.image' => 'Image', -// 'label.download' => 'Download', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', diff --git a/initialize.php b/initialize.php index 88b47d256..6104df6ef 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5575"); +define("APP_VERSION", "1.19.28.5576"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0b6c6bf40b94be1b25f4675eea05354297103409 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 19:16:27 +0000 Subject: [PATCH 2259/2515] More progress on integrating strings from pr #111. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/da.lang.php | 1 - WEB-INF/resources/de.lang.php | 2 -- WEB-INF/resources/en.lang.php | 1 - WEB-INF/resources/es.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/fa.lang.php | 1 - WEB-INF/resources/fi.lang.php | 1 - WEB-INF/resources/fr.lang.php | 1 - WEB-INF/resources/gr.lang.php | 1 - WEB-INF/resources/he.lang.php | 1 - WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/it.lang.php | 1 - WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/nl.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/pl.lang.php | 1 - WEB-INF/resources/pt-br.lang.php | 31 ++++++++++++------------------- WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/ru.lang.php | 1 - WEB-INF/resources/sk.lang.php | 1 - WEB-INF/resources/sl.lang.php | 1 - WEB-INF/resources/sr.lang.php | 1 - WEB-INF/resources/sv.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - initialize.php | 2 +- 31 files changed, 13 insertions(+), 50 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 1f735771e..c91a3ae3a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -291,7 +291,6 @@ 'title.login' => 'Sessió iniciada', 'title.groups' => 'Grups', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Eliminar grup', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index b180b884e..2829fc0ff 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -301,7 +301,6 @@ 'title.login' => 'Přihlásit', 'title.groups' => 'Týmy', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Smazat tým', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 9c6aea90d..bec944e15 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -280,7 +280,6 @@ 'title.login' => 'Login', 'title.groups' => 'Teams', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Redigér Team', // TODO: change "team" to "group". 'title.delete_group' => 'Slet Team', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index d2dff2a08..2c270748e 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -274,8 +274,6 @@ 'title.success' => 'Erfol', 'title.login' => 'Anmelden', 'title.groups' => 'Gruppen', -// TODO: translate the following. -// 'title.subgroups' => 'Subgroups', 'title.add_group' => 'Gruppe anlegen', 'title.edit_group' => 'Gruppe bearbeiten', 'title.delete_group' => 'Gruppe löschen', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index d7fb49ac4..2339a9961 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -258,7 +258,6 @@ 'title.success' => 'Success', 'title.login' => 'Login', 'title.groups' => 'Groups', -'title.subgroups' => 'Subgroups', 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Deleting Group', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c352f5d9a..c538fbc94 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -290,7 +290,6 @@ 'title.login' => 'Sesión iniciada', 'title.groups' => 'Grupos', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', // 'title.delete_group' => 'Deleting Group', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index c4ab61d3a..08f392f65 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -290,7 +290,6 @@ 'title.success' => 'Õnnestumine', 'title.login' => 'Sisene', 'title.groups' => 'Grupid', -'title.subgroups' => 'Alamgrupid', 'title.add_group' => 'Lisa grupp', 'title.edit_group' => 'Muuda gruppi', 'title.delete_group' => 'Kustuta grupp', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index dfff12bd2..75220b462 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -291,7 +291,6 @@ 'title.login' => 'ورود', 'title.groups' => 'تیم ها', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'حذف تیم', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index f624a91d1..a497a690e 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -284,7 +284,6 @@ 'title.login' => 'Kirjautuminen', 'title.groups' => 'Tiimit', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Tiimin muokkaus', // TODO: change "team" to "group". 'title.delete_group' => 'Tiimin poisto', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index f3e0c862a..d1b0bc906 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -278,7 +278,6 @@ 'title.login' => 'Connexion', 'title.groups' => 'Équipes', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Modification d\\\'une équipe', // TODO: change "team" to "group". 'title.delete_group' => 'Suppression d\\\'une équipe', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index b5ba3bf3e..647475c47 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -273,7 +273,6 @@ 'title.login' => 'Σύνδεση', 'title.groups' => 'Ομάδες', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Επεξεργασία ομάδας', 'title.delete_group' => 'Διαγραφή ομάδας', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index f85fbb544..8ad1fe77a 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -299,7 +299,6 @@ 'title.login' => 'כניסה', 'title.groups' => 'צוותים', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'מחיקת צוות', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 791105b34..403e178b8 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -292,7 +292,6 @@ 'title.login' => 'Bejelentkezés', 'title.groups' => 'Csoportok', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Csoport törlése', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 2654c6398..c48251969 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -281,7 +281,6 @@ 'title.login' => 'Login', 'title.groups' => 'Gruppi', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Modifica gruppo', 'title.delete_group' => 'Elimina gruppo', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b9d84a9ac..df981bc5a 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -297,7 +297,6 @@ 'title.login' => 'ログイン', 'title.groups' => 'チーム', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'チームの削除', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f1cff3fc4..120734f78 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -297,7 +297,6 @@ 'title.login' => '로그인', 'title.groups' => '팀', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => '팀 삭제', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index dfd469993..2190504f8 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -248,7 +248,6 @@ 'title.success' => 'Succes', 'title.login' => 'Aanmelden', 'title.groups' => 'Groepen', -'title.subgroups' => 'Subgroepen', 'title.add_group' => 'Groep toevoegen', 'title.edit_group' => 'Groep bewerken', 'title.delete_group' => 'Groep aan het verwijderen', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 3511faec7..a0ebfcde0 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -294,7 +294,6 @@ 'title.login' => 'Innlogging', // TODO: translate the following. // 'title.groups' => 'Groups', -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Slett team', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index dd4deeadd..42ff39036 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -285,7 +285,6 @@ 'title.login' => 'Logowanie', 'title.groups' => 'Zespoły', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Edytowanie zespołu', // TODO: change "team" to "group". 'title.delete_group' => 'Usuwanie zespołu', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 40f7a8362..d936a13f2 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -217,7 +217,7 @@ 'label.work_units_short' => 'Unidades', 'label.totals_only' => 'Somente totais', 'label.quota' => 'Cota', -'label.timesheet' => 'Planilha de horas', +'label.timesheet' => 'Planilha de horas', 'label.submitted' => 'Enviado', 'label.approved' => 'Aprovado', 'label.approval' => 'Aprovação de relatório', @@ -230,33 +230,26 @@ 'label.file' => 'Arquivo', 'label.active_users' => 'Usuários ativos', 'label.inactive_users' => 'Usuários inativos', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. +'label.details' => 'Detalhes', +'label.budget' => 'Orçamento', +'label.work' => 'Trabalho', +'label.offer' => 'Oferta', +'label.contractor' => 'Contratante', +'label.how_to_pay' => 'Como pagar', +'label.moderator_comment' => 'Comentário do moderador', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. -// TODO: translate the following. -// 'entity.time' => 'time', -// 'entity.user' => 'user', -// 'entity.project' => 'project', +'entity.time' => 'tempo', +'entity.user' => 'usuário', +'entity.project' => 'projeto', // Form titles. 'title.error' => 'Erro', -// TODO: Translate the following. -// 'title.success' => 'Success', +'title.success' => 'Sucesso', 'title.login' => 'Login', 'title.groups' => 'Equipes', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Editando equipe', // TODO: change "team" to "group". 'title.delete_group' => 'Apagando equipe', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 374cf4da6..2bd9783fa 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -282,7 +282,6 @@ 'title.login' => 'Login', // TODO: translate the following. // 'title.groups' => 'Groups', -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', // 'title.delete_group' => 'Deleting Group', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index cdca51cc1..561543d4c 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -297,7 +297,6 @@ 'title.login' => 'Autentificare', 'title.groups' => 'Echipe', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Șterge echipa', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index abfff9a20..c5c01a17f 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -246,7 +246,6 @@ 'title.success' => 'Успех', 'title.login' => 'Вход в систему', 'title.groups' => 'Группы', -'title.subgroups' => 'Подгруппы', 'title.add_group' => 'Добавление группы', 'title.edit_group' => 'Редактирование группы', 'title.delete_group' => 'Удаление группы', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 8c9717270..68ba10552 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -288,7 +288,6 @@ 'title.login' => 'Prihlásenie', 'title.groups' => 'Tímy', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Vymazávanie tímu', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index e45e43a52..0942fbbd6 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -277,7 +277,6 @@ 'title.login' => 'Prijava', 'title.groups' => 'Timi', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', // 'title.delete_group' => 'Deleting Group', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index cd9ff6182..a7118c7ca 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -283,7 +283,6 @@ 'title.login' => 'Prijava', 'title.groups' => 'Timovi', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Izmeni tim', // TODO: change "team" to "group". 'title.delete_group' => 'Obriši tim', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 5a9b86787..66f1b159d 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -279,7 +279,6 @@ 'title.login' => 'Logga in', 'title.groups' => 'Grupper', // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Redigera grupp', 'title.delete_group' => 'Ta bort grupp', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a1b4b0d84..7ae9c8e07 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -306,7 +306,6 @@ 'title.login' => 'Giriş', 'title.groups' => 'Ekipler', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => 'Ekibi sil', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index fc07dc618..f370b737e 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -287,7 +287,6 @@ 'title.login' => '登录', 'title.groups' => '团队', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => '删除团队', // TODO: change "team" to "group". diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 1b20c2d11..c7985b99a 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -292,7 +292,6 @@ 'title.login' => '登錄', 'title.groups' => '團隊', // TODO: change "teams" to "groups". // TODO: translate the following. -// 'title.subgroups' => 'Subgroups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', 'title.delete_group' => '刪除團隊', // TODO: change "team" to "group". diff --git a/initialize.php b/initialize.php index 6104df6ef..edfd70a71 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5576"); +define("APP_VERSION", "1.19.28.5577"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1406aa8ff086976efeea555da98d547f268845c7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 20:17:02 +0000 Subject: [PATCH 2260/2515] More work on progress improving pt-br translation from pr #111. --- WEB-INF/resources/pt-br.lang.php | 127 ++++++++++++++----------------- initialize.php | 2 +- 2 files changed, 57 insertions(+), 72 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index d936a13f2..d736843a4 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -217,7 +217,7 @@ 'label.work_units_short' => 'Unidades', 'label.totals_only' => 'Somente totais', 'label.quota' => 'Cota', -'label.timesheet' => 'Planilha de horas', +'label.timesheet' => 'Planilha de horas', 'label.submitted' => 'Enviado', 'label.approved' => 'Aprovado', 'label.approval' => 'Aprovação de relatório', @@ -248,37 +248,32 @@ 'title.error' => 'Erro', 'title.success' => 'Sucesso', 'title.login' => 'Login', -'title.groups' => 'Equipes', // TODO: change "teams" to "groups". -// TODO: translate the following. -// 'title.add_group' => 'Adding Group', -'title.edit_group' => 'Editando equipe', // TODO: change "team" to "group". -'title.delete_group' => 'Apagando equipe', // TODO: change "team" to "group". +'title.groups' => 'Grupos', +'title.add_group' => 'Adicionando grupo', +'title.edit_group' => 'Editando grupo', +'title.delete_group' => 'Apagando grupo', 'title.reset_password' => 'Resetando a senha', 'title.change_password' => 'Alterando a senha', 'title.time' => 'Tempo', 'title.edit_time_record' => 'Editando entrada de hora', 'title.delete_time_record' => 'Apagando entrada de hora', -// TODO: Translate the following. -// 'title.time_files' => 'Time Record Files', -// 'title.puncher' => 'Puncher', +'title.time_files' => 'Arquivos de registro de tempo', +'title.puncher' => 'Puncher', 'title.expenses' => 'Gastos', 'title.edit_expense' => 'Editando item de gasto', 'title.delete_expense' => 'Apagando item de gasto', -// TODO: translate the following. -// 'title.expense_files' => 'Expense Item Files', +'title.expense_files' => 'Arquivos de itens de despesas', 'title.reports' => 'Relatórios', 'title.report' => 'Report', 'title.send_report' => 'Enviando relatório', -// TODO: Translate the following. -// 'title.timesheets' => 'Timesheets', -// 'title.timesheet' => 'Timesheet', -// 'title.timesheet_files' => 'Timesheet Files', +'title.timesheets' => 'Planilhas de horas', +'title.timesheet' => 'Planilha de horas', +'title.timesheet_files' => 'Arquivos de planilha de horas', 'title.invoice' => 'Fatura', 'title.send_invoice' => 'Enviando fatura', 'title.charts' => 'Gráficos', 'title.projects' => 'Projetos', -// TODO: translate the following. -// 'title.project_files' => 'Project Files', +'title.project_files' => 'Arquivos do projeto', 'title.add_project' => 'Adicionando projeto', 'title.edit_project' => 'Editando projeto', 'title.delete_project' => 'Apagando projeto', @@ -290,8 +285,8 @@ 'title.add_user' => 'Adicionando usuário', 'title.edit_user' => 'Editando usuário', 'title.delete_user' => 'Apagando usuário', +'title.roles' => 'Papéis', // TODO: translate the following. -// 'title.roles' => 'Roles', // 'title.add_role' => 'Adding Role', // 'title.edit_role' => 'Editing Role', // 'title.delete_role' => 'Deleting Role', @@ -307,16 +302,14 @@ 'title.add_notification' => 'Adicionando notificação', 'title.edit_notification' => 'Editando notificação', 'title.delete_notification' => 'Apagando notificação', -// TODO: translate the following. -// 'title.add_timesheet' => 'Adding Timesheet', -// 'title.edit_timesheet' => 'Editing Timesheet', -// 'title.delete_timesheet' => 'Deleting Timesheet', -// 'title.monthly_quotas' => 'Monthly Quotas', +'title.add_timesheet' => 'Adicionando planilha de horas', +'title.edit_timesheet' => 'Editando planilha de horas', +'title.delete_timesheet' => 'Apagando planilha de horas', +'title.monthly_quotas' => 'Cotas mensais', 'title.export' => 'Exportando dados de equipe', // TODO: replace "team" with "group". 'title.import' => 'Importando dados de equipe', // TODO: replace "team" with "group". 'title.options' => 'Opções', -// TODO: translate the following. -// 'title.display_options' => 'Display Options', +'title.display_options' => 'Opções de exibição', 'title.profile' => 'Perfil', 'title.plugins' => 'Plugins', 'title.cf_custom_fields' => 'Campos personalizados', @@ -328,41 +321,39 @@ 'title.cf_edit_dropdown_option' => 'Editando opção', 'title.cf_delete_dropdown_option' => 'Apagando opção', 'title.locking' => 'Bloquear', -// TODO: translate the following. -// 'title.week_view' => 'Week View', -// 'title.swap_roles' => 'Swapping Roles', -// 'title.work_units' => 'Work Units', -// 'title.templates' => 'Templates', -// 'title.add_template' => 'Adding Template', -// 'title.edit_template' => 'Editing Template', -// 'title.delete_template' => 'Deleting Template', -// 'title.edit_file' => 'Editing File', -// 'title.delete_file' => 'Deleting File', -// 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. +'title.week_view' => 'Visão semanal', +'title.swap_roles' => 'Alteração de papéis', +'title.work_units' => 'Unidades de trabalho', +'title.templates' => 'Modelos', +'title.add_template' => 'Adicionando modelo', +'title.edit_template' => 'Editando modelo', +'title.delete_template' => 'Apagando modelo', +'title.edit_file' => 'Editando arquivo', +'title.delete_file' => 'Apagando arquivo', +'title.download_file' => 'Baixando arquivo', +'title.work' => 'Trabalho', +'title.add_work' => 'Adicionando trabalho', +'title.edit_work' => 'Editando trabalho', +'title.delete_work' => 'Apagando trabalho', +'title.active_work' => 'Trabalho ativo', +'title.available_work' => 'Trabalho disponível', +'title.inactive_work' => 'Trabalho inativo', +'title.pending_work' => 'Trabalho pendente', +'title.offer' => 'Oferta', +'title.add_offer' => 'Adicionando oferta', +'title.edit_offer' => 'Editando oferta', +'title.delete_offer' => 'Apagando oferta', +'title.active_offers' => 'Ofertas ativas', +'title.available_offers' => 'Ofertas disponíveis', +'title.inactive_offers' => 'Ofertas inativas', +'title.pending_offers' => 'Ofertas pendentes', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. 'dropdown.all' => '--- todos ---', 'dropdown.no' => '--- não ---', -// TODO: translate the following. -// 'dropdown.current_day' => 'today', -// 'dropdown.previous_day' => 'yesterday', +'dropdown.current_day' => 'hoje', +'dropdown.previous_day' => 'ontem', 'dropdown.selected_day' => 'dia', 'dropdown.current_week' => 'esta semana', 'dropdown.previous_week' => 'última semana', @@ -371,8 +362,7 @@ 'dropdown.previous_month' => 'último mês', 'dropdown.selected_month' => 'mês', 'dropdown.current_year' => 'este ano', -// TODO: translate the following. -// 'dropdown.previous_year' => 'previous year', +'dropdown.previous_year' => 'último ano', // TODO: check if this is correct. I used último for consistency with other dropdown options. 'dropdown.selected_year' => 'ano', 'dropdown.all_time' => 'todas as datas', 'dropdown.projects' => 'projetos', @@ -380,20 +370,18 @@ 'dropdown.clients' => 'clientes', 'dropdown.select' => '--- selecione ---', 'dropdown.select_invoice' => '--- selecione fatura ---', -// TODO: translate the following. -// 'dropdown.select_timesheet' => '--- select timesheet ---', +'dropdown.select_timesheet' => '--- selecione planilha de horas ---', 'dropdown.status_active' => 'ativo', 'dropdown.status_inactive' => 'inativo', 'dropdown.delete' => 'apagar', 'dropdown.do_not_delete' => 'não apagar', -// TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', -// 'dropdown.approved' => 'approved', -// 'dropdown.not_approved' => 'not approved', -// 'dropdown.paid' => 'paid', -// 'dropdown.not_paid' => 'not paid', -// 'dropdown.ascending' => 'ascending', -// 'dropdown.descending' => 'descending', +'dropdown.pending_approval' => 'aprovação pendente', +'dropdown.approved' => 'aprovado', +'dropdown.not_approved' => 'não aprovado', +'dropdown.paid' => 'pago', +'dropdown.not_paid' => 'não pago', +'dropdown.ascending' => 'ascendente', +'dropdown.descending' => 'descendente', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases @@ -407,10 +395,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Pedido para resetar a senha enviado por e-mail.', 'form.reset_password.email_subject' => 'Pedido de alteração de senha no Anuko Time Tracker', -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -// "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Prezado usuário,\n\nAlguém, IP %s, solicitou o reset da sua senha do Anuko Time Tracker. Entre nete link para resetar a sua senha.\n\n%s\n\nAnuko Time Tracker é um sistema de código abertois, de rastreamento do tempo. Visite https://www.anuko.com para mais informações.\n\n", +'form.reset_password.email_body' => "Caro usuário,\n\nAlguém do IP %s solicitou a redefinição da senha do Anuko Time Tracker. Visite este link se quiser redefinir sua senha.\n\n%s\n\nAnuko Time Tracker é um sistema de rastreamento de apontamentos de código aberto. Visite https://www.anuko.com para obter mais informações.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Entre com a nova senha e clique em Salvar.', diff --git a/initialize.php b/initialize.php index edfd70a71..80ad77c08 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5577"); +define("APP_VERSION", "1.19.28.5578"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c1633c81d3003d84aeea7e185d13f33b6142ab9f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 22:21:33 +0000 Subject: [PATCH 2261/2515] More work in progress on pt-br translation. --- WEB-INF/resources/ca.lang.php | 4 +-- WEB-INF/resources/cs.lang.php | 4 +-- WEB-INF/resources/da.lang.php | 4 +-- WEB-INF/resources/de.lang.php | 4 +-- WEB-INF/resources/en.lang.php | 4 +-- WEB-INF/resources/es.lang.php | 4 +-- WEB-INF/resources/et.lang.php | 4 +-- WEB-INF/resources/fa.lang.php | 4 +-- WEB-INF/resources/fi.lang.php | 4 +-- WEB-INF/resources/fr.lang.php | 4 +-- WEB-INF/resources/gr.lang.php | 4 +-- WEB-INF/resources/he.lang.php | 4 +-- WEB-INF/resources/hu.lang.php | 4 +-- WEB-INF/resources/it.lang.php | 4 +-- WEB-INF/resources/ja.lang.php | 4 +-- WEB-INF/resources/ko.lang.php | 4 +-- WEB-INF/resources/nl.lang.php | 4 +-- WEB-INF/resources/no.lang.php | 4 +-- WEB-INF/resources/pl.lang.php | 4 +-- WEB-INF/resources/pt-br.lang.php | 46 +++++++++++++++----------------- WEB-INF/resources/pt.lang.php | 4 +-- WEB-INF/resources/ro.lang.php | 4 +-- WEB-INF/resources/ru.lang.php | 4 +-- WEB-INF/resources/sk.lang.php | 4 +-- WEB-INF/resources/sl.lang.php | 4 +-- WEB-INF/resources/sr.lang.php | 4 +-- WEB-INF/resources/sv.lang.php | 4 +-- WEB-INF/resources/tr.lang.php | 4 +-- WEB-INF/resources/zh-cn.lang.php | 4 +-- WEB-INF/resources/zh-tw.lang.php | 4 +-- initialize.php | 2 +- 31 files changed, 81 insertions(+), 83 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index c91a3ae3a..205600d04 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -520,8 +520,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Número de factura', 'form.invoice.person' => 'Persona', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2829fc0ff..7a685029b 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -529,8 +529,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Faktura číslo', 'form.invoice.person' => 'Osoba', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index bec944e15..3cb53a5a3 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -503,8 +503,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 2c270748e..c0d69b6d6 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -489,8 +489,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Rechnungsnummer', 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 2339a9961..1acc79084 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -472,8 +472,8 @@ 'form.templates.active_templates' => 'Active Templates', 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Invoice number', 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c538fbc94..ebe095e96 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -533,8 +533,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Número de factura', 'form.invoice.person' => 'Persona', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 08f392f65..961b8e2b5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -515,8 +515,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Arve number', 'form.invoice.person' => 'Isik', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 75220b462..798406ccf 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -524,8 +524,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'شماره فاکتور', 'form.invoice.person' => 'شخص', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index a497a690e..813b442fe 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -509,8 +509,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Laskun numero', 'form.invoice.person' => 'Henkilö', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index d1b0bc906..e2642ad27 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -500,8 +500,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Numéro de facture', 'form.invoice.person' => 'Personne', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 647475c47..5a6a8df81 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -495,8 +495,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Αριθμός τιμολογίου', 'form.invoice.person' => 'Άτομο', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 8ad1fe77a..958a556e6 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -528,8 +528,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'מספר חשבונית', 'form.invoice.person' => 'משתמש', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 403e178b8..22b28039e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -523,8 +523,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Számla azonosító száma', 'form.invoice.person' => 'Személy', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index c48251969..ab3852bf5 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -508,8 +508,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Numero fattura', 'form.invoice.person' => 'Persona', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index df981bc5a..85192f026 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -529,8 +529,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => '送り状の番号', 'form.invoice.person' => '個人', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 120734f78..202578fcc 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -527,8 +527,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => '송장 번호', 'form.invoice.person' => '개인', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 2190504f8..10c905143 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -455,8 +455,8 @@ 'form.templates.active_templates' => 'Actieve sjablonen', 'form.templates.inactive_templates' => 'Inactieve sjablonen', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Factuur nummer', 'form.invoice.person' => 'Medewerker', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index a0ebfcde0..b3cf78863 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -527,8 +527,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 42ff39036..b0602334f 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -511,8 +511,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Numer faktury', 'form.invoice.person' => 'Osoba', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index d736843a4..52193b87d 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -404,18 +404,16 @@ 'form.time.duration_format' => '(hh:mm ou 0.0h)', 'form.time.billable' => 'Faturável', 'form.time.uncompleted' => 'Incompleta', -// TODO: translate the following. -// 'form.time.remaining_quota' => 'Remaining quota', -// 'form.time.over_quota' => 'Over quota', -// 'form.time.remaining_balance' => 'Remaining balance', -// 'form.time.over_balance' => 'Over balance', +'form.time.remaining_quota' => 'Cota restante', // TODO: check if this translation is correct. I changed it from "Cota excedente", which appears to be wrong. +'form.time.over_quota' => 'Acima da cota', +'form.time.remaining_balance' => 'Saldo restante', +'form.time.over_balance' => 'Saldo excedente', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Eesta entrada foi salva somente com hora de início. Não é um erro.', // Week view form. See example at https://timetracker.anuko.com/week.php. -// TODO: translate the following. -// 'form.week.new_entry' => 'New entry', +'form.week.new_entry' => 'Nova entrada', // Reports form. See example at https://timetracker.anuko.com/reports.php 'form.reports.save_as_favorite' => 'Guardar como favorito', @@ -424,16 +422,19 @@ 'form.reports.include_not_billable' => 'não faturável', 'form.reports.include_invoiced' => 'faturado', 'form.reports.include_not_invoiced' => 'não faturado', -// TODO: translate the following. -// 'form.reports.include_assigned' => 'assigned', -// 'form.reports.include_not_assigned' => 'not assigned', -// 'form.reports.include_pending' => 'pending', +'form.reports.include_assigned' => 'atribuído', +'form.reports.include_not_assigned' => 'não atribuído', +'form.reports.include_pending' => 'pendente', 'form.reports.select_period' => 'Selecione o período de tempo', 'form.reports.set_period' => 'ou selecionar datas', 'form.reports.show_fields' => 'Exibir campos', -// TODO: translate the following. +// TODO: Try to improve the translation of form.reports.time_fields. This is a label for a section of custom fields that +// are associated with a time record. I suggest trying custom fields plugin, creating a few "time" custom fields, and seeing how +// reports.php page looks like. For example, one may create a "Ticket #" or a "Property" custom fields to be associated with time entries, +// the form.reports.time_fields groups these fields together on reports.php. // 'form.reports.time_fields' => 'Time fields', -// 'form.reports.user_fields' => 'User fields', +// 'form.reports.time_fields' => 'Campos de apontamento', +'form.reports.user_fields' => 'Campos de usuário', 'form.reports.group_by' => 'Agrupar por', 'form.reports.group_by_no' => '--- sem agrupar ---', 'form.reports.group_by_date' => 'data', @@ -445,22 +446,19 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportar', -// TODO: translate the following. -// 'form.report.assign_to_invoice' => 'Assign to invoice', -// 'form.report.assign_to_timesheet' => 'Assign to timesheet', +'form.report.assign_to_invoice' => 'Atribuir a fatura', +'form.report.assign_to_timesheet' => 'Atribuir a planilha de horas', // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php -// TODO: translate the following. -// 'form.timesheets.active_timesheets' => 'Active Timesheets', -// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', +'form.timesheets.active_timesheets' => 'Planilhas de horas ativas', +'form.timesheets.inactive_timesheets' => 'Planilhas de horas inativas', // Templates form. See example at https://timetracker.anuko.com/templates.php -// TODO: translate the following. -// 'form.templates.active_templates' => 'Active Templates', -// 'form.templates.inactive_templates' => 'Inactive Templates', +'form.templates.active_templates' => 'Modelos ativos', +'form.templates.inactive_templates' => 'Modelos inativos', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Número da fatura', 'form.invoice.person' => 'Pessoa', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 2bd9783fa..9a26f283e 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -505,8 +505,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 561543d4c..95e27a122 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -527,8 +527,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Numar factura', 'form.invoice.person' => 'Persoana', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index c5c01a17f..cb4abe577 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -452,8 +452,8 @@ 'form.templates.active_templates' => 'Активные шаблоны', 'form.templates.inactive_templates' => 'Неактивные шаблоны', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Номер счёта', 'form.invoice.person' => 'Работник', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 68ba10552..821c23b45 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -514,8 +514,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Číslo faktúry', 'form.invoice.person' => 'Osoba', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 0942fbbd6..bb37b8631 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -500,8 +500,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). // TODO: translate the following. // 'form.invoice.number' => 'Invoice number', // 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index a7118c7ca..e1f9a28e2 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -511,8 +511,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Forma izveštaja. Pogledajte primer na https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Broj računa', 'form.invoice.person' => 'Osoba', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 66f1b159d..cea1ddd88 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -509,8 +509,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Fakturanummer', 'form.invoice.person' => 'Person', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 7ae9c8e07..b94ba8d90 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -539,8 +539,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => 'Fatura numarası', 'form.invoice.person' => 'Kişi', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index f370b737e..0a6e4ab25 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -516,8 +516,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => '发票号码', 'form.invoice.person' => '人', // TODO: is this correct? diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index c7985b99a..2efd7bbe1 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -519,8 +519,8 @@ // 'form.templates.active_templates' => 'Active Templates', // 'form.templates.inactive_templates' => 'Inactive Templates', -// Invoice form. See example at https://timetracker.anuko.com/invoice.php -// (you can get to this form after generating a report). +// Invoice form. See example at https://timetracker.anuko.com/invoice_view.php +// (you can get to this form after generating an invoice). 'form.invoice.number' => '發票號碼', 'form.invoice.person' => '人', // TODO: is this correct? diff --git a/initialize.php b/initialize.php index 80ad77c08..33974fb78 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5578"); +define("APP_VERSION", "1.19.28.5579"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2ac0bd2cc5b5d9b512476d884540b06b6c5f374a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 23:09:50 +0000 Subject: [PATCH 2262/2515] Finished integrating good changes from pr #111. --- WEB-INF/resources/pt-br.lang.php | 157 +++++++++++++++---------------- initialize.php | 2 +- 2 files changed, 75 insertions(+), 84 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 52193b87d..f9085c538 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -465,8 +465,7 @@ // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php 'form.invoice.invoice_to_delete' => 'Fatura a ser apagada', 'form.invoice.invoice_entries' => 'Entradas de fatura', -// TODO: translate the following. -// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +'form.invoice.confirm_deleting_entries' => 'Confirme a exclusão das entradas de fatura do Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php 'form.charts.interval' => 'Intervalo', @@ -481,8 +480,12 @@ 'form.tasks.inactive_tasks' => 'Tarefas inativas', // Users form. See example at https://timetracker.anuko.com/users.php -// TODO: translate the following. +// TODO: check the translation of form.users.uncompleted_entry. Is "apontamento" a correct term for a time entry? +// The meaning of incomplete time entry in Time Tracker is that the entry only has the "start" time defined, but no finish time yet, +// and may be ongoing. For example, user started working on something and is curently in progress doing it. +// Check the Puncher plugin, which operates with such entries. // 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', +'form.users.uncompleted_entry' => 'O usuário tem um apontamento incompleto', 'form.users.role' => 'Papel', 'form.users.manager' => 'Gerente', 'form.users.comanager' => 'Coordenador', @@ -490,17 +493,15 @@ 'form.users.default_rate' => 'Honorário padrão por hora', // Editing User form. See example at https://timetracker.anuko.com/user_edit.php -// TODO: translate the following. -// 'form.user_edit.swap_roles' => 'Swap roles', +'form.user_edit.swap_roles' => 'Alternar papéis', // Roles form. See example at https://timetracker.anuko.com/roles.php -// TODO: translate the following. -// 'form.roles.active_roles' => 'Active Roles', -// 'form.roles.inactive_roles' => 'Inactive Roles', -// 'form.roles.rank' => 'Rank', -// 'form.roles.rights' => 'Rights', -// 'form.roles.assigned' => 'Assigned', -// 'form.roles.not_assigned' => 'Not assigned', +'form.roles.active_roles' => 'Papéis ativos', +'form.roles.inactive_roles' => 'Papéis inativos', +'form.roles.rank' => 'Rank', +'form.roles.rights' => 'Direitos', +'form.roles.assigned' => 'Atribuído', +'form.roles.not_assigned' => 'Não atribuído', // Clients form. See example at https://timetracker.anuko.com/clients.php 'form.clients.active_clients' => 'Clientes ativos', @@ -529,9 +530,8 @@ // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 horas', 'form.group_edit.24_hours' => '24 horas', -// TODO: translate the following. -// 'form.group_edit.display_options' => 'Display options', -// 'form.group_edit.holidays' => 'Holidays', +'form.group_edit.display_options' => 'Opções de exibição', +'form.group_edit.holidays' => 'Feriados', 'form.group_edit.tracking_mode' => 'Modo de acompanhamento', 'form.group_edit.mode_time' => 'tempo', 'form.group_edit.mode_projects' => 'projetos', @@ -540,18 +540,16 @@ 'form.group_edit.type_all' => 'todos', 'form.group_edit.type_start_finish' => 'início e fim', 'form.group_edit.type_duration' => 'duração', -// TODO: translate the following. -// 'form.group_edit.punch_mode' => 'Punch mode', -// 'form.group_edit.allow_overlap' => 'Allow overlap', -// 'form.group_edit.future_entries' => 'Future entries', -// 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.group_edit.confirm_save' => 'Confirm saving', -// 'form.group_edit.allow_ip' => 'Allow IP', -// 'form.group_edit.advanced_settings' => 'Advanced settings', +'form.group_edit.punch_mode' => 'Modo punch', +'form.group_edit.allow_overlap' => 'Permitir sobreposição', +'form.group_edit.future_entries' => 'Entradas futuros', +'form.group_edit.uncompleted_indicators' => 'Indicadores incompletos', +'form.group_edit.confirm_save' => 'Confirme o salvamento', +'form.group_edit.allow_ip' => 'Permitir IP', +'form.group_edit.advanced_settings' => 'Configurações avançadas', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php -// TODO: translate the following. -// 'form.group_delete.hint' => 'Are you sure you want to delete the entire group?', +'form.group_delete.hint' => 'Tem certeza de que deseja excluir todo o grupo?', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Para', @@ -561,74 +559,67 @@ 'form.mail.invoice_sent' => 'Fatura enviada.', // Quotas configuration form. See example at https://timetracker.anuko.com/quotas.php after enabling Monthly quotas plugin. -// TODO: translate the following. -// 'form.quota.year' => 'Year', -// 'form.quota.month' => 'Month', -// 'form.quota.workday_hours' => 'Hours in a work day', -// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', +'form.quota.year' => 'Ano', +'form.quota.month' => 'Mês', +'form.quota.workday_hours' => 'Horas em um dia útil', +'form.quota.hint' => 'Se os valores estiverem vazios, as cotas serão calculadas automaticamente com base nas horas de trabalho e feriados.', // Swap roles form. See example at https://timetracker.anuko.com/swap_roles.php. -// TODO: translate the following. -// 'form.swap.hint' => 'Demote yourself to a lower role by swapping roles with someone else. This cannot be undone.', -// 'form.swap.swap_with' => 'Swap roles with', +'form.swap.hint' => 'Rebaixe-se a papel inferior trocando funções com outra pessoa. Isto não pode ser desfeito.', +'form.swap.swap_with' => 'Trocar papéis com', // Work Units configuration form. See example at https://timetracker.anuko.com/work_units.php after enabling Work units plugin. -// TODO: translate the following. -// 'form.work_units.minutes_in_unit' => 'Minutes in unit', -// 'form.work_units.1st_unit_threshold' => '1st unit threshold', +'form.work_units.minutes_in_unit' => 'Minutos em unidade', +'form.work_units.1st_unit_threshold' => 'Limiar da 1ª unidade', // Roles and rights. These strings are used in multiple places. Grouped here to provide consistent translations. -// TODO: translate the following. -// 'role.user.label' => 'User', -// 'role.user.low_case_label' => 'user', -// 'role.user.description' => 'A regular member without management rights.', -// 'role.client.label' => 'Client', -// 'role.client.low_case_label' => 'client', -// 'role.client.description' => 'A client can view its own data.', -// 'role.supervisor.label' => 'Supervisor', -// 'role.supervisor.low_case_label' => 'supervisor', -// 'role.supervisor.description' => 'A person with a small set of management rights.', -// 'role.comanager.label' => 'Co-manager', -// 'role.comanager.low_case_label' => 'co-manager', -// 'role.comanager.description' => 'A person with a big set of management functions.', -// 'role.manager.label' => 'Manager', -// 'role.manager.low_case_label' => 'manager', -// 'role.manager.description' => 'Group manager. Can do most of things for a group.', -// 'role.top_manager.label' => 'Top manager', -// 'role.top_manager.low_case_label' => 'top manager', -// 'role.top_manager.description' => 'Top group manager. Can do everything in a tree of groups.', -// 'role.admin.label' => 'Administrator', -// 'role.admin.low_case_label' => 'administrator', -// 'role.admin.description' => 'Site adminsitrator.', +'role.user.label' => 'Usuário', +'role.user.low_case_label' => 'usuário', +'role.user.description' => 'Um membro regular sem direitos de gestão.', +'role.client.label' => 'Cliente', +'role.client.low_case_label' => 'cliente', +'role.client.description' => 'Um cliente pode visualizar seus próprios dados.', +'role.supervisor.label' => 'Supervisor', +'role.supervisor.low_case_label' => 'supervisor', +'role.supervisor.description' => 'Uma pessoa com um pequeno conjunto de direitos de gerenciamento.', +'role.comanager.label' => 'Co-gerente', +'role.comanager.low_case_label' => 'co-gerente', +'role.comanager.description' => 'Uma pessoa com um grande conjunto de funções de gerenciamento.', +'role.manager.label' => 'Gerente', +'role.manager.low_case_label' => 'gerente', +'role.manager.description' => 'Gerente de grupo. Pode fazer a maioria das coisas para um grupo.', +'role.top_manager.label' => 'Gerente geral', +'role.top_manager.low_case_label' => 'gerente geral', +'role.top_manager.description' => 'Principal gerente de grupo. Pode fazer tudo em uma árvore de grupos.', +'role.admin.label' => 'Administrador', +'role.admin.low_case_label' => 'administrador', +'role.admin.description' => 'Adminsitrador do site/sistema.', // Timesheet View form. See example at https://timetracker.anuko.com/timesheet_view.php. -// TODO: translate the following. -// 'form.timesheet_view.submit_subject' => 'Timesheet approval request', -// 'form.timesheet_view.submit_body' => "A new timesheet requires approval.

User: %s.", -// 'form.timesheet_view.approve_subject' => 'Timesheet approved', -// 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", -// 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', -// 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", +'form.timesheet_view.submit_subject' => 'Solicitação de aprovação de planilha de horas', +'form.timesheet_view.submit_body' => "Uma nova planilha de horas requer aprovação.

Usuário: %s.", +'form.timesheet_view.approve_subject' => 'Planilha de horas aprovada', +'form.timesheet_view.approve_body' => "Sua planilha de horas %s foi aprovada.

%s", +'form.timesheet_view.disapprove_subject' => 'Planilha de horas não aprovada', +'form.timesheet_view.disapprove_body' => "Sua planilha de horas %s não foi aprovada.

%s", // Display Options form. See example at https://timetracker.anuko.com/display_options.php. -// TODO: translate the following. -// 'form.display_options.note_on_separate_row' => 'Note on separate row', -// 'form.display_options.not_complete_days' => 'Not complete days', -// 'form.display_options.custom_css' => 'Custom CSS', +'form.display_options.note_on_separate_row' => 'Anotação em linha separada', +'form.display_options.not_complete_days' => 'Dias não completos', +'form.display_options.custom_css' => 'CSS customizado', // Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', +'work.error.work_not_available' => 'Item de trabalho não está disponível.', +'work.error.offer_not_available' => 'Oferta não disponível', +'work.type.one_time' => 'Uma interação', +'work.type.ongoing' => 'Em progresso', +'work.label.own_work' => 'Trabalho próprio', +'work.label.own_offers' => 'Ofertas próprias', +'work.label.offers' => 'Ofertas', +'work.button.send_message' => 'Enviar mensagem', +'work.button.make_offer' => 'Fazer oferta', +'work.button.accept' => 'Aceitar', +'work.button.decline' => 'Recusar', +'work.title.send_message' => 'Enviando mensagem', +'work.msg.message_sent' => 'Mensagem enviada.', ); diff --git a/initialize.php b/initialize.php index 33974fb78..a89b0c287 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5579"); +define("APP_VERSION", "1.19.28.5580"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 9e937b53f8265d44579fdab0de1b9074582125b0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Jun 2021 23:17:58 +0000 Subject: [PATCH 2263/2515] Improved TODO comments for pt-br translators. --- WEB-INF/resources/pt-br.lang.php | 16 ++++++++-------- initialize.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index f9085c538..38ca0dfec 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -106,9 +106,9 @@ 'button.reset_password' => 'Resetar senha', 'button.send' => 'Enviar', 'button.send_by_email' => 'Enviar por e-mail', -'button.create_group' => 'Criar equipe', // TODO: replace "team" with "group". -'button.export' => 'Exportar equipe', // TODO: replace "team" with "group". -'button.import' => 'Importar equipe', // TODO: replace "team" with "group". +'button.create_group' => 'Criar equipe', // TODO: replace "equipe" with "group". +'button.export' => 'Exportar equipe', // TODO: replace "equipe" with "group". +'button.import' => 'Importar equipe', // TODO: replace "equipe" with "group". 'button.close' => 'Fechar', 'button.start' => 'Iniciar', 'button.stop' => 'Parar', @@ -117,7 +117,7 @@ // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', -'label.group_name' => 'Nome da equipe', // TODO: replace "team" with "group". +'label.group_name' => 'Nome da equipe', // TODO: replace "equipe" with "group". 'label.address' => 'Endereço', 'label.currency' => 'Moeda', 'label.manager_name' => 'Nome do gerente', @@ -306,8 +306,8 @@ 'title.edit_timesheet' => 'Editando planilha de horas', 'title.delete_timesheet' => 'Apagando planilha de horas', 'title.monthly_quotas' => 'Cotas mensais', -'title.export' => 'Exportando dados de equipe', // TODO: replace "team" with "group". -'title.import' => 'Importando dados de equipe', // TODO: replace "team" with "group". +'title.export' => 'Exportando dados de equipe', // TODO: replace "equipe" with "group". +'title.import' => 'Importando dados de equipe', // TODO: replace "equipe" with "group". 'title.options' => 'Opções', 'title.display_options' => 'Opções de exibição', 'title.profile' => 'Perfil', @@ -512,7 +512,7 @@ 'form.client.client_entries' => 'Entradas de cliente', // Exporting Group Data form. See example at https://timetracker.anuko.com/export.php -// TODO: replace "team" with "group" in the string below. +// TODO: replace "equipe" with "group" in the string below. 'form.export.hint' => 'Você pode exportar todos os dados da equipe para um arquivo xml. Isto pode ser útil se você estiver migrando os dados para um servidor próprio.', 'form.export.compression' => 'Compressão', 'form.export.compression_none' => 'nenhuma', @@ -524,7 +524,7 @@ 'form.import.success' => 'Importação realizada com sucesso.', // Groups form. See example at https://timetracker.anuko.com/admin_groups.php (login as admin first). -// TODO: replace "team" with "group" in the string below (3 places). +// TODO: replace "equipe" with "group" in the string below (3 places). 'form.groups.hint' => 'Crie uma nova equipe fazendo uma nova conta de gerente.
Você também pode importar os dados de um arquivo xml de outro servidor Anuko Time Tracker (não havendo colisão de usuários).', // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. diff --git a/initialize.php b/initialize.php index a89b0c287..24ac12b57 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5580"); +define("APP_VERSION", "1.19.28.5581"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 387034aed0193e99e1ac6cc3e01977118064201c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Jun 2021 18:06:29 +0000 Subject: [PATCH 2264/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 12 ++++-------- initialize.php | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 10c905143..51d4e41ee 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -23,8 +23,7 @@ 'menu.group' => 'Groep', 'menu.plugins' => 'Plugins', 'menu.time' => 'Tijden', -// TODO: translate the following: -// 'menu.puncher' => 'Punch', +'menu.puncher' => 'Prikklok', 'menu.week' => 'Week', 'menu.expenses' => 'Kosten', 'menu.reports' => 'Rapporten', @@ -108,8 +107,7 @@ 'button.export' => 'Groep exporteren', 'button.import' => 'Groep importeren', 'button.close' => 'Sluiten', -// TODO: translate the following. -// 'button.start' => 'Start', +'button.start' => 'Start', 'button.stop' => 'Stop', 'button.approve' => 'Goedkeuren', 'button.disapprove' => 'Afkeuren', @@ -167,8 +165,7 @@ 'label.select_none' => 'Selecteer niets', 'label.day_view' => 'Dag overzicht', 'label.week_view' => 'Week overzicht', -// TODO: translate the following. -// 'label.puncher' => 'Puncher', +'label.puncher' => 'Prikklok', 'label.id' => 'ID', 'label.language' => 'Taal', 'label.decimal_mark' => 'Decimaal teken', @@ -257,8 +254,7 @@ 'title.edit_time_record' => 'Wijzigen tijdrecord', 'title.delete_time_record' => 'Verwijder tijdrecord', 'title.time_files' => 'Tijden bestanden', -// TODO: Translate the following: -// 'title.puncher' => 'Puncher', +'title.puncher' => 'Prikklok', 'title.expenses' => 'Kosten', 'title.edit_expense' => 'Bewerk kosten artikel', 'title.delete_expense' => 'Verwijder kosten artikel', diff --git a/initialize.php b/initialize.php index 24ac12b57..b5407ad8a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5581"); +define("APP_VERSION", "1.19.28.5582"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c446afd20b43b27d34a840010ccf114f1eeb7b53 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 24 Jun 2021 17:08:40 +0000 Subject: [PATCH 2265/2515] Cosmetic change to .gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 92e2728c3..d81178e11 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ Thumbs.db *.DS_Store *~ .idea/ +api/ From 0b57ed4799b8ab05e9add3028977fb79d7c6fb90 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Jul 2021 15:19:18 +0000 Subject: [PATCH 2266/2515] Integrating useful changes from pr#111 with yet some remaining todo. --- WEB-INF/resources/pt-br.lang.php | 95 ++++++++++++++------------------ initialize.php | 2 +- 2 files changed, 42 insertions(+), 55 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 38ca0dfec..3e2c6526f 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -62,16 +62,15 @@ 'error.user_exists' => 'Já existe usuário com este login.', 'error.object_exists' => 'Já existe um objeto com este nome.', 'error.invoice_exists' => 'Já existe fatura com este número.', -// TODO: improve translation of the word "role" in error.role_exists. função here, papel elsewhere? 'error.role_exists' => 'Já existe uma função com este rank.', 'error.no_invoiceable_items' => 'Não há items faturáveis.', 'error.no_records' => 'Não há registros.', 'error.no_login' => 'Não há usuário com este login.', 'error.no_groups' => 'Sua base de dados está vazia. Entre como admin e crie um grupo novo.', 'error.upload' => 'Erro no envio do arquivo.', -'error.range_locked' => 'Período está bloqueado.', -'error.mail_send' => 'Erro enviando o e-mail.', -// TODO: is "Use" in error.mail_send translated correctly? +'error.range_locked' => 'Período bloqueado.', +// TODO: is "Use" in error.mail_send translated correctly? Usar, or utilizar, perhaps? "Use" looks like an untranslated English word. +// The meaning of this error is that mail send feature did not work, and using MAIL_SMTP_DEBUG should help admin to troubleshoot it. 'error.mail_send' => 'Erro ao enviar e-mail. Use MAIL_SMTP_DEBUG para diagnósticos.', 'error.no_email' => 'Não há e-mail associado a este login.', 'error.uncompleted_exists' => 'Entrada incompleta existente. Feche ou remova-a.', @@ -106,9 +105,9 @@ 'button.reset_password' => 'Resetar senha', 'button.send' => 'Enviar', 'button.send_by_email' => 'Enviar por e-mail', -'button.create_group' => 'Criar equipe', // TODO: replace "equipe" with "group". -'button.export' => 'Exportar equipe', // TODO: replace "equipe" with "group". -'button.import' => 'Importar equipe', // TODO: replace "equipe" with "group". +'button.create_group' => 'Criar grupo', +'button.export' => 'Exportar grupo', +'button.import' => 'Importar grupo', 'button.close' => 'Fechar', 'button.start' => 'Iniciar', 'button.stop' => 'Parar', @@ -117,7 +116,7 @@ // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', -'label.group_name' => 'Nome da equipe', // TODO: replace "equipe" with "group". +'label.group_name' => 'Nome do grupo', 'label.address' => 'Endereço', 'label.currency' => 'Moeda', 'label.manager_name' => 'Nome do gerente', @@ -286,10 +285,9 @@ 'title.edit_user' => 'Editando usuário', 'title.delete_user' => 'Apagando usuário', 'title.roles' => 'Papéis', -// TODO: translate the following. -// 'title.add_role' => 'Adding Role', -// 'title.edit_role' => 'Editing Role', -// 'title.delete_role' => 'Deleting Role', +'title.add_role' => 'Adicionando função', +'title.edit_role' => 'Editando função', +'title.delete_role' => 'Apagando função', 'title.clients' => 'Clientes', 'title.add_client' => 'Adicionando cliente', 'title.edit_client' => 'Editando cliente', @@ -306,8 +304,8 @@ 'title.edit_timesheet' => 'Editando planilha de horas', 'title.delete_timesheet' => 'Apagando planilha de horas', 'title.monthly_quotas' => 'Cotas mensais', -'title.export' => 'Exportando dados de equipe', // TODO: replace "equipe" with "group". -'title.import' => 'Importando dados de equipe', // TODO: replace "equipe" with "group". +'title.export' => 'Exportando dados do grupo', +'title.import' => 'Importando dados do grupo', 'title.options' => 'Opções', 'title.display_options' => 'Opções de exibição', 'title.profile' => 'Perfil', @@ -362,7 +360,7 @@ 'dropdown.previous_month' => 'último mês', 'dropdown.selected_month' => 'mês', 'dropdown.current_year' => 'este ano', -'dropdown.previous_year' => 'último ano', // TODO: check if this is correct. I used último for consistency with other dropdown options. +'dropdown.previous_year' => 'último ano', 'dropdown.selected_year' => 'ano', 'dropdown.all_time' => 'todas as datas', 'dropdown.projects' => 'projetos', @@ -404,7 +402,7 @@ 'form.time.duration_format' => '(hh:mm ou 0.0h)', 'form.time.billable' => 'Faturável', 'form.time.uncompleted' => 'Incompleta', -'form.time.remaining_quota' => 'Cota restante', // TODO: check if this translation is correct. I changed it from "Cota excedente", which appears to be wrong. +'form.time.remaining_quota' => 'Cota restante', 'form.time.over_quota' => 'Acima da cota', 'form.time.remaining_balance' => 'Saldo restante', 'form.time.over_balance' => 'Saldo excedente', @@ -415,7 +413,7 @@ // Week view form. See example at https://timetracker.anuko.com/week.php. 'form.week.new_entry' => 'Nova entrada', -// Reports form. See example at https://timetracker.anuko.com/reports.php +// Reports form. See example at https://timetracker.anuko.com/reports.php. 'form.reports.save_as_favorite' => 'Guardar como favorito', 'form.reports.confirm_delete' => 'Tem certeza que deseja remover este relatório dos favoritos?', 'form.reports.include_billable' => 'faturável', @@ -428,12 +426,7 @@ 'form.reports.select_period' => 'Selecione o período de tempo', 'form.reports.set_period' => 'ou selecionar datas', 'form.reports.show_fields' => 'Exibir campos', -// TODO: Try to improve the translation of form.reports.time_fields. This is a label for a section of custom fields that -// are associated with a time record. I suggest trying custom fields plugin, creating a few "time" custom fields, and seeing how -// reports.php page looks like. For example, one may create a "Ticket #" or a "Property" custom fields to be associated with time entries, -// the form.reports.time_fields groups these fields together on reports.php. -// 'form.reports.time_fields' => 'Time fields', -// 'form.reports.time_fields' => 'Campos de apontamento', +'form.reports.time_fields' => 'Campos de tempo', 'form.reports.user_fields' => 'Campos de usuário', 'form.reports.group_by' => 'Agrupar por', 'form.reports.group_by_no' => '--- sem agrupar ---', @@ -449,11 +442,11 @@ 'form.report.assign_to_invoice' => 'Atribuir a fatura', 'form.report.assign_to_timesheet' => 'Atribuir a planilha de horas', -// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php +// Timesheets form. See example at https://timetracker.anuko.com/timesheets.php. 'form.timesheets.active_timesheets' => 'Planilhas de horas ativas', 'form.timesheets.inactive_timesheets' => 'Planilhas de horas inativas', -// Templates form. See example at https://timetracker.anuko.com/templates.php +// Templates form. See example at https://timetracker.anuko.com/templates.php. 'form.templates.active_templates' => 'Modelos ativos', 'form.templates.inactive_templates' => 'Modelos inativos', @@ -462,70 +455,63 @@ 'form.invoice.number' => 'Número da fatura', 'form.invoice.person' => 'Pessoa', -// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php +// Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php. 'form.invoice.invoice_to_delete' => 'Fatura a ser apagada', 'form.invoice.invoice_entries' => 'Entradas de fatura', 'form.invoice.confirm_deleting_entries' => 'Confirme a exclusão das entradas de fatura do Time Tracker.', -// Charts form. See example at https://timetracker.anuko.com/charts.php +// Charts form. See example at https://timetracker.anuko.com/charts.php. 'form.charts.interval' => 'Intervalo', 'form.charts.chart' => 'Gráfico', -// Projects form. See example at https://timetracker.anuko.com/projects.php +// Projects form. See example at https://timetracker.anuko.com/projects.php. 'form.projects.active_projects' => 'Projetos ativos', 'form.projects.inactive_projects' => 'Projetos inativos', -// Tasks form. See example at https://timetracker.anuko.com/tasks.php +// Tasks form. See example at https://timetracker.anuko.com/tasks.php. 'form.tasks.active_tasks' => 'Tarefas ativas', 'form.tasks.inactive_tasks' => 'Tarefas inativas', -// Users form. See example at https://timetracker.anuko.com/users.php -// TODO: check the translation of form.users.uncompleted_entry. Is "apontamento" a correct term for a time entry? -// The meaning of incomplete time entry in Time Tracker is that the entry only has the "start" time defined, but no finish time yet, -// and may be ongoing. For example, user started working on something and is curently in progress doing it. -// Check the Puncher plugin, which operates with such entries. -// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -'form.users.uncompleted_entry' => 'O usuário tem um apontamento incompleto', -'form.users.role' => 'Papel', +// Users form. See example at https://timetracker.anuko.com/users.php. +'form.users.uncompleted_entry' => 'O usuário tem uma entrada incompleta', +'form.users.role' => 'Função', 'form.users.manager' => 'Gerente', 'form.users.comanager' => 'Coordenador', 'form.users.rate' => 'Honorário', 'form.users.default_rate' => 'Honorário padrão por hora', -// Editing User form. See example at https://timetracker.anuko.com/user_edit.php -'form.user_edit.swap_roles' => 'Alternar papéis', +// Editing User form. See example at https://timetracker.anuko.com/user_edit.php. +'form.user_edit.swap_roles' => 'Alternar funções', -// Roles form. See example at https://timetracker.anuko.com/roles.php -'form.roles.active_roles' => 'Papéis ativos', -'form.roles.inactive_roles' => 'Papéis inativos', +// Roles form. See example at https://timetracker.anuko.com/roles.php. +'form.roles.active_roles' => 'Funções ativas', +'form.roles.inactive_roles' => 'Funções inativas', 'form.roles.rank' => 'Rank', 'form.roles.rights' => 'Direitos', 'form.roles.assigned' => 'Atribuído', 'form.roles.not_assigned' => 'Não atribuído', -// Clients form. See example at https://timetracker.anuko.com/clients.php +// Clients form. See example at https://timetracker.anuko.com/clients.php. 'form.clients.active_clients' => 'Clientes ativos', 'form.clients.inactive_clients' => 'Clientes inativos', -// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php +// Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php. 'form.client.client_to_delete' => 'Cliente a ser apagado', 'form.client.client_entries' => 'Entradas de cliente', -// Exporting Group Data form. See example at https://timetracker.anuko.com/export.php -// TODO: replace "equipe" with "group" in the string below. -'form.export.hint' => 'Você pode exportar todos os dados da equipe para um arquivo xml. Isto pode ser útil se você estiver migrando os dados para um servidor próprio.', +// Exporting Group Data form. See example at https://timetracker.anuko.com/export.php. +'form.export.hint' => 'Você pode exportar todos os dados do grupo para um arquivo xml. Isto pode ser útil se você estiver migrando os dados para um servidor próprio.', 'form.export.compression' => 'Compressão', 'form.export.compression_none' => 'nenhuma', 'form.export.compression_bzip' => 'bzip', // Importing Group Data form. See example at https://timetracker.anuko.com/import.php (login as admin first). -'form.import.hint' => 'Importar dados de equipe de um arquivo xml.', // TODO: replace "team" with "group". +'form.import.hint' => 'Importar dados do grupo de um arquivo xml.', 'form.import.file' => 'Selecionar arquivo', 'form.import.success' => 'Importação realizada com sucesso.', // Groups form. See example at https://timetracker.anuko.com/admin_groups.php (login as admin first). -// TODO: replace "equipe" with "group" in the string below (3 places). -'form.groups.hint' => 'Crie uma nova equipe fazendo uma nova conta de gerente.
Você também pode importar os dados de um arquivo xml de outro servidor Anuko Time Tracker (não havendo colisão de usuários).', +'form.groups.hint' => 'Crie um novo grupo fazendo uma nova conta de gerente.
Você também pode importar os dados de um arquivo xml de outro servidor Anuko Time Tracker (não havendo colisão de usuários).', // Group Settings form. See example at https://timetracker.anuko.com/group_edit.php. 'form.group_edit.12_hours' => '12 horas', @@ -548,7 +534,7 @@ 'form.group_edit.allow_ip' => 'Permitir IP', 'form.group_edit.advanced_settings' => 'Configurações avançadas', -// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php +// Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php. 'form.group_delete.hint' => 'Tem certeza de que deseja excluir todo o grupo?', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. @@ -565,8 +551,8 @@ 'form.quota.hint' => 'Se os valores estiverem vazios, as cotas serão calculadas automaticamente com base nas horas de trabalho e feriados.', // Swap roles form. See example at https://timetracker.anuko.com/swap_roles.php. -'form.swap.hint' => 'Rebaixe-se a papel inferior trocando funções com outra pessoa. Isto não pode ser desfeito.', -'form.swap.swap_with' => 'Trocar papéis com', +'form.swap.hint' => 'Rebaixe-se a função inferior trocando funções com outra pessoa. Isto não pode ser desfeito.', +'form.swap.swap_with' => 'Trocar papéis com', // TODO: replace papéis with funções? // Work Units configuration form. See example at https://timetracker.anuko.com/work_units.php after enabling Work units plugin. 'form.work_units.minutes_in_unit' => 'Minutos em unidade', @@ -608,7 +594,7 @@ 'form.display_options.not_complete_days' => 'Dias não completos', 'form.display_options.custom_css' => 'CSS customizado', -// Work plugin strings. See example at https://timetracker.anuko.com/work.php +// Work plugin strings. See example at https://timetracker.anuko.com/work.php. 'work.error.work_not_available' => 'Item de trabalho não está disponível.', 'work.error.offer_not_available' => 'Oferta não disponível', 'work.type.one_time' => 'Uma interação', @@ -623,3 +609,4 @@ 'work.title.send_message' => 'Enviando mensagem', 'work.msg.message_sent' => 'Mensagem enviada.', ); + diff --git a/initialize.php b/initialize.php index b5407ad8a..f0b52b40b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5582"); +define("APP_VERSION", "1.19.28.5583"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 227ab161cfe26f605406ef31959449aa0ada0f27 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Jul 2021 13:28:54 +0000 Subject: [PATCH 2267/2515] Minor improvement in pt-br file as per pr #111. --- WEB-INF/resources/pt-br.lang.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3e2c6526f..bef8e5f40 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -552,7 +552,7 @@ // Swap roles form. See example at https://timetracker.anuko.com/swap_roles.php. 'form.swap.hint' => 'Rebaixe-se a função inferior trocando funções com outra pessoa. Isto não pode ser desfeito.', -'form.swap.swap_with' => 'Trocar papéis com', // TODO: replace papéis with funções? +'form.swap.swap_with' => 'Trocar função com', // Work Units configuration form. See example at https://timetracker.anuko.com/work_units.php after enabling Work units plugin. 'form.work_units.minutes_in_unit' => 'Minutos em unidade', diff --git a/initialize.php b/initialize.php index f0b52b40b..dc53874d9 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5583"); +define("APP_VERSION", "1.19.28.5584"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From f22d240ca21743681e52edecfa050450cd596213 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 7 Jul 2021 13:35:58 +0000 Subject: [PATCH 2268/2515] Added a comment in pt-br file. --- WEB-INF/resources/pt-br.lang.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index bef8e5f40..128f57f49 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -137,7 +137,7 @@ 'label.users' => 'Usuários', 'label.group' => 'Grupo', 'label.subgroups' => 'Subgrupos', -'label.roles' => 'Papéis', +'label.roles' => 'Papéis', // TODO: for consistency, use funçãos, perhaps? 'label.client' => 'Cliente', 'label.clients' => 'Clientes', 'label.option' => 'Opção', diff --git a/initialize.php b/initialize.php index dc53874d9..c282d3f35 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5584"); +define("APP_VERSION", "1.19.28.5585"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 7e78a97138a71ff4b8070d3ec354475ddf0b8e29 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Jul 2021 13:37:19 +0000 Subject: [PATCH 2269/2515] Finished integrating changes from pr #111. --- WEB-INF/resources/pt-br.lang.php | 12 +++++------- initialize.php | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 128f57f49..5d3e2b6ed 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -69,9 +69,7 @@ 'error.no_groups' => 'Sua base de dados está vazia. Entre como admin e crie um grupo novo.', 'error.upload' => 'Erro no envio do arquivo.', 'error.range_locked' => 'Período bloqueado.', -// TODO: is "Use" in error.mail_send translated correctly? Usar, or utilizar, perhaps? "Use" looks like an untranslated English word. -// The meaning of this error is that mail send feature did not work, and using MAIL_SMTP_DEBUG should help admin to troubleshoot it. -'error.mail_send' => 'Erro ao enviar e-mail. Use MAIL_SMTP_DEBUG para diagnósticos.', +'error.mail_send' => 'Erro ao enviar e-mail. Use MAIL_SMTP_DEBUG para diagnósticos.', // "Use" means the same in pt-br as in en. 'error.no_email' => 'Não há e-mail associado a este login.', 'error.uncompleted_exists' => 'Entrada incompleta existente. Feche ou remova-a.', 'error.goto_uncompleted' => 'Ir até a entrada incompleta.', @@ -137,7 +135,7 @@ 'label.users' => 'Usuários', 'label.group' => 'Grupo', 'label.subgroups' => 'Subgrupos', -'label.roles' => 'Papéis', // TODO: for consistency, use funçãos, perhaps? +'label.roles' => 'Funções', 'label.client' => 'Cliente', 'label.clients' => 'Clientes', 'label.option' => 'Opção', @@ -284,7 +282,7 @@ 'title.add_user' => 'Adicionando usuário', 'title.edit_user' => 'Editando usuário', 'title.delete_user' => 'Apagando usuário', -'title.roles' => 'Papéis', +'title.roles' => 'Funções', 'title.add_role' => 'Adicionando função', 'title.edit_role' => 'Editando função', 'title.delete_role' => 'Apagando função', @@ -320,7 +318,7 @@ 'title.cf_delete_dropdown_option' => 'Apagando opção', 'title.locking' => 'Bloquear', 'title.week_view' => 'Visão semanal', -'title.swap_roles' => 'Alteração de papéis', +'title.swap_roles' => 'Alteração de funções', 'title.work_units' => 'Unidades de trabalho', 'title.templates' => 'Modelos', 'title.add_template' => 'Adicionando modelo', @@ -408,7 +406,7 @@ 'form.time.over_balance' => 'Saldo excedente', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -'form.time_edit.uncompleted' => 'Eesta entrada foi salva somente com hora de início. Não é um erro.', +'form.time_edit.uncompleted' => 'Esta entrada foi salva somente com hora de início. Não é um erro.', // Week view form. See example at https://timetracker.anuko.com/week.php. 'form.week.new_entry' => 'Nova entrada', diff --git a/initialize.php b/initialize.php index c282d3f35..76b5058ef 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5585"); +define("APP_VERSION", "1.19.28.5586"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bd5871c86bd95adff6d429c3481f03ec9a244414 Mon Sep 17 00:00:00 2001 From: Thiago Alves Cavalcante Date: Thu, 8 Jul 2021 10:45:13 -0300 Subject: [PATCH 2270/2515] Add conditional if ldap is enabled on passwords (#112) Adds same conditional on verifications of passwords in case of ldap (external password) is enabled. Else is not possible create groups due to erros on this verification with ldap configured. --- admin_group_add.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/admin_group_add.php b/admin_group_add.php index 52850b608..9aeff1831 100644 --- a/admin_group_add.php +++ b/admin_group_add.php @@ -69,12 +69,14 @@ $err->add($i18n->get('error.field'), $i18n->get('label.manager_login')); if (ttUserHelper::getUserByLogin($cl_manager_login)) $err->add($i18n->get('error.user_exists')); - if (!ttValidString($cl_password1)) - $err->add($i18n->get('error.field'), $i18n->get('label.password')); - if (!ttValidString($cl_password2)) - $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + if (!$auth->isPasswordExternal()) { + if (!ttValidString($cl_password1)) + $err->add($i18n->get('error.field'), $i18n->get('label.password')); + if (!ttValidString($cl_password2)) + $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); + if ($cl_password1 !== $cl_password2) + $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); + } if (!ttValidEmail($cl_manager_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); if (!ttUserHelper::canAdd()) From 0a94b8f7afe1ee14b69b15789fd751d928255dd4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Jul 2021 15:23:21 +0000 Subject: [PATCH 2271/2515] Fixed ttUser::getUserDetails() function to allow supervisors work on behalf of users. --- WEB-INF/lib/ttUser.class.php | 7 ++----- initialize.php | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index cf1065f06..2086a3740 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -587,11 +587,8 @@ function getSubgroups($group_id = null) { return $groups; } - // getUserDetails function is used to manage users in group and returns user details. - // At the moment, the function is used for user edits and deletes. - function getUserDetails($user_id) { - if (!$this->can('manage_users')) return false; - + // getUserDetails function returns user details. + function getUserDetails($user_id) { $mdb2 = getConnection(); $group_id = $this->getGroup(); $org_id = $this->org_id; diff --git a/initialize.php b/initialize.php index 76b5058ef..6b968992a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5586"); +define("APP_VERSION", "1.19.28.5587"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 36d735b4748bc786196f4b8c5f9ce72867aa1fe2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Jul 2021 15:06:30 +0000 Subject: [PATCH 2272/2515] Work started on inactive projects display option for reports. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + initialize.php | 2 +- 31 files changed, 33 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 205600d04..5f37900bd 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -682,6 +682,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 7a685029b..0ff169553 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -695,6 +695,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 3cb53a5a3..142655586 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -659,6 +659,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index c0d69b6d6..86834287a 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -636,6 +636,7 @@ 'form.display_options.note_on_separate_row' => 'Beschreibung in separater Zeile', // TODO: translate the following. // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1acc79084..93d77217e 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -614,6 +614,7 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Note on separate row', 'form.display_options.not_complete_days' => 'Not complete days', +'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index ebe095e96..1fb69298e 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -697,6 +697,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 961b8e2b5..28693401c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -667,6 +667,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 798406ccf..7d453ef33 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -683,6 +683,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 813b442fe..f45dec85a 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -667,6 +667,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index e2642ad27..168b01a5b 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -655,6 +655,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 5a6a8df81..3b1ca3883 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -647,6 +647,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 958a556e6..2ed161e3e 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -688,6 +688,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 22b28039e..78971e4f5 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -686,6 +686,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index ab3852bf5..d1c172a5d 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -661,6 +661,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 85192f026..2e1b012d3 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -690,6 +690,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 202578fcc..a5960229d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -688,6 +688,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 51d4e41ee..c261b7491 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -593,6 +593,8 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', // Translator (Henk) comment: "kolom is the right word in Dutch." 'form.display_options.not_complete_days' => 'Niet complete dagen', +// TODO: translate the following. +// 'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.custom_css' => 'Aangepaste CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b3cf78863..6a6161f5d 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -689,6 +689,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index b0602334f..376f324b7 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -668,6 +668,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 5d3e2b6ed..db8503038 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -590,6 +590,8 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Anotação em linha separada', 'form.display_options.not_complete_days' => 'Dias não completos', +// TODO: translate the following. +// 'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.custom_css' => 'CSS customizado', // Work plugin strings. See example at https://timetracker.anuko.com/work.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 9a26f283e..4617faf4c 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -669,6 +669,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 95e27a122..d325468ce 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -690,6 +690,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index cb4abe577..5fbca6032 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -594,6 +594,7 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Комментарий в отдельном ряду', 'form.display_options.not_complete_days' => 'Незавершенные дни', +'form.display_options.inactive_projects' => 'Неактивные проекты', 'form.display_options.custom_css' => 'Пользовательская CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 821c23b45..d8add50c8 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -672,6 +672,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index bb37b8631..ac49e7d81 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -663,6 +663,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index e1f9a28e2..6fcae026c 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -670,6 +670,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index cea1ddd88..49df06651 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -667,6 +667,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index b94ba8d90..08eec0619 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -703,6 +703,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 0a6e4ab25..4ec6da135 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -677,6 +677,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2efd7bbe1..970d79263 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -680,6 +680,7 @@ // TODO: translate the following. // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/initialize.php b/initialize.php index 6b968992a..60598cb3c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5587"); +define("APP_VERSION", "1.19.28.5588"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ae7dfacad852cccff08c0a1f6fdcc8c7e7f50cf1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Jul 2021 16:42:27 +0000 Subject: [PATCH 2273/2515] Implemented report inactive projects display option. --- WEB-INF/lib/ttProjectHelper.class.php | 12 +++++++++--- WEB-INF/templates/display_options.tpl | 8 ++++++++ display_options.php | 4 ++++ initialize.php | 2 +- reports.php | 4 +++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index d456c3110..ebbd055fb 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -77,17 +77,23 @@ static function getRates($user_id) { return $result; } - // getProjects - returns an array of active and inactive projects in group. - static function getProjects() { + // getProjects - returns an array of projects for group. + static function getProjects($includeInactiveProjects = true) { global $user; $mdb2 = getConnection(); $group_id = $user->getGroup(); $org_id = $user->org_id; + // Construct status part. + $statusPart = 'status = 1'; + if ($includeInactiveProjects) { + $statusPart = '(status = 0 or '.$statusPart.')'; + } + $result = array(); $sql = "select id, name, tasks from tt_projects". - " where group_id = $group_id and org_id = $org_id and (status = 0 or status = 1) order by upper(name)"; + " where group_id = $group_id and org_id = $org_id and $statusPart order by upper(name)"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index 8c9db8ea7..6486c0b25 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -41,6 +41,14 @@ License: See license.txt *} {$i18n.label.what_is_it}

+ + + + + diff --git a/display_options.php b/display_options.php index 21b488c64..6e0ccc548 100644 --- a/display_options.php +++ b/display_options.php @@ -20,12 +20,14 @@ $cl_time_not_complete_days = (bool)$request->getParameter('time_not_complete_days'); $cl_record_custom_fields = (bool)$request->getParameter('record_custom_fields'); $cl_report_note_on_separate_row = (bool)$request->getParameter('report_note_on_separate_row'); + $cl_report_inactive_projects = (bool)($request->getParameter('report_inactive_projects')); $cl_custom_css = trim($request->getParameter('custom_css')); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); $cl_time_not_complete_days = $config->getDefinedValue('time_not_complete_days'); $cl_record_custom_fields = $config->getDefinedValue('record_custom_fields'); $cl_report_note_on_separate_row = $config->getDefinedValue('report_note_on_separate_row'); + $cl_report_inactive_projects = $config->getDefinedValue('report_inactive_projects'); $cl_custom_css = $user->getCustomCss(); } @@ -46,6 +48,7 @@ // Reports. $form->addInput(array('type'=>'checkbox','name'=>'report_note_on_separate_row','value'=>$cl_report_note_on_separate_row)); +$form->addInput(array('type'=>'checkbox','name'=>'report_inactive_projects','value'=>$cl_report_inactive_projects)); // TODO: add PDF break controller here. $form->addInput(array('type'=>'textarea','name'=>'custom_css','value'=>$cl_custom_css)); @@ -62,6 +65,7 @@ $config->setDefinedValue('time_not_complete_days', $cl_time_not_complete_days); $config->setDefinedValue('record_custom_fields', $cl_record_custom_fields); $config->setDefinedValue('report_note_on_separate_row', $cl_report_note_on_separate_row); + $config->setDefinedValue('report_inactive_projects', $cl_report_inactive_projects); if ($user->updateGroup(array( 'config' => $config->getConfig(), 'custom_css' => $cl_custom_css))) { diff --git a/initialize.php b/initialize.php index 60598cb3c..f8f514ee0 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5588"); +define("APP_VERSION", "1.19.28.5589"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index b71706220..c1df04387 100644 --- a/reports.php +++ b/reports.php @@ -73,7 +73,9 @@ $project_list = array(); if ($showProject) { if ($user->can('view_reports') || $user->can('view_all_reports')) { - $project_list = ttProjectHelper::getProjects(); // All active and inactive projects. + $config = new ttConfigHelper($user->getConfig()); + $includeInactiveProjects = $config->getDefinedValue('report_inactive_projects'); + $project_list = ttProjectHelper::getProjects($includeInactiveProjects); } elseif ($user->isClient()) { $project_list = ttProjectHelper::getProjectsForClient(); } else { From fb9f7b179726343b7c59aadf11c9ef1fa0b0762d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 6 Aug 2021 18:21:40 +0000 Subject: [PATCH 2274/2515] Added a resource string. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + initialize.php | 2 +- 31 files changed, 32 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 5f37900bd..f9d9952db 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -131,6 +131,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 0ff169553..453a51000 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -133,6 +133,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 142655586..a33224168 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -128,6 +128,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 86834287a..47eb84a16 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -125,6 +125,7 @@ // The problem is they do not appear precise, deviate from the meaning of approval / disaproval of report items.) // 'button.approve' => 'Approve', (suggested 'Freigeben / Genehmigen' does not appear precise) // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 93d77217e..c1c00af9d 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -120,6 +120,7 @@ 'button.stop' => 'Stop', 'button.approve' => 'Approve', 'button.disapprove' => 'Disapprove', +'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 1fb69298e..8a8902f7d 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -130,6 +130,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 28693401c..3299e8ada 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -139,6 +139,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 7d453ef33..019c4ca31 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -136,6 +136,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index f45dec85a..0940dc597 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -130,6 +130,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 168b01a5b..88a96690e 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -128,6 +128,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 3b1ca3883..489185a8c 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -123,6 +123,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 2ed161e3e..918b5f7dc 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -144,6 +144,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 78971e4f5..407c22cd4 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -133,6 +133,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index d1c172a5d..165afe880 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -127,6 +127,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 2e1b012d3..dbac8f190 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -137,6 +137,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a5960229d..896f1939f 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -136,6 +136,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index c261b7491..921d50af8 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -111,6 +111,7 @@ 'button.stop' => 'Stop', 'button.approve' => 'Goedkeuren', 'button.disapprove' => 'Afkeuren', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 6a6161f5d..5cb39137d 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -136,6 +136,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 376f324b7..d77f11c3d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -132,6 +132,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index db8503038..15e3ef91f 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -111,6 +111,8 @@ 'button.stop' => 'Parar', 'button.approve' => 'Aprovar', 'button.disapprove' => 'Desaprovar', +// TODO: translate the following. +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 4617faf4c..6a1598cc7 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -129,6 +129,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index d325468ce..f93f12085 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -136,6 +136,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 5fbca6032..71bc709bf 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -111,6 +111,7 @@ 'button.stop' => 'Завершить', 'button.approve' => 'Одобрить', 'button.disapprove' => 'Не одобрить', +'button.sync' => 'Синхронизовать', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Меню', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d8add50c8..da24d8caf 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -133,6 +133,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index ac49e7d81..40abaabea 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -126,6 +126,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 6fcae026c..8e9fe4e8f 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -129,6 +129,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 49df06651..bd025f84b 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -127,6 +127,7 @@ // TODO: translate the following. // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 08eec0619..5ac60a72d 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -140,6 +140,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 4ec6da135..6c6451214 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -129,6 +129,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 970d79263..d16bf4cb7 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -133,6 +133,7 @@ // 'button.stop' => 'Stop', // 'button.approve' => 'Approve', // 'button.disapprove' => 'Disapprove', +// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. // Labels for controls on forms. Labels in this section are used on multiple forms. // TODO: translate the following. diff --git a/initialize.php b/initialize.php index f8f514ee0..d36445879 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5589"); +define("APP_VERSION", "1.19.28.5590"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d1a34ad77b7f38f8831fa303a215c242aaab492b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 13 Aug 2021 13:26:18 +0000 Subject: [PATCH 2275/2515] Introduced entities_modified field in tt_groups table for future API support. --- dbinstall.php | 10 ++++++---- initialize.php | 2 +- mysql.sql | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index 322b05663..2dfe30d66 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1137,7 +1137,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to11923"]) { + if ($_POST["convert11900to11929"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1170,6 +1170,8 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.22', modified = now() where param_name = 'version_db' and param_value = '1.19.19'"); ttExecute("ALTER TABLE `tt_groups` drop `task_required`"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.23', modified = now() where param_name = 'version_db' and param_value = '1.19.22'"); + ttExecute("ALTER TABLE `tt_groups` ADD `entities_modified` datetime default NULL AFTER `modified_by`"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.29', modified = now() where param_name = 'version_db' and param_value = '1.19.23'"); } if ($_POST["cleanup"]) { @@ -1220,7 +1222,7 @@ function ttGenerateKeys() {

DB Install

 Anuko Time Tracker 1.17.12.3970 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3971 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 48da6c320f5b4ff9fcfe0832e87b5ed48cdb1e60 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 18:36:55 +0000 Subject: [PATCH 0512/2515] Finished refactoring Turkish translation. --- WEB-INF/resources/hu.lang.php | 20 +++++------------ WEB-INF/resources/no.lang.php | 30 +++++++------------------ WEB-INF/resources/ro.lang.php | 18 +++++---------- WEB-INF/resources/tr.lang.php | 42 +++++++++++------------------------ WEB-INF/templates/footer.tpl | 2 +- 5 files changed, 33 insertions(+), 79 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 2860399d1..2235d6182 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -200,7 +200,8 @@ 'label.select_none' => 'Senkit nem jelöl ki', // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'Azonosító', +// TODO: translate the following. // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', // 'label.date_format' => 'Date format', @@ -254,7 +255,8 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Csoport törlése', +// TODO: translate the following. // 'title.reset_password' => 'Resetting Password', // 'title.change_password' => 'Changing Password', // 'title.time' => 'Time', @@ -347,7 +349,8 @@ // TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', +'dropdown.status_active' => 'aktív', +// TODO: translate the following. // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', @@ -512,19 +515,8 @@ // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.profile.title" => 'csoportok', -"form.admin.profile.noprofiles" => 'az adatbázis üres. lépj be adminisztrátorként és hozz létre egyet.', -"form.admin.profile.comment" => 'csoport törlése', -"form.admin.profile.th.id" => 'azonosító', -"form.admin.profile.th.active" => 'aktív', - -// my time form attributes -"form.mytime.title" => 'munkaidőm', "form.mytime.edit_title" => 'szerkesztés', "form.mytime.del_str" => 'törlés', "form.mytime.time_form" => ' (óó:pp)', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index bd42ca20e..07f8c18b3 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -98,8 +98,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', 'error.no_login' => 'Det er ingen bruker med dette brukernavnet.', -// TODO: translate the following. -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'Databasen din er tom. Logg inn som admin og opprett et nytt team.', 'error.upload' => 'Feil med lasting av fil.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -198,7 +197,7 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID', 'label.language' => 'Språk', // TODO: translate the following. // 'label.decimal_mark' => 'Decimal mark', @@ -253,10 +252,11 @@ // 'title.teams' => 'Teams', // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Slett team', +// TODO: translate the following. // 'title.reset_password' => 'Resetting Password', // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', +'title.time' => 'Tid', // 'title.edit_time_record' => 'Editing Time Record', // 'title.delete_time_record' => 'Deleting Time Record', // 'title.expenses' => 'Expenses', @@ -343,8 +343,9 @@ // TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', -// 'dropdown.status_inactive' => 'inactive', +'dropdown.status_active' => 'aktiv', +'dropdown.status_inactive' => 'inaktiv', +// TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', // 'dropdown.paid' => 'paid', @@ -504,25 +505,10 @@ // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - // TODO: refactoring ongoing down from here. - -// "form.admin.profile.title" => 'team', -// "form.admin.profile.noprofiles" => 'databasen din er tom. logg inn som admin og opprett et nytt team.', -// "form.admin.profile.comment" => 'slett team', -// "form.admin.profile.th.id" => 'id', -// "form.admin.profile.th.active" => 'aktiv', - -// my time form attributes -// Note to translators: the 2 strings below must be translated -// "form.mytime.title" => 'min tid', // "form.mytime.edit_title" => 'endre tidsoppføringen', "form.mytime.del_str" => 'slett tids oppføringen', "form.mytime.time_form" => ' (tt:mm)', // Note to translators: the strings below must be translated // "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', - -// people form attributes -"form.people.rate" => 'timesats', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 95a61fefb..0378d894b 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -104,7 +104,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', // 'error.no_login' => 'No user with this login.', -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'Baza de date este goala. Intra ca admin si adauga o noua echipa.', 'error.upload' => 'Eroare la upload-ul fisierului.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -201,7 +201,8 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID', +// TODO: translate the following. // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', // 'label.date_format' => 'Date format', @@ -258,11 +259,11 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Șterge echipa', 'title.reset_password' => 'Reseteaza parola', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', +'title.time' => 'Timpul', // 'title.edit_time_record' => 'Editing Time Record', // 'title.delete_time_record' => 'Deleting Time Record', // 'title.expenses' => 'Expenses', @@ -518,15 +519,6 @@ // TODO: refactoring ongoing down from here. -// administrator form -"form.admin.profile.title" => 'echipe', -"form.admin.profile.noprofiles" => 'baza de date este goala. intra ca admin si adauga o noua echipa.', -"form.admin.profile.comment" => 'sterge echipa', -"form.admin.profile.th.id" => 'id', -"form.admin.profile.th.active" => 'activ', - -// my time form attributes -"form.mytime.title" => 'timpul meu', "form.mytime.edit_title" => 'editarea inregistrarii timpului', "form.mytime.del_str" => 'stergerea inregistrarii timpului', "form.mytime.time_form" => ' (hh:mm)', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 95899eddb..f51d3fde0 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -50,8 +50,8 @@ // TODO: translate the following. // 'menu.create_team' => 'Create Team', 'menu.profile' => 'Profili', +'menu.time' => 'Zaman', // TODO: translate the following. -// 'menu.time' => 'Time', // 'menu.expenses' => 'Expenses', 'menu.reports' => 'Raporlar', // TODO: translate the following. @@ -106,7 +106,7 @@ // 'error.invoice_exists' => 'Invoice with this number already exists.', // 'error.no_invoiceable_items' => 'There are no invoiceable items.', // 'error.no_login' => 'No user with this login.', -// 'error.no_teams' => 'Your database is empty. Login as admin and create a new team.', +'error.no_teams' => 'Veritabanınız boş. Yeni bir ekip yaratmak için yönetici olarak giriş yapın.', 'error.upload' => 'Dosya yükleme hatası.', // TODO: translate the following. // 'error.range_locked' => 'Date range is locked.', @@ -207,7 +207,8 @@ // TODO: translate the following. // 'label.day_view' => 'Day view', // 'label.week_view' => 'Week view', -// 'label.id' => 'ID', +'label.id' => 'ID', +// TODO: translate the following. // 'label.language' => 'Language', // 'label.decimal_mark' => 'Decimal mark', // 'label.date_format' => 'Date format', @@ -266,13 +267,14 @@ // TODO: translate the following. // 'title.create_team' => 'Creating Team', // 'title.edit_team' => 'Editing Team', -// 'title.delete_team' => 'Deleting Team', +'title.delete_team' => 'Ekibi sil', 'title.reset_password' => 'Parolayı sıfırla', // TODO: translate the following. // 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.time' => 'Zaman', +'title.edit_time_record' => 'Zaman kaydını düzenliyor', +'title.delete_time_record' => 'Zaman kaydını siliyor', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -358,7 +360,8 @@ // TODO: translate the following. // 'dropdown.select' => '--- select ---', // 'dropdown.select_invoice' => '--- select invoice ---', -// 'dropdown.status_active' => 'active', +'dropdown.status_active' => 'aktif', +// TODO: translate the following. // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', @@ -382,7 +385,7 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(ss:dd ya da 0.0h)', 'form.time.billable' => 'Faturalandırılabilir', // TODO: translate the following. // 'form.time.uncompleted' => 'Uncompleted', @@ -390,8 +393,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Bu kayıt sadece başlangıç zamanıyla silindi. Bu hata değildir.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -522,22 +524,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -// administrator form -"form.admin.profile.title" => 'ekipler', -"form.admin.profile.noprofiles" => 'veritabanınız boş. yeni bir ekip yaratmak için yönetici olarak giriş yapın.', -"form.admin.profile.comment" => 'ekibi sil', -"form.admin.profile.th.id" => 'id', -"form.admin.profile.th.active" => 'aktif', - -// my time form attributes -"form.mytime.title" => 'zamanım', -"form.mytime.edit_title" => 'zaman kaydını düzenliyor', -"form.mytime.del_str" => 'zaman kaydını siliyor', -"form.mytime.time_form" => ' (ss:dd)', -"form.mytime.no_finished_rec" => 'bu kayıt sadece başlangıç zamanıyla silindi. bu hata değildir. gerekirse çıkış yapın.', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5426c0913..db8221e55 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - + {if $show_files} {/if} @@ -68,8 +68,8 @@ License: See license.txt *} {if $show_client} {/if} - + {if $show_files} {/if} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 42fa0b34e..41568f601 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -195,4 +195,5 @@ function fillDropdowns() { {/if}
 Anuko Time Tracker 1.17.12.3971 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3972 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 62e316ec456ef2a98acee48dad2f305e7fb0c4b0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 10 Feb 2018 19:09:40 +0000 Subject: [PATCH 0513/2515] It's hard to believe but refactoring of translation files is done. --- WEB-INF/resources/hu.lang.php | 14 ++++---------- WEB-INF/resources/no.lang.php | 20 ++++++-------------- WEB-INF/resources/ro.lang.php | 22 ++++++---------------- WEB-INF/templates/footer.tpl | 2 +- 4 files changed, 17 insertions(+), 41 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 2235d6182..217bbcc6e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -374,7 +374,8 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(óó:pp vagy 0.0h)', +// TODO: translate the following. // 'form.time.billable' => 'Billable', // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', @@ -402,10 +403,10 @@ // 'form.reports.show_fields' => 'Show fields', 'form.reports.group_by' => 'Csoportosítva', 'form.reports.group_by_no' => '--- csoportosítás nélkül ---', +'form.reports.group_by_date' => 'dátum', // TODO: translate the following. -// 'form.reports.group_by_date' => 'date', // 'form.reports.group_by_user' => 'user', -// 'form.reports.group_by_client' => 'client', +'form.reports.group_by_client' => 'ügyfél', 'form.reports.group_by_project' => 'projekt', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', @@ -514,11 +515,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - -// TODO: refactoring ongoing down from here. - -"form.mytime.edit_title" => 'szerkesztés', -"form.mytime.del_str" => 'törlés', -"form.mytime.time_form" => ' (óó:pp)', -"form.mytime.no_finished_rec" => 'csak az munka kezdete lett megjelölve, ha később visszalépsz a rendszerbe beállíthatod a vég-időpontot...', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 07f8c18b3..533e3285d 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -257,8 +257,9 @@ // 'title.reset_password' => 'Resetting Password', // 'title.change_password' => 'Changing Password', 'title.time' => 'Tid', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.edit_time_record' => 'Endre tids oppføringen', +'title.delete_time_record' => 'Slett tids oppføringen', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -367,7 +368,7 @@ // Time form. See example at https://timetracker.anuko.com/time.php. // TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(tt:mm eller 0.0h)', 'form.time.billable' => 'Fakturerbar', 'form.time.uncompleted' => 'Uferdig', // TODO: translate the following. @@ -375,8 +376,7 @@ // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -397,8 +397,7 @@ // 'form.reports.group_by_no' => '--- no grouping ---', 'form.reports.group_by_date' => 'dato', 'form.reports.group_by_user' => 'bruker', -// TODO: translate the following. -// 'form.reports.group_by_client' => 'client', +'form.reports.group_by_client' => 'klient', 'form.reports.group_by_project' => 'prosjekt', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', @@ -504,11 +503,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - -// TODO: refactoring ongoing down from here. -// "form.mytime.edit_title" => 'endre tidsoppføringen', -"form.mytime.del_str" => 'slett tids oppføringen', -"form.mytime.time_form" => ' (tt:mm)', -// Note to translators: the strings below must be translated -// "form.mytime.no_finished_rec" => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil. Logg ut om nødvendig.', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0378d894b..6052a337d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -264,8 +264,9 @@ // TODO: translate the following. // 'title.change_password' => 'Changing Password', 'title.time' => 'Timpul', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.edit_time_record' => 'Editarea inregistrarii timpului', +'title.delete_time_record' => 'Ștergerea inregistrarii timpului', +// TODO: translate the following. // 'title.expenses' => 'Expenses', // 'title.edit_expense' => 'Editing Expense Item', // 'title.delete_expense' => 'Deleting Expense Item', @@ -376,16 +377,15 @@ // 'form.change_password.tip' => 'Type new password and click on Save.', // Time form. See example at https://timetracker.anuko.com/time.php. +'form.time.duration_format' => '(hh:mm sau 0.0h)', // TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', // 'form.time.billable' => 'Billable', // 'form.time.uncompleted' => 'Uncompleted', // 'form.time.remaining_quota' => 'Remaining quota', // 'form.time.over_quota' => 'Over quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). -// TODO: translate the following. -// 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.', +'form.time_edit.uncompleted' => 'Aceasta inregistrare a fost salvata numei cu timpul de inceput. Nu este o eroare.', // Week view form. See example at https://timetracker.anuko.com/week.php. // TODO: translate the following. @@ -406,8 +406,7 @@ 'form.reports.group_by_no' => '--- fara grupare ---', 'form.reports.group_by_date' => 'data', 'form.reports.group_by_user' => 'utilizator', -// TODO: translate the following. -// 'form.reports.group_by_client' => 'client', +'form.reports.group_by_client' => 'client', 'form.reports.group_by_project' => 'proiect', // TODO: translate the following. // 'form.reports.group_by_task' => 'task', @@ -514,13 +513,4 @@ // 'form.quota.quota' => 'Quota', // 'form.quota.workday_hours' => 'Hours in work day', // 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', - - - -// TODO: refactoring ongoing down from here. - -"form.mytime.edit_title" => 'editarea inregistrarii timpului', -"form.mytime.del_str" => 'stergerea inregistrarii timpului', -"form.mytime.time_form" => ' (hh:mm)', -"form.mytime.no_finished_rec" => 'aceasta inregistrare a fost salvata numei cu timpul de inceput. nu este o eroare. poti parasi aplicatia daca este nevoie.', ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index db8221e55..347a24498 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.12.3972 | Copyright © Anuko | +  Anuko Time Tracker 1.17.13.3973 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 8f7f616dc5fafe49038c6eaff25f6fe6f55ca635 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 00:01:43 +0000 Subject: [PATCH 0514/2515] Made show_holidays configurable as per issue #53. --- WEB-INF/lib/I18n.class.php | 8 ++++---- WEB-INF/lib/form/Calendar.class.php | 4 +++- WEB-INF/lib/ttTeamHelper.class.php | 4 +++- WEB-INF/lib/ttTimeHelper.class.php | 4 ++++ WEB-INF/lib/ttUser.class.php | 8 +++++++- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 4 ++++ dbinstall.php | 11 +++++++---- mysql.sql | 3 +++ profile_edit.php | 13 ++++++++++++- 39 files changed, 89 insertions(+), 13 deletions(-) diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index fd158f58c..7155edb0c 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -70,9 +70,9 @@ function load($localName) { $this->weekdayNames = $i18n_weekdays; $this->weekdayShortNames = $i18n_weekdays_short; - if (defined('SHOW_HOLIDAYS') && isTrue(SHOW_HOLIDAYS)) { +// if (defined('SHOW_HOLIDAYS') && isTrue(SHOW_HOLIDAYS)) { $this->holidays = $i18n_holidays; - } +// } foreach ($i18n_key_words as $kword=>$value) { $pos = strpos($kword, "."); @@ -97,9 +97,9 @@ function load($localName) { $this->monthNames = $i18n_months; $this->weekdayNames = $i18n_weekdays; $this->weekdayShortNames = $i18n_weekdays_short; - if (defined('SHOW_HOLIDAYS') && isTrue(SHOW_HOLIDAYS)) { +// if (defined('SHOW_HOLIDAYS') && isTrue(SHOW_HOLIDAYS)) { $this->holidays = $i18n_holidays; - } +// } foreach ($i18n_key_words as $kword=>$value) { if (!$value) continue; $pos = strpos($kword, "."); diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 1340c9873..555b6e149 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -172,7 +172,9 @@ function toString($date="") { } // holidays - if ($this->showHolidays) { + //if ($this->showHolidays) { + global $user; + if ($user->show_holidays) { foreach ($this->holidays as $day) { if($day == $date) { $stl_cell = ' class="CalendarDayHoliday"'; diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 217c07adb..b30899638 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -803,6 +803,7 @@ static function update($team_id, $fields) $uncompleted_indicators_part = ''; $bcc_email_part = ''; $plugins_part = ''; + $config_part = ''; $lock_spec_part = ''; $workday_hours_part = ''; @@ -817,12 +818,13 @@ static function update($team_id, $fields) if (isset($fields['uncompleted_indicators'])) $uncompleted_indicators_part = ', uncompleted_indicators = '.(int) $fields['uncompleted_indicators']; if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); + if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part - $uncompleted_indicators_part $bcc_email_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; + $uncompleted_indicators_part $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_hours_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 6b1efe0db..f5c3e9382 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -39,7 +39,11 @@ static function isWeekend($date) { // isHoliday determines if $date falls on a holiday. static function isHoliday($date) { + global $user; global $i18n; + + if (!$user->show_holidays) return false; + // $date is expected as string in DB_DATEFORMAT. $month = date('m', strtotime($date)); $day = date('d', strtotime($date)); diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 565e47adc..f04b49964 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -41,6 +41,7 @@ class ttUser { var $date_format = null; // Date format. var $time_format = null; // Time format. var $week_start = 0; // Week start day. + var $show_holidays = 1; // Whether to show holidays in calendar. var $tracking_mode = 0; // Tracking mode. var $project_required = 0; // Whether project selection is required on time entires. var $task_required = 0; // Whether task selection is required on time entires. @@ -49,6 +50,7 @@ class ttUser { var $bcc_email = null; // Bcc email. var $currency = null; // Currency. var $plugins = null; // Comma-separated list of enabled plugins. + var $config = null; // Comma-separated list of miscellaneous config options. var $team = null; // Team name. var $custom_logo = 0; // Whether to use a custom logo for team. var $lock_spec = null; // Cron specification for record locking. @@ -67,7 +69,7 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, t.tracking_mode, t.project_required, t.task_required, t.record_type, t.uncompleted_indicators, - t.bcc_email, t.plugins, t.lock_spec, t.workday_hours, t.custom_logo + t.bcc_email, t.plugins, t.config, t.lock_spec, t.workday_hours, t.custom_logo FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE "; if ($id) $sql .= "u.id = $id"; @@ -107,6 +109,10 @@ function __construct($login, $id = null) { $this->workday_hours = $val['workday_hours']; $this->custom_logo = $val['custom_logo']; + // Set user config options. + $this->config = $val['config']; + $this->show_holidays = in_array('show_holidays', explode(',', $this->config)); + // Set "on behalf" id and name. if (isset($_SESSION['behalf_id'])) { $this->behalf_id = $_SESSION['behalf_id']; diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3dd011aab..e7085ba7f 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -476,6 +476,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 8639a9ab1..ee5a92389 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -491,6 +491,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 1624695ef..b3205646c 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -422,6 +422,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 timers', 'form.profile.24_hours' => '24 timers', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Registrerings tilstand', 'form.profile.mode_time' => 'Tid', 'form.profile.mode_projects' => 'Projekter', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index a3d13850c..d6958825d 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -420,6 +420,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 Stunden', 'form.profile.24_hours' => '24 Stunden', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Nachverfolgung', 'form.profile.mode_time' => 'Zeit', 'form.profile.mode_projects' => 'Projekte', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index bcdbd0195..1009a0f4a 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -417,6 +417,7 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 hours', 'form.profile.24_hours' => '24 hours', +'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Tracking mode', 'form.profile.mode_time' => 'time', 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 4befd52a6..57139b008 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -489,6 +489,7 @@ 'form.profile.12_hours' => '12 horas', 'form.profile.24_hours' => '24 horas', // TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index ce8516427..2ff634e24 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -487,6 +487,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 9ec505cfe..80193ce70 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -451,6 +451,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ساعت', 'form.profile.24_hours' => '24 ساعت', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'حالت رهگیری', 'form.profile.mode_time' => 'زمان', 'form.profile.mode_projects' => 'پروژه ها', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index b12941804..e340d886b 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -429,6 +429,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-tuntinen', 'form.profile.24_hours' => '24-tuntinen', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Seurantamuoto', 'form.profile.mode_time' => 'aika', 'form.profile.mode_projects' => 'projektit', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 23b1d9871..d2ca6cd1a 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -419,6 +419,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 heures', 'form.profile.24_hours' => '24 heures', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Mode suivi', 'form.profile.mode_time' => 'Heures', 'form.profile.mode_projects' => 'Projets', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 526610d56..bd2c59803 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -456,6 +456,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 שעות', 'form.profile.24_hours' => '24 שעות', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'סוג מעקב', 'form.profile.mode_time' => 'זמן', 'form.profile.mode_projects' => 'פרוייקטים', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 217bbcc6e..b8ea9539e 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -486,6 +486,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 51bb09fab..c2af59cf0 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -483,6 +483,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index bc25f01fc..292d844bd 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -476,6 +476,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index bf5d7633e..323607f2b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -478,6 +478,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ddc13fbc5..aabb7ad75 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -418,6 +418,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 uurs', 'form.profile.24_hours' => '24 uurs', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Bijhouden', 'form.profile.mode_time' => 'tijd', 'form.profile.mode_projects' => 'projecten', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 533e3285d..b8b9bc3b1 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -474,6 +474,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 2f41e579e..ae6126a3f 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -432,6 +432,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 godzin', 'form.profile.24_hours' => '24 godziny', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Tryb śledzenia', 'form.profile.mode_time' => 'czas', 'form.profile.mode_projects' => 'projekty', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 12761d516..df75ffa2a 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -427,6 +427,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 horas', 'form.profile.24_hours' => '24 horas', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Modo de acompanhamento', 'form.profile.mode_time' => 'tempo', 'form.profile.mode_projects' => 'projetos', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index c5ef6fd75..852f1987f 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -467,6 +467,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 6052a337d..7277bcdfe 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -484,6 +484,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index da15dfab2..74a7f1423 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -415,6 +415,7 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 часов', 'form.profile.24_hours' => '24 часа', +'form.profile.show_holidays' => 'Показывать праздники', 'form.profile.tracking_mode' => 'Режим работы', 'form.profile.mode_time' => 'время', 'form.profile.mode_projects' => 'проекты', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index ff4948bd3..aa6b48c6d 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -448,6 +448,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-hodinový', 'form.profile.24_hours' => '24-hodinový', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Režim sledovania', 'form.profile.mode_time' => 'čas', 'form.profile.mode_projects' => 'projekty', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index bceace78d..c9f69a1ea 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -463,6 +463,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 4bd5d66a0..2d3f82c13 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -430,6 +430,8 @@ // Forma profila. Pogledajte primer na at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 časova', 'form.profile.24_hours' => '24 časova', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Način evidencije', 'form.profile.mode_time' => 'vreme', 'form.profile.mode_projects' => 'projekti', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 586957848..ac9cba05b 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -427,6 +427,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-timmars', 'form.profile.24_hours' => '24-timmars', +// TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Spårningsmetod', 'form.profile.mode_time' => 'Endast tid', 'form.profile.mode_projects' => 'Projekt', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index f51d3fde0..fe4888022 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -495,6 +495,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7d35e157f..bc08f8a44 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -463,6 +463,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 01b71c3da..09a49e997 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -473,6 +473,7 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', +// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 347a24498..593d07d0f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + diff --git a/dbinstall.php b/dbinstall.php index 00b9c382d..58467bc1c 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -709,7 +709,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11710"]) { + if ($_POST["convert11400to11714"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -717,6 +717,9 @@ function setChange($sql) { setChange("ALTER TABLE `tt_expense_items` ADD `paid` tinyint(4) NULL default '0' AFTER `invoice_id`"); setChange("ALTER TABLE `tt_monthly_quotas` MODIFY `quota` decimal(5,2) NOT NULL"); setChange("ALTER TABLE `tt_teams` MODIFY `workday_hours` decimal(5,2) DEFAULT '8.00'"); + setChange("ALTER TABLE `tt_teams` ADD `config` text default NULL AFTER `custom_logo`"); + setChange("ALTER TABLE `tt_monthly_quotas` ADD `minutes` int(11) DEFAULT NULL"); + setChange("ALTER TABLE `tt_teams` ADD `workday_minutes` smallint(4) DEFAULT '480' AFTER `workday_hours`"); } if ($_POST["cleanup"]) { @@ -761,7 +764,7 @@ function setChange($sql) {

DB Install

 Anuko Time Tracker 1.17.13.3973 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3974 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 4967259e0..089ecead4 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -160,6 +160,10 @@ function handlePluginCheckboxes() { {$i18n.label.week_start}: {$forms.profileForm.start_week.control}
{$i18n.form.profile.show_holidays}:{$forms.profileForm.show_holidays.control} {$i18n.label.what_is_it}
{$i18n.form.profile.tracking_mode}: {$forms.profileForm.tracking_mode.control} {$forms.profileForm.task_required.control}
-
Create database structure (v1.17.10) + Create database structure (v1.17.14)
(applies only to new installations, do not execute when updating)
@@ -797,8 +800,8 @@ function setChange($sql) {

Update database structure (v1.14 to v1.17.10)
Update database structure (v1.14 to v1.17.14)
diff --git a/mysql.sql b/mysql.sql index d6e1d2d32..dc07a1dde 100644 --- a/mysql.sql +++ b/mysql.sql @@ -32,7 +32,9 @@ CREATE TABLE `tt_teams` ( `lock_spec` varchar(255) default NULL, # Cron specification for record locking, # for example: "0 10 * * 1" for "weekly on Mon at 10:00". `workday_hours` decimal(5,2) DEFAULT '8.00', # number of work hours in a regular day + `workday_minutes` smallint(4) DEFAULT '480', # number of work minutes in a regular working day `custom_logo` tinyint(4) default '0', # whether to use a custom logo or not + `config` text default NULL, # miscellaneous team configuration settings `status` tinyint(4) default '1', # team status PRIMARY KEY (`id`) ); @@ -375,6 +377,7 @@ CREATE TABLE `tt_monthly_quotas` ( `year` smallint(5) UNSIGNED NOT NULL, # quota year `month` tinyint(3) UNSIGNED NOT NULL, # quota month `quota` decimal(5,2) NOT NULL, # number of work hours in specified month and year + `minutes` int(11) DEFAULT NULL, # quota in minutes in specified month and year PRIMARY KEY (`team_id`,`year`,`month`) ); diff --git a/profile_edit.php b/profile_edit.php index 5839c7e0f..eaa9b2ae3 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -57,6 +57,7 @@ $cl_date_format = $request->getParameter('date_format'); $cl_time_format = $request->getParameter('time_format'); $cl_start_week = $request->getParameter('start_week'); + $cl_show_holidays = $request->getParameter('show_holidays'); $cl_tracking_mode = $request->getParameter('tracking_mode'); $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); @@ -90,6 +91,7 @@ $cl_date_format = $user->date_format; $cl_time_format = $user->time_format; $cl_start_week = $user->week_start; + $cl_show_holidays = $user->show_holidays; $cl_tracking_mode = $user->tracking_mode; $cl_project_required = $user->project_required; $cl_task_required = $user->task_required; @@ -168,6 +170,9 @@ } $form->addInput(array('type'=>'combobox','name'=>'start_week','style'=>'width: 150px;','data'=>$week_start_options,'datakeys'=>array('id','name'),'value'=>$cl_start_week)); + // Show holidays checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'show_holidays','value'=>$cl_show_holidays)); + // Prepare tracking mode choices. $tracking_mode_options = array(); $tracking_mode_options[MODE_TIME] = $i18n->getKey('form.profile.mode_time'); @@ -278,6 +283,11 @@ $plugins = trim($plugins, ','); + // Prepare config string. At this time we only handle show_holidays here. + if ($cl_show_holidays) + $config .= ',show_holidays'; + $config = trim($config, ','); + $update_result = ttTeamHelper::update($user->team_id, array( 'name' => $cl_team, 'currency' => $cl_currency, @@ -292,7 +302,8 @@ 'record_type' => $cl_record_type, 'uncompleted_indicators' => $cl_uncompleted_indicators, 'bcc_email' => $cl_bcc_email, - 'plugins' => $plugins)); + 'plugins' => $plugins, + 'config' => $config)); } if ($update_result) { $update_result = ttUserHelper::update($user->id, array( From 8d4f529a93ab84e85122a7302bdc0799b5c3bae8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 14:27:11 +0000 Subject: [PATCH 0515/2515] Work in progress in Italian file. --- WEB-INF/resources/it.lang.php | 40 ++++++++++++++--------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index c2af59cf0..9502e6c00 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -32,7 +32,7 @@ // Note to translators: Use proper capitalization rules for your language. $i18n_language = 'Italiano'; -$i18n_months = array('Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luiglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'); +$i18n_months = array('Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'); $i18n_weekdays = array('Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'); $i18n_weekdays_short = array('Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'); // format mm/dd @@ -43,40 +43,33 @@ // Menus - short selection strings that are displayed on top of application web pages. // Example: https://timetracker.anuko.com (black menu on top). 'menu.login' => 'Login', -// TODO: translate the following. -// 'menu.logout' => 'Logout', -// 'menu.forum' => 'Forum', -// 'menu.help' => 'Help', -// 'menu.create_team' => 'Create Team', +'menu.logout' => 'Logout', +'menu.forum' => 'Forum', +'menu.help' => 'Aiuto', +'menu.create_team' => 'Crea gruppo', 'menu.profile' => 'Profilo', 'menu.time' => 'Tempo', 'menu.expenses' => 'Spese', -// TODO: translate the following. -// 'menu.reports' => 'Reports', +'menu.reports' => 'Rapporti', 'menu.charts' => 'Grafici', 'menu.projects' => 'Progetti', -// TODO: translate the following. -// 'menu.tasks' => 'Tasks', +'menu.tasks' => 'Compiti', 'menu.users' => 'Utenti', -// TODO: translate the following. -// 'menu.teams' => 'Teams', -// 'menu.export' => 'Export', +'menu.teams' => 'Gruppi', +'menu.export' => 'Esportazione', // TODO: is this correct? Also, I auto-translated some other terms in menu section. Check for accuracy. 'menu.clients' => 'Clienti', 'menu.options' => 'Opzioni', // Footer - strings on the bottom of most pages. -// TODO: translate the following. -// 'footer.contribute_msg' => 'You can contribute to Time Tracker in different ways.', -// 'footer.credits' => 'Credits', -// 'footer.license' => 'License', -// 'footer.improve' => 'Contribute', // Translators: this could mean "Improve", if it makes better sense in your language. - // This is a link to a webpage that describes how to contribute to the project. +'footer.contribute_msg' => 'Puoi collaborare al progetto Time Tracker in diversi modi.', +'footer.credits' => 'Credits', +'footer.license' => 'Licenza', +'footer.improve' => 'Collabora', // Error messages. -// TODO: translate the following. -// 'error.access_denied' => 'Access denied.', -// 'error.sys' => 'System error.', -// 'error.db' => 'Database error.', +'error.access_denied' => 'Accesso negato.', +'error.sys' => 'Errore di sistema.', +'error.db' => 'Errore database.', 'error.field' => 'Dato "{0}" errato.', 'error.empty' => 'Il campo "{0}" è vuoto.', 'error.not_equal' => 'Il campo "{0}" non è uguale al campo "{1}".', @@ -483,7 +476,6 @@ // TODO: translate the following. // 'form.profile.12_hours' => '12 hours', // 'form.profile.24_hours' => '24 hours', -// 'form.profile.show_holidays' => 'Show holidays', // 'form.profile.tracking_mode' => 'Tracking mode', // 'form.profile.mode_time' => 'time', // 'form.profile.mode_projects' => 'projects', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 593d07d0f..64c6d2a0a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +
 Anuko Time Tracker 1.17.14.3974 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3975 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a714e5ec2e7d8b4bea26e91fa07a7cc798f18da1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 14:53:20 +0000 Subject: [PATCH 0516/2515] Work in progress integrating changes to the Italian file. --- WEB-INF/resources/it.lang.php | 44 +++++++++++++++-------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 9502e6c00..3c15ff1d2 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -73,35 +73,29 @@ 'error.field' => 'Dato "{0}" errato.', 'error.empty' => 'Il campo "{0}" è vuoto.', 'error.not_equal' => 'Il campo "{0}" non è uguale al campo "{1}".', -// TODO: translate the following. -// error.interval' => 'Field "{0}" must be greater than "{1}".', +'error.interval' => 'Il campo "{0}" deve essere maggiore di "{1}".', 'error.project' => 'Seleziona il progetto.', -// TODO: translate the following. -// 'error.task' => 'Select task.', +'error.task' => 'Seleziona compito.', // TODO: is this correct? 'error.client' => 'Seleziona il cliente.', -// TODO: translate the following. -// 'error.report' => 'Select report.', -// 'error.record' => 'Select record.', +'error.report' => 'Seleziona rapporto.', +'error.record' => 'Seleziona record.', 'error.auth' => 'Login o password errati.', -// TODO: translate the following. -// 'error.user_exists' => 'User with this login already exists.', +'error.user_exists' => 'Esiste già un utente con questo username.', 'error.project_exists' => 'Esiste già un progetto con questo nome.', -// TODO: translate the following. -// 'error.task_exists' => 'Task with this name already exists.', -// 'error.client_exists' => 'Client with this name already exists.', -// 'error.invoice_exists' => 'Invoice with this number already exists.', -// 'error.no_invoiceable_items' => 'There are no invoiceable items.', -// 'error.no_login' => 'No user with this login.', -'error.no_teams' => 'Il database è vuoto. loggati come amministratore e crea un nuovo team.', -// TODO: translate the following. -// 'error.upload' => 'File upload error.', -// 'error.range_locked' => 'Date range is locked.', -// 'error.mail_send' => 'Error sending mail.', -// 'error.no_email' => 'No email associated with this login.', -// 'error.uncompleted_exists' => 'Uncompleted entry already exists. Close or delete it.', -// 'error.goto_uncompleted' => 'Go to uncompleted entry.', -// 'error.overlap' => 'Time interval overlaps with existing records.', -// 'error.future_date' => 'Date is in future.', +'error.task_exists' => 'Esiste già un compito con questo nome.', // TODO: is this correct? "un compito"? +'error.client_exists' => 'Esiste già un cliente con questo nome.', +'error.invoice_exists' => 'Esiste già una fattura con questo numero.', +'error.no_invoiceable_items' => 'Non ci sono voci fatturabili.', +'error.no_login' => 'Non esiste un utente con questo username.', +'error.no_teams' => 'Il database è vuoto. Loggati come amministratore e crea un nuovo gruppo.', +'error.upload' => 'Errore di caricamento file.', +'error.range_locked' => 'Intervallo data bloccato.', +'error.mail_send' => 'Errore nella fase di invio mail.', +'error.no_email' => 'Non ci sono email associate a questo username.', +'error.uncompleted_exists' => 'Esiste una voce incompleta. Chiudila o cancellala.', +'error.goto_uncompleted' => 'Vai alle voce incompleta.', +'error.overlap' => 'Intervallo temporale sovrapposto a voci esistenti.', +'error.future_date' => 'La data è nel futuro.', // Labels for buttons. 'button.login' => 'Login', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 64c6d2a0a..2b02397db 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - +
 Anuko Time Tracker 1.17.14.3975 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3976 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 2a12fc518e7486fa6074d9885d7480962854328f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 15:35:12 +0000 Subject: [PATCH 0517/2515] More improvements in Italian file. --- WEB-INF/resources/it.lang.php | 128 +++++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 56 insertions(+), 74 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 3c15ff1d2..e17086a3e 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -101,39 +101,32 @@ 'button.login' => 'Login', 'button.now' => 'Adesso', 'button.save' => 'Salva', -// TODO: translate the following. -// 'button.copy' => 'Copy', +'button.copy' => 'Copia', 'button.cancel' => 'Cancella', 'button.submit' => 'Invia', 'button.add_user' => 'Aggiungi utente', 'button.add_project' => 'Aggiungi progetto', -// TODO: translate the following. -// 'button.add_task' => 'Add task', +'button.add_task' => 'Aggiungi compito', 'button.add_client' => 'Aggiungi cliente', -// TODO: translate the following. -// 'button.add_invoice' => 'Add invoice', -// 'button.add_option' => 'Add option', -// 'button.add' => 'Add', +'button.add_invoice' => 'Aggiungi fattura', +'button.add_option' => 'Aggiungi opzione', +'button.add' => 'Aggiungi', 'button.generate' => 'Genera', -// TODO: translate the following. -// 'button.reset_password' => 'Reset password', +'button.reset_password' => 'Reset password', 'button.send' => 'Invia', 'button.send_by_email' => 'Invia tramite e-mail', 'button.create_team' => 'Crea team', -'button.export' => 'Esporta team', -'button.import' => 'Importa team', -// TODO: translate the following. -// 'button.close' => 'Close', -// 'button.stop' => 'Stop', +'button.export' => 'Esporta gruppo', +'button.import' => 'Importa gruppo', +'button.close' => 'Chiudi', +'button.stop' => 'Stop', // Labels for controls on forms. Labels in this section are used on multiple forms. -// TODO: translate the following. -// 'label.team_name' => 'Team name', -// 'label.address' => 'Address', +'label.team_name' => 'Nome del gruppo', +'label.address' => 'Indirizzo', 'label.currency' => 'Moneta', -// TODO: translate the following. -// 'label.manager_name' => 'Manager name', -// 'label.manager_login' => 'Manager login', +'label.manager_name' => 'Nome manager', +'label.manager_login' => 'Username manager', 'label.person_name' => 'Nome', 'label.thing_name' => 'Nome', 'label.login' => 'Login', @@ -141,8 +134,7 @@ 'label.confirm_password' => 'Conferma password', 'label.email' => 'E-mail', 'label.cc' => 'Cc', -// TODO: translate the following. -// 'label.bcc' => 'Bcc', +'label.bcc' => 'Ccn', 'label.subject' => 'Oggetto', 'label.date' => 'Data', 'label.start_date' => 'Data inizio', @@ -155,80 +147,70 @@ 'label.invoice' => 'Fattura', 'label.project' => 'Progetto', 'label.projects' => 'Progetti', -// TODO: translate the following. -// 'label.task' => 'Task', -// 'label.tasks' => 'Tasks', -// 'label.description' => 'Description', +'label.task' => 'Compito', +'label.tasks' => 'Compiti', +'label.description' => 'Descrizione', 'label.start' => 'Inizio', 'label.finish' => 'Fine', 'label.duration' => 'Durata', 'label.note' => 'Nota', -// TODO: translate the following. -// 'label.notes' => 'Notes', -// 'label.item' => 'Item', +'label.notes' => 'Note', +'label.item' => 'Voce', 'label.cost' => 'Costo', -// TODO: translate the following. -// 'label.day_total' => 'Day total', -// 'label.week_total' => 'Week total', -// 'label.month_total' => 'Month total', +'label.day_total' => 'Totale giornaliero', +'label.week_total' => 'Totale settimanale', +'label.month_total' => 'Totale mensile', 'label.today' => 'Oggi', -// TODO: translate the following. -// 'label.view' => 'View', +'label.view' => 'Visualizza', 'label.edit' => 'Modifica', 'label.delete' => 'Elimina', 'label.configure' => 'Configura', 'label.select_all' => 'Seleziona tutti', 'label.select_none' => 'Deseleziona tutti', -// TODO: translate the following. -// 'label.day_view' => 'Day view', -// 'label.week_view' => 'Week view', +'label.day_view' => 'Vista giornaliera', +'label.week_view' => 'Vista settimanale', 'label.id' => 'ID', -// TODO: translate the following. -// 'label.language' => 'Language', -// 'label.decimal_mark' => 'Decimal mark', -// 'label.date_format' => 'Date format', -// 'label.time_format' => 'Time format', -// 'label.week_start' => 'First day of week', +'label.language' => 'Lingua', +'label.decimal_mark' => 'Separatore decimale', +'label.date_format' => 'Formato data', +'label.time_format' => 'Formato ora', +'label.week_start' => 'Primo giorno della settimana', 'label.comment' => 'Commento', 'label.status' => 'Stato', 'label.tax' => 'Imposta', 'label.subtotal' => 'Subtotale', 'label.total' => 'Totale', -// TODO: translate the following. -// 'label.client_name' => 'Client name', -// 'label.client_address' => 'Client address', +'label.client_name' => 'Nome cliente', +'label.client_address' => 'Indirizzo cliente', 'label.or' => 'o', -// TODO: translate the following. -// 'label.error' => 'Error', -// 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', +'label.error' => 'Errore', +'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', // TODO: il tuo and then la tua? Improve? 'label.required_fields' => '* campi obbligatori', 'label.on_behalf' => 'a favore di', 'label.role_manager' => '(manager)', 'label.role_comanager' => '(co-manager)', 'label.role_admin' => '(amministratore)', -// TODO: translate the following. -// 'label.page' => 'Page', -// 'label.condition' => 'Condition', -// 'label.yes' => 'yes', -// 'label.no' => 'no', +'label.page' => 'Pagina', +'label.condition' => 'Condizione', +'label.yes' => 'si', +'label.no' => 'no', // Labels for plugins (extensions to Time Tracker that provide additional features). -// TODO: translate the following. -// 'label.custom_fields' => 'Custom fields', -// 'label.monthly_quotas' => 'Monthly quotas', -// 'label.type' => 'Type', -// 'label.type_dropdown' => 'dropdown', -// 'label.type_text' => 'text', -// 'label.required' => 'Required', -// 'label.fav_report' => 'Favorite report', -// 'label.cron_schedule' => 'Cron schedule', -// 'label.what_is_it' => 'What is it?', -// 'label.expense' => 'Expense', -// 'label.quantity' => 'Quantity', -// 'label.paid_status' => 'Paid status', -// 'label.paid' => 'Paid', -// 'label.mark_paid' => 'Mark paid', -// 'label.week_note' => 'Week note', -// 'label.week_list' => 'Week list', +'label.custom_fields' => 'Campi personalizzati', +'label.monthly_quotas' => 'Quote mensili', +'label.type' => 'Tipo', +'label.type_dropdown' => 'scelta multipla', // TODO: translation looks incorrect, a dropdown control is a single choice. +'label.type_text' => 'testo', +'label.required' => 'Obbligatorio', +'label.fav_report' => 'Rapporto preferito', +// 'label.cron_schedule' => 'Cron schedule', // TODO: how about "Programma cron" here? +'label.what_is_it' => 'Cosa è?', +'label.expense' => 'Spesa', +'label.quantity' => 'Quantità', +'label.paid_status' => 'Stato pagamento', +'label.paid' => 'Pagato', +'label.mark_paid' => 'Segna come pagato', +'label.week_note' => 'Nota settimanale', +'label.week_list' => 'Lista settimanale', // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2b02397db..39129bf53 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {foreach $time_records as $record} - + {if $show_client} diff --git a/initialize.php b/initialize.php index dc0c35452..469d92a7b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5533"); +define("APP_VERSION", "1.19.28.5534"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week_old.php b/week_old.php deleted file mode 100644 index 01597704d..000000000 --- a/week_old.php +++ /dev/null @@ -1,555 +0,0 @@ -isPluginEnabled('wv')) { - header('Location: feature_disabled.php'); - exit(); -} -if ($user->behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost()) { - $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { - header('Location: access_denied.php'); // User changed, but no right or wrong user id. - exit(); - } -} -// End of access checks. - -// Determine user for whom we display this page. -if ($request->isPost() && $userChanged) { - $user_id = (int)$request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -$group_id = $user->getGroup(); - -$showClient = $user->isPluginEnabled('cl'); -$showBillable = $user->isPluginEnabled('iv'); -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -if ($showTask) $taskRequired = $user->getConfigOption('task_required'); -$showWeekNote = $user->isOptionEnabled('week_note'); -$showWeekNotes = $user->isOptionEnabled('week_notes'); -$recordType = $user->getRecordType(); -$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; -$showFiles = $user->isPluginEnabled('at'); - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -// Determine selected week start and end dates. -$weekStartDay = $user->getWeekStart(); -$t_arr = localtime($selected_date->getTimestamp()); -$t_arr[5] = $t_arr[5] + 1900; -if ($t_arr[6] < $weekStartDay) - $startWeekBias = $weekStartDay - 7; -else - $startWeekBias = $weekStartDay; -$startDate = new DateAndTime(); -$startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); -$endDate = new DateAndTime(); -$endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); -// The above is needed to set date range (timestring) in page title. - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -// Use Monthly Quotas plugin, if applicable. -if ($user->isPluginEnabled('mq')){ - require_once('plugins/MonthlyQuota.class.php'); - $quota = new MonthlyQuota(); - $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth); - $month_total = ttTimeHelper::getTimeForMonth($selected_date); - $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total); - - $smarty->assign('month_total', $month_total); - $smarty->assign('over_quota', $minutes_left < 0); - $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); -} - -// Initialize variables. -$cl_billable = 1; -if ($showBillable) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; -} -$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); -$_SESSION['task'] = $cl_task; -$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); -$_SESSION['note'] = $cl_note; - -$timeCustomFields = array(); -// If we have time custom fields - collect input. -if ($request->isPost()) { - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); - } - } -} - -// Get the data we need to display week view. -// Get column headers, which are day numbers in month. -$dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); -$lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); -// Get already existing records. -$records = ttWeekViewHelper::getRecordsForInterval($startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $showFiles); -// Build data array for the table. Format is described in ttWeekViewHelper::getDataForWeekView function. -if ($records) - $dataArray = ttWeekViewHelper::getDataForWeekView($records, $dayHeaders); -else - $dataArray = ttWeekViewHelper::prePopulateFromPastWeeks($startDate->toString(DB_DATEFORMAT), $dayHeaders); - -// Build day totals (total durations for each day in week). -$dayTotals = ttWeekViewHelper::getDayTotals($dataArray, $dayHeaders); - -// Define rendering class for a label field to the left of durations. -class LabelCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $user; - $showNotes = $user->isOptionEnabled('week_notes'); - - $this->setOptions(array('width'=>200,'valign'=>'middle')); - - // Special handling for a new week entry (row 0, or 0 and 1 if we show notes). - if (0 == $row) { - $this->setOptions(array('style'=>'text-align: center; font-weight: bold; vertical-align: top;')); - } else if ($showNotes && (1 == $row)) { - $this->setOptions(array('style'=>'text-align: right; vertical-align: top;')); - } else if ($showNotes && (0 != $row % 2)) { - $this->setOptions(array('style'=>'text-align: right;')); - } - // Special handling for not billable entries. - $ignoreRow = $showNotes ? 1 : 0; - if ($row > $ignoreRow) { - $row_id = $table->getValueAtName($row,'row_id'); - $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl'); - if (!$billable) { - if (($showNotes && (0 == $row % 2)) || !$showNotes) { - $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. - } - } - } - $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. - return $this->toString(); - } -} - -// Define rendering class for a single cell for a time or a comment entry in week view table. -class WeekViewCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $user; - $showNotes = $user->isOptionEnabled('week_notes'); - - $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). - $field = new TextField($field_name); - // Disable control if the date is locked. - global $lockedDays; - if ($lockedDays[$column-1]) - $field->setEnabled(false); - $field->setFormName($table->getFormName()); - $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. - // Provide visual separation for new entry row. - $rowToSeparate = $showNotes ? 1 : 0; - if ($rowToSeparate == $row) { - $field->setStyle('width: 60px; margin-bottom: 40px'); - } - if ($showNotes) { - if (0 == $row % 2) { - $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. - } else { - $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. - $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to help view the entire comment. - } - } else { - $field->setValue($table->getValueAt($row,$column)['duration']); - // $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to see comment. TODO - value not available. - } - // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control - // because we can't supply start and finish times in week view - there are no fields for them. - if (!$field->getValue() && TYPE_START_FINISH == $user->getRecordType()) { - $field->setEnabled(false); - } - $this->setValue($field->getHtml()); - return $this->toString(); - } -} - -// Elements of weekTimeForm. -$form = new Form('weekTimeForm'); - -if ($user->can('track_time')) { - $rank = $user->getMaxRankForGroup($group_id); - if ($user->can('track_own_time')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'document.weekTimeForm.user_changed.value=1;document.weekTimeForm.submit();', - 'name'=>'user', - 'style'=>'width: 250px;', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'))); - $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Create week_durations table. -$table = new Table('week_durations'); -// $table->setCssClass('week_view_table'); // Currently not used. Fix this. -$table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('class'=>'tableHeaderCentered')); -$table->setData($dataArray); -// Add columns to table. -$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); -for ($i = 0; $i < 7; $i++) { - $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); -} -$table->setInteractive(false); -$form->addInputElement($table); - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $trackingMode && $showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -// Billable checkbox. -if ($user->isPluginEnabled('iv')) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); - -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -// If we show project dropdown, add controls for project and client. -if ($showProject) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} - -// Task dropdown. -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'style'=>'width: 250px;', - 'value'=>$cl_task, - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -} - -// Week note control. -if ($showWeekNote) { - if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); - $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); -} - -// Calendar. -$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'get_date()')); // User current date, which gets filled in on btn_submit click. - -// Submit button. -$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); - -// Submit. -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Validate user input for row 0. - // Determine if a new entry was posted. - $newEntryPosted = false; - foreach($dayHeaders as $dayHeader) { - $control_id = '0_'.$dayHeader; - if ($request->getParameter($control_id)) { - $newEntryPosted = true; - break; - } - } - if ($newEntryPosted) { - if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($timeCustomFields as $timeField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); - } - } - if ($showProject) { - if (!$cl_project) $err->add($i18n->get('error.project')); - } - if ($showTask && $taskRequired) { - if (!$cl_task) $err->add($i18n->get('error.task')); - } - } - // Finished validating user input for row 0. - - // Process the table of values. - if ($err->no()) { - - // Obtain values. Iterate through posted parameters one by one, - // see if value changed, apply one change at a time until we see an error. - $result = true; - $rowNumber = 0; - // Iterate through existing rows. - foreach ($dataArray as $row) { - // Iterate through days. - foreach ($dayHeaders as $key => $dayHeader) { - // Do not process locked days. - if ($lockedDays[$key]) continue; - // Make control id for the cell. - $control_id = $rowNumber.'_'.$dayHeader; - - // Handle durations and comments in separate blocks of code. - if (!$showWeekNotes || (0 == $rowNumber % 2)) { - // Handle durations row here. - - // Obtain existing and posted durations. - $postedDuration = $request->getParameter($control_id); - $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; - // If posted value is not null, check and normalize it. - if ($postedDuration) { - if (false === ttTimeHelper::postedDurationToMinutes($postedDuration)) { - $err->add($i18n->get('error.field'), $i18n->get('label.duration')); - $result = false; break; // Break out. Stop any further processing. - } else { - $minutes = ttTimeHelper::postedDurationToMinutes($postedDuration); - $postedDuration = ttTimeHelper::minutesToDuration($minutes); - } - } - // Do not process if value has not changed. - if ($postedDuration == $existingDuration) - continue; - // Posted value is different. - if ($existingDuration == null) { - // Skip inserting 0 duration values. - if (0 == ttTimeHelper::toMinutes($postedDuration)) - continue; - // Insert a new record. - $fields = array(); - $fields['row_id'] = $dataArray[$rowNumber]['row_id']; - if (!$fields['row_id']) { - // Special handling for row 0, a new entry. Need to construct new row_id. - $record = array(); - $record['client_id'] = $cl_client; - $record['billable'] = $cl_billable ? '1' : '0'; - $record['project_id'] = $cl_project; - $record['task_id'] = $cl_task; - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) - $record[$field_name] = $timeCustomFields[$timeField['id']]['value']; - else if ($timeField['type'] == CustomFields::TYPE_DROPDOWN) - $record[$field_name.'_option_id'] = $timeCustomFields[$timeField['id']]['value']; - } - } - $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; - // Note: no need to check for a possible conflict with an already existing row - // because we are doing an insert that does not affect already existing data. - - if ($showWeekNote) { - $fields['note'] = $request->getParameter('note'); - } - } - $fields['day_header'] = $dayHeader; - $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. - $fields['duration'] = $postedDuration; - $fields['browser_today'] = $request->getParameter('browser_today', null); - if ($showWeekNotes) { - // Take note value from the control below duration. - $noteRowNumber = $rowNumber + 1; - $note_control_id = $noteRowNumber.'_'.$dayHeader; - $fields['note'] = $request->getParameter($note_control_id); - } - $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); - } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { - // Delete an already existing record here. - $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id']); - } else { - $fields = array(); - $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; - $fields['duration'] = $postedDuration; - $result = ttWeekViewHelper::modifyDurationFromWeekView($fields, $err); - } - if (!$result) break; // Break out of the loop in case of first error. - - } else if ($showWeekNotes) { - // Handle commments row here. - - // Obtain existing and posted comments. - $postedComment = $request->getParameter($control_id); - $existingComment = $dataArray[$rowNumber][$dayHeader]['note']; - // If posted value is not null, check it. - if ($postedComment && !ttValidString($postedComment, true)) { - $err->add($i18n->get('error.field'), $i18n->get('label.note')); - $result = false; break; // Break out. Stop any further processing. - } - // Do not process if value has not changed. - if ($postedComment == $existingComment) - continue; - - // Posted value is different. - // TODO: handle new entries separately in the durations block above. - - // Here, only update the comment on an already existing record. - $fields = array(); - $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; - if ($fields['tt_log_id']) { - $fields['comment'] = $postedComment; - $result = ttWeekViewHelper::modifyCommentFromWeekView($fields); - } - if (!$result) break; // Break out of the loop on first error. - } - } - if (!$result) break; // Break out of the loop on first error. - $rowNumber++; - } - if ($result) { - header('Location: week.php'); // Normal exit. - exit(); - } - } - } -} // isPost - -$week_total = ttTimeHelper::getTimeForWeek($selected_date); - -$smarty->assign('selected_date', $selected_date); -$smarty->assign('week_total', $week_total); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns()"'); -$smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); -$smarty->assign('time_records', $records); -$smarty->assign('show_navigation', !$user->isOptionEnabled('week_menu')); -$smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('task_required', $taskRequired); -$smarty->assign('show_week_note', $showWeekNote); -$smarty->assign('show_week_list', $user->isOptionEnabled('week_list')); -$smarty->assign('show_start', $showStart); -$smarty->assign('show_files', $showFiles); -$smarty->assign('title', $i18n->get('menu.week')); -$smarty->assign('content_page_name', 'week.tpl'); -$smarty->display('index.tpl'); From 89db773dd2810bd5a52049e4c2908a6db4dd7636 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 19:50:23 +0000 Subject: [PATCH 2216/2515] Addressed issue #110 for php8. --- WEB-INF/lib/form/DateField.class.php | 4 +++- initialize.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 01c14f2e6..f5d6f8f73 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -406,7 +406,9 @@ function adjustiFrame(pickerDiv, iFrameDiv) { $html .= " value=\"".htmlspecialchars($this->getValue())."\""; $html .= ">"; - $dir_name = trim(@constant('DIR_NAME'), '/'); + $dir_name = $app_root = ''; + if (defined('DIR_NAME')) + $dir_name = trim(constant('DIR_NAME'), '/'); if (!empty($dir_name)) $app_root = '/'.$dir_name; diff --git a/initialize.php b/initialize.php index 469d92a7b..7d469b378 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5534"); +define("APP_VERSION", "1.19.28.5535"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6b8482702e23b70f3c54f476888b7efbc7bfee1e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 20:21:07 +0000 Subject: [PATCH 2217/2515] Addressed a few more php8 warnings. --- WEB-INF/lib/ttTimeHelper.class.php | 4 +-- WEB-INF/lib/ttWeekViewHelper.class.php | 34 +++++--------------------- WEB-INF/templates/week2.tpl | 4 +-- initialize.php | 2 +- week.php | 11 ++++++--- 5 files changed, 18 insertions(+), 37 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 58f2f4222..031ccfb61 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -414,8 +414,8 @@ static function insert($fields) $org_id = $user->org_id; $date = $fields['date']; - $start = $fields['start']; - $finish = $fields['finish']; + $start = isset($fields['start']) ? $fields['start'] : null; + $finish = isset($fields['finish']) ? $fields['finish'] : null ; $duration = isset($fields['duration']) ? $fields['duration'] : null; if ($duration) { $minutes = ttTimeHelper::postedDurationToMinutes($duration); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index aee8c8d61..55e40dc18 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -1,30 +1,6 @@ get('label.day_total').':'; - + foreach($dayHeaders as $dayHeader) { + $dayTotals[$dayHeader] = 0; + } foreach ($dataArray as $row) { foreach($dayHeaders as $dayHeader) { if (array_key_exists($dayHeader, $row)) { - $minutes = ttTimeHelper::toMinutes($row[$dayHeader]['duration']); + $minutes = ttTimeHelper::toMinutes(@$row[$dayHeader]['duration']); $dayTotals[$dayHeader] += $minutes; } } diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week2.tpl index 7dbf5d1f9..99da5ef47 100644 --- a/WEB-INF/templates/week2.tpl +++ b/WEB-INF/templates/week2.tpl @@ -148,14 +148,14 @@ function fillDropdowns() { {/if} {/if} mBgColor."\" onmouseover=\"setRowBackground(this, '".$this->mBgColorOver."')\" onmouseout=\"setRowBackground(this, null)\">\n"; - for ($col = 0; $col < $this->getColumnCount(); $col++) { - if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') { - // Checkbox for the row. Determine if selected. - $selected = false; - if (is_array($this->value)) { - foreach ($this->value as $p) { - if ($p == $this->mData[$row][$this->mKeyField]) { - $selected = true; - break; + if (is_array($this->mData)) { + for ($row = 0; $row < count($this->mData); $row++) { + $html .= "\nmBgColor."\" onmouseover=\"setRowBackground(this, '".$this->mBgColorOver."')\" onmouseout=\"setRowBackground(this, null)\">\n"; + for ($col = 0; $col < $this->getColumnCount(); $col++) { + if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') { + // Checkbox for the row. Determine if selected. + $selected = false; + if (is_array($this->value)) { + foreach ($this->value as $p) { + if ($p == $this->mData[$row][$this->mKeyField]) { + $selected = true; + break; + } } } + // Render control checkbox. + $html .= $this->mColumns[$col]->renderCell($this->mData[$row][$this->mKeyField], $row, $col, $selected); + } else { + // Render regular cell. + $html .= $this->mColumns[$col]->renderCell($this->getValueAt($row, $col), $row, $col); } - // Render control checkbox. - $html .= $this->mColumns[$col]->renderCell($this->mData[$row][$this->mKeyField], $row, $col, $selected); - } else { - // Render regular cell. - $html .= $this->mColumns[$col]->renderCell($this->getValueAt($row, $col), $row, $col); } + $html .= "\n"; } - $html .= "\n"; } // Print footers. diff --git a/initialize.php b/initialize.php index 69580f622..e219033d3 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5536"); +define("APP_VERSION", "1.19.28.5537"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_edit.php b/user_edit.php index dc19ad6aa..bae837c43 100644 --- a/user_edit.php +++ b/user_edit.php @@ -37,6 +37,7 @@ } $show_projects = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); +$projects = array(); if ($show_projects) { $projects = ttGroupHelper::getActiveProjects(); if (count($projects) == 0) $show_projects = false; From cc0928bf1d0b319a42359b44743d04eaaa0fdd05 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 13:20:39 +0000 Subject: [PATCH 2219/2515] Addressed a couple more of php8 issues. --- WEB-INF/lib/form/DateField.class.php | 28 ++-------------------------- initialize.php | 2 +- password_reset.php | 5 ++++- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index f5d6f8f73..922e8bf5e 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -1,30 +1,6 @@ setCharSet(CHARSET); $mailer->setSender(SENDER); $mailer->setReceiver("$receiver"); + $secure_connection = false; if ((!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off')) || ($_SERVER['SERVER_PORT'] == 443)) $secure_connection = true; if($secure_connection) @@ -85,7 +86,9 @@ $cl_subject = $user_i18n->get('form.reset_password.email_subject'); - $dir_name = trim(@constant('DIR_NAME'), '/'); + $dir_name = $app_root = ''; + if (defined('DIR_NAME')) + $dir_name = trim(constant('DIR_NAME'), '/'); if (!empty($dir_name)) $app_root = '/'.$dir_name; From 8e469a82a605b16607d1deca358ba698db4bc165 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 13:46:44 +0000 Subject: [PATCH 2220/2515] Removed no longer used template files. --- WEB-INF/templates/header.tpl | 211 ------------------------ WEB-INF/templates/index.tpl | 5 - WEB-INF/templates/{ => work}/footer.tpl | 1 + WEB-INF/templates/work/index.tpl | 2 +- initialize.php | 2 +- 5 files changed, 3 insertions(+), 218 deletions(-) delete mode 100644 WEB-INF/templates/header.tpl delete mode 100644 WEB-INF/templates/index.tpl rename WEB-INF/templates/{ => work}/footer.tpl (99%) diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl deleted file mode 100644 index 29ec892d3..000000000 --- a/WEB-INF/templates/header.tpl +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - -{if (isset($i18n.language.rtl) && $i18n.language.rtl)} - -{/if} -{if $user->getCustomCss()} - -{/if} - Time Tracker{if $title} - {$title}{/if} - - - - - - - -{assign var="tab_width" value="700"} - -
 Anuko Time Tracker 1.17.14.3976 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3977 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 00d11eaffd41616d9c4b003cc576b55187a9cf8c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 16:03:52 +0000 Subject: [PATCH 0518/2515] More improvements in Italian translation. --- WEB-INF/resources/it.lang.php | 47 ++++++++++++++++------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index e17086a3e..d4104c0a9 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -217,28 +217,25 @@ // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. // Compare with English file to see how it is done there and do Italian titles similarly. 'title.login' => 'Login', -// TODO: translate the following. -// 'title.teams' => 'Teams', -// 'title.create_team' => 'Creating Team', -// 'title.edit_team' => 'Editing Team', -'title.delete_team' => 'Elimina team', -// TODO: translate the following. -// 'title.reset_password' => 'Resetting Password', -// 'title.change_password' => 'Changing Password', -// 'title.time' => 'Time', -// 'title.edit_time_record' => 'Editing Time Record', -// 'title.delete_time_record' => 'Deleting Time Record', +'title.teams' => 'Gruppi', +'title.create_team' => 'Creazione gruppo', +'title.edit_team' => 'Modifica gruppo', +'title.delete_team' => 'Elimina gruppo', +'title.reset_password' => 'Reset password', +'title.change_password' => 'Cambio password', +'title.time' => 'Tempo', +'title.edit_time_record' => 'Modifica record temporale', +'title.delete_time_record' => 'Eliminazione record temporale', 'title.expenses' => 'Spese', -// TODO: translate the following. -// 'title.edit_expense' => 'Editing Expense Item', -// 'title.delete_expense' => 'Deleting Expense Item', -// 'title.predefined_expenses' => 'Predefined Expenses', -// 'title.add_predefined_expense' => 'Adding Predefined Expense', -// 'title.edit_predefined_expense' => 'Editing Predefined Expense', -// 'title.delete_predefined_expense' => 'Deleting Predefined Expense', -// 'title.reports' => 'Reports', -// 'title.report' => 'Report', -// 'title.send_report' => 'Sending Report', +'title.edit_expense' => 'Modifica voce di spesa', +'title.delete_expense' => 'Eliminezione voce di spesa', +'title.predefined_expenses' => 'Spese predefinite', +'title.add_predefined_expense' => 'Aggiunta spese predefinite', +'title.edit_predefined_expense' => 'Modifica spese predefinite', +'title.delete_predefined_expense' => 'Eliminazione spese predefinite', +'title.reports' => 'Rapporti', +'title.report' => 'Rapporto', +'title.send_report' => 'Invio Rapporto', 'title.invoice' => 'Fattura', 'title.send_invoice' => 'Invia fattura', 'title.charts' => 'Grafici', @@ -246,10 +243,10 @@ 'title.add_project' => 'Aggiungi progetto', 'title.edit_project' => 'Modifica progetto', 'title.delete_project' => 'Elimina progetto', -// 'title.tasks' => 'Tasks', -// 'title.add_task' => 'Adding Task', -// 'title.edit_task' => 'Editing Task', -// 'title.delete_task' => 'Deleting Task', +'title.tasks' => 'Compiti', +'title.add_task' => 'Aggiungi compito', // TODO: is this correct? +'title.edit_task' => 'Modifica compito', +'title.delete_task' => 'Eliminazione compito', 'title.users' => 'Utenti', 'title.add_user' => 'Crea utente', 'title.edit_user' => 'Modifica utente', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 39129bf53..eb8864d42 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} {if $show_week_note} - + - - + + {/if}
 Anuko Time Tracker 1.17.14.3977 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3978 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From a7e4eb9d02d8cc9eb46fa0a2bb3afd24ddeb7507 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 18:02:08 +0000 Subject: [PATCH 0519/2515] More improvements in Italian translation. --- WEB-INF/resources/it.lang.php | 43 +++++++++++++++++------------------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index d4104c0a9..739dc7fb2 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -216,6 +216,7 @@ // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. // Compare with English file to see how it is done there and do Italian titles similarly. +// Specifically: Eliminazione vs Elimina - we probably want nouns in titles. 'title.login' => 'Login', 'title.teams' => 'Gruppi', 'title.create_team' => 'Creazione gruppo', @@ -256,32 +257,30 @@ 'title.edit_client' => 'Modifica cliente', 'title.delete_client' => 'Elimina cliente', 'title.invoices' => 'Fatture', -// TODO: translate the following. -// 'title.add_invoice' => 'Adding Invoice', -// 'title.view_invoice' => 'Viewing Invoice', -// 'title.delete_invoice' => 'Deleting Invoice', -// 'title.notifications' => 'Notifications', -// 'title.add_notification' => 'Adding Notification', -// 'title.edit_notification' => 'Editing Notification', -// 'title.delete_notification' => 'Deleting Notification', -// 'title.monthly_quotas' => 'Monthly Quotas', -'title.export' => 'Esporta i dati del team', -'title.import' => 'Importa i dati del team', +'title.add_invoice' => 'Aggiunta fattura', +'title.view_invoice' => 'Visualizzazione fattura', +'title.delete_invoice' => 'Eliminazione fattura', +'title.notifications' => 'Notifiche', +'title.add_notification' => 'Aggiunta notifica', +'title.edit_notification' => 'Modifica notifica', +'title.delete_notification' => 'Eliminazione notifica', +'title.monthly_quotas' => 'Quote mensili', +'title.export' => 'Esporta i dati del gruppo', +'title.import' => 'Importa i dati del gruppo', 'title.options' => 'Opzioni', 'title.profile' => 'Profilo', -// TODO: translate the following. -// 'title.cf_custom_fields' => 'Custom Fields', -// 'title.cf_add_custom_field' => 'Adding Custom Field', -// 'title.cf_edit_custom_field' => 'Editing Custom Field', -// 'title.cf_delete_custom_field' => 'Deleting Custom Field', -// 'title.cf_dropdown_options' => 'Dropdown Options', -// 'title.cf_add_dropdown_option' => 'Adding Option', -// 'title.cf_edit_dropdown_option' => 'Editing Option', -// 'title.cf_delete_dropdown_option' => 'Deleting Option', +'title.cf_custom_fields' => 'Campi personalizzati', +'title.cf_add_custom_field' => 'Aggiunta campo personalizzato', +'title.cf_edit_custom_field' => 'Modifica campo personalizzato', +'title.cf_delete_custom_field' => 'Eliminazione campo personalizzato', +'title.cf_dropdown_options' => 'Opzioni menu di scelta', +'title.cf_add_dropdown_option' => 'Aggiunta opzione', +'title.cf_edit_dropdown_option' => 'Modifica opzione', +'title.cf_delete_dropdown_option' => 'Eliminazione opzione', // NOTE TO TRANSLATORS: Locking is a feature to lock records from modifications (ex: weekly on Mondays we lock all previous weeks). // It is also a name for the Locking plugin on the Team profile page. -// 'title.locking' => 'Locking', -// 'title.week_view' => 'Week View', +'title.locking' => 'Bloccaggio', +'title.week_view' => 'Vista settimanale', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index eb8864d42..9d5e10d75 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} +{if $show_invoice_dropdown} + + + + + + +{/if} {if $show_paid_status} @@ -294,6 +302,22 @@ License: See license.txt *} {/if} +{if $show_approved} + + + + + + +{/if} +{if $show_timesheet_dropdown} + + + + + + +{/if}
 Anuko Time Tracker 1.17.14.3978 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3979 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From bc70f847bb7a39697a704591b7bf8f8421791b09 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 18:25:37 +0000 Subject: [PATCH 0520/2515] More improvements in Italian file. --- WEB-INF/resources/ca.lang.php | 2 +- WEB-INF/resources/cs.lang.php | 2 +- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 2 +- WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 21 ++++++++------------- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 +- WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 +- WEB-INF/resources/sv.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 2 +- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- expenses.php | 2 +- 31 files changed, 38 insertions(+), 43 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index e7085ba7f..0be2f1f40 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -355,7 +355,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Ha oblidat la seva paraula de pas?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'S\\\'ha enviat la petició de restablir paraula de pas.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index ee5a92389..802bf2504 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -366,7 +366,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zapomenuté heslo?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zaslán požadavek k vymazání hesla.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index b3205646c..ac7d11f98 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -315,7 +315,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Har du glemt din adgangskode?', -'form.login.about' =>'Anuko Time Tracker er et nemt, let at bruge, open source tidsregistrerings system.', +'form.login.about' => 'Anuko Time Tracker er et nemt, let at bruge, open source tidsregistrerings system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Nulstilling af adgangskode er sendt på email.', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index d6958825d..db02fb08a 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -309,7 +309,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Passwort vergessen?', -'form.login.about' =>'Anuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source Zeiterfassungssystem.', +'form.login.about' => 'Anuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source Zeiterfassungssystem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Anfrage zur Zurücksetzung des Passwortes wurde per E-mail gesendet.', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 1009a0f4a..c12a66d2a 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -313,7 +313,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Forgot password?', -'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Password reset request sent by email.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 57139b008..fa89d9c86 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -361,7 +361,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '¿Olvido su contraseña?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: check / improve translation of form.reset_password.message. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 2ff634e24..44ff442da 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -362,7 +362,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Unustasid salasõna?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasõna tühjendamise käsk edastatud.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 80193ce70..e49627f30 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -337,7 +337,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'بازیابی رمز عبور؟', // TODO: translate form.login.about. -'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'درخواست بازیابی رمزعبور به ایمیل فرستاده شد.', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index e340d886b..8f03d5b06 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -320,7 +320,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Salasana unohtunut?', -'form.login.about' =>'Anuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto.', +'form.login.about' => 'Anuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasanan nollauspyyntöviesti lähetetty.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index d2ca6cd1a..8631202d9 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -312,7 +312,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Mot de passe oublié?', -'form.login.about' =>'Anuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser.', +'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Une demande de réinitialisation du mot de passe a été envoyé par courriel.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index bd2c59803..55d6e8673 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -344,7 +344,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'שכחת סיסמה?', -'form.login.about' =>'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', +'form.login.about' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'הבקשה לאיפוס בסיסמה נשלחה בדואר אלקטרוני.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b8ea9539e..7c824b877 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -360,7 +360,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Elfelejtetted a jelszót?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 739dc7fb2..0fc48dd99 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -296,24 +296,20 @@ 'dropdown.previous_month' => 'mese scorso', 'dropdown.selected_month' => 'mese', 'dropdown.current_year' => 'quest\\\'anno', -// TODO: translate the following. -// 'dropdown.previous_year' => 'previous year', +'dropdown.previous_year' => 'anno precedente', 'dropdown.selected_year' => 'anno', 'dropdown.all_time' => 'tutto il tempo', 'dropdown.projects' => 'progetti', -// TODO: translate the following. -// 'dropdown.tasks' => 'tasks', +'dropdown.tasks' => 'compiti', 'dropdown.clients' => 'clienti', -// TODO: translate the following. -// 'dropdown.select' => '--- select ---', +'dropdown.select' => '--- seleziona ---', 'dropdown.select_invoice' => '--- seleziona la fattura ---', 'dropdown.status_active' => 'attivo', 'dropdown.status_inactive' => 'inattivo', -// TODO: translate the following. -// 'dropdown.delete' => 'delete', -// 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.paid' => 'paid', -// 'dropdown.not_paid' => 'not paid', +'dropdown.delete' => 'elimina', +'dropdown.do_not_delete' => 'non eliminare', +'dropdown.paid' => 'pagato', +'dropdown.not_paid' => 'non pagato', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases @@ -322,8 +318,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Password dimenticata?', -// TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' => 'Anuko Time Tracker è un sistema semplice e open source per registrare i tempi di lavoro.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: improve form.reset_password.message by specifying that it was sent "by email". diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 292d844bd..fc4208773 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -354,7 +354,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'パスワードを忘れましたか?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 323607f2b..680b01c4d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -359,7 +359,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '암호를 잊으셨습니까?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index aabb7ad75..e96e808fd 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -313,7 +313,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Wachtwoord vergeten?', -'form.login.about' =>'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem.', +'form.login.about' => 'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Het verzoek om het wachtwoord te herstellen is verzonden per email.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b8b9bc3b1..8c23797ca 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -354,7 +354,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glemt passordet?', -'form.login.about' =>'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', +'form.login.about' => 'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index ae6126a3f..5f8e81564 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -323,7 +323,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Nie pamiętasz hasła?', -'form.login.about' =>'Anuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym systemem śledzenia czasu.', +'form.login.about' => 'Anuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym systemem śledzenia czasu.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Instrukcje zmiany hasła zostały wysłane na adres e-mail połączony z kontem.', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index df75ffa2a..9df35fc40 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -318,7 +318,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', -'form.login.about' =>'Anuko Time Tracker é um sistema, simples, de fácil uso, de código aberto, de rastreamento do tempo.', +'form.login.about' => 'Anuko Time Tracker é um sistema, simples, de fácil uso, de código aberto, de rastreamento do tempo.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Pedido para resetar a senha enviado por e-mail.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 852f1987f..76586191f 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -344,7 +344,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 7277bcdfe..129473eb9 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -364,7 +364,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parola pierduta?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 74a7f1423..2f22c81bb 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -311,7 +311,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Забыли пароль?', -'form.login.about' =>'Anuko Time Tracker - это открытая (open source), простая и лёгкая в использовании система трекинга рабочего времени.', +'form.login.about' => 'Anuko Time Tracker - это открытая (open source), простая и лёгкая в использовании система трекинга рабочего времени.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Запрос на сброс пароля отослан по e-mail.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index aa6b48c6d..afa7950ce 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -336,7 +336,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zabudnuté heslo?', -'form.login.about' =>'Anuko Time Tracker je jednoduchý a ľahko použiteľný systém na sledovanie času s otvoreným zdrojovým kódom.', +'form.login.about' => 'Anuko Time Tracker je jednoduchý a ľahko použiteľný systém na sledovanie času s otvoreným zdrojovým kódom.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Žiadosť o obnovenie hesla bola odoslaná e-mailom.', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index c9f69a1ea..e9f5d12d1 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -340,7 +340,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. // TODO: translate the following. // 'form.login.forgot_password' => 'Forgot password?', -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahteva za razveljavitev gesla je bila poslana.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 2d3f82c13..7b49b760f 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -321,7 +321,7 @@ // Forma prijave. Pogledajte primer na https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zaboravili ste lozinku?', -'form.login.about' =>'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', +'form.login.about' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', // Izmena forme za lozinku. Pogledajte primer na https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahtev za izmenu lozinke je poslat mejlom.', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index ac9cba05b..5040974c2 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -320,7 +320,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glömt lösenordet?', -'form.login.about' =>'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', +'form.login.about' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Begäran om att återställa lösenordet skickades via e-post.', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index fe4888022..25faa91bd 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -371,7 +371,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parolanızı unuttunuz mu?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index bc08f8a44..c2f7cd680 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -344,7 +344,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘记密码?', -'form.login.about' =>'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', +'form.login.about' => 'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密码重设请求已经发送。', // TODO: Add "by email" to match the English string. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 09a49e997..a9c842c3f 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -353,7 +353,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘記密碼?', // TODO: translate the following. -// 'form.login.about' =>'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密碼重設請求已經發送。', // TODO: Add "by email" to match the English string. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9d5e10d75..cc243dbab 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.14.3979 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3980 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/expenses.php b/expenses.php index 8db286537..2d1c53064 100644 --- a/expenses.php +++ b/expenses.php @@ -155,7 +155,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { if (!$cl_project) $err->add($i18n->getKey('error.project')); } - if (!ttValidString($cl_item_name)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.item')); + if (!ttValidString($cl_item_name)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.comment')); if (!ttValidFloat($cl_cost)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cost')); // Prohibit creating entries in future. From 376e864381d36df99d302af980d848adab585d46 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 18:56:23 +0000 Subject: [PATCH 0521/2515] More improvements in Italian translation. --- WEB-INF/resources/it.lang.php | 85 ++++++++++++++--------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 34 insertions(+), 53 deletions(-) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 0fc48dd99..2172f03c5 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -321,41 +321,33 @@ 'form.login.about' => 'Anuko Time Tracker è un sistema semplice e open source per registrare i tempi di lavoro.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. -// TODO: improve form.reset_password.message by specifying that it was sent "by email". -// English form: 'form.reset_password.message' => 'Password reset request sent by email.', -'form.reset_password.message' => 'Richiesta di reset pasword inviata.', -// TODO: translate the following. -// 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone, possibly you, requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.message' => 'Richiesta di reset password inviata via mail.', +'form.reset_password.email_subject' => 'Richiesta reset password per Anuko Time Tracker', +'form.reset_password.email_body' => "Caro utente,\n\n qualcuno, speriamo tu, ha richiesto di reimpostare la tua password per Anuko Time Tracker. Per favore visita questo link per reimpostare la tua password.\n\n%s\n\nAnuko Time Tracker è un sistema semplice e open source per registrare i tempi di lavoro. Visita https://www.anuko.com per maggiori informazioni.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. -// TODO: translate the following. -// 'form.change_password.tip' => 'Type new password and click on Save.', +'form.change_password.tip' => 'Digita una nuova password e clicca su Salva.', // Time form. See example at https://timetracker.anuko.com/time.php. -// TODO: translate the following. -// 'form.time.duration_format' => '(hh:mm or 0.0h)', +'form.time.duration_format' => '(oo:mm o 0.0h)', 'form.time.billable' => 'Fatturabile', -// TODO: translate the following. -// 'form.time.uncompleted' => 'Uncompleted', -// 'form.time.remaining_quota' => 'Remaining quota', -// 'form.time.over_quota' => 'Over quota', +'form.time.uncompleted' => 'Incompleti', +'form.time.remaining_quota' => 'Quota rimanente', +'form.time.over_quota' => 'Sopra quota', // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record). 'form.time_edit.uncompleted' => 'Questo record è stato salvato con la sola ora di inzio attività. Non è un errore.', // Week view form. See example at https://timetracker.anuko.com/week.php. -// TODO: translate the following. -// 'form.week.new_entry' => 'New entry', +'form.week.new_entry' => 'Nuova voce', // Reports form. See example at https://timetracker.anuko.com/reports.php -// TODO: translate the following. 'form.reports.save_as_favorite' => 'Salva nei preferiti', 'form.reports.confirm_delete' => 'Sei sicuro di voler cancellare questo report dai preferiti?', 'form.reports.include_billable' => 'fatturabile', 'form.reports.include_not_billable' => 'non fatturabile', -// 'form.reports.include_invoiced' => 'invoiced', -// 'form.reports.include_not_invoiced' => 'not invoiced', +'form.reports.include_invoiced' => 'fatturato', +'form.reports.include_not_invoiced' => 'non fatturato', 'form.reports.select_period' => 'Seleziona il periodo di tempo', 'form.reports.set_period' => 'oppure setta le date', 'form.reports.show_fields' => 'Mostra i campi', @@ -365,15 +357,13 @@ 'form.reports.group_by_user' => 'utente', 'form.reports.group_by_client' => 'cliente', 'form.reports.group_by_project' => 'progetto', -// TODO: translate the following. -// 'form.reports.group_by_task' => 'task', +'form.reports.group_by_task' => 'compito', 'form.reports.totals_only' => 'Solo i totali', // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Esporta', -// TODO: translate the following. -// 'form.report.assign_to_invoice' => 'Assign to invoice', +'form.report.assign_to_invoice' => 'Assegna alla fattura', // Invoice form. See example at https://timetracker.anuko.com/invoice.php // (you can get to this form after generating a report). @@ -381,57 +371,48 @@ 'form.invoice.person' => 'Persona', // Deleting Invoice form. See example at https://timetracker.anuko.com/invoice_delete.php -// TODO: translate the following. -// 'form.invoice.invoice_to_delete' => 'Invoice to delete', -// 'form.invoice.invoice_entries' => 'Invoice entries', -// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.', +'form.invoice.invoice_to_delete' => 'Fattura da eliminare', +'form.invoice.invoice_entries' => 'Voci fattura', +'form.invoice.confirm_deleting_entries' => 'Per favore conferma di voler eliminare le voci fattura da Time Tracker.', // Charts form. See example at https://timetracker.anuko.com/charts.php -// TODO: translate the following. -// 'form.charts.interval' => 'Interval', +'form.charts.interval' => 'Intervallo', 'form.charts.chart' => 'Grafico', // Projects form. See example at https://timetracker.anuko.com/projects.php -// TODO: translate the following. -//'form.projects.active_projects' => 'Active Projects', -// 'form.projects.inactive_projects' => 'Inactive Projects', +'form.projects.active_projects' => 'Progetti attivi', +'form.projects.inactive_projects' => 'Progetti inattivi', // Tasks form. See example at https://timetracker.anuko.com/tasks.php -// TODO: translate the following. -// 'form.tasks.active_tasks' => 'Active Tasks', -// 'form.tasks.inactive_tasks' => 'Inactive Tasks', +'form.tasks.active_tasks' => 'Compiti attivi', +'form.tasks.inactive_tasks' => 'Compiti inattivi', // Users form. See example at https://timetracker.anuko.com/users.php -// TODO: translate the following. -// 'form.users.active_users' => 'Active Users', -// 'form.users.inactive_users' => 'Inactive Users', -// 'form.users.uncompleted_entry' => 'User has an uncompleted time entry', -// 'form.users.role' => 'Role', +'form.users.active_users' => 'Utenti attivi', +'form.users.inactive_users' => 'Utenti inattivi', +'form.users.uncompleted_entry' => 'Questo utente ha un record temporale incompleto', +'form.users.role' => 'Ruolo', 'form.users.manager' => 'Manager', 'form.users.comanager' => 'Co-manager', 'form.users.rate' => 'Costo', 'form.users.default_rate' => 'Costo per ora di default', // Clients form. See example at https://timetracker.anuko.com/clients.php -// TODO: translate the following. -// 'form.clients.active_clients' => 'Active Clients', -// 'form.clients.inactive_clients' => 'Inactive Clients', +'form.clients.active_clients' => 'Clienti attivi', +'form.clients.inactive_clients' => 'Clienti inattivi', // Deleting Client form. See example at https://timetracker.anuko.com/client_delete.php -// TODO: translate the following. -// 'form.client.client_to_delete' => 'Client to delete', -// 'form.client.client_entries' => 'Client entries', +'form.client.client_to_delete' => 'Client da eliminare', +'form.client.client_entries' => 'Voci client', // Exporting Team Data form. See example at https://timetracker.anuko.com/export.php -// TODO: translate the following. -'form.export.hint' => 'Puoi esporate tutti i dati dei team in un file xml. Questo può essere utile se devi trasferire i dati da un server ad un altro.', +'form.export.hint' => 'Puoi esporate tutti i dati dei gruppo in un file xml. Questo può essere utile se devi trasferire i dati da un server ad un altro.', 'form.export.compression' => 'Compressione', -// TODO: translate the following. -// 'form.export.compression_none' => 'none', -// 'form.export.compression_bzip' => 'bzip', +'form.export.compression_none' => 'niente', +'form.export.compression_bzip' => 'bzip', // Importing Team Data form. See example at https://timetracker.anuko.com/imort.php (login as admin first). -'form.import.hint' => 'Importa i dati del team da un file xml.', +'form.import.hint' => 'Importa i dati del gruppo da un file xml.', 'form.import.file' => 'Seleziona il file', 'form.import.success' => 'Importazione eseguita con successo.', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index cc243dbab..3c24d34fa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.14.3980 | Copyright © Anuko | +  Anuko Time Tracker 1.17.14.3981 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 1686202ead3df740ac8d2d9e17d57988cd18b103 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 20:56:37 +0000 Subject: [PATCH 0522/2515] Finished integrating improvements in Italian translation. --- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/it.lang.php | 49 +++++++++++++++----------------- WEB-INF/resources/pl.lang.php | 4 +-- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 +- WEB-INF/resources/sv.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 16 files changed, 39 insertions(+), 42 deletions(-) diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index ac7d11f98..12873ffe8 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -417,7 +417,7 @@ 'form.import.success' => 'Import sluttede med succes.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Opret et nyt team ved at oprette en ny teamadministrator konto.
Du kan også importere teamdata fra en xml-fil fra en anden Anuko Time Tracker-server (eksisterende brugernavne er ikke tilladt).', +'form.teams.hint' => 'Opret et nyt team ved at oprette en ny teamadministrator konto.
Du kan også importere teamdata fra en xml-fil fra en anden Anuko Time Tracker-server (eksisterende brugernavne er ikke tilladt).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 timers', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index db02fb08a..523153612 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -220,7 +220,7 @@ 'title.delete_team' => 'Team löschen', 'title.reset_password' => 'Passworterinnerung', 'title.change_password' => 'Passwortänderung', -'title.time' => 'Meine Zeiten', +'title.time' => 'Zeiten', 'title.edit_time_record' => 'Bearbeiten des Stundeneintrags', 'title.delete_time_record' => 'Eintrag löschen', 'title.expenses' => 'Kosten', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index c12a66d2a..78d32ecb0 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -412,7 +412,7 @@ 'form.import.success' => 'Import completed successfully.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 hours', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 44ff442da..35806dd0d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -481,7 +481,7 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. // TODO: translate the following. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index e49627f30..1ef2f4bf0 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -446,7 +446,7 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate form.teams.hint. -'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ساعت', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 8f03d5b06..479cbf6bd 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -424,7 +424,7 @@ 'form.import.success' => 'Tietojen tuonti onnistui.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Luo uusi tiimi luomalla ensin tiimin esimiehen käyttäjätili.
Tiimin tiedot voi myös tuoda toiselta Anuko Time Tracker -palvelimelta xml-muodossa (käyttäjänimien oltava uusia).', +'form.teams.hint' => 'Luo uusi tiimi luomalla ensin tiimin esimiehen käyttäjätili.
Tiimin tiedot voi myös tuoda toiselta Anuko Time Tracker -palvelimelta xml-muodossa (käyttäjänimien oltava uusia).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-tuntinen', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 8631202d9..05f4b2591 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -295,7 +295,7 @@ 'dropdown.projects' => 'Projets', 'dropdown.tasks' => 'Tâches', 'dropdown.clients' => 'Clients', -'dropdown.select' => '--- sélectionnez ---', +'dropdown.select' => '--- sélectionnez ---', 'dropdown.select_invoice' => '--- selectionnez facture ---', 'dropdown.status_active' => 'actif', 'dropdown.status_inactive' => 'inactif', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 2172f03c5..97639927d 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -417,40 +417,37 @@ 'form.import.success' => 'Importazione eseguita con successo.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -// TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +'form.teams.hint' => 'Crea un nuovo gruppo creando un account gruppo manager.
Puoi anche importare i dati di un team da un file xml esportato da un altro server Anuko Time Tracker (non sono ammessi login duplicati).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. -// TODO: translate the following. -// 'form.profile.12_hours' => '12 hours', -// 'form.profile.24_hours' => '24 hours', -// 'form.profile.tracking_mode' => 'Tracking mode', -// 'form.profile.mode_time' => 'time', -// 'form.profile.mode_projects' => 'projects', -// 'form.profile.mode_projects_and_tasks' => 'projects and tasks', -// 'form.profile.record_type' => 'Record type', -// 'form.profile.type_all' => 'all', -// 'form.profile.type_start_finish' => 'start and finish', -// 'form.profile.type_duration' => 'duration', -// 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', +'form.profile.12_hours' => '12 ore', +'form.profile.24_hours' => '24 ore', +'form.profile.tracking_mode' => 'Modalità di registrazione', +'form.profile.mode_time' => 'tempo', +'form.profile.mode_projects' => 'progetti', +'form.profile.mode_projects_and_tasks' => 'progetti e compiti', +'form.profile.record_type' => 'Tipo di record', +'form.profile.type_all' => 'tutto', +'form.profile.type_start_finish' => 'inizio e fine', +'form.profile.type_duration' => 'durata', +'form.profile.uncompleted_indicators' => 'Indicatori incompleti', +'form.profile.uncompleted_indicators_none' => 'non mostrare', +'form.profile.uncompleted_indicators_show' => 'mostra', +// TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps? // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. -// TODO: translate the following. 'form.mail.from' => 'Da', 'form.mail.to' => 'A', -// 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', -// 'form.mail.report_sent' => 'Report sent.', +'form.mail.report_subject' => 'Rapporto Time Tracker', +'form.mail.footer' => 'Anuko Time Tracker è un sistema semplice e open source
per registrare i tempi di lavoro. Visita www.anuko.com per maggiori informazioni.', +'form.mail.report_sent' => 'Rapporto inviato.', 'form.mail.invoice_sent' => 'Fattura inviata.', // Quotas configuration form. -// TODO: translate the following. -// 'form.quota.year' => 'Year', -// 'form.quota.month' => 'Month', -// 'form.quota.quota' => 'Quota', -// 'form.quota.workday_hours' => 'Hours in work day', -// 'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.', +'form.quota.year' => 'Anno', +'form.quota.month' => 'Mese', +'form.quota.quota' => 'Quota', +'form.quota.workday_hours' => 'Ore lavorative in un giorno', +'form.quota.hint' => 'Se i valori sono vuoti, le quote vengono calcolate automaticamente basandosi su ore giornaliere e vacanze.', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 5f8e81564..5ef7b6011 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -322,7 +322,7 @@ // Strings that are used on multiple unrelated forms should be placed in shared sections such as label., etc. // Login form. See example at https://timetracker.anuko.com/login.php. -'form.login.forgot_password' => 'Nie pamiętasz hasła?', +'form.login.forgot_password' => 'Nie pamiętasz hasła?', 'form.login.about' => 'Anuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym systemem śledzenia czasu.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. @@ -427,7 +427,7 @@ 'form.import.success' => 'Import zakończony powodzeniem.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Załóż nowy zespół najpierw tworząc konto managera.
Możesz także zaimportować plik xml z danymi zespołu z innego serwera Anuko Time Tracker (nazwy loginów nie mogą się powtarzać).', +'form.teams.hint' => 'Załóż nowy zespół najpierw tworząc konto managera.
Możesz także zaimportować plik xml z danymi zespołu z innego serwera Anuko Time Tracker (nazwy loginów nie mogą się powtarzać).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 godzin', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 9df35fc40..387abe059 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -422,7 +422,7 @@ 'form.import.success' => 'Importação realizada com sucesso.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Crie uma nova equipe fazendo uma nova conta de gerente.
você também pode importar os dados de um arquivo xml de outro servidor Anuko Time Tracker (não havendo colisão de usuários).', +'form.teams.hint' => 'Crie uma nova equipe fazendo uma nova conta de gerente.
você também pode importar os dados de um arquivo xml de outro servidor Anuko Time Tracker (não havendo colisão de usuários).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 horas', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 76586191f..2084757c7 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -461,7 +461,7 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. // TODO: translate the following. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index afa7950ce..a2bd1b17a 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -443,7 +443,7 @@ 'form.import.success' => 'Import úspešne dokončený.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Pomocou vytvorenia nového účtu tímového manažéra vytvorte nový tím.
Taktiež môžete importovať údaje o tíme z xml súboru z iného Anuko Time Tracker serveru (nie sú povolené kolízie v prihlasovacom mene).', +'form.teams.hint' => 'Pomocou vytvorenia nového účtu tímového manažéra vytvorte nový tím.
Taktiež môžete importovať údaje o tíme z xml súboru z iného Anuko Time Tracker serveru (nie sú povolené kolízie v prihlasovacom mene).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-hodinový', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index e9f5d12d1..27fd0c3b3 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -457,7 +457,7 @@ // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). // TODO: translate the following. -// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', +// 'form.teams.hint' => 'Create a new team by creating a new team manager account.
You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 7b49b760f..c3353baa0 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -425,7 +425,7 @@ 'form.import.success' => 'Uvoz uspešan.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Napravite novi tim. Počnite sa otvaranjem naloga za Menadžera.
Takođe možete uvoziti podatke iz xml fajla sa drugog Anuko Time Tracker server-a (dupliranje prijava nisu dozvoljeni).', +'form.teams.hint' => 'Napravite novi tim. Počnite sa otvaranjem naloga za Menadžera.
Takođe možete uvoziti podatke iz xml fajla sa drugog Anuko Time Tracker server-a (dupliranje prijava nisu dozvoljeni).', // Forma profila. Pogledajte primer na at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 časova', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 5040974c2..12d8c10cb 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -422,7 +422,7 @@ 'form.import.success' => 'Importeringen lyckades utan problem.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Skapa en ny arbetsgrupp genom att skapa ett konto för en ansvarig person. Du kan även importera arbetsgrupper från en tidigare installation av Anuko Time Tracker via en XML-fil. Se till att inga användarnamn krockar när filen importeras.', +'form.teams.hint' => 'Skapa en ny arbetsgrupp genom att skapa ett konto för en ansvarig person. Du kan även importera arbetsgrupper från en tidigare installation av Anuko Time Tracker via en XML-fil. Se till att inga användarnamn krockar när filen importeras.', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12-timmars', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3c24d34fa..eb7944614 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +
 Anuko Time Tracker 1.17.14.3981 | Copyright © Anuko | +  Anuko Time Tracker 1.17.15.3982 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From da93a87e5052017f10005e12c39f7d1023e013fe Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Feb 2018 20:59:12 +0000 Subject: [PATCH 0523/2515] Cosmetic. --- WEB-INF/resources/it.lang.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 97639927d..a084c7633 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -422,6 +422,8 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ore', 'form.profile.24_hours' => '24 ore', +// // TODO: translate the following. +// 'form.profile.show_holidays' => 'Show holidays', 'form.profile.tracking_mode' => 'Modalità di registrazione', 'form.profile.mode_time' => 'tempo', 'form.profile.mode_projects' => 'progetti', From bf5ddc4f34213ffe75d6d601c16148a3fe506455 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 12 Feb 2018 15:28:45 +0000 Subject: [PATCH 0524/2515] Fixed rounding errors in monthly quotas. --- WEB-INF/lib/ttTeamHelper.class.php | 6 +-- WEB-INF/lib/ttTimeHelper.class.php | 66 ++++++++++++++++++++++++++++++ WEB-INF/lib/ttUser.class.php | 8 ++-- WEB-INF/resources/it.lang.php | 4 +- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 12 ++++-- mysql.sql | 1 - plugins/MonthlyQuota.class.php | 19 ++++----- quotas.php | 17 ++++---- time.php | 4 +- 10 files changed, 103 insertions(+), 36 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index b30899638..c0baa3d8a 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -805,7 +805,7 @@ static function update($team_id, $fields) $plugins_part = ''; $config_part = ''; $lock_spec_part = ''; - $workday_hours_part = ''; + $workday_minutes_part = ''; if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); if (isset($fields['lang'])) $lang_part = ', lang = '.$mdb2->quote($fields['lang']); @@ -820,11 +820,11 @@ static function update($team_id, $fields) if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); - if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); + if (isset($fields['workday_minutes'])) $workday_minutes_part = ', workday_minutes = '.$mdb2->quote($fields['workday_minutes']); $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part - $uncompleted_indicators_part $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_hours_part where id = $team_id"; + $uncompleted_indicators_part $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_minutes_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index f5c3e9382..8c3d27b67 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -106,6 +106,72 @@ static function isValidDuration($value) { return false; } + // postedDurationToMinutes - converts a value representing a duration + // (usually enetered in a form by a user) to integer number of minutes. + // + // At the moment, we have 2 variations of duration types: + // 1) A duration within a day, such as in a time entry. + // These are less or equal to 24 hours. + // + // 2) A duration of a monthly quota, with max value of 31*24 hours. + // + // This function is generic to be used for both types. + // Other functions will be used to check for specific max values. + // + // Returns false if the value cannot be converted. + static function postedDurationToMinutes($duration) { + // Handle empty value. + if (!isset($duration) || strlen($duration) == 0) + return null; // Value is not set. Caller decides whether it is valid or not. + + // Handle whole hours. + if (preg_match('/^\d{1,3}h?$/', $duration )) { // 0 - 999, 0h - 999h + $minutes = 60 * trim($duration, 'h'); + return $minutes; + } + + // Handle a normalized duration value. + if (preg_match('/^\d{1,3}:[0-5][0-9]$/', $duration )) { // 0:00 - 999:59 + $time_array = explode(':', $duration); + $minutes = (int)@$time_array[1] + ((int)@$time_array[0]) * 60; + return $minutes; + } + + // Handle localized fractional hours. + global $user; + $localizedPattern = '/^(\d{1,3})?['.$user->decimal_mark.'][0-9]{1,4}h?$/'; + if (preg_match($localizedPattern, $duration )) { // decimal values like .5, 1.25h, ... .. 999.9999h (or with comma) + if ($user->decimal_mark == ',') + $duration = str_replace (',', '.', $duration); + + $minutes = (int)round(60 * floatval($duration)); + return $minutes; + } + + // Handle minutes. Some users enter durations like 10m (meaning 10 minutes). + if (preg_match('/^\d{1,5}m$/', $duration )) { // 0m - 99999m + $minutes = (int) trim($duration, 'm'); + return $minutes; + } + + // Everything else is not a valid duration. + return false; + } + + static function durationToMinutes($duration) { + $minutes = ttTimeHelper::postedDurationToMinutes($duration); + if (false === $minutes || $minutes > 24*60) + return false; // $duration is not valid for a day entry. + return $minutes; + } + + static function quotaToMinutes($duration) { + $minutes = ttTimeHelper::postedDurationToMinutes($duration); + if (false === $minutes || $minutes > 31*24*60) + return false; // $duration is not valid for a monthly quota. + return $minutes; + } + // validateDuration - a future replacement of the isValidDuration above. // Validates a passed in $value as a time duration string in hours and / or minutes. // Returns either a normalized duration (hh:mm) or false if $value is invalid. diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index f04b49964..b433e6ef8 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -41,7 +41,7 @@ class ttUser { var $date_format = null; // Date format. var $time_format = null; // Time format. var $week_start = 0; // Week start day. - var $show_holidays = 1; // Whether to show holidays in calendar. + var $show_holidays = 0; // Whether to show holidays in calendar. var $tracking_mode = 0; // Tracking mode. var $project_required = 0; // Whether project selection is required on time entires. var $task_required = 0; // Whether task selection is required on time entires. @@ -54,7 +54,7 @@ class ttUser { var $team = null; // Team name. var $custom_logo = 0; // Whether to use a custom logo for team. var $lock_spec = null; // Cron specification for record locking. - var $workday_hours = 8; // Number of work hours in a regular day. + var $workday_minutes = 480; // Number of work minutes in a regular day. var $rights = 0; // A mask of user rights. // Constructor. @@ -69,7 +69,7 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, t.tracking_mode, t.project_required, t.task_required, t.record_type, t.uncompleted_indicators, - t.bcc_email, t.plugins, t.config, t.lock_spec, t.workday_hours, t.custom_logo + t.bcc_email, t.plugins, t.config, t.lock_spec, t.workday_minutes, t.custom_logo FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE "; if ($id) $sql .= "u.id = $id"; @@ -106,7 +106,7 @@ function __construct($login, $id = null) { $this->currency = $val['currency']; $this->plugins = $val['plugins']; $this->lock_spec = $val['lock_spec']; - $this->workday_hours = $val['workday_hours']; + $this->workday_minutes = $val['workday_minutes']; $this->custom_logo = $val['custom_logo']; // Set user config options. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index a084c7633..04b63d888 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -115,7 +115,7 @@ 'button.reset_password' => 'Reset password', 'button.send' => 'Invia', 'button.send_by_email' => 'Invia tramite e-mail', -'button.create_team' => 'Crea team', +'button.create_team' => 'Crea gruppo', 'button.export' => 'Esporta gruppo', 'button.import' => 'Importa gruppo', 'button.close' => 'Chiudi', @@ -417,7 +417,7 @@ 'form.import.success' => 'Importazione eseguita con successo.', // Teams form. See example at https://timetracker.anuko.com/admin_teams.php (login as admin first). -'form.teams.hint' => 'Crea un nuovo gruppo creando un account gruppo manager.
Puoi anche importare i dati di un team da un file xml esportato da un altro server Anuko Time Tracker (non sono ammessi login duplicati).', +'form.teams.hint' => 'Crea un nuovo gruppo creando un account gruppo manager.
Puoi anche importare i dati di un gruppo da un file xml esportato da un altro server Anuko Time Tracker (non sono ammessi login duplicati).', // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ore', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index eb7944614..f3e02b5cd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.15.3982 | Copyright © Anuko | +  Anuko Time Tracker 1.17.15.3983 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 58467bc1c..dd3601150 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -709,7 +709,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11714"]) { + if ($_POST["convert11400to11715"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -720,6 +720,10 @@ function setChange($sql) { setChange("ALTER TABLE `tt_teams` ADD `config` text default NULL AFTER `custom_logo`"); setChange("ALTER TABLE `tt_monthly_quotas` ADD `minutes` int(11) DEFAULT NULL"); setChange("ALTER TABLE `tt_teams` ADD `workday_minutes` smallint(4) DEFAULT '480' AFTER `workday_hours`"); + setChange("UPDATE `tt_teams` SET `workday_minutes` = 60 * `workday_hours`"); + setChange("ALTER TABLE `tt_teams` DROP `workday_hours`"); + setChange("UPDATE `tt_monthly_quotas` SET `minutes` = 60 * `quota`"); + setChange("ALTER TABLE `tt_monthly_quotas` DROP `quota`"); } if ($_POST["cleanup"]) { @@ -764,7 +768,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.17.14) + Create database structure (v1.17.15)
(applies only to new installations, do not execute when updating)
@@ -800,8 +804,8 @@ function setChange($sql) {

Update database structure (v1.14 to v1.17.14)
Update database structure (v1.14 to v1.17.15)
diff --git a/mysql.sql b/mysql.sql index dc07a1dde..d77112606 100644 --- a/mysql.sql +++ b/mysql.sql @@ -376,7 +376,6 @@ CREATE TABLE `tt_monthly_quotas` ( `team_id` int(11) NOT NULL, # team id `year` smallint(5) UNSIGNED NOT NULL, # quota year `month` tinyint(3) UNSIGNED NOT NULL, # quota month - `quota` decimal(5,2) NOT NULL, # number of work hours in specified month and year `minutes` int(11) DEFAULT NULL, # quota in minutes in specified month and year PRIMARY KEY (`team_id`,`year`,`month`) ); diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index 6e420f918..a4be6ee32 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -34,7 +34,6 @@ class MonthlyQuota { var $db; // Database connection. var $team_id; // Team id. - // Old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use __construct() in new code. function __construct() { $this->db = getConnection(); global $user; @@ -42,13 +41,12 @@ function __construct() { } // update - deletes a quota, then inserts a new one. - public function update($year, $month, $quota) { + public function update($year, $month, $minutes) { $team_id = $this->team_id; $deleteSql = "DELETE FROM tt_monthly_quotas WHERE year = $year AND month = $month AND team_id = $team_id"; $this->db->exec($deleteSql); - if ($quota){ - $float_quota = $this->quotaToFloat($quota); - $insertSql = "INSERT INTO tt_monthly_quotas (team_id, year, month, quota) values ($team_id, $year, $month, $float_quota)"; + if ($minutes){ + $insertSql = "INSERT INTO tt_monthly_quotas (team_id, year, month, minutes) values ($team_id, $year, $month, $minutes)"; $affected = $this->db->exec($insertSql); return (!is_a($affected, 'PEAR_Error')); } @@ -67,7 +65,7 @@ public function get($year, $month = null) { // getSingle - obtains a quota for a single month. private function getSingle($year, $month) { $team_id = $this->team_id; - $sql = "SELECT quota FROM tt_monthly_quotas WHERE year = $year AND month = $month AND team_id = $team_id"; + $sql = "SELECT minutes FROM tt_monthly_quotas WHERE year = $year AND month = $month AND team_id = $team_id"; $reader = $this->db->query($sql); if (is_a($reader, 'PEAR_Error')) { return false; @@ -75,19 +73,18 @@ private function getSingle($year, $month) { $row = $reader->fetchRow(); if ($row) - return $row['quota']; + return $row['minutes']; // If we did not find a record, return a calculated monthly quota. $numWorkdays = $this->getNumWorkdays($month, $year); global $user; - return $numWorkdays * $user->workday_hours; // TODO: fix a rounding issue for small values like 0:01 - // Possibly with a database field type change (minutes?). + return $numWorkdays * $user->workday_minutes; } // getMany - returns an array of quotas for a given year for team. private function getMany($year){ $team_id = $this->team_id; - $sql = "SELECT month, quota FROM tt_monthly_quotas WHERE year = $year AND team_id = $team_id"; + $sql = "SELECT month, minutes FROM tt_monthly_quotas WHERE year = $year AND team_id = $team_id"; $result = array(); $res = $this->db->query($sql); if (is_a($res, 'PEAR_Error')) { @@ -95,7 +92,7 @@ private function getMany($year){ } while ($val = $res->fetchRow()) { - $result[$val['month']] = $val['quota']; + $result[$val['month']] = $val['minutes']; } return $result; diff --git a/quotas.php b/quotas.php index d3e7912e7..15a7a49ac 100644 --- a/quotas.php +++ b/quotas.php @@ -71,12 +71,12 @@ if ($request->isPost()){ // Validate user input. - if (!ttTimeHelper::isValidDuration($request->getParameter('workdayHours'))) + if (false === ttTimeHelper::durationToMinutes($request->getParameter('workdayHours'))) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.quota.workday_hours')); for ($i = 0; $i < count($months); $i++){ $val = $request->getParameter($months[$i]); - if (!$quota->isValidQuota($val)) + if (false === ttTimeHelper::quotaToMinutes($val)) $err->add($i18n->getKey('error.field'), $months[$i]); } // Finished validating user input. @@ -84,16 +84,17 @@ if ($err->no()) { // Handle workday hours. - $hours = $quota->quotaToFloat($request->getParameter('workdayHours')); - if ($hours != $user->workday_hours) { - if (!ttTeamHelper::update($user->team_id, array('name'=>$user->team,'workday_hours'=>$hours))) + $workday_minutes = ttTimeHelper::durationToMinutes($request->getParameter('workdayHours')); + if ($workday_minutes != $user->workday_minutes) { + if (!ttTeamHelper::update($user->team_id, array('name'=>$user->team,'workday_minutes'=>$workday_minutes))) $err->add($i18n->getKey('error.db')); } // Handle monthly quotas for a selected year. $selectedYear = (int) $request->getParameter('year'); for ($i = 0; $i < count($months); $i++){ - if (!$quota->update($selectedYear, $i+1, $request->getParameter($months[$i]))) + $quota_in_minutes = ttTimeHelper::quotaToMinutes($request->getParameter($months[$i])); + if (!$quota->update($selectedYear, $i+1, $quota_in_minutes)) $err->add($i18n->getKey('error.db')); } @@ -107,7 +108,7 @@ // Get monthly quotas for the entire year. $monthsData = $quota->get($selectedYear); -$workdayHours = ttTimeHelper::toAbsDuration($user->workday_hours * 60, true); +$workdayHours = ttTimeHelper::toAbsDuration($user->workday_minutes, true); $form = new Form('monthlyQuotasForm'); $form->addInput(array('type'=>'text', 'name'=>'workdayHours', 'value'=>$workdayHours, 'style'=>'width:60px')); @@ -116,7 +117,7 @@ $value = ""; if (array_key_exists($i+1, $monthsData)){ $value = $monthsData[$i+1]; - $value = ttTimeHelper::toAbsDuration($value * 60, true); + $value = ttTimeHelper::toAbsDuration($value, true); } $name = $months[$i]; $form->addInput(array('type'=>'text','name'=>$name,'maxlength'=>6,'value'=> $value,'style'=>'width:70px')); diff --git a/time.php b/time.php index 25cee96cc..27d3cdbea 100644 --- a/time.php +++ b/time.php @@ -66,9 +66,9 @@ if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); - $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); + $month_quota_minutes = $quota->get($selected_date->mYear, $selected_date->mMonth); $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); - $minutes_left = round(60*$month_quota) - ttTimeHelper::toMinutes($month_total); + $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total); $smarty->assign('month_total', $month_total); $smarty->assign('over_quota', $minutes_left < 0); From f58cc6f6d6403f4eb01e4f6dfa4058afc927970c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 12 Feb 2018 22:39:11 +0000 Subject: [PATCH 0525/2515] Made durations like 15m legal. --- WEB-INF/lib/ttTimeHelper.class.php | 172 +++++++---------------------- WEB-INF/templates/footer.tpl | 2 +- mobile/time.php | 2 +- mobile/time_edit.php | 2 +- quotas.php | 8 +- time.php | 2 +- time_edit.php | 2 +- week.php | 7 +- 8 files changed, 51 insertions(+), 146 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 8c3d27b67..7bc5e646f 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -107,19 +107,27 @@ static function isValidDuration($value) { } // postedDurationToMinutes - converts a value representing a duration - // (usually enetered in a form by a user) to integer number of minutes. + // (usually enetered in a form by a user) to an integer number of minutes. // - // At the moment, we have 2 variations of duration types: + // Parameters: + // $duration - user entered duration string. Valid strings are: + // 3 or 3h - means 3 hours. Note: h and m letters are not localized. + // 0.25 or 0.25h or .25 or .25h - means a quarter of hour. + // 0,25 or 0,25h or ,25 or ,25h - same as above for users with comma ad decimal mark. + // 1:30 - means 1 hour 30 minutes. + // 25m - means 25 minutes. + // $max - maximum number of minutes that is valid. + // + // At the moment, we have 2 variations of duration types: // 1) A duration within a day, such as in a time entry. - // These are less or equal to 24 hours. + // These are less or equal to 24*60 minutes. // - // 2) A duration of a monthly quota, with max value of 31*24 hours. + // 2) A duration of a monthly quota, with max value of 31*24*60 minutes. // // This function is generic to be used for both types. - // Other functions will be used to check for specific max values. // // Returns false if the value cannot be converted. - static function postedDurationToMinutes($duration) { + static function postedDurationToMinutes($duration, $max = 1440) { // Handle empty value. if (!isset($duration) || strlen($duration) == 0) return null; // Value is not set. Caller decides whether it is valid or not. @@ -127,14 +135,14 @@ static function postedDurationToMinutes($duration) { // Handle whole hours. if (preg_match('/^\d{1,3}h?$/', $duration )) { // 0 - 999, 0h - 999h $minutes = 60 * trim($duration, 'h'); - return $minutes; + return $minutes > $max ? false : $minutes; } // Handle a normalized duration value. if (preg_match('/^\d{1,3}:[0-5][0-9]$/', $duration )) { // 0:00 - 999:59 $time_array = explode(':', $duration); $minutes = (int)@$time_array[1] + ((int)@$time_array[0]) * 60; - return $minutes; + return $minutes > $max ? false : $minutes; } // Handle localized fractional hours. @@ -145,142 +153,32 @@ static function postedDurationToMinutes($duration) { $duration = str_replace (',', '.', $duration); $minutes = (int)round(60 * floatval($duration)); - return $minutes; + return $minutes > $max ? false : $minutes; } // Handle minutes. Some users enter durations like 10m (meaning 10 minutes). if (preg_match('/^\d{1,5}m$/', $duration )) { // 0m - 99999m $minutes = (int) trim($duration, 'm'); - return $minutes; + return $minutes > $max ? false : $minutes; } // Everything else is not a valid duration. return false; } - static function durationToMinutes($duration) { - $minutes = ttTimeHelper::postedDurationToMinutes($duration); - if (false === $minutes || $minutes > 24*60) - return false; // $duration is not valid for a day entry. - return $minutes; - } - - static function quotaToMinutes($duration) { - $minutes = ttTimeHelper::postedDurationToMinutes($duration); - if (false === $minutes || $minutes > 31*24*60) - return false; // $duration is not valid for a monthly quota. - return $minutes; - } - - // validateDuration - a future replacement of the isValidDuration above. - // Validates a passed in $value as a time duration string in hours and / or minutes. - // Returns either a normalized duration (hh:mm) or false if $value is invalid. - // - // This is a convenience function that allows users to pass in data in a variety of formats. - // - // 3 or 3h - means 3 hours - normalized 3:00. Note: h and m letters are not localized. - // 0.25 or 0.25h or .25 or .25h - means a quarter of hour - normalized 0:15. - // 0,25 0r 0,25h or ,25 or ,25h - means the same as above for users with comma ad decimal mark. - // 1:30 - means 1 hour 30 mminutes - normalized 1:30. - // 25m - means 25 minutes - normalized 0:25. - static function validateDuration($value) { - // Handle empty value. - if (!isset($value) || strlen($value) == 0) - return false; - - // Handle whole hours. - if (preg_match('/^([0-1]{0,1}[0-9]|2[0-4])h?$/', $value )) { // 0, 1 ... 24 - $normalized = trim($value, 'h'); - $normalized .= ':00'; - return $normalized; - } - // Handle already normalized value. - if (preg_match('/^([0-1]{0,1}[0-9]|2[0-3]):?[0-5][0-9]$/', $value )) { // 0:00 - 23:59, 000 - 2359 - return $value; - } - // Handle a special case of 24:00. - if ($value == '24:00') { - return $value; - } - // Handle localized fractional hours. - global $user; - $localizedPattern = '/^([0-1]{0,1}[0-9]|2[0-3])?['.$user->decimal_mark.'][0-9]{1,4}h?$/'; - if (preg_match($localizedPattern, $value )) { // decimal values like 0.5, 1.25h, ... .. 23.9999h (or with comma) - if ($user->decimal_mark == ',') - $value = str_replace (',', '.', $value); - - $val = floatval($value); - $mins = round($val * 60); - $hours = (string)((int)($mins / 60)); - $mins = (string)($mins % 60); - if (strlen($mins) == 1) - $mins = '0' . $mins; - return $hours.':'.$mins; - } - // Handle minutes. - if (preg_match('/^\d{1,4}m$/', $value )) { // ddddm - $mins = (int) trim($value, 'm'); - if ($mins > 1440) // More minutes than an entire day could hold. - return false; - $hours = (string)((int)($mins / 60)); - $mins = (string)($mins % 60); - if (strlen($mins) == 1) - $mins = '0' . $mins; - return $hours.':'.$mins; - } - return false; - } - - // normalizeDuration - converts a valid time duration string to format 00:00. - static function normalizeDuration($value, $leadingZero = true) { - $time_value = $value; - - // If we have a decimal format - convert to time format 00:00. - global $user; - if ($user->decimal_mark == ',') - $time_value = str_replace (',', '.', $time_value); - - if((strpos($time_value, '.') !== false) || (strpos($time_value, 'h') !== false)) { - $val = floatval($time_value); - $mins = round($val * 60); - $hours = (string)((int)($mins / 60)); - $mins = (string)($mins % 60); - if ($leadingZero && strlen($hours) == 1) - $hours = '0'.$hours; - if (strlen($mins) == 1) - $mins = '0' . $mins; - return $hours.':'.$mins; - } - - $time_a = explode(':', $time_value); - $res = ''; - - // 0-99 - if ((strlen($time_value) >= 1) && (strlen($time_value) <= 2) && !isset($time_a[1])) { - $hours = $time_a[0]; - if ($leadingZero && strlen($hours) == 1) - $hours = '0'.$hours; - return $hours.':00'; - } - - // 000-2359 (2400) - if ((strlen($time_value) >= 3) && (strlen($time_value) <= 4) && !isset($time_a[1])) { - if (strlen($time_value)==3) $time_value = '0'.$time_value; - $hours = substr($time_value,0,2); - if ($leadingZero && strlen($hours) == 1) - $hours = '0'.$hours; - return $hours.':'.substr($time_value,2,2); - } + // minutesToDuration converts an integer number of minutes into duration string. + // Formats returned HH:MM, HHH:MM, HH, or HHH. + static function minutesToDuration($minutes, $abbreviate = false) { + if ($minutes < 0) return false; - // 0:00-23:59 (24:00) - if ((strlen($time_value) >= 4) && (strlen($time_value) <= 5) && isset($time_a[1])) { - $hours = $time_a[0]; - if ($leadingZero && strlen($hours) == 1) - $hours = '0'.$hours; - return $hours.':'.$time_a[1]; - } + $hours = (string) (int)($minutes / 60); + $mins = (string) round(fmod($minutes, 60)); + if (strlen($mins) == 1) + $mins = '0' . $mins; + if ($abbreviate && $mins == '00') + return $hours; - return $res; + return $hours.':'.$mins; } // toMinutes - converts a time string in format 00:00 to a number of minutes. @@ -496,6 +394,10 @@ static function insert($fields) $start = $fields['start']; $finish = $fields['finish']; $duration = $fields['duration']; + if ($duration) { + $minutes = ttTimeHelper::postedDurationToMinutes($duration); + $duration = ttTimeHelper::minutesToDuration($minutes); + } $client = $fields['client']; $project = $fields['project']; $task = $fields['task']; @@ -513,7 +415,6 @@ static function insert($fields) $finish = ttTimeHelper::to24HourFormat($finish); if ('00:00' == $finish) $finish = '24:00'; } - $duration = ttTimeHelper::normalizeDuration($duration); if (!$timestamp) { $timestamp = date('YmdHis'); //yyyymmddhhmmss @@ -562,6 +463,10 @@ static function update($fields) $start = $fields['start']; $finish = $fields['finish']; $duration = $fields['duration']; + if ($duration) { + $minutes = ttTimeHelper::postedDurationToMinutes($duration); + $duration = ttTimeHelper::minutesToDuration($minutes); + } $note = $fields['note']; $billable_part = ''; @@ -576,8 +481,7 @@ static function update($fields) $start = ttTimeHelper::to24HourFormat($start); $finish = ttTimeHelper::to24HourFormat($finish); if ('00:00' == $finish) $finish = '24:00'; - $duration = ttTimeHelper::normalizeDuration($duration); - + if ($start) $duration = ''; if ($duration) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f3e02b5cd..392fdd9a1 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.15.3983 | Copyright © Anuko | +  Anuko Time Tracker 1.17.16.3984 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/time.php b/mobile/time.php index 0c634f3a5..2b1f8395b 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -218,7 +218,7 @@ $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); } } else { - if (!ttTimeHelper::isValidDuration($cl_duration)) + if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); } if (!ttValidString($cl_note, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.note')); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index dcf76211c..81337c9c2 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -242,7 +242,7 @@ $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); } } else { - if (!ttTimeHelper::isValidDuration($cl_duration)) + if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); } if (!ttValidDate($cl_date)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.date')); diff --git a/quotas.php b/quotas.php index 15a7a49ac..52d8136fc 100644 --- a/quotas.php +++ b/quotas.php @@ -71,12 +71,12 @@ if ($request->isPost()){ // Validate user input. - if (false === ttTimeHelper::durationToMinutes($request->getParameter('workdayHours'))) + if (false === ttTimeHelper::postedDurationToMinutes($request->getParameter('workdayHours'))) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.quota.workday_hours')); for ($i = 0; $i < count($months); $i++){ $val = $request->getParameter($months[$i]); - if (false === ttTimeHelper::quotaToMinutes($val)) + if (false === ttTimeHelper::postedDurationToMinutes($val, 44640/*24*60*31*/)) $err->add($i18n->getKey('error.field'), $months[$i]); } // Finished validating user input. @@ -84,7 +84,7 @@ if ($err->no()) { // Handle workday hours. - $workday_minutes = ttTimeHelper::durationToMinutes($request->getParameter('workdayHours')); + $workday_minutes = ttTimeHelper::postedDurationToMinutes($request->getParameter('workdayHours')); if ($workday_minutes != $user->workday_minutes) { if (!ttTeamHelper::update($user->team_id, array('name'=>$user->team,'workday_minutes'=>$workday_minutes))) $err->add($i18n->getKey('error.db')); @@ -93,7 +93,7 @@ // Handle monthly quotas for a selected year. $selectedYear = (int) $request->getParameter('year'); for ($i = 0; $i < count($months); $i++){ - $quota_in_minutes = ttTimeHelper::quotaToMinutes($request->getParameter($months[$i])); + $quota_in_minutes = ttTimeHelper::postedDurationToMinutes($request->getParameter($months[$i]), 44640/*24*60*31*/); if (!$quota->update($selectedYear, $i+1, $quota_in_minutes)) $err->add($i18n->getKey('error.db')); } diff --git a/time.php b/time.php index 27d3cdbea..11f95c49e 100644 --- a/time.php +++ b/time.php @@ -253,7 +253,7 @@ $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); } } else { - if (!ttTimeHelper::isValidDuration($cl_duration)) + if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); } if (!ttValidString($cl_note, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.note')); diff --git a/time_edit.php b/time_edit.php index 6628ce342..d24d7f19b 100644 --- a/time_edit.php +++ b/time_edit.php @@ -248,7 +248,7 @@ $err->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration')); } } else { - if (!ttTimeHelper::isValidDuration($cl_duration)) + if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); } if (!ttValidDate($cl_date)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.date')); diff --git a/week.php b/week.php index 44a05bdc5..194532470 100644 --- a/week.php +++ b/week.php @@ -368,11 +368,12 @@ function render(&$table, $value, $row, $column, $selected = false) { $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; // If posted value is not null, check and normalize it. if ($postedDuration) { - if (ttTimeHelper::isValidDuration($postedDuration)) { - $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero. - } else { + if (false === ttTimeHelper::postedDurationToMinutes($postedDuration)) { $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration')); $result = false; break; // Break out. Stop any further processing. + } else { + $minutes = ttTimeHelper::postedDurationToMinutes($postedDuration); + $postedDuration = ttTimeHelper::minutesToDuration($minutes); } } // Do not process if value has not changed. From a94cf5b21ee9cc76ff7dda42563444011800f462 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Feb 2018 15:24:15 +0000 Subject: [PATCH 0526/2515] Work in progress making Allow overlap configurable. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 8 +++++--- WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 30 files changed, 37 insertions(+), 4 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 0be2f1f40..df19a2cfc 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -485,6 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 802bf2504..680b28e95 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -500,6 +500,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 12873ffe8..9e56b50f2 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -432,6 +432,8 @@ 'form.profile.type_all' => 'Alle', 'form.profile.type_start_finish' => 'Start og slut', 'form.profile.type_duration' => 'Varighed', +// TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', 'form.profile.uncompleted_indicators_none' => 'Vis ikke', 'form.profile.uncompleted_indicators_show' => 'Vis', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 523153612..d3f43242b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -431,6 +431,7 @@ 'form.profile.type_start_finish' => 'Start und Ende', 'form.profile.type_duration' => 'Dauer', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', //'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 78d32ecb0..a417f62b3 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -426,6 +426,7 @@ 'form.profile.type_all' => 'all', 'form.profile.type_start_finish' => 'start and finish', 'form.profile.type_duration' => 'duration', +'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.uncompleted_indicators_none' => 'do not show', 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index fa89d9c86..c15cac5f0 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -498,6 +498,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 35806dd0d..b774f74be 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -496,6 +496,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 1ef2f4bf0..0a3a27788 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -462,6 +462,7 @@ 'form.profile.type_start_finish' => 'شروع و اتمام', 'form.profile.type_duration' => 'مدت زمان', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 479cbf6bd..ef65a2f10 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -440,6 +440,7 @@ 'form.profile.type_start_finish' => 'aloitus ja lopetus', 'form.profile.type_duration' => 'kesto', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 05f4b2591..7d2b924f3 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -430,6 +430,7 @@ 'form.profile.type_start_finish' => 'Début et fin', 'form.profile.type_duration' => 'Durée', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 55d6e8673..03669f76a 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -467,6 +467,7 @@ 'form.profile.type_start_finish' => 'התחלה וסיום', 'form.profile.type_duration' => 'משך זמן', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 7c824b877..fca0e8d49 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -495,6 +495,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 04b63d888..e834fcadd 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -432,6 +432,8 @@ 'form.profile.type_all' => 'tutto', 'form.profile.type_start_finish' => 'inizio e fine', 'form.profile.type_duration' => 'durata', +// TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', 'form.profile.uncompleted_indicators_none' => 'non mostrare', 'form.profile.uncompleted_indicators_show' => 'mostra', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index fc4208773..1458a9c1f 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -485,6 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 680b01c4d..d1fdc85b8 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -487,6 +487,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index e96e808fd..7f38d369c 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -425,12 +425,14 @@ 'form.profile.mode_projects' => 'projecten', 'form.profile.mode_projects_and_tasks' => 'projecten en taken', 'form.profile.record_type' => 'Registratie type', -'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', -'form.profile.uncompleted_indicators_none' => 'verberg', -'form.profile.uncompleted_indicators_show' => 'toon', 'form.profile.type_all' => 'begin, einde en duur', 'form.profile.type_start_finish' => 'begin en einde', 'form.profile.type_duration' => 'duur', +// TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', +'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', +'form.profile.uncompleted_indicators_none' => 'verberg', +'form.profile.uncompleted_indicators_show' => 'toon', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8c23797ca..150ecb7b5 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -483,6 +483,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 5ef7b6011..5e4f251e3 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -443,6 +443,7 @@ 'form.profile.type_start_finish' => 'początek i koniec', 'form.profile.type_duration' => 'czas trwania', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 387abe059..714d2e798 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -438,6 +438,7 @@ 'form.profile.type_start_finish' => 'início e fim', 'form.profile.type_duration' => 'duração', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 2084757c7..b8648fdac 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -476,6 +476,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 129473eb9..8a4b2b66d 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -493,6 +493,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 2f22c81bb..7ccbeda0a 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -424,6 +424,7 @@ 'form.profile.type_all' => 'все', 'form.profile.type_start_finish' => 'начало и конец', 'form.profile.type_duration' => 'длительность', +'form.profile.allow_overlap' => 'Возможное перекрывание', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', 'form.profile.uncompleted_indicators_none' => 'не показывать', 'form.profile.uncompleted_indicators_show' => 'показывать', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index a2bd1b17a..28f09a539 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -459,6 +459,7 @@ 'form.profile.type_start_finish' => 'začiatok a koniec', 'form.profile.type_duration' => 'trvanie', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 27fd0c3b3..7bb52f757 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -472,6 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index c3353baa0..ebb4751a4 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -441,6 +441,7 @@ 'form.profile.type_start_finish' => 'početak i kraj', 'form.profile.type_duration' => 'trajanje', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 12d8c10cb..96c8ee3f1 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -437,6 +437,8 @@ 'form.profile.type_all' => 'Alla', 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', +// TODO: translate the following. +// 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', 'form.profile.uncompleted_indicators_none' => 'Visa inte', 'form.profile.uncompleted_indicators_show' => 'Visa', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 25faa91bd..44e2b88c6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -504,6 +504,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index c2f7cd680..3ae2f5d0b 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -472,6 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index a9c842c3f..9b3de6ec5 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -482,6 +482,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.uncompleted_indicators_none' => 'do not show', // 'form.profile.uncompleted_indicators_show' => 'show', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 392fdd9a1..f877ab054 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/foreach} - {if $tax} + {if isset($tax)} diff --git a/WEB-INF/templates/invoices.tpl b/WEB-INF/templates/invoices.tpl deleted file mode 100644 index e27eb3991..000000000 --- a/WEB-INF/templates/invoices.tpl +++ /dev/null @@ -1,60 +0,0 @@ - - -{if $show_sorting_options} - {$forms.invoicesForm.open} -
-
 Anuko Time Tracker 1.17.16.3984 | Copyright © Anuko | +  Anuko Time Tracker 1.17.16.3985 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From e053d82d1b49537463875f7e68510d5afabe5b12 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Feb 2018 19:11:42 +0000 Subject: [PATCH 0527/2515] Replaced uncompleted indicators dropdown with a checkbox. --- WEB-INF/lib/ttUser.class.php | 11 ++++++++--- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 2 +- profile_edit.php | 8 +++++++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index b433e6ef8..f2fa1cba6 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -46,6 +46,7 @@ class ttUser { var $project_required = 0; // Whether project selection is required on time entires. var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). + var $allow_overlap = 0; // Whether to allow overlapping time entries. var $uncompleted_indicators = 0; // Uncompleted time entry indicators (show nowhere or on users page). var $bcc_email = null; // Bcc email. var $currency = null; // Currency. @@ -100,7 +101,7 @@ function __construct($login, $id = null) { $this->project_required = $val['project_required']; $this->task_required = $val['task_required']; $this->record_type = $val['record_type']; - $this->uncompleted_indicators = $val['uncompleted_indicators']; + // $this->uncompleted_indicators = $val['uncompleted_indicators']; // TODO: remove the field from query and drop the field. $this->bcc_email = $val['bcc_email']; $this->team = $val['team_name']; $this->currency = $val['currency']; @@ -109,9 +110,13 @@ function __construct($login, $id = null) { $this->workday_minutes = $val['workday_minutes']; $this->custom_logo = $val['custom_logo']; - // Set user config options. $this->config = $val['config']; - $this->show_holidays = in_array('show_holidays', explode(',', $this->config)); + $config_array = explode(',', $this->config); + + // Set user config options. + $this->show_holidays = in_array('show_holidays', $config_array); + $this->allow_overlap = in_array('allow_overlap', $config_array); + $this->uncompleted_indicators = in_array('uncompleted_indicators', $config_array); // Set "on behalf" id and name. if (isset($_SESSION['behalf_id'])) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f877ab054..45b1d7d4a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + {if $user->isManager()} diff --git a/profile_edit.php b/profile_edit.php index eaa9b2ae3..6abcce1af 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -190,10 +190,14 @@ $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); // Prepare uncompleted indicators choices. + /* $uncompleted_indicators_options = array(); $uncompleted_indicators_options[UNCOMPLETED_INDICATORS_NONE] = $i18n->getKey('form.profile.uncompleted_indicators_none'); $uncompleted_indicators_options[UNCOMPLETED_INDICATORS] = $i18n->getKey('form.profile.uncompleted_indicators_show'); $form->addInput(array('type'=>'combobox','name'=>'uncompleted_indicators','style'=>'width: 150px;','data'=>$uncompleted_indicators_options,'value'=>$cl_uncompleted_indicators)); + */ + // Uncompleted indicators checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators)); // Add bcc email control, for manager only. if ($user->isManager()) { @@ -283,9 +287,11 @@ $plugins = trim($plugins, ','); - // Prepare config string. At this time we only handle show_holidays here. + // Prepare config string. if ($cl_show_holidays) $config .= ',show_holidays'; + if ($cl_uncompleted_indicators) + $config .= ',uncompleted_indicators'; $config = trim($config, ','); $update_result = ttTeamHelper::update($user->team_id, array( From 7bce64d44641b6fa36877db2bc9a1f1f78ac73eb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Feb 2018 19:21:51 +0000 Subject: [PATCH 0528/2515] Cleanup. --- WEB-INF/resources/ca.lang.php | 2 -- WEB-INF/resources/cs.lang.php | 2 -- WEB-INF/resources/da.lang.php | 2 -- WEB-INF/resources/de.lang.php | 2 -- WEB-INF/resources/en.lang.php | 2 -- WEB-INF/resources/es.lang.php | 2 -- WEB-INF/resources/et.lang.php | 2 -- WEB-INF/resources/fa.lang.php | 2 -- WEB-INF/resources/fi.lang.php | 2 -- WEB-INF/resources/fr.lang.php | 2 -- WEB-INF/resources/he.lang.php | 2 -- WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/resources/it.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 2 -- WEB-INF/resources/ko.lang.php | 2 -- WEB-INF/resources/nl.lang.php | 2 -- WEB-INF/resources/no.lang.php | 2 -- WEB-INF/resources/pl.lang.php | 2 -- WEB-INF/resources/pt-br.lang.php | 2 -- WEB-INF/resources/pt.lang.php | 2 -- WEB-INF/resources/ro.lang.php | 2 -- WEB-INF/resources/ru.lang.php | 2 -- WEB-INF/resources/sk.lang.php | 2 -- WEB-INF/resources/sl.lang.php | 2 -- WEB-INF/resources/sr.lang.php | 2 -- WEB-INF/resources/sv.lang.php | 2 -- WEB-INF/resources/tr.lang.php | 2 -- WEB-INF/resources/zh-cn.lang.php | 2 -- WEB-INF/resources/zh-tw.lang.php | 2 -- WEB-INF/templates/footer.tpl | 2 +- initialize.php | 4 ---- profile_edit.php | 7 ------- 32 files changed, 1 insertion(+), 70 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index df19a2cfc..08e3fc067 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -487,8 +487,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 680b28e95..0a300d8e4 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -502,8 +502,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 9e56b50f2..262c4f45f 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -435,8 +435,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', -'form.profile.uncompleted_indicators_none' => 'Vis ikke', -'form.profile.uncompleted_indicators_show' => 'Vis', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index d3f43242b..7a9b178ca 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -433,8 +433,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -//'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Erweiterungen', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index a417f62b3..e5330ca96 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -428,8 +428,6 @@ 'form.profile.type_duration' => 'duration', 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -'form.profile.uncompleted_indicators_none' => 'do not show', -'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index c15cac5f0..0caf6e50b 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -500,8 +500,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b774f74be..69a71332a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -498,8 +498,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 0a3a27788..d4d9eb91a 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -464,8 +464,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'پلاگین ها', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index ef65a2f10..6becda6be 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -442,8 +442,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Lisäosat', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 7d2b924f3..eb39469f7 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -432,8 +432,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 03669f76a..9ce2735b0 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -469,8 +469,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'תוספים', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index fca0e8d49..dd94782e9 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -497,8 +497,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index e834fcadd..074abd557 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -435,8 +435,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', -'form.profile.uncompleted_indicators_none' => 'non mostrare', -'form.profile.uncompleted_indicators_show' => 'mostra', // TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps? // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 1458a9c1f..e20543955 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -487,8 +487,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index d1fdc85b8..6948e8041 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -489,8 +489,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 7f38d369c..ec5fa5115 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -431,8 +431,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', -'form.profile.uncompleted_indicators_none' => 'verberg', -'form.profile.uncompleted_indicators_show' => 'toon', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 150ecb7b5..1cf774644 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -485,8 +485,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 5e4f251e3..7ea5e96ef 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -445,8 +445,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Dodatkowe moduły', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 714d2e798..a832f7e67 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -440,8 +440,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index b8648fdac..b0923333a 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -478,8 +478,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 8a4b2b66d..3dfc9fdcd 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -495,8 +495,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 7ccbeda0a..76e78705e 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -426,8 +426,6 @@ 'form.profile.type_duration' => 'длительность', 'form.profile.allow_overlap' => 'Возможное перекрывание', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', -'form.profile.uncompleted_indicators_none' => 'не показывать', -'form.profile.uncompleted_indicators_show' => 'показывать', 'form.profile.plugins' => 'Плагины', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 28f09a539..81bcc7259 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -461,8 +461,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Doplnkové moduly', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 7bb52f757..bdf54a499 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -474,8 +474,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index ebb4751a4..519f9a136 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -443,8 +443,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', 'form.profile.plugins' => 'Dodaci', // Forma mejla. Pogledajte primer na https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 96c8ee3f1..567bb5445 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -440,8 +440,6 @@ // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', -'form.profile.uncompleted_indicators_none' => 'Visa inte', -'form.profile.uncompleted_indicators_show' => 'Visa', 'form.profile.plugins' => 'Tillägg', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 44e2b88c6..ce0d563af 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -506,8 +506,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 3ae2f5d0b..59b4916ff 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -474,8 +474,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 9b3de6ec5..bd66279d9 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -484,8 +484,6 @@ // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', -// 'form.profile.uncompleted_indicators_none' => 'do not show', -// 'form.profile.uncompleted_indicators_show' => 'show', // 'form.profile.plugins' => 'Plugins', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 45b1d7d4a..78f5cec18 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.16.3985 | Copyright © Anuko | +  Anuko Time Tracker 1.17.17.3986 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 089ecead4..bb73a69ed 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -174,7 +174,7 @@ function handlePluginCheckboxes() {
{$i18n.form.profile.uncompleted_indicators}:{$forms.profileForm.uncompleted_indicators.control}{$forms.profileForm.uncompleted_indicators.control} {$i18n.label.what_is_it}
- - + - + - + diff --git a/default.css b/default.css index 23098db42..65f3be3b9 100644 --- a/default.css +++ b/default.css @@ -273,6 +273,11 @@ span.what-is-it-text { display: inline-block; } +/* span for what format example */ +span.format-example { + color: #777777; +} + /* buttons */ input[type="submit"], input[type="button"] { -webkit-appearance: none; @@ -295,6 +300,11 @@ input[type="text"].project-rate-field { width: 236px; } +/* dropdown control with an associated format example */ +.dropdown-field-with-format-example { + width: 136px; +} + /* textareas for fields */ #description, #address, #item_name, #custom_css { width: 220px; diff --git a/group_edit.php b/group_edit.php index e1a7a5234..cea5a6a41 100644 --- a/group_edit.php +++ b/group_edit.php @@ -118,7 +118,7 @@ $form->addInput(array('type'=>'combobox','name'=>'lang','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang)); $DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>',')); -$form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, +$form->addInput(array('type'=>'combobox','name'=>'decimal_mark','class'=>'dropdown-field-with-format-example','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, 'onchange'=>'adjustDecimalPreview()')); $DATE_FORMAT_OPTIONS = array( @@ -127,12 +127,12 @@ array('id'=>'%d-%m-%Y','name'=>'d-m-Y'), array('id'=>'%d.%m.%Y','name'=>'d.m.Y'), array('id'=>'%d.%m.%Y %a','name'=>'d.m.Y a')); -$form->addInput(array('type'=>'combobox','name'=>'date_format','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format, +$form->addInput(array('type'=>'combobox','name'=>'date_format','class'=>'dropdown-field-with-format-example','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format, 'onchange'=>'MakeFormatPreview("date_format_preview", this);')); $TIME_FORMAT_OPTIONS = array( array('id'=>'%H:%M','name'=>$i18n->get('form.group_edit.24_hours')), array('id'=>'%I:%M %p','name'=>$i18n->get('form.group_edit.12_hours'))); -$form->addInput(array('type'=>'combobox','name'=>'time_format','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format, +$form->addInput(array('type'=>'combobox','name'=>'time_format','class'=>'dropdown-field-with-format-example','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format, 'onchange'=>'MakeFormatPreview("time_format_preview", this);')); // Prepare week start choices. diff --git a/initialize.php b/initialize.php index e161a3122..ec49622fe 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5474"); +define("APP_VERSION", "1.19.28.5475"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 524081ff8eab73ed2498a89800a73be31ce4f7a4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 20:10:42 +0000 Subject: [PATCH 2155/2515] Made groups.php mobile friendly and fixed a bug to set on behalf group properly when user clicks an edit icon. --- WEB-INF/templates/groups.tpl | 42 -------------------------------- WEB-INF/templates/groups2.tpl | 45 +++++++++++++++++++++++++++++++++++ group_edit.php | 5 +++- groups.php | 5 ++-- initialize.php | 2 +- 5 files changed, 52 insertions(+), 47 deletions(-) delete mode 100644 WEB-INF/templates/groups.tpl create mode 100644 WEB-INF/templates/groups2.tpl diff --git a/WEB-INF/templates/groups.tpl b/WEB-INF/templates/groups.tpl deleted file mode 100644 index 636a252b0..000000000 --- a/WEB-INF/templates/groups.tpl +++ /dev/null @@ -1,42 +0,0 @@ - -{$forms.subgroupsForm.open} -{if $group_dropdown} -
 Anuko Time Tracker 1.17.17.3986 | Copyright © Anuko | +  Anuko Time Tracker 1.17.17.3987 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/initialize.php b/initialize.php index c1a8437a0..f309ee6a9 100644 --- a/initialize.php +++ b/initialize.php @@ -125,10 +125,6 @@ define('TYPE_START_FINISH', 1); // Time record has start and finish times. define('TYPE_DURATION', 2); // Time record has only duration, no start and finish times. -// Definitions for uncompleted time entry indicators. -define('UNCOMPLETED_INDICATORS_NONE', 0); // Do not show indicators. -define('UNCOMPLETED_INDICATORS', 1); // Show indicators. - // User access rights - bits that collectively define an access mask to the system (a role). // We'll have some bits here (1,2, etc...) reserved for future use. define('right_data_entry', 4); // Right to enter work hours and expenses. diff --git a/profile_edit.php b/profile_edit.php index 6abcce1af..575bafe64 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -189,13 +189,6 @@ $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); - // Prepare uncompleted indicators choices. - /* - $uncompleted_indicators_options = array(); - $uncompleted_indicators_options[UNCOMPLETED_INDICATORS_NONE] = $i18n->getKey('form.profile.uncompleted_indicators_none'); - $uncompleted_indicators_options[UNCOMPLETED_INDICATORS] = $i18n->getKey('form.profile.uncompleted_indicators_show'); - $form->addInput(array('type'=>'combobox','name'=>'uncompleted_indicators','style'=>'width: 150px;','data'=>$uncompleted_indicators_options,'value'=>$cl_uncompleted_indicators)); - */ // Uncompleted indicators checkbox. $form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators)); From 21a4caf9b07233e69ad230a4d4d5248b589c205b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Feb 2018 23:16:31 +0000 Subject: [PATCH 0529/2515] Made Allow overlap a configurable option. --- WEB-INF/config.php.dist | 11 ----------- WEB-INF/lib/ttTimeHelper.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 6 +++++- profile_edit.php | 7 +++++++ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index fed4eea59..e4fb3c0a3 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -70,12 +70,6 @@ define('APP_NAME', ''); // define('OLD_PASSWORDS', true); -// Holidays. At this time holiday days are defined in the localization files (one file per language). -// The SHOW_HOLIDAYS option defines whether holidays are highlighted with holiday color. -// -define('SHOW_HOLIDAYS', true); - - // COST_ON_REPORTS - defines the availability of the Cost field on the Reports page. // define('COST_ON_REPORTS', true); @@ -92,11 +86,6 @@ define('COST_ON_REPORTS', true); // define('FUTURE_ENTRIES', false); -// ALLOW_OVERLAP - defines whether overlapping time entries are allowed. Defaults to false. -// -// define('ALLOW_OVERLAP', true); - - // WEEKEND_START_DAY // // This option defines which days are highlighted with weekend color. diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 7bc5e646f..7cbf4ddaa 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -595,8 +595,8 @@ static function getUncompleted($user_id) { // $record_id - optional record id we may be editing, excluded from overlap set static function overlaps($user_id, $date, $start, $finish, $record_id = null) { // Do not bother checking if we allow overlaps. - if (defined('ALLOW_OVERLAP') && ALLOW_OVERLAP == true) - return false; + global $user; + if ($user->allow_overlap) return false; $mdb2 = getConnection(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 78f5cec18..3fd1c79ff 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + + + + + diff --git a/profile_edit.php b/profile_edit.php index 575bafe64..7ce14f66a 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -62,6 +62,7 @@ $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); + $cl_allow_overlap = $request->getParameter('allow_overlap'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); $cl_bcc_email = trim($request->getParameter('bcc_email')); @@ -96,6 +97,7 @@ $cl_project_required = $user->project_required; $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; + $cl_allow_overlap = $user->allow_overlap; $cl_uncompleted_indicators = $user->uncompleted_indicators; $cl_bcc_email = $user->bcc_email; @@ -189,6 +191,9 @@ $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); + // Allow overlap checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap)); + // Uncompleted indicators checkbox. $form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators)); @@ -283,6 +288,8 @@ // Prepare config string. if ($cl_show_holidays) $config .= ',show_holidays'; + if ($cl_allow_overlap) + $config .= ',allow_overlap'; if ($cl_uncompleted_indicators) $config .= ',uncompleted_indicators'; $config = trim($config, ','); From e3ed046e205a14772a8157def21fea9a14acdde8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 14 Feb 2018 15:58:48 +0000 Subject: [PATCH 0530/2515] Fixed import and export for latest changes. --- WEB-INF/lib/ttExportHelper.class.php | 7 ++--- WEB-INF/lib/ttImportHelper.class.php | 10 +++---- WEB-INF/lib/ttTeamHelper.class.php | 40 +++++++++++++--------------- WEB-INF/lib/ttUser.class.php | 3 +-- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/users.tpl | 2 +- WEB-INF/templates/users.tpl | 2 +- dbinstall.php | 9 ++++--- mobile/users.php | 2 +- mysql.sql | 2 -- users.php | 2 +- 11 files changed, 39 insertions(+), 42 deletions(-) diff --git a/WEB-INF/lib/ttExportHelper.class.php b/WEB-INF/lib/ttExportHelper.class.php index bf43f28c6..0e1164787 100644 --- a/WEB-INF/lib/ttExportHelper.class.php +++ b/WEB-INF/lib/ttExportHelper.class.php @@ -64,8 +64,9 @@ function createDataFile($compress = false) { fwrite($file, "currency."\" decimal_mark=\"".$user->decimal_mark."\" lang=\"".$user->lang. "\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start. "\" tracking_mode=\"".$user->tracking_mode."\" project_required=\"".$user->project_required."\" task_required=\"".$user->task_required. - "\" record_type=\"".$user->record_type."\" uncompleted_indicators=\"".$user->uncompleted_indicators."\" bcc_email=\"".$user->bcc_email. - "\" plugins=\"".$user->plugins."\" lock_spec=\"".$user->lock_spec."\" workday_hours=\"".$user->workday_hours. + "\" record_type=\"".$user->record_type."\" bcc_email=\"".$user->bcc_email. + "\" plugins=\"".$user->plugins."\" lock_spec=\"".$user->lock_spec."\" workday_minutes=\"".$user->workday_minutes. + "\" config=\"".$user->config. "\">\n"); fwrite($file, " team."]]>\n"); fwrite($file, "\n"); @@ -206,7 +207,7 @@ function createDataFile($compress = false) { $quotas = ttTeamHelper::getMonthlyQuotas($user->team_id); fwrite($file, "\n"); foreach ($quotas as $quota) { - fwrite($file, " \n"); + fwrite($file, " \n"); } fwrite($file, "\n"); diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index da4176c12..9b1aad2ac 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -126,11 +126,11 @@ function endElement($parser, $name) { 'project_required' => $this->teamData['PROJECT_REQUIRED'], 'task_required' => $this->teamData['TASK_REQUIRED'], 'record_type' => $this->teamData['RECORD_TYPE'], - 'uncompleted_indicators' => $this->teamData['UNCOMPLETED_INDICATORS'], 'bcc_email' => $this->teamData['BCC_EMAIL'], 'plugins' => $this->teamData['PLUGINS'], 'lock_spec' => $this->teamData['LOCK_SPEC'], - 'workday_hours' => $this->teamData['WORKDAY_HOURS'])); + 'workday_minutes' => $this->teamData['WORKDAY_MINUTES'], + 'config' => $this->teamData['CONFIG'])); if ($team_id) { $this->team_id = $team_id; foreach ($this->users as $key=>$user_item) { @@ -216,7 +216,7 @@ function endElement($parser, $name) { } if ($name == 'MONTHLY_QUOTA' && $this->canImport) { - $this->insertMonthlyQuota($this->team_id, $this->currentElement['YEAR'], $this->currentElement['MONTH'], $this->currentElement['QUOTA']); + $this->insertMonthlyQuota($this->team_id, $this->currentElement['YEAR'], $this->currentElement['MONTH'], $this->currentElement['MINUTES']); } if ($name == 'LOG_ITEM' && $this->canImport) { @@ -410,9 +410,9 @@ function uncompress($in, $out) { } // insertMonthlyQuota - a helper function to insert a monthly quota. - private function insertMonthlyQuota($team_id, $year, $month, $quota) { + private function insertMonthlyQuota($team_id, $year, $month, $minutes) { $mdb2 = getConnection(); - $sql = "INSERT INTO tt_monthly_quotas (team_id, year, month, quota) values ($team_id, $year, $month, $quota)"; + $sql = "INSERT INTO tt_monthly_quotas (team_id, year, month, minutes) values ($team_id, $year, $month, $minutes)"; $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); } diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index c0baa3d8a..a58c2cd32 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -548,7 +548,7 @@ static function getMonthlyQuotas($team_id) { $mdb2 = getConnection(); $result = array(); - $sql = "select year, month, quota from tt_monthly_quotas where team_id = $team_id"; + $sql = "select year, month, minutes from tt_monthly_quotas where team_id = $team_id"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { @@ -727,15 +727,6 @@ static function insert($fields) { $record_type_v = ''; } - $uncompleted_indicators = $fields['uncompleted_indicators']; - if ($uncompleted_indicators !== null) { - $uncompleted_indicators_f = ', uncompleted_indicators'; - $uncompleted_indicators_v = ', ' . (int)$uncompleted_indicators; - } else { - $uncompleted_indicators_f = ''; - $uncompleted_indicators_v = ''; - } - $bcc_email = $fields['bcc_email']; if ($bcc_email !== null) { $bcc_email_f = ', bcc_email'; @@ -763,19 +754,28 @@ static function insert($fields) { $lockspec_v = ''; } - $workday_hours = $fields['workday_hours']; - if ($workday_hours !== null) { - $workday_hours_f = ', workday_hours'; - $workday_hours_v = ', ' . (int)$workday_hours; + $workday_minutes = $fields['workday_minutes']; + if ($workday_minutes !== null) { + $workday_minutes_f = ', workday_minutes'; + $workday_minutes_v = ', ' . (int)$workday_minutes; + } else { + $workday_minutes_f = ''; + $workday_minutes_v = ''; + } + + $config = $fields['config']; + if ($config !== null) { + $config_f = ', config'; + $config_v = ', ' . $mdb2->quote($config); } else { - $workday_hours_f = ''; - $workday_hours_v = ''; + $config_f = ''; + $config_f = ''; } - $sql = "insert into tt_teams (name, currency $decimal_mark_f, lang $date_format_f $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $uncompleted_indicators_f $bcc_email_f $plugins_f $lockspec_f $workday_hours_f) + $sql = "insert into tt_teams (name, currency $decimal_mark_f, lang $date_format_f $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $bcc_email_f $plugins_f $lockspec_f $workday_minutes_f $config_f) values(".$mdb2->quote(trim($fields['name'])). ", ".$mdb2->quote(trim($fields['currency']))." $decimal_mark_v, ".$mdb2->quote($lang). - "$date_format_v $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $uncompleted_indicators_v $bcc_email_v $plugins_v $lockspec_v $workday_hours_v)"; + "$date_format_v $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $bcc_email_v $plugins_v $lockspec_v $workday_minutes_v $config_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { @@ -800,7 +800,6 @@ static function update($team_id, $fields) $tracking_mode_part = ''; $task_required_part = ' , task_required = '.(int) $fields['task_required']; $record_type_part = ''; - $uncompleted_indicators_part = ''; $bcc_email_part = ''; $plugins_part = ''; $config_part = ''; @@ -815,7 +814,6 @@ static function update($team_id, $fields) if (isset($fields['week_start'])) $week_start_part = ', week_start = '.(int) $fields['week_start']; if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.(int) $fields['tracking_mode']; if (isset($fields['record_type'])) $record_type_part = ', record_type = '.(int) $fields['record_type']; - if (isset($fields['uncompleted_indicators'])) $uncompleted_indicators_part = ', uncompleted_indicators = '.(int) $fields['uncompleted_indicators']; if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); @@ -824,7 +822,7 @@ static function update($team_id, $fields) $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part - $uncompleted_indicators_part $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_minutes_part where id = $team_id"; + $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_minutes_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index f2fa1cba6..f64a76c09 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -69,7 +69,7 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start, - t.tracking_mode, t.project_required, t.task_required, t.record_type, t.uncompleted_indicators, + t.tracking_mode, t.project_required, t.task_required, t.record_type, t.bcc_email, t.plugins, t.config, t.lock_spec, t.workday_minutes, t.custom_logo FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE "; if ($id) @@ -101,7 +101,6 @@ function __construct($login, $id = null) { $this->project_required = $val['project_required']; $this->task_required = $val['task_required']; $this->record_type = $val['record_type']; - // $this->uncompleted_indicators = $val['uncompleted_indicators']; // TODO: remove the field from query and drop the field. $this->bcc_email = $val['bcc_email']; $this->team = $val['team_name']; $this->currency = $val['currency']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3fd1c79ff..12aac3e59 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.17.3987 | Copyright © Anuko | +  Anuko Time Tracker 1.17.18.3988 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index bb73a69ed..420a1985a 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -166,12 +166,16 @@ function handlePluginCheckboxes() {
{$i18n.form.profile.tracking_mode}:{$forms.profileForm.tracking_mode.control} {$forms.profileForm.task_required.control} {$forms.profileForm.tracking_mode.control} {$forms.profileForm.task_required.control}
{$i18n.form.profile.record_type}: {$forms.profileForm.record_type.control}
{$i18n.form.profile.allow_overlap}:{$forms.profileForm.allow_overlap.control} {$i18n.label.what_is_it}
{$i18n.form.profile.uncompleted_indicators}: {$forms.profileForm.uncompleted_indicators.control} {$i18n.label.what_is_it}
- - - + +
 Anuko Time Tracker 1.17.18.3988 | Copyright © Anuko | +  Anuko Time Tracker 1.17.19.3989 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl index 956ee55ae..5ca38fedf 100644 --- a/WEB-INF/templates/mobile/users.tpl +++ b/WEB-INF/templates/mobile/users.tpl @@ -19,7 +19,7 @@ {foreach $active_users as $u}
- {if $smarty.const.UNCOMPLETED_INDICATORS == $user->uncompleted_indicators} + {if $user->uncompleted_indicators} {/if} {if $user->isManager()} diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl index c84039d2d..95ff2805e 100644 --- a/WEB-INF/templates/users.tpl +++ b/WEB-INF/templates/users.tpl @@ -21,7 +21,7 @@ {foreach $active_users as $u}
- {if $smarty.const.UNCOMPLETED_INDICATORS == $user->uncompleted_indicators} + {if $user->uncompleted_indicators} {/if} {$u.name|escape} diff --git a/dbinstall.php b/dbinstall.php index dd3601150..4d4de7e8e 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -709,7 +709,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11715"]) { + if ($_POST["convert11400to11719"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -724,6 +724,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_teams` DROP `workday_hours`"); setChange("UPDATE `tt_monthly_quotas` SET `minutes` = 60 * `quota`"); setChange("ALTER TABLE `tt_monthly_quotas` DROP `quota`"); + setChange("ALTER TABLE `tt_teams` DROP `uncompleted_indicators`"); } if ($_POST["cleanup"]) { @@ -768,7 +769,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.17.15) + Create database structure (v1.17.19)
(applies only to new installations, do not execute when updating)
@@ -804,8 +805,8 @@ function setChange($sql) {

Update database structure (v1.14 to v1.17.15)
Update database structure (v1.14 to v1.17.19)
diff --git a/mobile/users.php b/mobile/users.php index d565fc647..1eee6089d 100644 --- a/mobile/users.php +++ b/mobile/users.php @@ -45,7 +45,7 @@ } // Check if the team is set to show indicators for uncompleted time entries. -if (UNCOMPLETED_INDICATORS == $user->uncompleted_indicators) { +if ($user->uncompleted_indicators) { // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']); diff --git a/mysql.sql b/mysql.sql index d77112606..a09c3f4a0 100644 --- a/mysql.sql +++ b/mysql.sql @@ -26,12 +26,10 @@ CREATE TABLE `tt_teams` ( `project_required` smallint(2) NOT NULL DEFAULT '0', # whether a project selection is required or optional `task_required` smallint(2) NOT NULL DEFAULT '0', # whether a task selection is required or optional `record_type` smallint(2) NOT NULL DEFAULT '0', # time record type ("start and finish", "duration", or both) - `uncompleted_indicators` smallint(2) NOT NULL DEFAULT '0', # whether to show indicators for users with uncompleted time entries `bcc_email` varchar(100) default NULL, # bcc email to copy all reports to `plugins` varchar(255) default NULL, # a list of enabled plugins for team `lock_spec` varchar(255) default NULL, # Cron specification for record locking, # for example: "0 10 * * 1" for "weekly on Mon at 10:00". - `workday_hours` decimal(5,2) DEFAULT '8.00', # number of work hours in a regular day `workday_minutes` smallint(4) DEFAULT '480', # number of work minutes in a regular working day `custom_logo` tinyint(4) default '0', # whether to use a custom logo or not `config` text default NULL, # miscellaneous team configuration settings diff --git a/users.php b/users.php index da5704018..354ea1d69 100644 --- a/users.php +++ b/users.php @@ -45,7 +45,7 @@ } // Check if the team is set to show indicators for uncompleted time entries. -if (UNCOMPLETED_INDICATORS == $user->uncompleted_indicators) { +if ($user->uncompleted_indicators) { // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']); From 6c92bed7b97ace08101baa84c8aa171e5d127c28 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 14 Feb 2018 17:14:06 +0000 Subject: [PATCH 0531/2515] A bit of refactoring. --- WEB-INF/lib/ttTeamHelper.class.php | 36 +++++++++++++----------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index a58c2cd32..15bb3d6d4 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -640,13 +640,13 @@ static function insert($fields) { $mdb2 = getConnection(); - $decimal_mark = $fields['decimal_mark']; - if ($decimal_mark !== null) { - $decimal_mark_f = ', decimal_mark'; - $decimal_mark_v = ', ' . $mdb2->quote($decimal_mark); - } else { - $decimal_mark_f = ''; - $decimal_mark_v = ''; + // Start with team name and currency. + $columns = 'name, currency'; + $values = $mdb2->quote(trim($fields['name'])).', '.$mdb2->quote(trim($fields['currency'])); + + if ($fields['decimal_mark']) { + $columns .= ', decimal_mark'; + $values .= ', '.$mdb2->quote($fields['decimal_mark']); } $lang = $fields['lang']; @@ -654,17 +654,13 @@ static function insert($fields) { global $i18n; $lang = $i18n->lang; } + $columns .= ', lang'; + $values .= ', '.$mdb2->quote($lang); - $date_format = $fields['date_format']; - if ($date_format !== null) { - $date_format_f = ', date_format'; - $date_format_v = ', ' . $mdb2->quote($date_format); - } elseif (defined('DATE_FORMAT_DEFAULT')) { - $date_format_f = ', date_format'; - $date_format_v = ', ' . $mdb2->quote(DATE_FORMAT_DEFAULT); - } else { - $date_format_f = ''; - $date_format_v = ''; + if ($fields['date_format'] || defined('DATE_FORMAT_DEFAULT')) { + $date_format = $fields['date_format'] ? $fields['date_format'] : DATE_FORMAT_DEFAULT; + $columns .= ', date_format'; + $values .= ', '.$mdb2->quote($date_format); } $time_format = $fields['time_format']; @@ -772,10 +768,8 @@ static function insert($fields) { $config_f = ''; } - $sql = "insert into tt_teams (name, currency $decimal_mark_f, lang $date_format_f $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $bcc_email_f $plugins_f $lockspec_f $workday_minutes_f $config_f) - values(".$mdb2->quote(trim($fields['name'])). - ", ".$mdb2->quote(trim($fields['currency']))." $decimal_mark_v, ".$mdb2->quote($lang). - "$date_format_v $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $bcc_email_v $plugins_v $lockspec_v $workday_minutes_v $config_v)"; + $sql = "insert into tt_teams ($columns $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $bcc_email_f $plugins_f $lockspec_f $workday_minutes_f $config_f) + values($values $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $bcc_email_v $plugins_v $lockspec_v $workday_minutes_v $config_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 12aac3e59..931e07815 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - {if $show_record_custom_fields && $custom_fields && $custom_fields->timeFields} + {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {/foreach} @@ -148,7 +148,7 @@ License: See license.txt *} {/if} {* record custom fileds *} - {if $show_record_custom_fields && $custom_fields && $custom_fields->timeFields} + {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} diff --git a/expense_edit.php b/expense_edit.php index c930956ab..f4d3c2216 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -112,11 +112,10 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'recalculateCost();', 'name'=>'predefined_expense', - 'value'=>$cl_predefined_expense, 'data'=>$predefined_expenses, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity','value'=>$cl_quantity)); + $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity')); } $form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','value'=>$cl_item_name)); $form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','value'=>$cl_cost)); diff --git a/export.php b/export.php index 2bcba2dce..b5e1206dd 100644 --- a/export.php +++ b/export.php @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.export')); -$smarty->assign('content_page_name', 'export.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'export2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index dd9e8a636..235e90f0e 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5467"); +define("APP_VERSION", "1.19.28.5468"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/success.php b/success.php index 6fbf8ad2a..eea4687a2 100644 --- a/success.php +++ b/success.php @@ -8,5 +8,5 @@ if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('title.success')); -$smarty->assign('content_page_name', 'success.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'success2.tpl'); +$smarty->display('index2.tpl'); diff --git a/time.php b/time.php index a0e009b68..f6cd1daf1 100644 --- a/time.php +++ b/time.php @@ -80,7 +80,7 @@ // Determine column span for note field. $colspan = 0; if ($showClient) $colspan++; - if ($showRecordCustomFields && $custom_fields && $custom_fields->timeFields) { + if ($showRecordCustomFields && isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $colspan++; } From d6e6398d13d65f13569cb4628dba6b1c82f58127 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 24 Apr 2021 20:33:38 +0000 Subject: [PATCH 2148/2515] Made group_add.php and group_advanced_edit.php mobile friendly. --- WEB-INF/lib/ttGroup.class.php | 30 +++------------- WEB-INF/templates/group_add.tpl | 28 --------------- WEB-INF/templates/group_add2.tpl | 22 ++++++++++++ WEB-INF/templates/group_advanced_edit.tpl | 37 -------------------- WEB-INF/templates/group_advanced_edit2.tpl | 40 ++++++++++++++++++++++ group_add.php | 7 ++-- group_advanced_edit.php | 8 ++--- initialize.php | 2 +- 8 files changed, 75 insertions(+), 99 deletions(-) delete mode 100644 WEB-INF/templates/group_add.tpl create mode 100644 WEB-INF/templates/group_add2.tpl delete mode 100644 WEB-INF/templates/group_advanced_edit.tpl create mode 100644 WEB-INF/templates/group_advanced_edit2.tpl diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index bd0f944e3..bc747e097 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -1,30 +1,6 @@ config = $val['config']; $this->configHelper = new ttConfigHelper($val['config']); + $this->custom_css = $val['custom_css']; // Set user config options. $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); diff --git a/WEB-INF/templates/group_add.tpl b/WEB-INF/templates/group_add.tpl deleted file mode 100644 index 852f1b78b..000000000 --- a/WEB-INF/templates/group_add.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{$forms.groupForm.open} -
 Anuko Time Tracker 1.17.19.3989 | Copyright © Anuko | +  Anuko Time Tracker 1.17.19.3990 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 4644ff57154cc72fdf7f4555b2750d2c9a680efb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 14 Feb 2018 18:47:27 +0000 Subject: [PATCH 0532/2515] A bit of refactoring to keep things cleaner. --- WEB-INF/lib/ttTeamHelper.class.php | 121 +++++++++-------------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 37 insertions(+), 86 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 15bb3d6d4..aebf52a9d 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -663,113 +663,64 @@ static function insert($fields) { $values .= ', '.$mdb2->quote($date_format); } - $time_format = $fields['time_format']; - if ($time_format !== null) { - $time_format_f = ', time_format'; - $time_format_v = ', ' . $mdb2->quote($time_format); - } elseif (defined('TIME_FORMAT_DEFAULT')) { - $time_format_f = ', time_format'; - $time_format_v = ', ' . $mdb2->quote(TIME_FORMAT_DEFAULT); - } else { - $time_format_f = ''; - $time_format_v = ''; + if ($fields['time_format'] || defined('TIME_FORMAT_DEFAULT')) { + $time_format = $fields['time_format'] ? $fields['time_format'] : TIME_FORMAT_DEFAULT; + $columns .= ', time_format'; + $values .= ', '.$mdb2->quote($time_format); } - $week_start = $fields['week_start']; - if ($week_start !== null) { - $week_start_f = ', week_start'; - $week_start_v = ', ' . (int)$week_start; - } elseif (defined('WEEK_START_DEFAULT')) { - $week_start_f = ', week_start'; - $week_start_v = ', ' . (int)WEEK_START_DEFAULT; - } else { - $week_start_f = ''; - $week_start_v = ''; + if ($fields['week_start'] || defined('WEEK_START_DEFAULT')) { + $week_start = $fields['week_start'] ? $fields['week_start'] : WEEK_START_DEFAULT; + $columns .= ', week_start'; + $values .= ', '.(int)$week_start; } - $tracking_mode = $fields['tracking_mode']; - if ($tracking_mode !== null) { - $tracking_mode_f = ', tracking_mode'; - $tracking_mode_v = ', ' . (int)$tracking_mode; - } else { - $tracking_mode_f = ''; - $tracking_mode_v = ''; + if ($fields['tracking_mode']) { + $columns .= ', tracking_mode'; + $values .= ', '.(int)$fields['tracking_mode']; } - $project_required = $fields['project_required']; - if ($project_required !== null) { - $project_required_f = ', project_required'; - $project_required_v = ', ' . (int)$project_required; - } else { - $project_required_f = ''; - $project_required_v = ''; + if ($fields['project_required']) { + $columns .= ', project_required'; + $values .= ', '.(int)$fields['project_required']; } - $task_required = $fields['task_required']; - if ($task_required !== null) { - $task_required_f = ', task_required'; - $task_required_v = ', ' . (int)$task_required; - } else { - $task_required_f = ''; - $task_required_v = ''; + if ($fields['task_required']) { + $columns .= ', task_required'; + $values .= ', '.(int)$fields['task_required']; } - $record_type = $fields['record_type']; - if ($record_type !== null) { - $record_type_f = ', record_type'; - $record_type_v = ', ' . (int)$record_type; - } else { - $record_type_f = ''; - $record_type_v = ''; + if ($fields['record_type']) { + $columns .= ', record_type'; + $values .= ', '.(int)$fields['record_type']; } - $bcc_email = $fields['bcc_email']; - if ($bcc_email !== null) { - $bcc_email_f = ', bcc_email'; - $bcc_email_v = ', ' . $mdb2->quote($bcc_email); - } else { - $bcc_email_f = ''; - $bcc_email_v = ''; + if ($fields['bcc_email']) { + $columns .= ', bcc_email'; + $values .= ', '.$mdb2->quote($fields['bcc_email']); } - $plugins = $fields['plugins']; - if ($plugins !== null) { - $plugins_f = ', plugins'; - $plugins_v = ', ' . $mdb2->quote($plugins); - } else { - $plugins_f = ''; - $plugins_v = ''; + if ($fields['plugins']) { + $columns .= ', plugins'; + $values .= ', '.$mdb2->quote($fields['plugins']); } - $lock_spec = $fields['lock_spec']; - if ($lock_spec !== null) { - $lockspec_f = ', lock_spec'; - $lockspec_v = ', ' . $mdb2->quote($lock_spec); - } else { - $lockspec_f = ''; - $lockspec_v = ''; + if ($fields['lock_spec']) { + $columns .= ', lock_spec'; + $values .= ', '.$mdb2->quote($fields['lock_spec']); } - $workday_minutes = $fields['workday_minutes']; - if ($workday_minutes !== null) { - $workday_minutes_f = ', workday_minutes'; - $workday_minutes_v = ', ' . (int)$workday_minutes; - } else { - $workday_minutes_f = ''; - $workday_minutes_v = ''; + if ($fields['workday_minutes']) { + $columns .= ', workday_minutes'; + $values .= ', '.(int)$fields['workday_minutes']; } - $config = $fields['config']; - if ($config !== null) { - $config_f = ', config'; - $config_v = ', ' . $mdb2->quote($config); - } else { - $config_f = ''; - $config_f = ''; + if ($fields['config']) { + $columns .= ', config'; + $values .= ', '.$mdb2->quote($fields['config']); } - $sql = "insert into tt_teams ($columns $time_format_f $week_start_f $tracking_mode_f $project_required_f $task_required_f $record_type_f $bcc_email_f $plugins_f $lockspec_f $workday_minutes_f $config_f) - values($values $time_format_v $week_start_v $tracking_mode_v $project_required_v $task_required_v $record_type_v $bcc_email_v $plugins_v $lockspec_v $workday_minutes_v $config_v)"; + $sql = "insert into tt_teams ($columns) values($values)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 931e07815..b95b9d85c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - -
 Anuko Time Tracker 1.17.19.3990 | Copyright © Anuko | +  Anuko Time Tracker 1.17.19.3991 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3c857ca72d35f70449f20f1156ab35db92f84828 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 14 Feb 2018 23:15:00 +0000 Subject: [PATCH 0533/2515] FUTURE_ENTRIES option is now configurable as per issue #53. --- WEB-INF/config.php.dist | 5 ----- WEB-INF/lib/ttUser.class.php | 2 ++ WEB-INF/lib/ttWeekViewHelper.class.php | 2 +- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 4 ++++ expense_edit.php | 2 +- expenses.php | 2 +- mobile/expense_edit.php | 2 +- mobile/expenses.php | 2 +- mobile/time.php | 2 +- mobile/time_edit.php | 2 +- mobile/timer.php | 2 +- profile_edit.php | 7 +++++++ time.php | 2 +- time_edit.php | 2 +- 44 files changed, 53 insertions(+), 16 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index e4fb3c0a3..c0dd256d5 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -81,11 +81,6 @@ define('COST_ON_REPORTS', true); // define('READONLY_START_FINISH', false); -// FUTURE_ENTRIES - defines whether users can create entries for future dates. Defaults to true. -// -// define('FUTURE_ENTRIES', false); - - // WEEKEND_START_DAY // // This option defines which days are highlighted with weekend color. diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index f64a76c09..915d241f2 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -47,6 +47,7 @@ class ttUser { var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). var $allow_overlap = 0; // Whether to allow overlapping time entries. + var $future_entries = 0; // Whether to allow creating future entries. var $uncompleted_indicators = 0; // Uncompleted time entry indicators (show nowhere or on users page). var $bcc_email = null; // Bcc email. var $currency = null; // Currency. @@ -115,6 +116,7 @@ function __construct($login, $id = null) { // Set user config options. $this->show_holidays = in_array('show_holidays', $config_array); $this->allow_overlap = in_array('allow_overlap', $config_array); + $this->future_entries = in_array('future_entries', $config_array); $this->uncompleted_indicators = in_array('uncompleted_indicators', $config_array); // Set "on behalf" id and name. diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 130cc3d66..af0960ae6 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -482,7 +482,7 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { $objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES) && $fields['browser_today']) { + if (!$user->future_entries && $fields['browser_today']) { $objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']); if ($objEntryDate->after($objBrowserToday)) { $err->add($i18n->getKey('error.future_date')); diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 08e3fc067..523fabf84 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -486,6 +486,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 0a300d8e4..dd3c68bbc 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -501,6 +501,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 262c4f45f..41cbcec62 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -434,6 +434,7 @@ 'form.profile.type_duration' => 'Varighed', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 7a9b178ca..a97714517 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -432,6 +432,7 @@ 'form.profile.type_duration' => 'Dauer', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Erweiterungen', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index e5330ca96..73f15638a 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -427,6 +427,7 @@ 'form.profile.type_start_finish' => 'start and finish', 'form.profile.type_duration' => 'duration', 'form.profile.allow_overlap' => 'Allow overlap', +'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 0caf6e50b..b6b487dec 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -499,6 +499,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 69a71332a..ea56258bc 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -497,6 +497,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index d4d9eb91a..116de7cef 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -463,6 +463,7 @@ 'form.profile.type_duration' => 'مدت زمان', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'پلاگین ها', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 6becda6be..f1c98c984 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -441,6 +441,7 @@ 'form.profile.type_duration' => 'kesto', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Lisäosat', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index eb39469f7..288eaa512 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -431,6 +431,7 @@ 'form.profile.type_duration' => 'Durée', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 9ce2735b0..70e6d0782 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -468,6 +468,7 @@ 'form.profile.type_duration' => 'משך זמן', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'תוספים', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index dd94782e9..e9e3a8bdb 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -496,6 +496,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 074abd557..396dbfe4e 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -434,6 +434,7 @@ 'form.profile.type_duration' => 'durata', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', // TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps? // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index e20543955..e89da2ff5 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -486,6 +486,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 6948e8041..c77f4b89d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -488,6 +488,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ec5fa5115..13040d669 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -430,6 +430,7 @@ 'form.profile.type_duration' => 'duur', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 1cf774644..c71fdabd7 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -484,6 +484,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 7ea5e96ef..9d833c3b9 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -444,6 +444,7 @@ 'form.profile.type_duration' => 'czas trwania', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Dodatkowe moduły', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index a832f7e67..0e4f76de0 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -439,6 +439,7 @@ 'form.profile.type_duration' => 'duração', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index b0923333a..52617669e 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -477,6 +477,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 3dfc9fdcd..d3a6ef997 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -494,6 +494,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 76e78705e..13a2446fd 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -425,6 +425,7 @@ 'form.profile.type_start_finish' => 'начало и конец', 'form.profile.type_duration' => 'длительность', 'form.profile.allow_overlap' => 'Возможное перекрывание', +'form.profile.future_entries' => 'Будущие записи', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', 'form.profile.plugins' => 'Плагины', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 81bcc7259..d0ebdc3ec 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -460,6 +460,7 @@ 'form.profile.type_duration' => 'trvanie', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Doplnkové moduly', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index bdf54a499..0cc067f2f 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -473,6 +473,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 519f9a136..ea3ec6972 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -442,6 +442,7 @@ 'form.profile.type_duration' => 'trajanje', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', 'form.profile.plugins' => 'Dodaci', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 567bb5445..dc9a3eeca 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -439,6 +439,7 @@ 'form.profile.type_duration' => 'Varaktighet', // TODO: translate the following. // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', 'form.profile.plugins' => 'Tillägg', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index ce0d563af..c0f8f9786 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -505,6 +505,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 59b4916ff..26d80a5d2 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -473,6 +473,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index bd66279d9..b40cfc321 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -483,6 +483,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b95b9d85c..66f277324 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + diff --git a/expense_edit.php b/expense_edit.php index d7d815c34..f13c7919e 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -162,7 +162,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/expenses.php b/expenses.php index 2d1c53064..99418276b 100644 --- a/expenses.php +++ b/expenses.php @@ -159,7 +159,7 @@ if (!ttValidFloat($cl_cost)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cost')); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php index c2df1abb6..69c13ecca 100644 --- a/mobile/expense_edit.php +++ b/mobile/expense_edit.php @@ -144,7 +144,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/mobile/expenses.php b/mobile/expenses.php index 790a7ace0..dd8e87c0a 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -150,7 +150,7 @@ if (!ttValidFloat($cl_cost)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cost')); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/mobile/time.php b/mobile/time.php index 2b1f8395b..827eadcae 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -225,7 +225,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 81337c9c2..1e1a3897d 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -253,7 +253,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/mobile/timer.php b/mobile/timer.php index 1fa6c1377..95790311d 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -200,7 +200,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/profile_edit.php b/profile_edit.php index 7ce14f66a..fc13d0c5f 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -63,6 +63,7 @@ $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); $cl_allow_overlap = $request->getParameter('allow_overlap'); + $cl_future_entries = $request->getParameter('future_entries'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); $cl_bcc_email = trim($request->getParameter('bcc_email')); @@ -98,6 +99,7 @@ $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; $cl_allow_overlap = $user->allow_overlap; + $cl_future_entries = $user->future_entries; $cl_uncompleted_indicators = $user->uncompleted_indicators; $cl_bcc_email = $user->bcc_email; @@ -194,6 +196,9 @@ // Allow overlap checkbox. $form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap)); + // Future entries checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'future_entries','value'=>$cl_future_entries)); + // Uncompleted indicators checkbox. $form->addInput(array('type'=>'checkbox','name'=>'uncompleted_indicators','value'=>$cl_uncompleted_indicators)); @@ -290,6 +295,8 @@ $config .= ',show_holidays'; if ($cl_allow_overlap) $config .= ',allow_overlap'; + if ($cl_future_entries) + $config .= ',future_entries'; if ($cl_uncompleted_indicators) $config .= ',uncompleted_indicators'; $config = trim($config, ','); diff --git a/time.php b/time.php index 11f95c49e..9fca8898a 100644 --- a/time.php +++ b/time.php @@ -260,7 +260,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); diff --git a/time_edit.php b/time_edit.php index d24d7f19b..607199714 100644 --- a/time_edit.php +++ b/time_edit.php @@ -259,7 +259,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) { + if (!$user->future_entries) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->getKey('error.future_date')); From 4f9ea2fd0f60b516858d62c67d59c8af66613f10 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 15 Feb 2018 18:31:01 +0000 Subject: [PATCH 0534/2515] Work in progress on configurable punch in mode. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/footer.tpl | 2 +- 29 files changed, 29 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 523fabf84..66354c1bb 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -485,6 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index dd3c68bbc..33b3f8a36 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -500,6 +500,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 41cbcec62..5e8a06270 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -433,6 +433,7 @@ 'form.profile.type_start_finish' => 'Start og slut', 'form.profile.type_duration' => 'Varighed', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index a97714517..c15ac51c0 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -431,6 +431,7 @@ 'form.profile.type_start_finish' => 'Start und Ende', 'form.profile.type_duration' => 'Dauer', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b6b487dec..19df3e9c5 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -498,6 +498,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index ea56258bc..b62c8daec 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -496,6 +496,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 116de7cef..ff8634e1b 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -462,6 +462,7 @@ 'form.profile.type_start_finish' => 'شروع و اتمام', 'form.profile.type_duration' => 'مدت زمان', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index f1c98c984..3806d2bc7 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -440,6 +440,7 @@ 'form.profile.type_start_finish' => 'aloitus ja lopetus', 'form.profile.type_duration' => 'kesto', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 288eaa512..2d8633ebf 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -430,6 +430,7 @@ 'form.profile.type_start_finish' => 'Début et fin', 'form.profile.type_duration' => 'Durée', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 70e6d0782..0880741e7 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -467,6 +467,7 @@ 'form.profile.type_start_finish' => 'התחלה וסיום', 'form.profile.type_duration' => 'משך זמן', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e9e3a8bdb..b86de6493 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -495,6 +495,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 396dbfe4e..ded68ae1f 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -433,6 +433,7 @@ 'form.profile.type_start_finish' => 'inizio e fine', 'form.profile.type_duration' => 'durata', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index e89da2ff5..4c1a48cc4 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -485,6 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index c77f4b89d..d150dc742 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -487,6 +487,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 13040d669..8f8e54512 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -429,6 +429,7 @@ 'form.profile.type_start_finish' => 'begin en einde', 'form.profile.type_duration' => 'duur', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index c71fdabd7..feccacfce 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -483,6 +483,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 9d833c3b9..d7e26720f 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -443,6 +443,7 @@ 'form.profile.type_start_finish' => 'początek i koniec', 'form.profile.type_duration' => 'czas trwania', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 0e4f76de0..52f4b3d6e 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -438,6 +438,7 @@ 'form.profile.type_start_finish' => 'início e fim', 'form.profile.type_duration' => 'duração', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 52617669e..eacf15058 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -476,6 +476,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index d3a6ef997..8c39a1d9b 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -493,6 +493,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 13a2446fd..625c4e0dc 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -424,6 +424,7 @@ 'form.profile.type_all' => 'все', 'form.profile.type_start_finish' => 'начало и конец', 'form.profile.type_duration' => 'длительность', +'form.profile.allow_overlap' => 'Пробивать время', 'form.profile.allow_overlap' => 'Возможное перекрывание', 'form.profile.future_entries' => 'Будущие записи', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d0ebdc3ec..d8052dee1 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -459,6 +459,7 @@ 'form.profile.type_start_finish' => 'začiatok a koniec', 'form.profile.type_duration' => 'trvanie', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 0cc067f2f..c560c38ba 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -472,6 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index ea3ec6972..1a0163b84 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -441,6 +441,7 @@ 'form.profile.type_start_finish' => 'početak i kraj', 'form.profile.type_duration' => 'trajanje', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index dc9a3eeca..b55a0d236 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -438,6 +438,7 @@ 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', // TODO: translate the following. +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c0f8f9786..c68d7d555 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -505,6 +505,7 @@ // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', // 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 26d80a5d2..38a4663ff 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -472,6 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index b40cfc321..e48bc44af 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -482,6 +482,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', +// 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 66f277324..3ecb4d925 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.19.3991 | Copyright © Anuko | +  Anuko Time Tracker 1.17.20.3992 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 420a1985a..51d01cc2b 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -176,6 +176,10 @@ function handlePluginCheckboxes() { {$i18n.form.profile.allow_overlap}: {$forms.profileForm.allow_overlap.control} {$i18n.label.what_is_it}
{$i18n.form.profile.future_entries}:{$forms.profileForm.future_entries.control} {$i18n.label.what_is_it}
{$i18n.form.profile.uncompleted_indicators}: {$forms.profileForm.uncompleted_indicators.control} {$i18n.label.what_is_it}
- {/if} -{if $custom_fields && $custom_fields->timeFields} +{if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} diff --git a/initialize.php b/initialize.php index d83cfe133..f922de080 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5437"); +define("APP_VERSION", "1.19.28.5438"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 90d54c0cf..95ae5cc79 100644 --- a/time.php +++ b/time.php @@ -50,6 +50,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$taskRequired = false; if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; @@ -136,7 +137,7 @@ // Handle time custom fields. $timeCustomFields = array(); -if ($custom_fields && $custom_fields->timeFields) { +if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $control_name = 'time_field_'.$timeField['id']; $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); @@ -195,7 +196,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); // If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { +if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { @@ -255,6 +256,7 @@ } // Task dropdown. +$task_list = array(); if ($showTask) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', From 6ba6101125b592da256f9561824a9aade059cce4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 18:12:42 +0000 Subject: [PATCH 2117/2515] Addressed a few more php8 issues. --- WEB-INF/lib/ttFileHelper.class.php | 8 +++----- initialize.php | 2 +- project_add.php | 1 + project_files.php | 1 + time_files.php | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/ttFileHelper.class.php b/WEB-INF/lib/ttFileHelper.class.php index 48105e417..d97ec00ee 100644 --- a/WEB-INF/lib/ttFileHelper.class.php +++ b/WEB-INF/lib/ttFileHelper.class.php @@ -362,7 +362,7 @@ private function entityHasFiles($entity_id, $entity_type) { " and entity_type = ".$mdb2->quote($entity_type)." and entity_id = $entity_id limit 1"; $res = $mdb2->query($sql); $val = $res->fetchRow(); - return $val['id'] > 0; + return (isset($val['id']) && $val['id'] > 0); } // getEntityFiles obtains a list of files for an entity. @@ -446,6 +446,7 @@ function getFile($fields) { 'file_name' => urlencode($fields['file_name'])); // url-ify the data for the POST. + $fields_string = ''; foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string, '&'); @@ -461,9 +462,6 @@ function getFile($fields) { // Execute a post request. $result = curl_exec($ch); - $error = curl_error(); - $result_array2 = json_decode($result, true); - // Close connection. curl_close($ch); @@ -474,7 +472,7 @@ function getFile($fields) { $result_array = json_decode($result, true); $status = (int) $result_array['status']; - $error = $result_array['error']; + $error = isset($result_array['error']) ? $result_array['error'] : false; if ($error) { // Add an error from file storage facility if we have it. diff --git a/initialize.php b/initialize.php index f922de080..c8acab4ec 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5438"); +define("APP_VERSION", "1.19.28.5439"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/project_add.php b/project_add.php index 1b326b627..16af7a8d1 100644 --- a/project_add.php +++ b/project_add.php @@ -29,6 +29,7 @@ $all_tasks[$task_item['id']] = $task_item['name']; $show_tasks = MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && count($tasks) > 0; +$cl_name = $cl_description = ''; if ($request->isPost()) { $cl_name = trim($request->getParameter('project_name')); $cl_description = trim($request->getParameter('description')); diff --git a/project_files.php b/project_files.php index 5dd816d6c..60fc4d9e3 100644 --- a/project_files.php +++ b/project_files.php @@ -24,6 +24,7 @@ } // End of access checks. +$cl_description = ''; if ($request->isPost()) { $cl_description = trim($request->getParameter('description')); } diff --git a/time_files.php b/time_files.php index 18489aa98..210bd534c 100644 --- a/time_files.php +++ b/time_files.php @@ -24,6 +24,7 @@ } // End of access checks. +$cl_description = ''; if ($request->isPost()) { $cl_description = trim($request->getParameter('description')); } From b0dc8fc28c87679721c9817d2606e7938956eac0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 18:51:53 +0000 Subject: [PATCH 2118/2515] Fixed a few more php8 warnings. --- WEB-INF/lib/ttFileHelper.class.php | 11 ++++++----- WEB-INF/templates/time_edit2.tpl | 4 ++-- initialize.php | 2 +- time.php | 4 ++-- time_edit.php | 14 ++++++++------ 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/WEB-INF/lib/ttFileHelper.class.php b/WEB-INF/lib/ttFileHelper.class.php index d97ec00ee..859435a2b 100644 --- a/WEB-INF/lib/ttFileHelper.class.php +++ b/WEB-INF/lib/ttFileHelper.class.php @@ -137,11 +137,12 @@ function putFile($fields) { 'entity_type' => urlencode($fields['entity_type']), 'entity_id' => urlencode($fields['entity_id']), 'file_name' => urlencode($fields['file_name']), - 'description' => urlencode($fields['description']), + 'description' => urlencode(isset($fields['description']) ? $fields['description'] : ''), 'content' => urlencode(base64_encode(file_get_contents($_FILES['newfile']['tmp_name']))) ); // url-ify the data for the POST. + $fields_string = ''; foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string, '&'); @@ -171,7 +172,7 @@ function putFile($fields) { $result_array = json_decode($result, true); $file_id = (int) $result_array['file_id']; $file_key = $result_array['file_key']; - $error = $result_array['error']; + $error = isset($result_array['error']) ? $result_array['error'] : false; if ($error || !$file_id || !$file_key) { if ($error) { @@ -186,7 +187,7 @@ function putFile($fields) { $entity_type = $mdb2->quote($fields['entity_type']); $entity_id = (int) $fields['entity_id']; $file_name = $mdb2->quote($fields['file_name']); - $description = $mdb2->quote($fields['description']); + $description = $mdb2->quote(isset($fields['description']) ? $fields['description'] : ''); $created = 'now()'; $created_ip = $mdb2->quote($_SERVER['REMOTE_ADDR']); $created_by = $user->id; @@ -295,6 +296,7 @@ function deleteEntityFiles($entity_id, $entity_type) { 'entity_id' => urlencode($entity_id)); // url-ify the data for the POST. + $fields_string = ''; foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string, '&'); @@ -320,7 +322,7 @@ function deleteEntityFiles($entity_id, $entity_type) { $result_array = json_decode($result, true); $status = (int) $result_array['status']; - $error = $result_array['error']; + $error = isset($result_array['error']) ? $result_array['error'] : false; if ($error) { // Add an error from file storage facility if we have it. @@ -336,7 +338,6 @@ function deleteEntityFiles($entity_id, $entity_type) { // records from the database. // Delete all entity records from the database. - $file_id = $fields['id']; $sql = "delete from tt_files". " where entity_id = $entity_id". " and entity_type = ".$mdb2->quote($entity_type). diff --git a/WEB-INF/templates/time_edit2.tpl b/WEB-INF/templates/time_edit2.tpl index 2f8f9e985..8425965b9 100644 --- a/WEB-INF/templates/time_edit2.tpl +++ b/WEB-INF/templates/time_edit2.tpl @@ -4,7 +4,7 @@ License: See license.txt *} {include file="time_script.tpl"} {* Conditional include of confirmSave handler. *} -{if $confirm_save} +{if isset($confirm_save) && $confirm_save} - -
 Anuko Time Tracker 1.17.20.3992 | Copyright © Anuko | +  Anuko Time Tracker 1.17.20.3993 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3d6a515a50d61cf1c234cd6775c925246b8a95b0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 15 Feb 2018 18:37:25 +0000 Subject: [PATCH 0535/2515] Fixed the key for punch in mode. --- WEB-INF/resources/ca.lang.php | 2 +- WEB-INF/resources/cs.lang.php | 2 +- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 +- WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 +- WEB-INF/resources/sv.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 2 +- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 30 files changed, 30 insertions(+), 29 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 66354c1bb..ad08cfa8a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -485,7 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 33b3f8a36..cd5abbbb3 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -500,7 +500,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 5e8a06270..34c62b8aa 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -433,7 +433,7 @@ 'form.profile.type_start_finish' => 'Start og slut', 'form.profile.type_duration' => 'Varighed', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index c15ac51c0..793507eb7 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -431,7 +431,7 @@ 'form.profile.type_start_finish' => 'Start und Ende', 'form.profile.type_duration' => 'Dauer', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 73f15638a..618745f04 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -426,6 +426,7 @@ 'form.profile.type_all' => 'all', 'form.profile.type_start_finish' => 'start and finish', 'form.profile.type_duration' => 'duration', +'form.profile.punch_in_mode' => 'Punch in mode', 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 19df3e9c5..51d69f50c 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -498,7 +498,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b62c8daec..b12921a01 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -496,7 +496,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index ff8634e1b..a6ec5ff2b 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -462,7 +462,7 @@ 'form.profile.type_start_finish' => 'شروع و اتمام', 'form.profile.type_duration' => 'مدت زمان', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 3806d2bc7..87958d5c8 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -440,7 +440,7 @@ 'form.profile.type_start_finish' => 'aloitus ja lopetus', 'form.profile.type_duration' => 'kesto', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 2d8633ebf..6898cbedf 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -430,7 +430,7 @@ 'form.profile.type_start_finish' => 'Début et fin', 'form.profile.type_duration' => 'Durée', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 0880741e7..ce8f1f33f 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -467,7 +467,7 @@ 'form.profile.type_start_finish' => 'התחלה וסיום', 'form.profile.type_duration' => 'משך זמן', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b86de6493..cfba30d0b 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -495,7 +495,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index ded68ae1f..96dd91916 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -433,7 +433,7 @@ 'form.profile.type_start_finish' => 'inizio e fine', 'form.profile.type_duration' => 'durata', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 4c1a48cc4..b0e2b1f59 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -485,7 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index d150dc742..c18aa1731 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -487,7 +487,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 8f8e54512..0ae1f1e79 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -429,7 +429,7 @@ 'form.profile.type_start_finish' => 'begin en einde', 'form.profile.type_duration' => 'duur', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index feccacfce..e533d70ae 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -483,7 +483,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index d7e26720f..bb47e0df4 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -443,7 +443,7 @@ 'form.profile.type_start_finish' => 'początek i koniec', 'form.profile.type_duration' => 'czas trwania', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 52f4b3d6e..702c820c1 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -438,7 +438,7 @@ 'form.profile.type_start_finish' => 'início e fim', 'form.profile.type_duration' => 'duração', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index eacf15058..65196bad8 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -476,7 +476,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 8c39a1d9b..74035115c 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -493,7 +493,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 625c4e0dc..cff534030 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -424,7 +424,7 @@ 'form.profile.type_all' => 'все', 'form.profile.type_start_finish' => 'начало и конец', 'form.profile.type_duration' => 'длительность', -'form.profile.allow_overlap' => 'Пробивать время', +'form.profile.punch_in_mode' => 'Пробивать время', 'form.profile.allow_overlap' => 'Возможное перекрывание', 'form.profile.future_entries' => 'Будущие записи', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d8052dee1..9ed685340 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -459,7 +459,7 @@ 'form.profile.type_start_finish' => 'začiatok a koniec', 'form.profile.type_duration' => 'trvanie', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index c560c38ba..ac6492717 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -472,7 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 1a0163b84..c4c16e561 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -441,7 +441,7 @@ 'form.profile.type_start_finish' => 'početak i kraj', 'form.profile.type_duration' => 'trajanje', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index b55a0d236..b9f92583c 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -438,7 +438,7 @@ 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', // TODO: translate the following. -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c68d7d555..ddadaa5ad 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -504,7 +504,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Allow overlap', +// 'form.profile.punch_in_mode' => 'Allow overlap', // 'form.profile.allow_overlap' => 'Punch in mode', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 38a4663ff..610c68c86 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -472,7 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index e48bc44af..5e38bf627 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -482,7 +482,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_in_mode' => 'Punch in mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3ecb4d925..3616c6e81 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + diff --git a/mobile/time.php b/mobile/time.php index 827eadcae..0479f0cdb 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -155,7 +155,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + if ($user->punch_in_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 1e1a3897d..06ea90919 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -175,7 +175,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + if ($user->punch_in_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/profile_edit.php b/profile_edit.php index fc13d0c5f..e9afa9705 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -62,6 +62,7 @@ $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); + $cl_punch_in_mode = $request->getParameter('punch_in_mode'); $cl_allow_overlap = $request->getParameter('allow_overlap'); $cl_future_entries = $request->getParameter('future_entries'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); @@ -98,6 +99,7 @@ $cl_project_required = $user->project_required; $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; + $cl_punch_in_mode = $user->punch_in_mode; $cl_allow_overlap = $user->allow_overlap; $cl_future_entries = $user->future_entries; $cl_uncompleted_indicators = $user->uncompleted_indicators; @@ -193,6 +195,9 @@ $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); + // Punch in mode checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'punch_in_mode','value'=>$cl_punch_in_mode)); + // Allow overlap checkbox. $form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap)); @@ -293,6 +298,8 @@ // Prepare config string. if ($cl_show_holidays) $config .= ',show_holidays'; + if ($cl_punch_in_mode) + $config .= ',punch_in_mode'; if ($cl_allow_overlap) $config .= ',allow_overlap'; if ($cl_future_entries) diff --git a/time.php b/time.php index 9fca8898a..39bac8015 100644 --- a/time.php +++ b/time.php @@ -187,7 +187,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + if ($user->punch_in_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/time_edit.php b/time_edit.php index 607199714..5f135e45a 100644 --- a/time_edit.php +++ b/time_edit.php @@ -178,7 +178,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) { + if ($user->punch_in_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); From 7f044f1ee58129eace73b829509b06384533a25d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 15 Feb 2018 19:40:47 +0000 Subject: [PATCH 0537/2515] Forgot to change the version. --- WEB-INF/templates/footer.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3616c6e81..20aebdb01 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.20.3993 | Copyright © Anuko | +  Anuko Time Tracker 1.17.20.3994 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 11cfcc792a4c3578abce0ef3f1b933f3858b5c1d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 15 Feb 2018 19:17:03 +0000 Subject: [PATCH 0536/2515] Implemented a configurable punch in mode as per issue #53. --- WEB-INF/config.php.dist | 6 ------ WEB-INF/lib/ttUser.class.php | 5 +++++ WEB-INF/templates/profile_edit.tpl | 4 ++++ mobile/time.php | 2 +- mobile/time_edit.php | 2 +- profile_edit.php | 7 +++++++ time.php | 2 +- time_edit.php | 2 +- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index c0dd256d5..ed00f3a50 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -75,12 +75,6 @@ define('APP_NAME', ''); define('COST_ON_REPORTS', true); -// READONLY_START_FINISH - defines whether the start and finish fields on time entry pages are read-only. -// This applies to regular users only. Manager and co-managers can edit these values. -// -// define('READONLY_START_FINISH', false); - - // WEEKEND_START_DAY // // This option defines which days are highlighted with weekend color. diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 915d241f2..697d541fc 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -46,6 +46,7 @@ class ttUser { var $project_required = 0; // Whether project selection is required on time entires. var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). + var $punch_in_mode = 0; // Whether punch in mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. var $future_entries = 0; // Whether to allow creating future entries. var $uncompleted_indicators = 0; // Uncompleted time entry indicators (show nowhere or on users page). @@ -115,6 +116,7 @@ function __construct($login, $id = null) { // Set user config options. $this->show_holidays = in_array('show_holidays', $config_array); + $this->punch_in_mode = in_array('punch_in_mode', $config_array); $this->allow_overlap = in_array('allow_overlap', $config_array); $this->future_entries = in_array('future_entries', $config_array); $this->uncompleted_indicators = in_array('uncompleted_indicators', $config_array); @@ -137,6 +139,9 @@ function __construct($login, $id = null) { } elseif ($this->role == ROLE_SITE_ADMIN) { $this->rights = right_administer_site; } + + // Adjust punch_in_mode for managers as they are allowed to overwrite start and end times. + if ($this->canManageTeam()) $this->punch_in_mode = 0; } } diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 51d01cc2b..f7bb80640 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -172,6 +172,10 @@ function handlePluginCheckboxes() { {$i18n.form.profile.record_type}: {$forms.profileForm.record_type.control}
{$i18n.form.profile.punch_in_mode}:{$forms.profileForm.punch_in_mode.control} {$i18n.label.what_is_it}
{$i18n.form.profile.allow_overlap}: {$forms.profileForm.allow_overlap.control} {$i18n.label.what_is_it}
- {/if} -{if $template_dropdown} +{if (isset($template_dropdown) && $template_dropdown)} diff --git a/WEB-INF/templates/time_script.tpl b/WEB-INF/templates/time_script.tpl index 5834ba3cc..67c5062cc 100644 --- a/WEB-INF/templates/time_script.tpl +++ b/WEB-INF/templates/time_script.tpl @@ -46,23 +46,25 @@ var task_names = new Array(); // Prepare an array of template ids for projects. var template_ids = new Array(); -{if $bind_templates_with_projects} +{if (isset($bind_templates_with_projects) && $bind_templates_with_projects)} {foreach $project_list as $project} template_ids[{$project.id}] = "{$project.templates}"; {/foreach} {/if} // Prepare an array of template names. var template_names = new Array(); -{if $bind_templates_with_projects} +{if (isset($bind_templates_with_projects) && $bind_templates_with_projects) && isset($template_list)} {foreach $template_list as $template} template_names[{$template.id}] = "{$template.name|escape:'javascript'}"; {/foreach} {/if} // Prepare an array of template bodies. var template_bodies = new Array(); -{foreach $template_list as $template} - template_bodies[{$template.id}] = "{$template.content|escape:'javascript'}"; -{/foreach} +{if isset($template_list)} + {foreach $template_list as $template} + template_bodies[{$template.id}] = "{$template.content|escape:'javascript'}"; + {/foreach} +{/if} // The fillNote function populates the Note field with a selected template body. function fillNote(id) { @@ -189,7 +191,7 @@ function fillTaskDropdown(id) { // The fillTemplateDropdown function populates the template combo box with // templates associated with a selected project (project id is passed here as id). function fillTemplateDropdown(id) { -{if !$bind_templates_with_projects} +{if (!isset($bind_templates_with_projects) || !$bind_templates_with_projects)} return; // Do nothing if we are not binding templates with projects, {/if} @@ -234,7 +236,7 @@ function fillTemplateDropdown(id) { // The prepopulateNote function populates the note field with first found template body in Template dropdown. function prepopulateNote() { - {if !$prepopulate_note} + {if (!isset($prepopulate_note) || !$prepopulate_note)} return; {/if} var dropdown = document.getElementById("template"); diff --git a/initialize.php b/initialize.php index a739b939e..d34aa56d5 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5433"); +define("APP_VERSION", "1.19.28.5434"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 66cf4da4b..90d54c0cf 100644 --- a/time.php +++ b/time.php @@ -225,6 +225,7 @@ $largeScreenCalendarRowSpan += 2; // Client dropdown. + $client_list = array(); if ($showClient) { $active_clients = ttGroupHelper::getActiveClients(true); // We need an array of assigned project ids to do some trimming. From 1ce02deaaa3f2c66162a55fe0b62acb1dd94739a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Apr 2021 22:11:54 +0000 Subject: [PATCH 2112/2515] Addressed a few more php8 warnings. --- WEB-INF/lib/ttTimeHelper.class.php | 4 ++-- WEB-INF/templates/header2.tpl | 8 ++++---- WEB-INF/templates/time_edit2.tpl | 2 +- initialize.php | 2 +- time_edit.php | 2 ++ 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index af2a436a5..78e7a2cf5 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -424,10 +424,10 @@ static function insert($fields) $client = $fields['client']; $project = $fields['project']; $task = $fields['task']; - $invoice = $fields['invoice']; + $invoice = isset($fields['invoice']) ? $fields['invoice'] : null; $note = $fields['note']; $billable = $fields['billable']; - $paid = $fields['paid']; + $paid = isset($fields['paid']) ? $fields['paid'] : null; $start = ttTimeHelper::to24HourFormat($start); if ($finish) { diff --git a/WEB-INF/templates/header2.tpl b/WEB-INF/templates/header2.tpl index 74ccb1adc..65af554ee 100644 --- a/WEB-INF/templates/header2.tpl +++ b/WEB-INF/templates/header2.tpl @@ -21,7 +21,7 @@ - + -{if $template_dropdown} +{if (isset($template_dropdown) && $template_dropdown)} diff --git a/initialize.php b/initialize.php index d34aa56d5..be7ff2576 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5434"); +define("APP_VERSION", "1.19.28.5435"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time_edit.php b/time_edit.php index 774add2c6..31ee2d137 100644 --- a/time_edit.php +++ b/time_edit.php @@ -76,6 +76,7 @@ $cl_billable = 1; if ($showBillable) $cl_billable = $request->getParameter('billable'); + $cl_paid = 0; if ($showPaidStatus) $cl_paid = $request->getParameter('paid'); } else { @@ -166,6 +167,7 @@ 'empty'=>array(''=>$i18n->get('dropdown.select')))); // Client dropdown. + $client_list = array(); if ($showClient) { $active_clients = ttGroupHelper::getActiveClients(true); // We need an array of assigned project ids to do some trimming. From 0c78b2191214590d9468be1392b547913ddcb10c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 00:00:57 +0000 Subject: [PATCH 2113/2515] Eliminated a few more php8 warnings. --- WEB-INF/lib/ttGroupHelper.class.php | 6 +++++- WEB-INF/lib/ttUser.class.php | 5 ++++- WEB-INF/templates/header.tpl | 6 +++--- plugins.php | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 895fa1dc6..6da527085 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -336,6 +336,8 @@ static function getActiveProjects($includeFiles = false) $group_id = $user->getGroup(); $org_id = $user->org_id; + $filePart = ''; + $fileJoin = ''; if ($includeFiles) { $filePart = ', if(Sub1.entity_id is null, 0, 1) as has_files'; $fileJoin = " left join (select distinct entity_id from tt_files". @@ -364,6 +366,8 @@ static function getInactiveProjects($includeFiles = false) $group_id = $user->getGroup(); $org_id = $user->org_id; + $filePart = ''; + $fileJoin = ''; if ($includeFiles) { $filePart = ', if(Sub1.entity_id is null, 0, 1) as has_files'; $fileJoin = " left join (select distinct entity_id from tt_files". @@ -502,7 +506,7 @@ static function getActiveUsers($options = null) { return false; while ($val = $res->fetchRow()) { // Localize top manager role name, as it is not localized in db. - if ($val['rank'] == 512) + if (isset($val['rank']) && $val['rank'] == 512) $val['role_name'] = $i18n->get('role.top_manager.label'); $user_list[] = $val; } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index fcfc1b9d5..ca0b759e8 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -694,10 +694,13 @@ function adjustBehalfId() { function updateGroup($fields) { $mdb2 = getConnection(); - $group_id = $fields['group_id']; + $group_id = isset($fields['group_id']) ? $fields['group_id'] : null; if ($group_id && !$this->isGroupValid($group_id)) return false; if (!$group_id) $group_id = $this->getGroup(); + $name_part = $description_part = $currency_part = $lang_part = $decimal_mark_part = $date_format_part = $time_format_part = + $week_start_part = $tracking_mode_part = $project_required_part = $record_type_part = $bcc_email_part = $allow_ip_part = + $plugins_part = $config_part = $custom_css_part = $lock_spec_part = $holidays_part = $workday_minutes_part = ''; if (isset($fields['name'])) $name_part = ', name = '.$mdb2->quote($fields['name']); if (isset($fields['description'])) $description_part = ', description = '.$mdb2->quote($fields['description']); if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 10640cb29..29ec892d3 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -5,7 +5,7 @@ -{if $i18n.language.rtl} +{if (isset($i18n.language.rtl) && $i18n.language.rtl)} {/if} {if $user->getCustomCss()} @@ -20,7 +20,7 @@ - + {assign var="tab_width" value="700"} @@ -176,7 +176,7 @@ {if $title}
 Anuko Time Tracker 1.17.20.3994 | Copyright © Anuko | +  Anuko Time Tracker 1.17.21.3995 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 1bb418518633df9bda7d73235759b11e640cc81f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 15 Feb 2018 21:37:29 +0000 Subject: [PATCH 0538/2515] Removed COST_ON_REPORTS global setting as per issue #53. --- WEB-INF/config.php.dist | 5 ----- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/reports.tpl | 2 +- reports.php | 3 +-- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index ed00f3a50..bb1937937 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -70,11 +70,6 @@ define('APP_NAME', ''); // define('OLD_PASSWORDS', true); -// COST_ON_REPORTS - defines the availability of the Cost field on the Reports page. -// -define('COST_ON_REPORTS', true); - - // WEEKEND_START_DAY // // This option defines which days are highlighted with weekend color. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 20aebdb01..4558949fe 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- -{if ((($user->canManageTeam() || $user->isClient()) || $user->isPluginEnabled('ex')) && defined('COST_ON_REPORTS') && isTrue($smarty.const.COST_ON_REPORTS))} +{if (($user->canManageTeam() || $user->isClient()) || $user->isPluginEnabled('ex'))} {else} diff --git a/reports.php b/reports.php index 80e1e903b..27a722446 100644 --- a/reports.php +++ b/reports.php @@ -197,8 +197,7 @@ } $form->addInput(array('type'=>'checkbox','name'=>'chduration')); $form->addInput(array('type'=>'checkbox','name'=>'chnote')); -if (defined('COST_ON_REPORTS') && isTrue(COST_ON_REPORTS)) - $form->addInput(array('type'=>'checkbox','name'=>'chcost')); +$form->addInput(array('type'=>'checkbox','name'=>'chcost')); // If we have a custom field - add a checkbox for it. if ($custom_fields && $custom_fields->fields[0]) $form->addInput(array('type'=>'checkbox','name'=>'chcf_1')); From d952547e1d6e9f22fffd5cd76e2015d60045889f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 16 Feb 2018 14:56:38 +0000 Subject: [PATCH 0539/2515] Minor improvements in Italian translation. --- WEB-INF/lib/ttUser.class.php | 34 ++++++++++++++++++++++++++++++++++ WEB-INF/resources/it.lang.php | 20 +++++++++----------- WEB-INF/templates/footer.tpl | 2 +- initialize.php | 6 ++++++ 4 files changed, 50 insertions(+), 12 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 697d541fc..60d08726a 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -59,6 +59,7 @@ class ttUser { var $lock_spec = null; // Cron specification for record locking. var $workday_minutes = 480; // Number of work minutes in a regular day. var $rights = 0; // A mask of user rights. + var $rights_array = array(); // An array of user rights, planned replacement of array mask. // Constructor. function __construct($login, $id = null) { @@ -130,8 +131,15 @@ function __construct($login, $id = null) { // Set user rights. if ($this->role == ROLE_USER) { $this->rights = right_data_entry|right_view_charts|right_view_reports; + // TODO: get customized rights from the database instead. + $this->rights_array[] = "data_entry"; // Right to enter time and expense records into Time Tracker. + $this->rights_array[] = "view_own_reports"; // Right to view own reports (for a specific user). + $this->rights_array[] = "view_own_charts"; // Right to view own charts (for a specific user). } elseif ($this->role == ROLE_CLIENT) { $this->rights = right_view_reports|right_view_invoices; // TODO: how about right_view_charts, too? + $this->rights_array[] = "view_client_reports"; // Right to view reports for a specific client. + $this->rights_array[] = "view_client_charts"; // Right to view charts for a specific client. + $this->rights_array[] = "view_client_invoices"; // Right to view invoices for a specific client. } elseif ($this->role == ROLE_COMANAGER) { $this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team; } elseif ($this->role == ROLE_MANAGER) { @@ -140,6 +148,32 @@ function __construct($login, $id = null) { $this->rights = right_administer_site; } +/* +// TODO: redesign of user rights and roles is currently ongoing. +// As we run our of bits for sure at some point, rights should be strings instead, +// for example: "data_entry". +// Also, we need rights editor page and team-customized roles. +// Move this stuff from here to ttUser class. +// +// User access rights - bits that collectively define an access mask to the system (a role). +// We'll have some bits here (1,2, etc...) reserved for future use. +define('right_data_entry', 4); // Right to enter work hours and expenses. +define('right_view_charts', 8); // Right to view charts. +define('right_view_reports', 16); // Right to view reports. +define('right_view_invoices', 32); // Right to view invoices. +define('right_manage_team', 64); // Right to manage team. Note that this is not full access to team. +define('right_assign_roles', 128); // Right to assign user roles. +define('right_export_team', 256); // Right to export team data to a file. +define('right_administer_site', 1024); // Admin account right to manage the application as a whole. + +// User roles. +define('ROLE_USER', 4); // Regular user. +define('ROLE_CLIENT', 16); // Client (to view reports and invoices). +define('ROLE_COMANAGER', 68); // Team co-manager. Can do many things but not as much as team manager. +define('ROLE_MANAGER', 324); // Team manager. Can do everything for a team. +define('ROLE_SITE_ADMIN', 1024); // Site administrator. +*/ + // Adjust punch_in_mode for managers as they are allowed to overwrite start and end times. if ($this->canManageTeam()) $this->punch_in_mode = 0; } diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 96dd91916..83045b570 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -56,7 +56,7 @@ 'menu.tasks' => 'Compiti', 'menu.users' => 'Utenti', 'menu.teams' => 'Gruppi', -'menu.export' => 'Esportazione', // TODO: is this correct? Also, I auto-translated some other terms in menu section. Check for accuracy. +'menu.export' => 'Esportazione', 'menu.clients' => 'Clienti', 'menu.options' => 'Opzioni', @@ -75,14 +75,14 @@ 'error.not_equal' => 'Il campo "{0}" non è uguale al campo "{1}".', 'error.interval' => 'Il campo "{0}" deve essere maggiore di "{1}".', 'error.project' => 'Seleziona il progetto.', -'error.task' => 'Seleziona compito.', // TODO: is this correct? +'error.task' => 'Seleziona compito.', 'error.client' => 'Seleziona il cliente.', 'error.report' => 'Seleziona rapporto.', 'error.record' => 'Seleziona record.', 'error.auth' => 'Login o password errati.', 'error.user_exists' => 'Esiste già un utente con questo username.', 'error.project_exists' => 'Esiste già un progetto con questo nome.', -'error.task_exists' => 'Esiste già un compito con questo nome.', // TODO: is this correct? "un compito"? +'error.task_exists' => 'Esiste già un compito con questo nome.', 'error.client_exists' => 'Esiste già un cliente con questo nome.', 'error.invoice_exists' => 'Esiste già una fattura con questo numero.', 'error.no_invoiceable_items' => 'Non ci sono voci fatturabili.', @@ -184,7 +184,7 @@ 'label.client_address' => 'Indirizzo cliente', 'label.or' => 'o', 'label.error' => 'Errore', -'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', // TODO: il tuo and then la tua? Improve? +'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', 'label.required_fields' => '* campi obbligatori', 'label.on_behalf' => 'a favore di', 'label.role_manager' => '(manager)', @@ -198,11 +198,11 @@ 'label.custom_fields' => 'Campi personalizzati', 'label.monthly_quotas' => 'Quote mensili', 'label.type' => 'Tipo', -'label.type_dropdown' => 'scelta multipla', // TODO: translation looks incorrect, a dropdown control is a single choice. +'label.type_dropdown' => 'menu a tendina', 'label.type_text' => 'testo', 'label.required' => 'Obbligatorio', 'label.fav_report' => 'Rapporto preferito', -// 'label.cron_schedule' => 'Cron schedule', // TODO: how about "Programma cron" here? +'label.cron_schedule' => 'Cron programmata', 'label.what_is_it' => 'Cosa è?', 'label.expense' => 'Spesa', 'label.quantity' => 'Quantità', @@ -245,7 +245,7 @@ 'title.edit_project' => 'Modifica progetto', 'title.delete_project' => 'Elimina progetto', 'title.tasks' => 'Compiti', -'title.add_task' => 'Aggiungi compito', // TODO: is this correct? +'title.add_task' => 'Aggiungi compito', 'title.edit_task' => 'Modifica compito', 'title.delete_task' => 'Eliminazione compito', 'title.users' => 'Utenti', @@ -422,8 +422,7 @@ // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ore', 'form.profile.24_hours' => '24 ore', -// // TODO: translate the following. -// 'form.profile.show_holidays' => 'Show holidays', +'form.profile.show_holidays' => 'Mostra vacanze', 'form.profile.tracking_mode' => 'Modalità di registrazione', 'form.profile.mode_time' => 'tempo', 'form.profile.mode_projects' => 'progetti', @@ -437,8 +436,7 @@ // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', -// TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps? -// 'form.profile.plugins' => 'Plugins', +'form.profile.plugins' => 'Plugin', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.from' => 'Da', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4558949fe..2eaf9b3dd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.21.3995 | Copyright © Anuko | +  Anuko Time Tracker 1.17.21.3996 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 88511512f..8e7daf092 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -261,7 +261,7 @@ function handleCheckboxes() { {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if}
-
 Anuko Time Tracker 1.17.21.3996 | Copyright © Anuko | +  Anuko Time Tracker 1.17.21.3997 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/initialize.php b/initialize.php index f309ee6a9..5d721b803 100644 --- a/initialize.php +++ b/initialize.php @@ -125,6 +125,12 @@ define('TYPE_START_FINISH', 1); // Time record has start and finish times. define('TYPE_DURATION', 2); // Time record has only duration, no start and finish times. +// TODO: redesign of user rights and roles is currently ongoing. +// As we run our of bits for sure at some point, rights should be strings instead, +// for example: "data_entry". +// Also, we need rights editor page and team-customized roles. +// Move this stuff from here to ttUser class. +// // User access rights - bits that collectively define an access mask to the system (a role). // We'll have some bits here (1,2, etc...) reserved for future use. define('right_data_entry', 4); // Right to enter work hours and expenses. From 9afadaf6b4d3ea192021530cce4939226c7c310f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 16 Feb 2018 19:52:44 +0000 Subject: [PATCH 0540/2515] Itroduced a temporary define MANAGER_ONLY_TEAM_SETTINGS for issue #53. --- WEB-INF/config.php.dist | 4 ++++ WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index bb1937937..8e9cf20f1 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -208,3 +208,7 @@ define('AUTH_MODULE', 'db'); // Height in pixels for the note input field in time.php. Defaults to 40. // define('NOTE_INPUT_HEIGHT', 100); + +// define('MANAGER_ONLY_TEAM_SETTINGS', true); // Note: temporary define, to be removed after introduction of role edits. + // Currently checked for "defined" only in profile_edit.tpl, meaning that false + // value here means the same thing. \ No newline at end of file diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2eaf9b3dd..a4bcc6d2a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- -{if $user->canManageTeam()} +{if $user->isManager() || ($user->canManageTeam() && !defined(MANAGER_ONLY_TEAM_SETTINGS))} From 4b320378230d5de8cd44d6d819b8c583a714c636 Mon Sep 17 00:00:00 2001 From: Livivs <36597092+Livivs@users.noreply.github.com> Date: Sun, 18 Feb 2018 14:38:21 +0100 Subject: [PATCH 0541/2515] update hu.lang.php some words for now to start (#54) I'd like to help translating, because I really like to use TimeTracker, maybe this can be beneficial for other Hungairan users as well. :) --- WEB-INF/resources/hu.lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index cfba30d0b..9671ad1b3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -45,10 +45,10 @@ 'menu.login' => 'Bejelentkezés', 'menu.logout' => 'Kijelentkezés', // TODO: translate the following. -// 'menu.forum' => 'Forum', +'menu.forum' => 'Fórum', 'menu.help' => 'Segítség', // TODO: translate the following. -// 'menu.create_team' => 'Create Team', +'menu.create_team' => 'Csoport létrehozása', 'menu.profile' => 'Profil', 'menu.time' => 'Munkaidő', // TODO: translate the following. From f74c7df066d55b06570f7b7b1fabb71246cb5791 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Feb 2018 13:41:18 +0000 Subject: [PATCH 0542/2515] Removed no longer needed comments. --- WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 9671ad1b3..81270f5c7 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -44,10 +44,8 @@ // Example: https://timetracker.anuko.com (black menu on top). 'menu.login' => 'Bejelentkezés', 'menu.logout' => 'Kijelentkezés', -// TODO: translate the following. 'menu.forum' => 'Fórum', 'menu.help' => 'Segítség', -// TODO: translate the following. 'menu.create_team' => 'Csoport létrehozása', 'menu.profile' => 'Profil', 'menu.time' => 'Munkaidő', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index a4bcc6d2a..1e7e0784d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.21.3997 | Copyright © Anuko | +  Anuko Time Tracker 1.17.22.3998 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index f7bb80640..ce4a6bf20 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -129,7 +129,7 @@ function handlePluginCheckboxes() { {$i18n.label.required_fields}
 
- {/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} - {* {* column for edit icons *} + {* column for edit icons *} {/if} @@ -172,7 +172,12 @@ {if 1 == $item.type}{/if} {if 2 == $item.type}{/if} {/if} - {* {* column for edit icons *} + {if $item.approved || $item.timesheet_id || $item.invoice_id} + + {else} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} @@ -222,7 +227,7 @@ {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} - {* {* column for edit icons *} + {* column for edit icons *} {/if} @@ -264,7 +269,7 @@ {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} - {* {* column for edit icons *} + {* column for edit icons *} {/if}
 Anuko Time Tracker 1.17.22.3998 | Copyright © Anuko | +  Anuko Time Tracker 1.17.22.3999 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 3588c58386ea0e275d019b635dcc815f280589de Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Feb 2018 15:47:52 +0000 Subject: [PATCH 0543/2515] Added a requirement to select a client for a client role. --- WEB-INF/templates/footer.tpl | 2 +- user_add.php | 2 ++ user_edit.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1e7e0784d..df6a8da69 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} + {* {* column for edit icons *} {/if} @@ -171,6 +172,7 @@ {if 1 == $item.type}{/if} {if 2 == $item.type}{/if} {/if} + {* {* column for edit icons *} {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} @@ -220,6 +222,7 @@ {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} + {* {* column for edit icons *} {/if} @@ -261,6 +264,7 @@ {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} + {* {* column for edit icons *} {/if}
 Anuko Time Tracker 1.17.22.3999 | Copyright © Anuko | +  Anuko Time Tracker 1.17.23.4000 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/user_add.php b/user_add.php index b8b5d3020..906b2edf0 100644 --- a/user_add.php +++ b/user_add.php @@ -141,6 +141,8 @@ function render(&$table, $value, $row, $column, $selected = false) { $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); + // Require selection of a client for a client role. + if ($user->isPluginEnabled('cl') && $cl_role == ROLE_CLIENT && !$cl_client_id) $err->add($i18n->getKey('error.client')); if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); if ($err->no()) { diff --git a/user_edit.php b/user_edit.php index d7a3feb5e..415005365 100644 --- a/user_edit.php +++ b/user_edit.php @@ -174,6 +174,8 @@ function render(&$table, $value, $row, $column, $selected = false) { } if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); + // Require selection of a client for a client role. + if ($user->isPluginEnabled('cl') && $cl_role == ROLE_CLIENT && !$cl_client_id) $err->add($i18n->getKey('error.client')); if ($err->no()) { $existing_user = ttUserHelper::getUserByLogin($cl_login); From 20f744b683cc7fd47c222d423ae56fa02aad64a2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Feb 2018 16:08:49 +0000 Subject: [PATCH 0544/2515] Cosmetic - changed the order of input data checking to match control layout. --- user_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_edit.php b/user_edit.php index 415005365..830889242 100644 --- a/user_edit.php +++ b/user_edit.php @@ -173,9 +173,9 @@ function render(&$table, $value, $row, $column, $selected = false) { $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password')); } if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); // Require selection of a client for a client role. if ($user->isPluginEnabled('cl') && $cl_role == ROLE_CLIENT && !$cl_client_id) $err->add($i18n->getKey('error.client')); + if (!ttValidFloat($cl_rate, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('form.users.default_rate')); if ($err->no()) { $existing_user = ttUserHelper::getUserByLogin($cl_login); From 1525dcb2eb2094c83ac9762675d957c285762434 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Feb 2018 19:23:57 +0000 Subject: [PATCH 0545/2515] Renamed Punch in mode to Punch mode. --- WEB-INF/lib/ttUser.class.php | 9 +++++---- WEB-INF/resources/ca.lang.php | 2 +- WEB-INF/resources/cs.lang.php | 2 +- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/en.lang.php | 2 +- WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 +- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 +- WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 +- WEB-INF/resources/sv.lang.php | 2 +- WEB-INF/resources/tr.lang.php | 4 ++-- WEB-INF/resources/zh-cn.lang.php | 2 +- WEB-INF/resources/zh-tw.lang.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/profile_edit.tpl | 4 ++-- mobile/time.php | 2 +- mobile/time_edit.php | 2 +- profile_edit.php | 12 ++++++------ time.php | 2 +- time_edit.php | 2 +- 37 files changed, 48 insertions(+), 47 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 60d08726a..b340c7bc6 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -46,7 +46,7 @@ class ttUser { var $project_required = 0; // Whether project selection is required on time entires. var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). - var $punch_in_mode = 0; // Whether punch in mode is enabled for user. + var $punch_mode = 0; // Whether punch mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. var $future_entries = 0; // Whether to allow creating future entries. var $uncompleted_indicators = 0; // Uncompleted time entry indicators (show nowhere or on users page). @@ -117,7 +117,7 @@ function __construct($login, $id = null) { // Set user config options. $this->show_holidays = in_array('show_holidays', $config_array); - $this->punch_in_mode = in_array('punch_in_mode', $config_array); + $this->punch_mode = in_array('punch_mode', $config_array); $this->allow_overlap = in_array('allow_overlap', $config_array); $this->future_entries = in_array('future_entries', $config_array); $this->uncompleted_indicators = in_array('uncompleted_indicators', $config_array); @@ -174,8 +174,9 @@ function __construct($login, $id = null) { define('ROLE_SITE_ADMIN', 1024); // Site administrator. */ - // Adjust punch_in_mode for managers as they are allowed to overwrite start and end times. - if ($this->canManageTeam()) $this->punch_in_mode = 0; + // Adjust punch_mode for managers as they are allowed to overwrite start and end times. + // TODO: because of this we currently have a bug on the Team Profile page with "Punch mode" checkbox always off. + if ($this->canManageTeam()) $this->punch_mode = 0; } } diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index ad08cfa8a..e3f9fa079 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -485,7 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index cd5abbbb3..ebbececc8 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -500,7 +500,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 34c62b8aa..f3346ec24 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -433,7 +433,7 @@ 'form.profile.type_start_finish' => 'Start og slut', 'form.profile.type_duration' => 'Varighed', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uafsluttede indikatore', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 793507eb7..3df7b2a55 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -431,7 +431,7 @@ 'form.profile.type_start_finish' => 'Start und Ende', 'form.profile.type_duration' => 'Dauer', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 618745f04..eec4c0982 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -426,7 +426,7 @@ 'form.profile.type_all' => 'all', 'form.profile.type_start_finish' => 'start and finish', 'form.profile.type_duration' => 'duration', -'form.profile.punch_in_mode' => 'Punch in mode', +'form.profile.punch_mode' => 'Punch mode', 'form.profile.allow_overlap' => 'Allow overlap', 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 51d69f50c..39ac20014 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -498,7 +498,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b12921a01..3bfbe8601 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -496,7 +496,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index a6ec5ff2b..02846df91 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -462,7 +462,7 @@ 'form.profile.type_start_finish' => 'شروع و اتمام', 'form.profile.type_duration' => 'مدت زمان', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 87958d5c8..ee24cd1ed 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -440,7 +440,7 @@ 'form.profile.type_start_finish' => 'aloitus ja lopetus', 'form.profile.type_duration' => 'kesto', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 6898cbedf..e48db54f8 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -430,7 +430,7 @@ 'form.profile.type_start_finish' => 'Début et fin', 'form.profile.type_duration' => 'Durée', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index ce8f1f33f..fb1e74a4a 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -467,7 +467,7 @@ 'form.profile.type_start_finish' => 'התחלה וסיום', 'form.profile.type_duration' => 'משך זמן', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 81270f5c7..935bc5f91 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -493,7 +493,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 83045b570..8e6319850 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -432,7 +432,7 @@ 'form.profile.type_start_finish' => 'inizio e fine', 'form.profile.type_duration' => 'durata', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b0e2b1f59..c08d69c75 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -485,7 +485,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index c18aa1731..3c8aa8ece 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -487,7 +487,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 0ae1f1e79..4ca682384 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -429,7 +429,7 @@ 'form.profile.type_start_finish' => 'begin en einde', 'form.profile.type_duration' => 'duur', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Onvolledige indicatoren', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index e533d70ae..553cbf7f6 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -483,7 +483,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index bb47e0df4..04c64fb62 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -443,7 +443,7 @@ 'form.profile.type_start_finish' => 'początek i koniec', 'form.profile.type_duration' => 'czas trwania', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 702c820c1..c1ec2b117 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -438,7 +438,7 @@ 'form.profile.type_start_finish' => 'início e fim', 'form.profile.type_duration' => 'duração', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 65196bad8..63be90c21 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -476,7 +476,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 74035115c..c7c6f99cd 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -493,7 +493,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index cff534030..18e81a66c 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -424,7 +424,7 @@ 'form.profile.type_all' => 'все', 'form.profile.type_start_finish' => 'начало и конец', 'form.profile.type_duration' => 'длительность', -'form.profile.punch_in_mode' => 'Пробивать время', +'form.profile.punch_mode' => 'Пробивать время', 'form.profile.allow_overlap' => 'Возможное перекрывание', 'form.profile.future_entries' => 'Будущие записи', 'form.profile.uncompleted_indicators' => 'Индикаторы незавершения', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 9ed685340..f0ae26cca 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -459,7 +459,7 @@ 'form.profile.type_start_finish' => 'začiatok a koniec', 'form.profile.type_duration' => 'trvanie', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index ac6492717..69fac8550 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -472,7 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index c4c16e561..4fa1a325b 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -441,7 +441,7 @@ 'form.profile.type_start_finish' => 'početak i kraj', 'form.profile.type_duration' => 'trajanje', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index b9f92583c..92664c531 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -438,7 +438,7 @@ 'form.profile.type_start_finish' => 'Starttid och sluttid', 'form.profile.type_duration' => 'Varaktighet', // TODO: translate the following. -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indikatorer för oavslutad registrering', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index ddadaa5ad..0897e2dfa 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -504,8 +504,8 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Allow overlap', -// 'form.profile.allow_overlap' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', +// 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', // 'form.profile.plugins' => 'Plugins', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 610c68c86..2b2e1ac28 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -472,7 +472,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 5e38bf627..b3286ab3e 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -482,7 +482,7 @@ // 'form.profile.type_all' => 'all', // 'form.profile.type_start_finish' => 'start and finish', // 'form.profile.type_duration' => 'duration', -// 'form.profile.punch_in_mode' => 'Punch in mode', +// 'form.profile.punch_mode' => 'Punch mode', // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', // 'form.profile.uncompleted_indicators' => 'Uncompleted indicators', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index df6a8da69..58b3b77dc 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + + diff --git a/mobile/time.php b/mobile/time.php index 0479f0cdb..9bb2a26d8 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -155,7 +155,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_in_mode) { + if ($user->punch_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 06ea90919..6861262be 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -175,7 +175,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_in_mode) { + if ($user->punch_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/profile_edit.php b/profile_edit.php index e9afa9705..c4e325df3 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -62,7 +62,7 @@ $cl_project_required = $request->getParameter('project_required'); $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); - $cl_punch_in_mode = $request->getParameter('punch_in_mode'); + $cl_punch_mode = $request->getParameter('punch_mode'); $cl_allow_overlap = $request->getParameter('allow_overlap'); $cl_future_entries = $request->getParameter('future_entries'); $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); @@ -99,7 +99,7 @@ $cl_project_required = $user->project_required; $cl_task_required = $user->task_required; $cl_record_type = $user->record_type; - $cl_punch_in_mode = $user->punch_in_mode; + $cl_punch_mode = $user->punch_mode; $cl_allow_overlap = $user->allow_overlap; $cl_future_entries = $user->future_entries; $cl_uncompleted_indicators = $user->uncompleted_indicators; @@ -195,8 +195,8 @@ $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); - // Punch in mode checkbox. - $form->addInput(array('type'=>'checkbox','name'=>'punch_in_mode','value'=>$cl_punch_in_mode)); + // Punch mode checkbox. + $form->addInput(array('type'=>'checkbox','name'=>'punch_mode','value'=>$cl_punch_mode)); // Allow overlap checkbox. $form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap)); @@ -298,8 +298,8 @@ // Prepare config string. if ($cl_show_holidays) $config .= ',show_holidays'; - if ($cl_punch_in_mode) - $config .= ',punch_in_mode'; + if ($cl_punch_mode) + $config .= ',punch_mode'; if ($cl_allow_overlap) $config .= ',allow_overlap'; if ($cl_future_entries) diff --git a/time.php b/time.php index 39bac8015..f7bd3d3dd 100644 --- a/time.php +++ b/time.php @@ -187,7 +187,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_in_mode) { + if ($user->punch_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/time_edit.php b/time_edit.php index 5f135e45a..1a358ed78 100644 --- a/time_edit.php +++ b/time_edit.php @@ -178,7 +178,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_in_mode) { + if ($user->punch_mode) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); From 4cb1ca7b840b9fb4bd63fe31d1f1717fb0a56dd8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Feb 2018 18:13:33 +0000 Subject: [PATCH 0546/2515] Fixed a timestamp problem related to WampServer. --- WEB-INF/templates/footer.tpl | 2 +- mysql.sql | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 58b3b77dc..17cd70c7c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.17.23.4000 | Copyright © Anuko | +  Anuko Time Tracker 1.17.23.4001 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index ce4a6bf20..48511182c 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -173,8 +173,8 @@ function handlePluginCheckboxes() { {$forms.profileForm.record_type.control}
{$i18n.form.profile.punch_in_mode}:{$forms.profileForm.punch_in_mode.control} {$i18n.label.what_is_it}{$i18n.form.profile.punch_mode}:{$forms.profileForm.punch_mode.control} {$i18n.label.what_is_it}
{$i18n.form.profile.allow_overlap}:
- - + {/if} diff --git a/WEB-INF/templates/client_edit2.tpl b/WEB-INF/templates/client_edit2.tpl index 67b79ecdf..39c965ae0 100644 --- a/WEB-INF/templates/client_edit2.tpl +++ b/WEB-INF/templates/client_edit2.tpl @@ -34,7 +34,7 @@ License: See license.txt *} - + {/if} diff --git a/WEB-INF/templates/project_add2.tpl b/WEB-INF/templates/project_add2.tpl index cd900cf36..8cc43fcaa 100644 --- a/WEB-INF/templates/project_add2.tpl +++ b/WEB-INF/templates/project_add2.tpl @@ -28,7 +28,7 @@ License: See license.txt *} - + {/if} @@ -37,7 +37,7 @@ License: See license.txt *} - + {/if} diff --git a/WEB-INF/templates/project_edit2.tpl b/WEB-INF/templates/project_edit2.tpl index f7b23a9ac..3ecc85a84 100644 --- a/WEB-INF/templates/project_edit2.tpl +++ b/WEB-INF/templates/project_edit2.tpl @@ -26,7 +26,7 @@ License: See license.txt *} - + {/if} @@ -35,7 +35,7 @@ License: See license.txt *} - + {/if} diff --git a/WEB-INF/templates/task_add2.tpl b/WEB-INF/templates/task_add2.tpl index 1b1c4e42e..d933160af 100644 --- a/WEB-INF/templates/task_add2.tpl +++ b/WEB-INF/templates/task_add2.tpl @@ -20,7 +20,7 @@ License: See license.txt *} - + {/if} diff --git a/WEB-INF/templates/task_edit2.tpl b/WEB-INF/templates/task_edit2.tpl index 9292ad151..c6e433b73 100644 --- a/WEB-INF/templates/task_edit2.tpl +++ b/WEB-INF/templates/task_edit2.tpl @@ -26,7 +26,7 @@ License: See license.txt *} - + {/if} diff --git a/default.css b/default.css index 95f56094b..377197f28 100644 --- a/default.css +++ b/default.css @@ -233,6 +233,12 @@ div.record-list { text-align: left; } +/* a table cell containing a set ov vertically stacked checkboxes */ +.td-with-checkboxes { + text-align: left; + width: 300px; +} + /* div containing how to contribute message */ div.contribute-msg { text-align: center; diff --git a/initialize.php b/initialize.php index 47f069ba8..6ccd4533e 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5408"); +define("APP_VERSION", "1.19.23.5409"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 7e9111012d54e0feae92598b508f99cb035167d0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 20 Jan 2021 17:26:27 +0000 Subject: [PATCH 2084/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 12 +++--------- initialize.php | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 6d51082c7..70750349d 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -390,16 +390,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Wachtwoord vergeten?', - // TODO: re-translate form.login.about as it has changed. - // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', -'form.login.about' => 'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem.', +'form.login.about' => 'Anuko Time Tracker is een open source tijdregistratiesysteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Het verzoek om het wachtwoord te herstellen is verzonden per email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker wachtwoord herstel verzoek', -// TODO: retranslate form.reset_password.email_body as the string has changed. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", -'form.reset_password.email_body' => "Geachte medewerker,\n\nIemand, met IP adres %s, heeft verzocht uw wachtwoord in Anuko Time Tracker te herstellen. Klik op deze link als u uw wachtwoord wil wijzigen.\n\n%s\n\nAnuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem. Bezoek https://www.anuko.com voor meer informatie.\n\n", +'form.reset_password.email_body' => "Beste gebruiker,\n\nIemand, met IP adres %s, heeft verzocht uw wachtwoord in Anuko Time Tracker te herstellen. Klik op deze link als u uw wachtwoord wil wijzigen.\n\n%s\n\nAnuko Time Tracker is een open source tijdregistratiesysteem. Bezoek https://www.anuko.com voor meer informatie.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Voer het nieuwe wachtwoord in en klik op Bewaren.', @@ -546,9 +542,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Aan', 'form.mail.report_subject' => 'Time Tracker rapport', -// TODO: retranslate form.mail.footer as the English string has changed. -// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', -'form.mail.footer' => 'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem. Bezoek www.anuko.com voor meer informatie.', +'form.mail.footer' => 'Anuko Time Tracker is een open source tijdregistratiesysteem. Bezoek www.anuko.com voor meer informatie.', 'form.mail.report_sent' => 'Rapport is verzonden.', 'form.mail.invoice_sent' => 'Factuur is verzonden.', diff --git a/initialize.php b/initialize.php index 6ccd4533e..f955479f7 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5409"); +define("APP_VERSION", "1.19.23.5410"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 13ad968d9729dbff50acdeb652bba5e298633c0e Mon Sep 17 00:00:00 2001 From: Josh Bowers Date: Wed, 27 Jan 2021 07:06:47 -0800 Subject: [PATCH 2085/2515] extra '+' character and end of line causing error (#105) PHP Fatal error: Uncaught TypeError: Unsupported operand types: Smarty * int in ./time_edit.php:453 --- time_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time_edit.php b/time_edit.php index 89988409b..4065bf08f 100644 --- a/time_edit.php +++ b/time_edit.php @@ -449,7 +449,7 @@ $smarty->assign('entry_date', $cl_date); } $smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable);+ +$smarty->assign('show_billable', $showBillable); $smarty->assign('show_paid_status', $showPaidStatus); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); From 87b5c171f0ddb7ba24e5cf86a5238f1564e12459 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 20 Feb 2021 21:03:38 +0000 Subject: [PATCH 2086/2515] A couple of minor fixes to remove some php8 warnings. --- WEB-INF/lib/DateAndTime.class.php | 3 ++- WEB-INF/lib/ttUser.class.php | 1 + initialize.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php index 20f274265..1184bd853 100644 --- a/WEB-INF/lib/DateAndTime.class.php +++ b/WEB-INF/lib/DateAndTime.class.php @@ -325,6 +325,7 @@ function preprocessFormatString($format) { // replace locale-dependent strings $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format); $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format); + /* This block is commented out because we currently do not use these formatters. $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8'); $format = str_replace('%b', $abbrev_month, $format); $format = str_replace('%h', $abbrev_month, $format); @@ -332,7 +333,7 @@ function preprocessFormatString($format) { $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime if (strpos($format, '%c') !== false) { $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format); - } + }*/ return $format; } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 72b829d31..c006350fd 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -488,6 +488,7 @@ function getUsers($options) { $includeSelf = isset($options['include_self']); $select_part = 'select u.id, u.group_id, u.name'; + $include_quota = false; if (isset($options['include_login'])) { $select_part .= ', u.login'; // Piggy-back on include_login to see if we must also include quota_percent. diff --git a/initialize.php b/initialize.php index f955479f7..55b1a1034 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5410"); +define("APP_VERSION", "1.19.23.5411"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From f3f9921ce9d15b84658b40bf1cefe4870490e0ab Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 20 Feb 2021 21:56:04 +0000 Subject: [PATCH 2087/2515] A couple more fixes for php8. --- WEB-INF/lib/form/Calendar.class.php | 2 +- WEB-INF/lib/ttUser.class.php | 4 +++- initialize.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index d335e1503..337737f1c 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -80,7 +80,7 @@ function getHtml() { $firstOfPreviousMonth = strftime(DB_DATEFORMAT, $firstOfPreviousMonth2AM); // Print calendar header. - $html .= "\n\n\n"; + $html = "\n\n\n"; $html .= '
 Anuko Time Tracker 1.17.23.4001 | Copyright © Anuko | +  Anuko Time Tracker 1.17.24.4002 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mysql.sql b/mysql.sql index a09c3f4a0..78e09a803 100644 --- a/mysql.sql +++ b/mysql.sql @@ -14,7 +14,7 @@ # CREATE TABLE `tt_teams` ( `id` int(11) NOT NULL auto_increment, # team id - `timestamp` timestamp NOT NULL, # modification timestamp + `timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp `name` varchar(80) default NULL, # team name `currency` varchar(7) default NULL, # team currency symbol `decimal_mark` char(1) NOT NULL default '.', # separator in decimals @@ -42,17 +42,17 @@ CREATE TABLE `tt_teams` ( # Structure for table tt_users. This table is used to store user properties. # CREATE TABLE `tt_users` ( - `id` int(11) NOT NULL auto_increment, # user id - `timestamp` timestamp NOT NULL, # modification timestamp - `login` varchar(50) COLLATE utf8_bin NOT NULL, # user login - `password` varchar(50) default NULL, # password hash - `name` varchar(100) default NULL, # user name - `team_id` int(11) NOT NULL, # team id - `role` int(11) default '4', # user role ("manager", "co-manager", "client", or "user") - `client_id` int(11) default NULL, # client id for "client" user role - `rate` float(6,2) NOT NULL default '0.00', # default hourly rate - `email` varchar(100) default NULL, # user email - `status` tinyint(4) default '1', # user status + `id` int(11) NOT NULL auto_increment, # user id + `timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp + `login` varchar(50) COLLATE utf8_bin NOT NULL, # user login + `password` varchar(50) default NULL, # password hash + `name` varchar(100) default NULL, # user name + `team_id` int(11) NOT NULL, # team id + `role` int(11) default '4', # user role ("manager", "co-manager", "client", or "user") + `client_id` int(11) default NULL, # client id for "client" user role + `rate` float(6,2) NOT NULL default '0.00', # default hourly rate + `email` varchar(100) default NULL, # user email + `status` tinyint(4) default '1', # user status PRIMARY KEY (`id`) ); From f022655c123fabf9a236b99f4ffe0591189a4b6d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Feb 2018 20:58:07 +0000 Subject: [PATCH 0547/2515] Fixed presentation of the Punch mode checkbox. --- WEB-INF/lib/ttUser.class.php | 25 +++++++++++++++---------- WEB-INF/templates/footer.tpl | 2 +- mobile/time.php | 2 +- mobile/time_edit.php | 2 +- time.php | 2 +- time_edit.php | 2 +- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index b340c7bc6..815eff7c7 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -132,18 +132,27 @@ function __construct($login, $id = null) { if ($this->role == ROLE_USER) { $this->rights = right_data_entry|right_view_charts|right_view_reports; // TODO: get customized rights from the database instead. - $this->rights_array[] = "data_entry"; // Right to enter time and expense records into Time Tracker. - $this->rights_array[] = "view_own_reports"; // Right to view own reports (for a specific user). - $this->rights_array[] = "view_own_charts"; // Right to view own charts (for a specific user). + // $this->rights_array[] = "data_entry"; // Enter time and expense records into Time Tracker. + // $this->rights_array[] = "view_own_data"; // View own reports and charts. + // $this->rights_array[] = "manage_own_settings"; // Edit own settings. + // $this->rights_array[] = "view_users"; // View user names and roles in a group. } elseif ($this->role == ROLE_CLIENT) { $this->rights = right_view_reports|right_view_invoices; // TODO: how about right_view_charts, too? - $this->rights_array[] = "view_client_reports"; // Right to view reports for a specific client. - $this->rights_array[] = "view_client_charts"; // Right to view charts for a specific client. - $this->rights_array[] = "view_client_invoices"; // Right to view invoices for a specific client. + // $this->rights_array[] = "view_own_data"; // View own reports, charts, and invoices. + // $this->rights_array[] = "manage_own_settings"; // Edit own settings. } elseif ($this->role == ROLE_COMANAGER) { $this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team; + // $this->rights_array[] = "data_entry"; // Enter time and expense records into Time Tracker. + // $this->rights_array[] = "view_own_data"; // View own reports and charts. + // $this->rights_array[] = "manage_own_settings"; // Edit own settings. + // $this->rights_array[] = "view_users"; // View user names and roles in a group. + // $this->rights_array[] = "on_behalf_data_entry";// Can enter data on behalf of lower roles. + // $this->rights_array[] = "view_data"; // Can view data for lower roles. + $this->rights_array[] = "override_punch_mode"; // Can input any start and finish times for self and lower roles. + // TODO: get rights from the database instead. } elseif ($this->role == ROLE_MANAGER) { $this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team|right_assign_roles|right_export_team; + $this->rights_array[] = "override_punch_mode"; // Can input any start and finish times for self and lower roles. } elseif ($this->role == ROLE_SITE_ADMIN) { $this->rights = right_administer_site; } @@ -173,10 +182,6 @@ function __construct($login, $id = null) { define('ROLE_MANAGER', 324); // Team manager. Can do everything for a team. define('ROLE_SITE_ADMIN', 1024); // Site administrator. */ - - // Adjust punch_mode for managers as they are allowed to overwrite start and end times. - // TODO: because of this we currently have a bug on the Team Profile page with "Punch mode" checkbox always off. - if ($this->canManageTeam()) $this->punch_mode = 0; } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 17cd70c7c..28562116d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.24.4002 | Copyright © Anuko | +  Anuko Time Tracker 1.17.25.4003 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/time.php b/mobile/time.php index 9bb2a26d8..666f4c2cc 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -155,7 +155,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode) { + if ($user->punch_mode && !in_array('override_punch_mode', $user->rights_array)) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 6861262be..e374008f3 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -175,7 +175,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode) { + if ($user->punch_mode && !in_array('override_punch_mode', $user->rights_array)) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/time.php b/time.php index f7bd3d3dd..b6bb000e6 100644 --- a/time.php +++ b/time.php @@ -187,7 +187,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode) { + if ($user->punch_mode && !in_array('override_punch_mode', $user->rights_array)) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); diff --git a/time_edit.php b/time_edit.php index 1a358ed78..2ceb4b3ab 100644 --- a/time_edit.php +++ b/time_edit.php @@ -178,7 +178,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode) { + if ($user->punch_mode && !in_array('override_punch_mode', $user->rights_array)) { // Make the start and finish fields read-only. $form->getElement('start')->setEnabled(false); $form->getElement('finish')->setEnabled(false); From 7bafd815e19a8c4535a3684c01955fe7b789982d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Feb 2018 21:18:39 +0000 Subject: [PATCH 0548/2515] Fixed environment check for PHP opening tag in config.php for Windows systems. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 28562116d..540cabe91 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {if $show_projects} + diff --git a/WEB-INF/templates/user_edit2.tpl b/WEB-INF/templates/user_edit2.tpl index 107891777..5adad2e9f 100644 --- a/WEB-INF/templates/user_edit2.tpl +++ b/WEB-INF/templates/user_edit2.tpl @@ -185,6 +185,7 @@ function handleClientRole() { {if $show_projects} + diff --git a/default.css b/default.css index c4f8ac542..8159cab08 100644 --- a/default.css +++ b/default.css @@ -234,6 +234,10 @@ input[type="text"] { width: 220px; } +input[type="text"].project-rate-field { + width: 100px; +} + input[type="password"] { width: 220px; } diff --git a/initialize.php b/initialize.php index 79d1105fe..68f36434c 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5393"); +define("APP_VERSION", "1.19.23.5394"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_add.php b/user_add.php index e87fed752..046ecdb87 100644 --- a/user_add.php +++ b/user_add.php @@ -123,6 +123,7 @@ class RateCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; $field = new FloatField('rate_'.$table->getValueAtName($row, 'id')); + $field->setCssClass('project-rate-field'); $field->setFormName($table->getFormName()); $field->setSize(5); $field->setFormat('.2'); diff --git a/user_edit.php b/user_edit.php index 17c8292e3..be0f13e26 100644 --- a/user_edit.php +++ b/user_edit.php @@ -156,6 +156,7 @@ function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); + $field->setCssClass('project-rate-field'); $field->setFormName($table->getFormName()); $field->setSize(5); $field->setFormat('.2'); From 26058d1c778fba9ecdbef81453eaf64ed13f3607 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 29 Nov 2020 23:36:30 +0000 Subject: [PATCH 2069/2515] Improved presentation of project rates table. --- WEB-INF/lib/form/Table.class.php | 9 ++++----- default.css | 6 +++++- initialize.php | 2 +- user_edit.php | 5 +++-- week.php | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 7bcd78be8..1995b7dea 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -47,10 +47,9 @@ class Table extends FormElement { var $mHeaderOptions = array(); var $mProccessed = false; - function __construct($name, $cssClass = null) { + function __construct($name) { $this->class = 'Table'; $this->name = $name; - $this->cssClass = $cssClass; } function setKeyField($value) { @@ -123,15 +122,15 @@ function getHtml() { if ($this->mInteractive) $html .= $this->_addJavaScript(); $html .= "cssClass) { - $html .= " class=\"".$this->cssClass."\""; + if ($this->css_class) { + $html .= " class=\"".$this->css_class."\""; } if (count($this->mTableOptions) > 0) { foreach ($this->mTableOptions as $k=>$v) { $html .= " $k=\"$v\""; } } else { - $html .= " border=\"1\""; + // $html .= " border=\"1\""; } if ($this->mWidth!="") $html .= " width=\"".$this->mWidth."\""; $html .= ">\n"; diff --git a/default.css b/default.css index 8159cab08..2a6b06382 100644 --- a/default.css +++ b/default.css @@ -108,6 +108,10 @@ div.page-hint { margin-top: 1rem; } +.project-rate-table { + width: 300px; +} + .centered-table { margin-top: .5rem; margin-left: auto; @@ -235,7 +239,7 @@ input[type="text"] { } input[type="text"].project-rate-field { - width: 100px; + width: 50px; } input[type="password"] { diff --git a/initialize.php b/initialize.php index 68f36434c..ca81befef 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5394"); +define("APP_VERSION", "1.19.23.5395"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_edit.php b/user_edit.php index be0f13e26..b0868c4e5 100644 --- a/user_edit.php +++ b/user_edit.php @@ -146,7 +146,7 @@ // Define classes for the projects table. class NameCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200)); + //$this->setOptions(array('width'=>200)); $this->setValue(''); return $this->toString(); } @@ -169,8 +169,9 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Create projects table. $table = new Table('projects'); +$table->setCssClass('project-rate-table'); $table->setIAScript('setRate'); -$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); +//$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); $table->setData($projects); $table->setKeyField('id'); diff --git a/week.php b/week.php index d86e0c99c..fee395d66 100644 --- a/week.php +++ b/week.php @@ -275,7 +275,8 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Create week_durations table. -$table = new Table('week_durations', 'week_view_table'); +$table = new Table('week_durations'); +// $table->setCssClass('week_view_table'); // Currently not used. Fix this. $table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); $table->setRowOptions(array('class'=>'tableHeaderCentered')); $table->setData($dataArray); From 374853526cac28b5b38fc96638601eb550058564 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 1 Dec 2020 18:23:14 +0000 Subject: [PATCH 2070/2515] Resuming work on styles. --- WEB-INF/lib/form/Table.class.php | 3 +-- initialize.php | 2 +- user_edit.php | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index 1995b7dea..c83d90bd8 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -129,9 +129,8 @@ function getHtml() { foreach ($this->mTableOptions as $k=>$v) { $html .= " $k=\"$v\""; } - } else { - // $html .= " border=\"1\""; } + if ($this->mWidth!="") $html .= " width=\"".$this->mWidth."\""; $html .= ">\n"; diff --git a/initialize.php b/initialize.php index ca81befef..daa1b0522 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5395"); +define("APP_VERSION", "1.19.23.5396"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_edit.php b/user_edit.php index b0868c4e5..c270243ad 100644 --- a/user_edit.php +++ b/user_edit.php @@ -171,8 +171,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $table = new Table('projects'); $table->setCssClass('project-rate-table'); $table->setIAScript('setRate'); -//$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); $table->setData($projects); $table->setKeyField('id'); $table->setValue($cl_projects); From 5d1667d8de0bf0583234d750d2123f5c40962246 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 1 Dec 2020 18:33:13 +0000 Subject: [PATCH 2071/2515] Improved styles on user_add.php. --- default.css | 5 +++++ initialize.php | 2 +- user_add.php | 4 +--- user_edit.php | 2 -- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/default.css b/default.css index 2a6b06382..2aa8335f8 100644 --- a/default.css +++ b/default.css @@ -110,6 +110,11 @@ div.page-hint { .project-rate-table { width: 300px; + border-collapse: collapse; +} + +.project-rate-table td { + padding: .2rem; } .centered-table { diff --git a/initialize.php b/initialize.php index daa1b0522..aced0690c 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5396"); +define("APP_VERSION", "1.19.23.5397"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_add.php b/user_add.php index 046ecdb87..7b7b72ed8 100644 --- a/user_add.php +++ b/user_add.php @@ -114,7 +114,6 @@ // Define classes for the projects table. class NameCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200)); $this->setValue(''); return $this->toString(); } @@ -136,9 +135,8 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Create projects table. $table = new Table('projects'); +$table->setCssClass('project-rate-table'); $table->setIAScript('setDefaultRate'); -$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); $table->setData($projects); $table->setKeyField('id'); $table->setValue($cl_projects); diff --git a/user_edit.php b/user_edit.php index c270243ad..b1f1e65e2 100644 --- a/user_edit.php +++ b/user_edit.php @@ -146,7 +146,6 @@ // Define classes for the projects table. class NameCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { - //$this->setOptions(array('width'=>200)); $this->setValue(''); return $this->toString(); } @@ -154,7 +153,6 @@ function render(&$table, $value, $row, $column, $selected = false) { class RateCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; - $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); $field->setCssClass('project-rate-field'); $field->setFormName($table->getFormName()); From 529edc11b2f3476cae0a976ff40bdd5b62e4cbd2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 1 Dec 2020 22:03:35 +0000 Subject: [PATCH 2072/2515] Some cleanup and commenting in css. --- WEB-INF/templates/charts2.tpl | 4 +- default.css | 92 ++++++++++++++++++++++------------- initialize.php | 2 +- 3 files changed, 61 insertions(+), 37 deletions(-) diff --git a/WEB-INF/templates/charts2.tpl b/WEB-INF/templates/charts2.tpl index 7f4c3844a..6e9f1756d 100644 --- a/WEB-INF/templates/charts2.tpl +++ b/WEB-INF/templates/charts2.tpl @@ -53,7 +53,7 @@ function adjustTodayLinks() {
 Anuko Time Tracker 1.17.25.4003 | Copyright © Anuko | +  Anuko Time Tracker 1.17.26.4004 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 4d4de7e8e..07cb37d76 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -61,7 +61,7 @@ function setChange($sql) { // spit white space before output in some situations such as in PDF reports. $file = fopen(APP_DIR.'/WEB-INF/config.php', 'r'); $line = fgets($file); - if (strcmp('Error: WEB-INF/config.php file does not start with PHP opening tag.
'); } fclose($file); From 2e02b27f8c392d5a2f446f7b51982175e9bf32c4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Feb 2018 15:36:30 +0000 Subject: [PATCH 0549/2515] Cleanup of mysql.sql for timestamp defaults. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 12 ++-- mysql.sql | 106 +++++++++++++++++------------------ 3 files changed, 62 insertions(+), 58 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 540cabe91..f4b18e78c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.26.4004 | Copyright © Anuko | +  Anuko Time Tracker 1.17.27.4005 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 07cb37d76..5c02031fd 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -709,7 +709,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11719"]) { + if ($_POST["convert11400to11727"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -725,6 +725,10 @@ function setChange($sql) { setChange("UPDATE `tt_monthly_quotas` SET `minutes` = 60 * `quota`"); setChange("ALTER TABLE `tt_monthly_quotas` DROP `quota`"); setChange("ALTER TABLE `tt_teams` DROP `uncompleted_indicators`"); + setChange("ALTER TABLE `tt_users` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_teams` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_log` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_tmp_refs` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); } if ($_POST["cleanup"]) { @@ -769,7 +773,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.17.19) + Create database structure (v1.17.27)
(applies only to new installations, do not execute when updating)
@@ -805,8 +809,8 @@ function setChange($sql) {

Update database structure (v1.14 to v1.17.19)
Update database structure (v1.14 to v1.17.27)
diff --git a/mysql.sql b/mysql.sql index 78e09a803..06f705cc6 100644 --- a/mysql.sql +++ b/mysql.sql @@ -21,19 +21,19 @@ CREATE TABLE `tt_teams` ( `lang` varchar(10) NOT NULL default 'en', # language `date_format` varchar(20) NOT NULL default '%Y-%m-%d', # date format `time_format` varchar(20) NOT NULL default '%H:%M', # time format - `week_start` smallint(2) NOT NULL DEFAULT '0', # Week start day, 0 == Sunday. - `tracking_mode` smallint(2) NOT NULL DEFAULT '1', # tracking mode ("time", "projects" or "projects and tasks") - `project_required` smallint(2) NOT NULL DEFAULT '0', # whether a project selection is required or optional - `task_required` smallint(2) NOT NULL DEFAULT '0', # whether a task selection is required or optional - `record_type` smallint(2) NOT NULL DEFAULT '0', # time record type ("start and finish", "duration", or both) + `week_start` smallint(2) NOT NULL default 0, # Week start day, 0 == Sunday. + `tracking_mode` smallint(2) NOT NULL default 1, # tracking mode ("time", "projects" or "projects and tasks") + `project_required` smallint(2) NOT NULL default 0, # whether a project selection is required or optional + `task_required` smallint(2) NOT NULL default 0, # whether a task selection is required or optional + `record_type` smallint(2) NOT NULL default 0, # time record type ("start and finish", "duration", or both) `bcc_email` varchar(100) default NULL, # bcc email to copy all reports to `plugins` varchar(255) default NULL, # a list of enabled plugins for team `lock_spec` varchar(255) default NULL, # Cron specification for record locking, # for example: "0 10 * * 1" for "weekly on Mon at 10:00". - `workday_minutes` smallint(4) DEFAULT '480', # number of work minutes in a regular working day - `custom_logo` tinyint(4) default '0', # whether to use a custom logo or not + `workday_minutes` smallint(4) default 480, # number of work minutes in a regular working day + `custom_logo` tinyint(4) default 0, # whether to use a custom logo or not `config` text default NULL, # miscellaneous team configuration settings - `status` tinyint(4) default '1', # team status + `status` tinyint(4) default 1, # team status PRIMARY KEY (`id`) ); @@ -48,11 +48,11 @@ CREATE TABLE `tt_users` ( `password` varchar(50) default NULL, # password hash `name` varchar(100) default NULL, # user name `team_id` int(11) NOT NULL, # team id - `role` int(11) default '4', # user role ("manager", "co-manager", "client", or "user") + `role` int(11) default 4, # user role ("manager", "co-manager", "client", or "user") `client_id` int(11) default NULL, # client id for "client" user role `rate` float(6,2) NOT NULL default '0.00', # default hourly rate `email` varchar(100) default NULL, # user email - `status` tinyint(4) default '1', # user status + `status` tinyint(4) default 1, # user status PRIMARY KEY (`id`) ); @@ -73,7 +73,7 @@ CREATE TABLE `tt_projects` ( `name` varchar(80) COLLATE utf8_bin NOT NULL, # project name `description` varchar(255) default NULL, # project description `tasks` text default NULL, # comma-separated list of task ids associated with this project - `status` tinyint(4) default '1', # project status + `status` tinyint(4) default 1, # project status PRIMARY KEY (`id`) ); @@ -89,7 +89,7 @@ CREATE TABLE `tt_tasks` ( `team_id` int(11) NOT NULL, # team id `name` varchar(80) COLLATE utf8_bin NOT NULL, # task name `description` varchar(255) default NULL, # task description - `status` tinyint(4) default '1', # task status + `status` tinyint(4) default 1, # task status PRIMARY KEY (`id`) ); @@ -105,7 +105,7 @@ CREATE TABLE `tt_user_project_binds` ( `user_id` int(11) NOT NULL, # user id `project_id` int(11) NOT NULL, # project id `rate` float(6,2) default '0.00', # rate for this user when working on this project - `status` tinyint(4) default '1', # bind status + `status` tinyint(4) default 1, # bind status PRIMARY KEY (`id`) ); @@ -131,20 +131,20 @@ create index task_idx on tt_project_task_binds(task_id); # If you use custom fields, additional info for each record may exist in tt_custom_field_log. # CREATE TABLE `tt_log` ( - `id` bigint NOT NULL auto_increment, # time record id - `timestamp` timestamp NOT NULL, # modification timestamp - `user_id` int(11) NOT NULL, # user id - `date` date NOT NULL, # date the record is for - `start` time default NULL, # record start time (for example, 09:00) - `duration` time default NULL, # record duration (for example, 1 hour) - `client_id` int(11) default NULL, # client id - `project_id` int(11) default NULL, # project id - `task_id` int(11) default NULL, # task id - `invoice_id` int(11) default NULL, # invoice id - `comment` text, # user provided comment for time record - `billable` tinyint(4) default '0', # whether the record is billable or not - `paid` tinyint(4) default '0', # whether the record is paid - `status` tinyint(4) default '1', # time record status + `id` bigint NOT NULL auto_increment, # time record id + `timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp + `user_id` int(11) NOT NULL, # user id + `date` date NOT NULL, # date the record is for + `start` time default NULL, # record start time (for example, 09:00) + `duration` time default NULL, # record duration (for example, 1 hour) + `client_id` int(11) default NULL, # client id + `project_id` int(11) default NULL, # project id + `task_id` int(11) default NULL, # task id + `invoice_id` int(11) default NULL, # invoice id + `comment` text, # user provided comment for time record + `billable` tinyint(4) default 0, # whether the record is billable or not + `paid` tinyint(4) default 0, # whether the record is paid + `status` tinyint(4) default 1, # time record status PRIMARY KEY (`id`) ); @@ -166,7 +166,7 @@ CREATE TABLE `tt_invoices` ( `name` varchar(80) COLLATE utf8_bin NOT NULL, # invoice name `date` date NOT NULL, # invoice date `client_id` int(11) NOT NULL, # client id - `status` tinyint(4) default '1', # invoice status + `status` tinyint(4) default 1, # invoice status PRIMARY KEY (`id`) ); @@ -178,9 +178,9 @@ create unique index name_idx on tt_invoices(team_id, name, status); # Structure for table tt_tmp_refs. Used for reset password mechanism. # CREATE TABLE `tt_tmp_refs` ( - `timestamp` timestamp NOT NULL, # creation timestamp - `ref` char(32) NOT NULL default '', # unique reference for user, used in urls - `user_id` int(11) NOT NULL # user id + `timestamp` timestamp default CURRENT_TIMESTAMP, # creation timestamp + `ref` char(32) NOT NULL default '', # unique reference for user, used in urls + `user_id` int(11) NOT NULL # user id ); @@ -203,20 +203,20 @@ CREATE TABLE `tt_fav_reports` ( `period` tinyint(4) default NULL, # selected period type for report `period_start` date default NULL, # period start `period_end` date default NULL, # period end - `show_client` tinyint(4) NOT NULL default '0', # whether to show client column - `show_invoice` tinyint(4) NOT NULL default '0', # whether to show invoice column - `show_paid` tinyint(4) NOT NULL default '0', # whether to show paid column - `show_project` tinyint(4) NOT NULL default '0', # whether to show project column - `show_start` tinyint(4) NOT NULL default '0', # whether to show start field - `show_duration` tinyint(4) NOT NULL default '0', # whether to show duration field - `show_cost` tinyint(4) NOT NULL default '0', # whether to show cost field - `show_task` tinyint(4) NOT NULL default '0', # whether to show task column - `show_end` tinyint(4) NOT NULL default '0', # whether to show end field - `show_note` tinyint(4) NOT NULL default '0', # whether to show note column - `show_custom_field_1` tinyint(4) NOT NULL default '0', # whether to show custom field 1 - `show_totals_only` tinyint(4) NOT NULL default '0', # whether to show totals only + `show_client` tinyint(4) NOT NULL default 0, # whether to show client column + `show_invoice` tinyint(4) NOT NULL default 0, # whether to show invoice column + `show_paid` tinyint(4) NOT NULL default 0, # whether to show paid column + `show_project` tinyint(4) NOT NULL default 0, # whether to show project column + `show_start` tinyint(4) NOT NULL default 0, # whether to show start field + `show_duration` tinyint(4) NOT NULL default 0, # whether to show duration field + `show_cost` tinyint(4) NOT NULL default 0, # whether to show cost field + `show_task` tinyint(4) NOT NULL default 0, # whether to show task column + `show_end` tinyint(4) NOT NULL default 0, # whether to show end field + `show_note` tinyint(4) NOT NULL default 0, # whether to show note column + `show_custom_field_1` tinyint(4) NOT NULL default 0, # whether to show custom field 1 + `show_totals_only` tinyint(4) NOT NULL default 0, # whether to show totals only `group_by` varchar(20) default NULL, # group by field - `status` tinyint(4) default '1', # favorite report status + `status` tinyint(4) default 1, # favorite report status PRIMARY KEY (`id`) ); @@ -235,7 +235,7 @@ CREATE TABLE `tt_cron` ( `cc` varchar(100) default NULL, # cc email to send results to `subject` varchar(100) default NULL, # email subject `report_condition` varchar(255) default NULL, # report condition, "count > 0" for sending not empty reports - `status` tinyint(4) default '1', # entry status + `status` tinyint(4) default 1, # entry status PRIMARY KEY (`id`) ); @@ -250,7 +250,7 @@ CREATE TABLE `tt_clients` ( `address` varchar(255) default NULL, # client address `tax` float(6,2) default '0.00', # applicable tax for this client `projects` text default NULL, # comma-separated list of project ids assigned to this client - `status` tinyint(4) default '1', # client status + `status` tinyint(4) default 1, # client status PRIMARY KEY (`id`) ); @@ -293,10 +293,10 @@ create unique index param_idx on tt_config(user_id, param_name); CREATE TABLE `tt_custom_fields` ( `id` int(11) NOT NULL auto_increment, # custom field id `team_id` int(11) NOT NULL, # team id - `type` tinyint(4) NOT NULL default '0', # custom field type (text or dropdown) + `type` tinyint(4) NOT NULL default 0, # custom field type (text or dropdown) `label` varchar(32) NOT NULL default '', # custom field label - `required` tinyint(4) default '0', # whether this custom field is mandatory for time records - `status` tinyint(4) default '1', # custom field status + `required` tinyint(4) default 0, # whether this custom field is mandatory for time records + `status` tinyint(4) default 1, # custom field status PRIMARY KEY (`id`) ); @@ -322,7 +322,7 @@ CREATE TABLE `tt_custom_field_log` ( `field_id` int(11) NOT NULL, # custom field id `option_id` int(11) default NULL, # Option id. Used for dropdown custom fields. `value` varchar(255) default NULL, # Text value. Used for text custom fields. - `status` tinyint(4) default '1', # custom field log entry status + `status` tinyint(4) default 1, # custom field log entry status PRIMARY KEY (`id`) ); @@ -340,8 +340,8 @@ CREATE TABLE `tt_expense_items` ( `name` text NOT NULL, # expense item name (what is an expense for) `cost` decimal(10,2) default '0.00', # item cost (including taxes, etc.) `invoice_id` int(11) default NULL, # invoice id - `paid` tinyint(4) default '0', # whether the item is paid - `status` tinyint(4) default '1', # item status + `paid` tinyint(4) default 0, # whether the item is paid + `status` tinyint(4) default 1, # item status PRIMARY KEY (`id`) ); @@ -374,7 +374,7 @@ CREATE TABLE `tt_monthly_quotas` ( `team_id` int(11) NOT NULL, # team id `year` smallint(5) UNSIGNED NOT NULL, # quota year `month` tinyint(3) UNSIGNED NOT NULL, # quota month - `minutes` int(11) DEFAULT NULL, # quota in minutes in specified month and year + `minutes` int(11) default NULL, # quota in minutes in specified month and year PRIMARY KEY (`team_id`,`year`,`month`) ); From 73d14da2b2bf18a91937cf08ee3da6e62f2d01e0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Feb 2018 15:00:16 +0000 Subject: [PATCH 0550/2515] Work in progress on new roles. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 10 ++++++---- mysql.sql | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f4b18e78c..11ff37309 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.27.4005 | Copyright © Anuko | +  Anuko Time Tracker 1.17.28.4006 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 5c02031fd..41864c459 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -709,7 +709,7 @@ function setChange($sql) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11727"]) { + if ($_POST["convert11400to11728"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -729,6 +729,8 @@ function setChange($sql) { setChange("ALTER TABLE `tt_teams` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); setChange("ALTER TABLE `tt_log` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); setChange("ALTER TABLE `tt_tmp_refs` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("CREATE TABLE `tt_roles` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(80) default NULL, `rank` int(11) default 0, `rights` text default NULL, `status` tinyint(4) default 1, PRIMARY KEY (`id`))"); + setChange("create unique index role_idx on tt_roles(team_id, rank, status)"); } if ($_POST["cleanup"]) { @@ -773,7 +775,7 @@ function setChange($sql) {

DB Install

-
Create database structure (v1.17.27) + Create database structure (v1.17.28)
(applies only to new installations, do not execute when updating)
@@ -809,8 +811,8 @@ function setChange($sql) {

Update database structure (v1.14 to v1.17.27)
Update database structure (v1.14 to v1.17.28)
diff --git a/mysql.sql b/mysql.sql index 06f705cc6..3c52aefc4 100644 --- a/mysql.sql +++ b/mysql.sql @@ -380,3 +380,24 @@ CREATE TABLE `tt_monthly_quotas` ( ALTER TABLE `tt_monthly_quotas` ADD CONSTRAINT `FK_TT_TEAM_CONSTRAING` FOREIGN KEY (`team_id`) REFERENCES `tt_teams` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; + + +# +# Structure for table tt_roles. This table stores customized team roles. +# +CREATE TABLE `tt_roles` ( + `id` int(11) NOT NULL auto_increment, # role id + `team_id` int(11) NOT NULL, # team id + `name` varchar(80) default NULL, # role name - may be used to rename standard roles + `rank` int(11) default 0, # Role rank and identifier in comparison with other roles, + # used to determine what "lesser roles" are + # and also identifies a role within a team, used as role in tt_users. + `rights` text default NULL, # Comma-separated list of rights assigned to a role. + # NULL here for predefined roles (4, 16, 68, 324 - manager) + # means a hard-coded set of default access rights. + `status` tinyint(4) default 1, # role status + PRIMARY KEY (`id`) +); + +# Create an index that guarantees unique active and inactive role ranks per team. +create unique index role_idx on tt_roles(team_id, rank, status); From ebcf3daac421df8e3925e5fff52b26d4bb789286 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Feb 2018 15:28:00 +0000 Subject: [PATCH 0551/2515] Fixed cleanup code to include tt_roles table. --- WEB-INF/lib/ttTeamHelper.class.php | 5 +++++ WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index aebf52a9d..e88492e51 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -885,6 +885,11 @@ static function delete($team_id) { // Delete custom fields. if (!ttTeamHelper::deleteCustomFields($team_id)) return false; + // Delete roles. + $sql = "delete from tt_roles where team_id = $team_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) return false; + // Delete team. $sql = "delete from tt_teams where id = $team_id"; $affected = $mdb2->exec($sql); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 11ff37309..ccc935f25 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + +
 Anuko Time Tracker 1.17.28.4006 | Copyright © Anuko | +  Anuko Time Tracker 1.17.28.4007 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 41864c459..491330f23 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -763,6 +763,7 @@ function setChange($sql) { setChange("OPTIMIZE TABLE tt_tmp_refs"); setChange("OPTIMIZE TABLE tt_user_project_binds"); setChange("OPTIMIZE TABLE tt_users"); + setChange("OPTIMIZE TABLE tt_roles"); } print "done.
\n"; From 1ad0313b11df884c04ca0354abcbc18e4b334537 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Feb 2018 17:50:40 +0000 Subject: [PATCH 0552/2515] Implemented export and import of roles and improved a comment for tt_roles table. --- WEB-INF/lib/ttExportHelper.class.php | 12 +++++++ WEB-INF/lib/ttImportHelper.class.php | 13 +++++++- WEB-INF/lib/ttRoleHelper.class.php | 50 ++++++++++++++++++++++++++++ WEB-INF/lib/ttTeamHelper.class.php | 17 ++++++++++ WEB-INF/templates/footer.tpl | 2 +- mysql.sql | 21 +++++++----- 6 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 WEB-INF/lib/ttRoleHelper.class.php diff --git a/WEB-INF/lib/ttExportHelper.class.php b/WEB-INF/lib/ttExportHelper.class.php index 0e1164787..cce9246e3 100644 --- a/WEB-INF/lib/ttExportHelper.class.php +++ b/WEB-INF/lib/ttExportHelper.class.php @@ -289,6 +289,18 @@ function createDataFile($compress = false) { fwrite($file, "\n"); unset($fav_reports); + // Write roles. + fwrite($file, "\n"); + $roles = ttTeamHelper::getRoles($user->team_id); + foreach ($roles as $role) { + fwrite($file, "\t\n"); + fwrite($file, "\t\t\n"); + fwrite($file, "\t\n"); + } + fwrite($file, "\n"); + unset($roles); + // Cleanup. unset($users); $this->userMap = array(); diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 9b1aad2ac..b6c7b8b3a 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -36,6 +36,7 @@ import('ttCustomFieldHelper'); import('ttFavReportHelper'); import('ttExpenseHelper'); +import('ttRoleHelper'); // ttImportHelper - this class is used to import team data from a file. class ttImportHelper { @@ -83,7 +84,8 @@ function startElement($parser, $name, $attrs) { || $name == 'INVOICE_HEADER' || $name == 'USER_PROJECT_BIND' || $name == 'EXPENSE_ITEM' - || $name == 'FAV_REPORT') { + || $name == 'FAV_REPORT' + || $name == 'ROLE') { $this->currentElement = $attrs; } $this->currentTag = $name; @@ -310,6 +312,15 @@ function endElement($parser, $name) { 'group_by' => $this->currentElement['GROUP_BY'], 'chtotalsonly' => (int) $this->currentElement['SHOW_TOTALS_ONLY'])); } + + if ($name == 'ROLE' && $this->canImport) { + ttRoleHelper::insert(array( + 'team_id' => $this->team_id, + 'name' => $this->currentElement['NAME'], + 'rank' => $this->currentElement['RANK'], + 'rights' => $this->currentElement['RIGHTS'], + 'status' => $this->currentElement['STATUS'])); + } $this->currentTag = ''; } diff --git a/WEB-INF/lib/ttRoleHelper.class.php b/WEB-INF/lib/ttRoleHelper.class.php new file mode 100644 index 000000000..14372288d --- /dev/null +++ b/WEB-INF/lib/ttRoleHelper.class.php @@ -0,0 +1,50 @@ +quote($name).", $rank, ".$mdb2->quote($rights).", ".$mdb2->quote($status).")"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + + return true; + } +} diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index e88492e51..3b01415ec 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -485,6 +485,23 @@ static function getFavReports($team_id) { return false; } + // getRoles - obtains all roles defined for team. + static function getRoles($team_id) { + $mdb2 = getConnection(); + + $result = array(); + $sql = "select * from tt_roles where team_id = $team_id"; + $res = $mdb2->query($sql); + $result = array(); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + $result[] = $val; + } + return $result; + } + return false; + } + // getExpenseItems - obtains all expense items for all users in team. static function getExpenseItems($team_id) { $mdb2 = getConnection(); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ccc935f25..27ad84943 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - + + + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + {/foreach} {/if} {if $show_project} @@ -108,96 +108,96 @@
 Anuko Time Tracker 1.17.28.4007 | Copyright © Anuko | +  Anuko Time Tracker 1.17.28.4008 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mysql.sql b/mysql.sql index 3c52aefc4..8bfc22196 100644 --- a/mysql.sql +++ b/mysql.sql @@ -386,18 +386,23 @@ ALTER TABLE `tt_monthly_quotas` # Structure for table tt_roles. This table stores customized team roles. # CREATE TABLE `tt_roles` ( - `id` int(11) NOT NULL auto_increment, # role id - `team_id` int(11) NOT NULL, # team id - `name` varchar(80) default NULL, # role name - may be used to rename standard roles - `rank` int(11) default 0, # Role rank and identifier in comparison with other roles, - # used to determine what "lesser roles" are - # and also identifies a role within a team, used as role in tt_users. + `id` int(11) NOT NULL auto_increment, # Role id. Identifies roles for all groups on the server. + `team_id` int(11) NOT NULL, # Team id the role is defined for. + `name` varchar(80) default NULL, # Role name - custom role name. In case we are editing a + # predefined role (USER, etc.), we can rename the role here. + `rank` int(11) default 0, # Role rank, an integer value between 0-324. Predefined role ranks: + # USER - 4, CLIENT - 16, COMANAGER - 68, MANAGER - 324. + # Rank is used to determine what "lesser roles" are in each group + # for sutuations such as "manage_users". + # It also identifies a role within a team (by its "rank"). + # Value of rank is to be used in role field in tt_users table, + # just like standard roles now. `rights` text default NULL, # Comma-separated list of rights assigned to a role. # NULL here for predefined roles (4, 16, 68, 324 - manager) # means a hard-coded set of default access rights. - `status` tinyint(4) default 1, # role status + `status` tinyint(4) default 1, # Role status. PRIMARY KEY (`id`) ); -# Create an index that guarantees unique active and inactive role ranks per team. +# Create an index that guarantees unique active and inactive role ranks in each group. create unique index role_idx on tt_roles(team_id, rank, status); From f8202dca930de9e3cc70cbc8084e10a0f346f389 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Feb 2018 19:55:54 +0000 Subject: [PATCH 0553/2515] Fixed dropdown population script in week view. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/week.tpl | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 27ad84943..e11c2eb70 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + +
 Anuko Time Tracker 1.17.28.4008 | Copyright © Anuko | +  Anuko Time Tracker 1.17.29.4009 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 7c59f5b3b..8eaa5fa88 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -1,5 +1,20 @@ {include file="time_script.tpl"} + + \n"; return $str; } From 80e8cc371b87d8a29863085ec3307d5a789e4659 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 13:34:07 +0000 Subject: [PATCH 1865/2515] Some refactoring and fixes on mobile time.php. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/time.tpl | 29 ++++---- mobile/time.php | 107 ++++++++++++++++++++---------- time.php | 12 ++-- 4 files changed, 97 insertions(+), 53 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7486f21e1..71d4fc489 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} -{if $user->isPluginEnabled('cl')} +{if $show_client} {/if} -{if $user->isPluginEnabled('iv')} +{if $show_billable} {/if} {if $custom_fields && $custom_fields->timeFields} @@ -68,22 +68,23 @@ {/foreach} {/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if $show_project} {/if} -{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if $show_task} {/if} -{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} +{if $show_start} - +{/if} +{if $show_finish} {/if} -{if (($smarty.const.TYPE_DURATION == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} +{if $show_duration} {/if} diff --git a/mobile/time.php b/mobile/time.php index e51e00bdc..f1c4e4d84 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -68,6 +68,16 @@ $group_id = $user->getGroup(); $config = new ttConfigHelper($user->getConfig()); +$showClient = $user->isPluginEnabled('cl'); +$showBillable = $user->isPluginEnabled('iv'); +$trackingMode = $user->getTrackingMode(); +$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; +$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$recordType = $user->getRecordType(); +$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; +$showFinish = $showStart; +$showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; + // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); $selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); @@ -94,7 +104,7 @@ $cl_duration = trim($request->getParameter('duration')); $cl_note = trim($request->getParameter('note')); $cl_billable = 1; -if ($user->isPluginEnabled('iv')) { +if ($showBillable) { if ($request->isPost()) { $cl_billable = $request->getParameter('billable'); $_SESSION['billable'] = (int) $cl_billable; @@ -150,7 +160,8 @@ } // Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $user->getTrackingMode() && $user->isPluginEnabled('cl')) { +// Note: for other tracking modes the control is added further below. +if (MODE_TIME == $trackingMode && $showClient) { $active_clients = ttGroupHelper::getActiveClients(true); $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', @@ -163,7 +174,28 @@ // Note: in other modes the client list is filtered to relevant clients only. See below. } -if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) { +// Billable checkbox. +if ($showBillable) + $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); + +// If we have time custom fields - add controls for them. +if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + if ($timeField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); + } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', + 'data'=>CustomFields::getOptions($timeField['id']), + 'value'=>$timeCustomFields[$timeField['id']]['value'], + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } +} + +// If we show project dropdown, add controls for project and client. +if ($showProject) { // Dropdown for projects assigned to user. $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); $project_list = $user->getAssignedProjects($options); @@ -176,8 +208,8 @@ 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Dropdown for clients if the clients plugin is enabled. - if ($user->isPluginEnabled('cl')) { + // Client dropdown. + if ($showClient) { $active_clients = ttGroupHelper::getActiveClients(true); // We need an array of assigned project ids to do some trimming. foreach($project_list as $project) @@ -205,7 +237,8 @@ } } -if (MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) { +// Task dropdown. +if ($showTask) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', 'name'=>'task', @@ -215,7 +248,9 @@ 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); } -if ((TYPE_START_FINISH == $user->getRecordType()) || (TYPE_ALL == $user->getRecordType())) { + +// Start and finish controls. +if ($showStart) { $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); if ($user->punch_mode && !$user->canOverridePunchMode()) { @@ -224,29 +259,10 @@ $form->getElement('finish')->setEnabled(false); } } -if ((TYPE_DURATION == $user->getRecordType()) || (TYPE_ALL == $user->getRecordType())) - $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); -$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height: 60px;','value'=>$cl_note)); -if ($user->isPluginEnabled('iv')) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); -$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->get('button.submit'))); -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} +// Duration control. +if ($showDuration) + $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); // If we have templates, add a dropdown to select one. if ($user->isPluginEnabled('tp')){ @@ -266,12 +282,20 @@ } } -// Submit. +// Note control. +$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height: 60px;','value'=>$cl_note)); + +// A hidden control for today's date from user's browser. +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. + +// Submit button. +$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); + if ($request->isPost()) { if ($request->getParameter('btn_submit')) { - + // Submit button clicked. // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) + if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); // Validate input in time custom fields. if ($custom_fields && $custom_fields->timeFields) { @@ -280,12 +304,14 @@ if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); } } - if (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) { + if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if (MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && $user->task_required) { + if ($showTask && $user->task_required) { if (!$cl_task) $err->add($i18n->get('error.task')); } + + // TODO: refactoring going on down from here... if (strlen($cl_duration) == 0) { if ($cl_start || $cl_finish) { if (!ttTimeHelper::isValidTime($cl_start)) @@ -368,6 +394,19 @@ $smarty->assign('next_date', $next_date); $smarty->assign('prev_date', $prev_date); $smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); + +$smarty->assign('show_client', $showClient); +$smarty->assign('show_billable', $showBillable); +$smarty->assign('show_project', $showProject); +$smarty->assign('show_task', $showTask); +$smarty->assign('show_start', $showStart); +$smarty->assign('show_finish', $showFinish); +$smarty->assign('show_duration', $showDuration); + + + + + $smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); diff --git a/time.php b/time.php index b1c0c4dba..1055470d0 100644 --- a/time.php +++ b/time.php @@ -138,7 +138,7 @@ $cl_duration = trim($request->getParameter('duration')); $cl_note = trim($request->getParameter('note')); $cl_billable = 1; -if ($user->isPluginEnabled('iv')) { +if ($showBillable) { if ($request->isPost()) { $cl_billable = $request->getParameter('billable'); $_SESSION['billable'] = (int) $cl_billable; @@ -293,9 +293,11 @@ $form->getElement('finish')->setEnabled(false); } } + // Duration control. if ($showDuration) $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); + // File upload control. if ($showFiles) $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); @@ -322,10 +324,13 @@ if (!defined('NOTE_INPUT_HEIGHT')) define('NOTE_INPUT_HEIGHT', 40); $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); + // Calendar. $form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar + // A hidden control for today's date from user's browser. $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. + // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); @@ -342,10 +347,10 @@ if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); } } - if (MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode) { + if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if (MODE_PROJECTS_AND_TASKS == $trackingMode && $user->task_required) { + if ($showTask && $user->task_required) { if (!$cl_task) $err->add($i18n->get('error.task')); } if (strlen($cl_duration) == 0) { @@ -480,7 +485,6 @@ $smarty->assign('show_start', $showStart); $smarty->assign('show_finish', $showFinish); $smarty->assign('show_duration', $showDuration); -$smarty->assign('show_templates', $showTemplates); $smarty->assign('show_note_column', $showNoteColumn); $smarty->assign('show_note_row', $showNoteRow); $smarty->assign('show_files', $showFiles); From 1a8bb88c2b59660be6d55da2816af800191a95b4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 14:32:23 +0000 Subject: [PATCH 1866/2515] Finished refactoring mobile time.php and template. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/time.tpl | 105 +++++++++++++++--------------- WEB-INF/templates/time.tpl | 96 +++++++++++++-------------- mobile/time.php | 14 +--- time.php | 4 +- 5 files changed, 105 insertions(+), 116 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 71d4fc489..3c0845777 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
 Anuko Time Tracker 1.19.18.5216 | Copyright © Anuko | +  Anuko Time Tracker 1.19.18.5217 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/time.tpl b/WEB-INF/templates/mobile/time.tpl index 79398703b..b14e4d456 100644 --- a/WEB-INF/templates/mobile/time.tpl +++ b/WEB-INF/templates/mobile/time.tpl @@ -17,18 +17,18 @@
- {if $time_records} - - {foreach $time_records as $record} +{if $time_records} +
+ {foreach $time_records as $record} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if $show_project} -{/if} + {/if} - {/foreach} + {/foreach}
{$record.project|escape}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{$record.duration}{if ($record.duration == '0:00' && $record.start <> '')}{/if} {if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.edit}{/if} {if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.delete}{/if}
@@ -36,7 +36,7 @@
{$day_total}
- {/if} +{/if}
@@ -53,11 +53,11 @@
{$i18n.label.user}:
{$forms.timeRecordForm.user.control}
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}:
{$forms.timeRecordForm.task.control}
{$i18n.label.start}:
{$forms.timeRecordForm.start.control} 
{$i18n.label.finish}:
{$forms.timeRecordForm.finish.control} 
{$i18n.label.duration}:
{$forms.timeRecordForm.duration.control}
-
 Anuko Time Tracker 1.19.18.5217 | Copyright © Anuko | +  Anuko Time Tracker 1.19.18.5218 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/time.tpl b/WEB-INF/templates/mobile/time.tpl index b14e4d456..038d6790d 100644 --- a/WEB-INF/templates/mobile/time.tpl +++ b/WEB-INF/templates/mobile/time.tpl @@ -15,94 +15,91 @@
- - +
+
{if $time_records} - +
{foreach $time_records as $record} - + {if $show_project} - + {/if} - - - - + + + + {/foreach} -
{$record.project|escape}{$record.project|escape}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{$record.duration}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.edit}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.delete}{/if}
{if ($record.duration == '0:00' && $record.start <> '')}{/if}{$record.duration}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.edit}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.delete}{/if}
- - - - - -
{$i18n.label.day_total}:{$day_total}
+
+ + + + + +
{$i18n.label.day_total}:{$day_total}
{/if} -
{$forms.timeRecordForm.open} - - -
- - - - - -
- + + + +
+ + + + +
+ {if $user_dropdown} - - + + {/if} {if $show_client} - - + + {/if} {if $show_billable} - + {/if} {if $custom_fields && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - + + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + {/foreach} {/if} {if $show_project} - - + + {/if} {if $show_task} - - + + {/if} {if $show_start} - - + + {/if} {if $show_finish} - - + + {/if} {if $show_duration} - - + + {/if} {if $template_dropdown} - - + + {/if} - - - -
{$i18n.label.user}:
{$forms.timeRecordForm.user.control}
{$i18n.label.user}:
{$forms.timeRecordForm.user.control}
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:
{$forms.timeRecordForm.$control_name.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:
{$forms.timeRecordForm.$control_name.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}:
{$forms.timeRecordForm.task.control}
{$i18n.label.task}:
{$forms.timeRecordForm.task.control}
{$i18n.label.start}:
{$forms.timeRecordForm.start.control} 
{$i18n.label.start}:
{$forms.timeRecordForm.start.control} 
{$i18n.label.finish}:
{$forms.timeRecordForm.finish.control} 
{$i18n.label.finish}:
{$forms.timeRecordForm.finish.control} 
{$i18n.label.duration}:
{$forms.timeRecordForm.duration.control}
{$i18n.label.duration}:
{$forms.timeRecordForm.duration.control}
{$i18n.label.template}:
{$forms.timeRecordForm.template.control}
{$i18n.label.template}:
{$forms.timeRecordForm.template.control}
{$i18n.label.note}:
{$forms.timeRecordForm.note.control}
+
{$i18n.label.note}:
{$forms.timeRecordForm.note.control}
+
{$forms.timeRecordForm.btn_submit.control}
{$forms.timeRecordForm.btn_submit.control}
-
{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index d153dc96d..0b78b1788 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -38,11 +38,11 @@ {/if} {if $custom_fields && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} -
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.timeRecordForm.$control_name.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.timeRecordForm.$control_name.control}
- - +
+
{if $time_records} - + {if $show_client} - + {/if} {if $show_project} - + {/if} {if $show_task} - + {/if} {if $show_start} - + {/if} {if $show_finish} - + {/if} - + {if $show_note_column} - + {/if} {if $show_files} - + {/if} - - - + + + {foreach $time_records as $record} - + {if $show_client} - + {/if} {if $show_project} - + {/if} {if $show_task} - + {/if} {if $show_start} - + {/if} {if $show_finish} - + {/if} - + {if $show_note_column} - + {/if} {if $show_files} {if $record.has_files} - + {else} - + {/if} {/if} - - + - + + {if $show_note_row && $record.comment} - - - - + + + + {/if} {/foreach} -
{$i18n.label.client}{$i18n.label.client}{$i18n.label.project}{$i18n.label.project}{$i18n.label.task}{$i18n.label.task}{$i18n.label.start}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.duration}{$i18n.label.note}{$i18n.label.note}
{$record.client|escape}{$record.client|escape}{$record.project|escape}{$record.project|escape}{$record.task|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files} + {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} - {$i18n.label.edit} + {$i18n.label.edit} {if ($record.duration == '0:00' && $record.start <> '')} - - - - + + + + {/if} {/if} - + {if $record.approved || $record.timesheet_id || $record.invoice_id} -   +   {else} - {$i18n.label.delete} + {$i18n.label.delete} {/if} -
{$i18n.label.note}:{$record.comment|escape}
{$i18n.label.note}:{$record.comment|escape}
+
{/if} -
diff --git a/mobile/time.php b/mobile/time.php index f1c4e4d84..233f1d16f 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -310,8 +310,6 @@ if ($showTask && $user->task_required) { if (!$cl_task) $err->add($i18n->get('error.task')); } - - // TODO: refactoring going on down from here... if (strlen($cl_duration) == 0) { if ($cl_start || $cl_finish) { if (!ttTimeHelper::isValidTime($cl_start)) @@ -323,11 +321,11 @@ $err->add($i18n->get('error.interval'), $i18n->get('label.finish'), $i18n->get('label.start')); } } else { - if ((TYPE_START_FINISH == $user->getRecordType()) || (TYPE_ALL == $user->getRecordType())) { + if ($showStart) { $err->add($i18n->get('error.empty'), $i18n->get('label.start')); $err->add($i18n->get('error.empty'), $i18n->get('label.finish')); } - if ((TYPE_DURATION == $user->getRecordType()) || (TYPE_ALL == $user->getRecordType())) + if ($showDuration) $err->add($i18n->get('error.empty'), $i18n->get('label.duration')); } } else { @@ -393,8 +391,8 @@ $smarty->assign('next_date', $next_date); $smarty->assign('prev_date', $prev_date); +$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); - $smarty->assign('show_client', $showClient); $smarty->assign('show_billable', $showBillable); $smarty->assign('show_project', $showProject); @@ -402,12 +400,6 @@ $smarty->assign('show_start', $showStart); $smarty->assign('show_finish', $showFinish); $smarty->assign('show_duration', $showDuration); - - - - - -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list); diff --git a/time.php b/time.php index 1055470d0..9f85d5981 100644 --- a/time.php +++ b/time.php @@ -364,11 +364,11 @@ $err->add($i18n->get('error.interval'), $i18n->get('label.finish'), $i18n->get('label.start')); } } else { - if (TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType) { + if ($showStart) { $err->add($i18n->get('error.empty'), $i18n->get('label.start')); $err->add($i18n->get('error.empty'), $i18n->get('label.finish')); } - if (TYPE_DURATION == $recordType || TYPE_ALL == $recordType) + if ($showDuration) $err->add($i18n->get('error.empty'), $i18n->get('label.duration')); } } else { From bf36e82b0af62613d2826ef793e199eddaaa0ac6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 15:11:09 +0000 Subject: [PATCH 1867/2515] Some html fixes. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/header.tpl | 1 + WEB-INF/templates/mobile/header.tpl | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3c0845777..0390d8a25 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- diff --git a/initialize.php b/initialize.php index 42b94a865..4e41c7ea3 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5382"); +define("APP_VERSION", "1.19.23.5383"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/client_add.php b/mobile/client_add.php deleted file mode 100644 index 2050204a6..000000000 --- a/mobile/client_add.php +++ /dev/null @@ -1,94 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_address = trim($request->getParameter('address')); - $cl_tax = $request->getParameter('tax'); - $cl_projects = $request->getParameter('projects'); -} 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']; -} - -$show_projects = (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && count($projects) > 0; - -$form = new Form('clientForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','class'=>'mobile-textarea','value'=>$cl_address)); -$form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); -if ($show_projects) - $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.client_name')); - if (!ttValidString($cl_address, true)) $err->add($i18n->get('error.field'), $i18n->get('label.client_address')); - if (!ttValidFloat($cl_tax, true)) $err->add($i18n->get('error.field'), $i18n->get('label.tax')); - - if ($err->no()) { - if (!ttClientHelper::getClientByName($cl_name)) { - if (ttClientHelper::insert(array('name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'projects' => $cl_projects, - 'status' => ACTIVE))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.clientForm.name.focus()"'); -$smarty->assign('show_projects',$show_projects); -$smarty->assign('title', $i18n->get('title.add_client')); -$smarty->assign('content_page_name', 'mobile/client_add.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/client_delete.php b/mobile/client_delete.php deleted file mode 100644 index 8e05ccde8..000000000 --- a/mobile/client_delete.php +++ /dev/null @@ -1,78 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -$id = (int)$request->getParameter('id'); -$client = ttClientHelper::getClient($id); -if (!$client) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$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->get('dropdown.do_not_delete'),'1'=>$i18n->get('dropdown.delete')))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if (ttClientHelper::delete($id, $request->getParameter('delete_client_entries'))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - - if ($request->getParameter('btn_cancel')) { - header('Location: clients.php'); - exit(); - } -} // isPost - -$smarty->assign('client_to_delete', $client_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.delete_client')); -$smarty->assign('content_page_name', 'mobile/client_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/client_edit.php b/mobile/client_edit.php deleted file mode 100644 index ab8686509..000000000 --- a/mobile/client_edit.php +++ /dev/null @@ -1,135 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -$client = ttClientHelper::getClient($cl_id, true); -if (!$client) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_address = trim($request->getParameter('address')); - $cl_tax = trim($request->getParameter('tax')); - $cl_status = $request->getParameter('status'); - $cl_projects = $request->getParameter('projects'); -} else { - $cl_name = $client['name']; - $cl_address = $client['address']; - $cl_tax = $client['tax']; - $cl_status = $client['status']; - $assigned_projects = ttClientHelper::getAssignedProjects($cl_id); - foreach($assigned_projects as $project_item) { - $cl_projects[] = $project_item['id']; - } -} - -$show_projects = (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && count($projects) > 0; - -$form = new Form('clientForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'text','name'=>'name','maxlength'=>'100','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','class'=>'mobile-textarea','value'=>$cl_address)); -$form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -if ($show_projects) - $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'datakeys'=>array('id','name'),'layout'=>'H','value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.client_name')); - if (!ttValidString($cl_address, true)) $err->add($i18n->get('error.field'), $i18n->get('label.client_address')); - if (!ttValidFloat($cl_tax, true)) $err->add($i18n->get('error.field'), $i18n->get('label.tax')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $client = ttClientHelper::getClientByName($cl_name); - if (($client && ($cl_id == $client['id'])) || !$client) { - if (ttClientHelper::update(array('id' => $cl_id, - 'name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttClientHelper::getClientByName($cl_name)) { - if (ttClientHelper::insert(array('name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_delete')) { - header("Location: client_delete.php?id=$cl_id"); - exit(); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('title', $i18n->get('title.edit_client')); -$smarty->assign('content_page_name', 'mobile/client_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/clients.php b/mobile/clients.php deleted file mode 100644 index d1e6b38f3..000000000 --- a/mobile/clients.php +++ /dev/null @@ -1,54 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -if($user->can('manage_clients')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $inactive_clients = ttGroupHelper::getInactiveClients(true); -} else - $active_clients = $user->getAssignedClients(); - -$smarty->assign('active_clients', $active_clients); -$smarty->assign('inactive_clients', $inactive_clients); -$smarty->assign('title', $i18n->get('title.clients')); -$smarty->assign('content_page_name', 'mobile/clients.tpl'); -$smarty->display('mobile/index.tpl'); From fa0a08caa353fd5e2667780c7bb42eb763ad1b02 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 26 Nov 2020 16:36:43 +0000 Subject: [PATCH 2058/2515] Cosmetic changes in translation files. --- README.md | 2 +- WEB-INF/resources/ca.lang.php | 34 +++++------------------------- WEB-INF/resources/cs.lang.php | 34 +++++------------------------- WEB-INF/resources/da.lang.php | 34 +++++------------------------- WEB-INF/resources/de.lang.php | 28 ++----------------------- WEB-INF/resources/en.lang.php | 34 +++++------------------------- WEB-INF/resources/es.lang.php | 36 ++++++-------------------------- WEB-INF/resources/et.lang.php | 28 ++----------------------- WEB-INF/resources/fa.lang.php | 34 +++++------------------------- WEB-INF/resources/fi.lang.php | 33 +++++------------------------ WEB-INF/resources/fr.lang.php | 32 ++++------------------------ WEB-INF/resources/gr.lang.php | 28 ++----------------------- WEB-INF/resources/he.lang.php | 28 ++----------------------- WEB-INF/resources/hu.lang.php | 28 ++----------------------- WEB-INF/resources/it.lang.php | 28 ++----------------------- WEB-INF/resources/ja.lang.php | 28 ++----------------------- WEB-INF/resources/ko.lang.php | 28 ++----------------------- WEB-INF/resources/nl.lang.php | 28 ++----------------------- WEB-INF/resources/no.lang.php | 28 ++----------------------- WEB-INF/resources/pl.lang.php | 28 ++----------------------- WEB-INF/resources/pt-br.lang.php | 28 ++----------------------- WEB-INF/resources/pt.lang.php | 28 ++----------------------- WEB-INF/resources/ro.lang.php | 28 ++----------------------- WEB-INF/resources/ru.lang.php | 28 ++----------------------- WEB-INF/resources/sk.lang.php | 28 ++----------------------- WEB-INF/resources/sl.lang.php | 28 ++----------------------- WEB-INF/resources/sr.lang.php | 28 ++----------------------- WEB-INF/resources/sv.lang.php | 28 ++----------------------- WEB-INF/resources/tr.lang.php | 28 ++----------------------- WEB-INF/resources/zh-cn.lang.php | 28 ++----------------------- WEB-INF/resources/zh-tw.lang.php | 34 +++++------------------------- initialize.php | 2 +- mobile/index.php | 5 ++--- 33 files changed, 91 insertions(+), 811 deletions(-) diff --git a/README.md b/README.md index f3b7987ef..cf2f8601f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Anuko Time Tracker ## About -Anuko [Time Tracker](https://www.anuko.com/time-tracker/index.htm) is a simple, easy to use, open source, web-based time tracking application written in PHP. It allows you to track the time that employees or colleagues spend working on projects and tasks. It needs a web server such as Apache, IIS, etc. to run on, and a database to keep the data in, such as MySQL. +Anuko [Time Tracker](https://www.anuko.com/time-tracker/index.htm) is an open source, web-based time tracking application written in PHP. It allows you to track the time that employees or colleagues spend working on projects and tasks. It needs a web server such as Apache, IIS, etc. to run on, and a database to keep the data in, such as MySQL. ## Free Hosting [Anuko](https://www.anuko.com) provides [free hosting](https://www.anuko.com/time-tracker/free-hosting/index.htm) of Time Tracker to individuals and small groups up to 5 users. To start using Time Tracker immediately, create a group at https://timetracker.anuko.com diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index de6e0df96..34421e73d 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -1,30 +1,6 @@ '¿Ha oblidat la seva paraula de pas?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'S\\\'ha enviat la petició de restablir paraula de pas.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Sol·licitud de restabliment de la paraula de pas de Anuko Time Tracker', // TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Per restablir la paraula de pas, si us plau escrigui-la i faci clic en guardar.', @@ -649,7 +625,7 @@ 'form.mail.to' => 'Per a', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Factura enviada.', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 92411b33b..199a96faf 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -1,30 +1,6 @@ 'Zapomenuté heslo?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zaslán požadavek k vymazání hesla.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker požadavek na vymazání hesla', // TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -662,7 +638,7 @@ 'form.mail.to' => 'Komu', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Faktura odeslána.', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 3ab49c39e..88b5324fb 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -1,30 +1,6 @@ 'Nulstilling af adgangskode er sendt på email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker - Anmodning om nulstilling af adgangskode', // TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Hej\n\nNogen, IP %s, har bedt om at få nulstillet din adgangskode. Tryk på linket hvis du vil have nulstillet din adgangskode.\n\n%s\n\nAnuko Time Tracker er et nemt, let at bruge, open source tidsregistrerings system. Besøg https://www.anuko.com for mere information.\n\n", +'form.reset_password.email_body' => "Hej\n\nNogen, IP %s, har bedt om at få nulstillet din adgangskode. Tryk på linket hvis du vil have nulstillet din adgangskode.\n\n%s\n\nAnuko Time Tracker er et open source tidsregistrerings system. Besøg https://www.anuko.com for mere information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Skriv en ny adgangskode og tryk Gem.', @@ -626,7 +602,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Til', 'form.mail.report_subject' => 'Tidsregistrerings Rapport', -'form.mail.footer' => 'Anuko Time Tracker er et simpelt, let at bruge, open source
tidsregistrerings system. Besøg www.anuko.com for mere information.', +'form.mail.footer' => 'Anuko Time Tracker er et open source
tidsregistrerings system. Besøg www.anuko.com for mere information.', 'form.mail.report_sent' => 'Rapport sendt.', 'form.mail.invoice_sent' => 'Faktura sendt.', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 7db6f93bb..be1ede828 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -1,30 +1,6 @@ 'Forgot password?', -'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Password reset request sent by email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Type new password and click on Save.', @@ -587,7 +563,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'To', 'form.mail.report_subject' => 'Time Tracker Report', -'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Invoice sent.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 0c1d2c6b9..e7df23ad6 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -1,30 +1,6 @@ '¿Olvido su contraseña?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: check / improve translation of form.reset_password.message. @@ -486,9 +462,9 @@ 'form.reset_password.email_subject' => 'Solicitud de reestablecimiento de la contraseña de Anuko Time Tracker', // Note to translators: the ending of this string needs to be translated. // TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Querido usuario, Alguien, IP %s, solicitó reestablecer su contraseña de Anuko Time Tracker. Por favor visite este enlace si quiere reestablecer su contraseña.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Querido usuario, Alguien, IP %s, solicitó reestablecer su contraseña de Anuko Time Tracker. Por favor visite este enlace si quiere reestablecer su contraseña.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: improve translation of form.change_password.tip. @@ -664,7 +640,7 @@ // TODO: translate form.mail.report_subject. // 'form.mail.report_subject' => 'Time Tracker Report', // Note to translators: the following strings need to be translated. -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Factura enviada.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index b6b442441..e2c63ef91 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -1,30 +1,6 @@ 'بازیابی رمز عبور؟', // TODO: translate form.login.about. -'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'درخواست بازیابی رمزعبور به ایمیل فرستاده شد.', @@ -481,7 +457,7 @@ // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', 'form.reset_password.email_subject' => 'درخواست بازیابی رمزعبور فرستاده شد', // TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Older translation is below. // 'form.reset_password.email_body' => "کاربران گرامی\n\n یک نفر، شاید خودتان، درخواست بازیابی رمزعبور نرم افزار رهگیری زمان شما را داشته است.لطفا برای تغییر رمزعبور روی لینک زیر کلیک کنید: \n\n%s\n\n", @@ -649,7 +625,7 @@ 'form.mail.to' => 'به', 'form.mail.report_subject' => 'گزارش تایم شیت', // TODO: translate form.mail.footer. -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.report_sent' => 'گزارش ارسال شد.', 'form.mail.invoice_sent' => 'فاکتور ارسال شد.', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 753dcf8ce..42af8047e 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -1,30 +1,6 @@ 'Salasanan nollauspyyntöviesti lähetetty.', 'form.reset_password.email_subject' => 'Anuko Time Tracker -salasanan nollauspyyntö', -// TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Hyvä käyttäjä,\n\nJoku, IP %s, on pyytänyt nollaamaan Anuko Time Tracker -ohjelman salasanasi. Jos haluat nollata salasanasi, käy sivulla \n\n%s\n\nAnuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto. Lisätietoja sivulla https://www.anuko.com.\n\n", @@ -631,6 +607,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Vastaanottaja', 'form.mail.report_subject' => 'Time Tracker -raportti', +// TODO: English string for form.mail.footer changed. Re-translate. 'form.mail.footer' => 'Anuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto. Lisätietoja sivulla www.anuko.com.', 'form.mail.report_sent' => 'Raportti lähetetty.', 'form.mail.invoice_sent' => 'Lasku lähetetty.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index ca00e9471..46116db12 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -1,30 +1,6 @@ 'Une demande de réinitialisation du mot de passe a été envoyé par courriel.', 'form.reset_password.email_subject' => 'Demande de réinitialisation de mot de passe Anuko Time Tracker', -// TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Cher utilisateur,\n\nQuelqu\'un, IP %s, avez demandé une réinitialisation de votre mot de passe. Veuillez de suivre ce lien pour le réinitialiser\n\n%s\n\nAnuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser. Visitez https://www.anuko.com pour plus d\'informations.\n\n", diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index ba630f269..5e3ee8ee8 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -1,30 +1,6 @@ '忘記密碼?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '密碼重設請求已經發送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko時間追蹤器密碼重設請求', // TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. @@ -647,7 +623,7 @@ 'form.mail.to' => '到', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => '發票已送出。', diff --git a/initialize.php b/initialize.php index 4e41c7ea3..ae59bd0db 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5383"); +define("APP_VERSION", "1.19.23.5384"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/index.php b/mobile/index.php index fa3f04c46..8fc64b35e 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -44,10 +44,9 @@ From 6f4cf24936570945a4809d8cfc33acb42c952813 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 26 Nov 2020 17:17:34 +0000 Subject: [PATCH 2059/2515] Cosmetic improvements in translation files. --- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 3 ++- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/gr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 2 ++ initialize.php | 2 +- 25 files changed, 32 insertions(+), 19 deletions(-) diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 88b5324fb..040405503 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -431,7 +431,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Har du glemt din adgangskode?', -'form.login.about' => 'Anuko Time Tracker er et nemt, let at bruge, open source tidsregistrerings system.', +'form.login.about' => 'Anuko Time Tracker er et open source tidsregistrerings system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Nulstilling af adgangskode er sendt på email.', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index be1ede828..2268692bb 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -422,7 +422,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Passwort vergessen?', -'form.login.about' => 'Anuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source Zeiterfassungssystem.', +'form.login.about' => 'Anuko Time Tracker ist ein Open-Source Zeiterfassungssystem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Anfrage zur Zurücksetzung des Passwortes wurde per E-mail gesendet.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index e2c63ef91..30f697cbd 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -439,7 +439,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Unustasid salasõna?', -'form.login.about' => 'Anuko Time Tracker on lihtne, lihtsalt kasutatav ja avatud lähtekoodiga ajaarvestussüsteem.', +'form.login.about' => 'Anuko Time Tracker on avatud lähtekoodiga ajaarvestussüsteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasõna tühistamise teade on saadetud e-postile.', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 42af8047e..034ea6ae0 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -436,7 +436,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Salasana unohtunut?', -'form.login.about' => 'Anuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto.', + // TODO: check translation of form.login.about - is open source "vapaan koodin"? +'form.login.about' => 'Anuko Time Tracker on vapaan koodin tuntiseurantaohjelmisto.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasanan nollauspyyntöviesti lähetetty.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 46116db12..44ba9b2bb 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -428,7 +428,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Mot de passe oublié?', -'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser.', +'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Une demande de réinitialisation du mot de passe a été envoyé par courriel.', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 5e3ee8ee8..29404a831 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -428,7 +428,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Ξεχάσατε τον κωδικό πρόσβασης;', -'form.login.about' => 'Anuko Time Tracker είναι ένα απλό, εύχρηστο, ανοικτού κώδικα σύστημα παρακολούθησης χρόνου.', +'form.login.about' => 'Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Το αίτημα επαναφοράς κωδικού πρόσβασης αποστέλλεται μέσω ηλεκτρονικού ταχυδρομείου.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 1460943e2..2bc6129d9 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -453,6 +453,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'שכחת סיסמה?', + // TODO: re-translate form.login.about as it has changed. + // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 509034524..98a566d10 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -450,7 +450,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Elfelejtetted a jelszót?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 1626913ec..1b7f56e46 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -438,7 +438,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Password dimenticata?', -'form.login.about' => 'Anuko Time Tracker è un sistema semplice e open source per registrare i tempi di lavoro.', +'form.login.about' => 'Anuko Time Tracker è un sistema open source per registrare i tempi di lavoro.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Richiesta di reset password inviata via mail.', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b73f3ea83..aae1528cc 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -451,7 +451,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'パスワードを忘れましたか?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index e7430b6ee..6794c57e7 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -455,7 +455,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '암호를 잊으셨습니까?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 959822057..8b2e557ea 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -390,6 +390,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Wachtwoord vergeten?', + // TODO: re-translate form.login.about as it has changed. + // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index ed392d932..77d43637f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -450,6 +450,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glemt passordet?', + // TODO: re-translate form.login.about as it has changed. + // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 5f67ff40f..b617314db 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -439,7 +439,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Nie pamiętasz hasła?', -'form.login.about' => 'Anuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym systemem śledzenia czasu.', +'form.login.about' => 'Anuko Time Tracker jest otwartoźródłowym systemem śledzenia czasu.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Instrukcje zmiany hasła zostały wysłane na adres e-mail połączony z kontem.', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3fb2f3aed..95e9d1060 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -434,7 +434,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', -'form.login.about' => 'Anuko Time Tracker é um sistema, simples, de fácil uso, de código aberto, de rastreamento do tempo.', +'form.login.about' => 'Anuko Time Tracker é um sistema de código aberto de rastreamento do tempo.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Pedido para resetar a senha enviado por e-mail.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index fab8af4cf..dd72ab4b6 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -434,7 +434,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Esqueceu a senha?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 32edb49e9..55731aa05 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -454,7 +454,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parola pierduta?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 3268f0878..dd6c1e1c8 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -391,7 +391,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Забыли пароль?', -'form.login.about' => 'Anuko Time Tracker - это открытая (open source), простая и лёгкая в использовании система трекинга рабочего времени.', +'form.login.about' => 'Anuko Time Tracker - это открытая (open source) система трекинга рабочего времени.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Запрос на сброс пароля отослан по e-mail.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 90f500e0c..95a025a7a 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -443,7 +443,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zabudnuté heslo?', -'form.login.about' => 'Anuko Time Tracker je jednoduchý a ľahko použiteľný systém na sledovanie času s otvoreným zdrojovým kódom.', +'form.login.about' => 'Anuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Žiadosť o obnovenie hesla bola odoslaná e-mailom.', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 2e1004810..eb8bd99dd 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -426,7 +426,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. // TODO: translate the following. // 'form.login.forgot_password' => 'Forgot password?', -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahteva za razveljavitev gesla je bila poslana.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index f67e81334..a80f0e67a 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -437,6 +437,8 @@ // Forma prijave. Pogledajte primer na https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Zaboravili ste lozinku?', + // TODO: re-translate form.login.about as it has changed. + // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', // Izmena forme za lozinku. Pogledajte primer na https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index fc1c7bd62..6bae583a7 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -436,6 +436,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Glömt lösenordet?', + // TODO: re-translate form.login.about as it has changed. + // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index f1c164c62..3ba51a116 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -462,7 +462,7 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Parolanızı unuttunuz mu?', // TODO: translate the following. -// 'form.login.about' => 'Anuko Time Tracker is a simple, easy to use, open source time tracking system.', +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index c10942223..7eb54073a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -442,6 +442,8 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => '忘记密码?', +// TODO: re-translate form.login.about as it has changed. +// 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/initialize.php b/initialize.php index ae59bd0db..1f219134f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5384"); +define("APP_VERSION", "1.19.23.5385"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2de5567b129e8190b9c1f9d80d9cedc5b6c5d37d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 26 Nov 2020 18:10:00 +0000 Subject: [PATCH 2060/2515] Some more refactoring in translation files. --- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fa.lang.php | 2 +- WEB-INF/resources/fi.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/gr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 4 ++-- WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/ja.lang.php | 6 +++--- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 4 ++-- WEB-INF/resources/pl.lang.php | 4 ++-- WEB-INF/resources/pt-br.lang.php | 4 ++-- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 6 +++--- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 4 ++-- WEB-INF/resources/sl.lang.php | 6 +++--- WEB-INF/resources/sr.lang.php | 4 ++-- WEB-INF/resources/sv.lang.php | 4 ++-- WEB-INF/resources/tr.lang.php | 6 +++--- WEB-INF/resources/zh-cn.lang.php | 2 +- initialize.php | 2 +- 25 files changed, 41 insertions(+), 39 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 2268692bb..13626d9e6 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -427,7 +427,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Anfrage zur Zurücksetzung des Passwortes wurde per E-mail gesendet.', 'form.reset_password.email_subject' => 'Anuko Time Tracker Anfrage zur Zurücksetzung des Passwortes', -'form.reset_password.email_body' => "Sehr geehrter Nutzer,\n\nEin Benutzer mit der IP %s hat vor Kurzem die Zurücksetzung Ihres Passworts für Anuko Time Tracker Passwort angefordert. Bitte rufen Sie diesen Link auf wenn Sie Ihr Passwort zurücksetzen möchten.\n\n%s\n\nAnuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source Zeiterfassungs-System. Besuchen Sie https://www.anuko.com für weitere Informationen.\n\n", +'form.reset_password.email_body' => "Sehr geehrter Nutzer,\n\nEin Benutzer mit der IP %s hat vor Kurzem die Zurücksetzung Ihres Passworts für Anuko Time Tracker Passwort angefordert. Bitte rufen Sie diesen Link auf wenn Sie Ihr Passwort zurücksetzen möchten.\n\n%s\n\nAnuko Time Tracker ist ein Open-Source Zeiterfassungs-System. Besuchen Sie https://www.anuko.com für weitere Informationen.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Um das Passwort zurückzusetzen, geben Sie ein Neues ein und klicken dann auf Speichern.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index e7df23ad6..05c24948c 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -461,7 +461,7 @@ 'form.reset_password.message' => 'Se ha enviado la petición de reestablecer contraseña.', 'form.reset_password.email_subject' => 'Solicitud de reestablecimiento de la contraseña de Anuko Time Tracker', // Note to translators: the ending of this string needs to be translated. -// TODO: English string has changed. "from IP added. Re-translate the beginning. +// TODO: English string has changed. "from IP added. Re-translate. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Querido usuario, Alguien, IP %s, solicitó reestablecer su contraseña de Anuko Time Tracker. Por favor visite este enlace si quiere reestablecer su contraseña.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 30f697cbd..d938cf079 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -444,7 +444,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Salasõna tühistamise teade on saadetud e-postile.', 'form.reset_password.email_subject' => 'Anuko Time Tracker, parooli tühistamise nõue', -'form.reset_password.email_body' => "Lugupeetud Kasutaja,\n\nIP-lt %s on nõutud Teie salasõna lähtestamist. Palun avage allolev link, kui soovite oma parooli lähtestada.\n\n%s\n\nAnuko Time Tracker on lihtne, lihtsalt kasutatav ja avatud lähtekoodiga ajaarvestussüsteem. Lisainfo saamiseks külastage https://www.anuko.com lehekülge.\n\n", +'form.reset_password.email_body' => "Lugupeetud Kasutaja,\n\nIP-lt %s on nõutud Teie salasõna lähtestamist. Palun avage allolev link, kui soovite oma parooli lähtestada.\n\n%s\n\nAnuko Time Tracker on avatud lähtekoodiga ajaarvestussüsteem. Lisainfo saamiseks külastage https://www.anuko.com lehekülge.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Kirjuta siia oma uus parool ja salvesta.', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 0d578b64c..0fca34586 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -456,7 +456,7 @@ // TODO: check translation of form.reset_password.email_subject. This is the subject for email message for password reset. Below is the English original. // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', 'form.reset_password.email_subject' => 'درخواست بازیابی رمزعبور فرستاده شد', -// TODO: English string has changed. "from IP added. Re-translate the beginning. +// TODO: English string has changed. Re-translate. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Older translation is below. // 'form.reset_password.email_body' => "کاربران گرامی\n\n یک نفر، شاید خودتان، درخواست بازیابی رمزعبور نرم افزار رهگیری زمان شما را داشته است.لطفا برای تغییر رمزعبور روی لینک زیر کلیک کنید: \n\n%s\n\n", diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 034ea6ae0..eaad8a293 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -445,7 +445,7 @@ // TODO: English string has changed. Re-translate. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Hyvä käyttäjä,\n\nJoku, IP %s, on pyytänyt nollaamaan Anuko Time Tracker -ohjelman salasanasi. Jos haluat nollata salasanasi, käy sivulla \n\n%s\n\nAnuko Time Tracker on yksinkertainen ja helppokäyttöinen vapaan koodin tuntiseurantaohjelmisto. Lisätietoja sivulla https://www.anuko.com.\n\n", +'form.reset_password.email_body' => "Hyvä käyttäjä,\n\nJoku, IP %s, on pyytänyt nollaamaan Anuko Time Tracker -ohjelman salasanasi. Jos haluat nollata salasanasi, käy sivulla \n\n%s\n\nAnuko Time Tracker on vapaan koodin tuntiseurantaohjelmisto. Lisätietoja sivulla https://www.anuko.com.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Syötä uusi salasana ja osoita Tallenna.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 44ba9b2bb..3d4845cc0 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -436,7 +436,7 @@ // TODO: English string has changed. Re-translate. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Cher utilisateur,\n\nQuelqu\'un, IP %s, avez demandé une réinitialisation de votre mot de passe. Veuillez de suivre ce lien pour le réinitialiser\n\n%s\n\nAnuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser. Visitez https://www.anuko.com pour plus d\'informations.\n\n", +'form.reset_password.email_body' => "Cher utilisateur,\n\nQuelqu\'un, IP %s, avez demandé une réinitialisation de votre mot de passe. Veuillez de suivre ce lien pour le réinitialiser\n\n%s\n\nAnuko Time Tracker est un système de gestion du temps, open source. Visitez https://www.anuko.com pour plus d\'informations.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Saisissez votre nouveau mot de passe et cliquez sur Sauvegarder.', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 29404a831..61b06f6bd 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -433,7 +433,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Το αίτημα επαναφοράς κωδικού πρόσβασης αποστέλλεται μέσω ηλεκτρονικού ταχυδρομείου.', 'form.reset_password.email_subject' => 'Αίτημα επαναφοράς κωδικού Anuko Time Tracker', -'form.reset_password.email_body' => "Αγαπητέ χρήστη,\n\nΚάποιος από την IP %s ζήτησε επαναφορά του κωδικού πρόσβασης στο Anuko Time Tracker. Πατήστε στον ακόλουθο σύνδεσμο για επαναφορά του κωδικού σας.\n\n%s\n\nΤο Anuko Time Tracker είναι ένα απλό, εύχρηστο, ανοικτού κώδικα σύστημα παρακολούθησης χρόνου. Επισκεφθείτε τη διεύθυνση https://www.anuko.com για περισσότερες πληροφορίες.\n\n", +'form.reset_password.email_body' => "Αγαπητέ χρήστη,\n\nΚάποιος από την IP %s ζήτησε επαναφορά του κωδικού πρόσβασης στο Anuko Time Tracker. Πατήστε στον ακόλουθο σύνδεσμο για επαναφορά του κωδικού σας.\n\n%s\n\nΤο Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου. Επισκεφθείτε τη διεύθυνση https://www.anuko.com για περισσότερες πληροφορίες.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Πληκτρολογήστε νέο κωδικό πρόσβασης και κάντε κλικ στην επιλογή Αποθήκευση.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 2bc6129d9..b8459e8b7 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -460,8 +460,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'הבקשה לאיפוס בסיסמה נשלחה בדואר אלקטרוני.', 'form.reset_password.email_subject' => 'בקשה לאיפוס סיסמה למערכת Anuko Time Tracker', -// TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Older translation is below. // 'form.reset_password.email_body' => "משתמש יקר,\n\n התקבלה בקשה לאיפוס סיסמתך. נא ללחוץ על קישור זה אם ברצונך לאפס את הסיסמה.\n\n%s\n\n. Anuko Time Tracker הינה מערכת לניהול זמן פשוטה וחינמית. בקר באתרנו בכתובת https://www.anuko.com לפרטים נוספים.\n\n", diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 98a566d10..a4fe12023 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -456,7 +456,7 @@ // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index aae1528cc..07db51091 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -457,10 +457,10 @@ 'form.reset_password.message' => '送信したパスワードの初期化の要求。', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Trackerのパスワードの初期化の要求', // TODO: translate the ending of this string. -// TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Older translation is below. -// 'form.reset_password.email_body' => "尊敬なるお客様、\n\n誰から(多分あなた)あなたのAnuko Time Trackerのパスワードの初期化が要求されました。あなたのパスワードを初期化しようとこのリンクを押してください。\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "尊敬なるお客様、\n\n誰から(多分あなた)あなたのAnuko Time Trackerのパスワードの初期化が要求されました。あなたのパスワードを初期化しようとこのリンクを押してください。\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 6794c57e7..975719ebd 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -461,7 +461,7 @@ 'form.reset_password.message' => '송신한 암호 재설정 요청.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker 암호 재설정 요청', // TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 8b2e557ea..ac8431264 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -397,6 +397,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Het verzoek om het wachtwoord te herstellen is verzonden per email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker wachtwoord herstel verzoek', +// TODO: retranslate form.reset_password.email_body as the string has changed. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", 'form.reset_password.email_body' => "Geachte medewerker,\n\nIemand, met IP adres %s, heeft verzocht uw wachtwoord in Anuko Time Tracker te herstellen. Klik op deze link als u uw wachtwoord wil wijzigen.\n\n%s\n\nAnuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem. Bezoek https://www.anuko.com voor meer informatie.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 77d43637f..eb406d0f9 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -458,8 +458,8 @@ // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Kjære bruker,\n\nNoen, IP %s, bad om å få ditt Anuko Time Tracker password resatt. Vær vennlig å besøk denne lenken dersom du ønsker at passordet ditt skal resettes.\n\n%s\n\nAnuko Time Tracker er et enkelt og brukervennlig system for tidsregistrering basert på åpen kildekode. Les mer på https://www.anuko.com.\n\n", diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index b617314db..79952ff56 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -445,9 +445,9 @@ 'form.reset_password.message' => 'Instrukcje zmiany hasła zostały wysłane na adres e-mail połączony z kontem.', 'form.reset_password.email_subject' => 'Anuko Time Tracker - żądanie zmiany hasła', // TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Drogi Użytkowniku,\n\nktoś, IP %s, poprosił o zmianę hasła w aplikacji Anuko Time Tracker. Aby ustawić nowe hasło, proszę kliknąć na poniższy link lub go skopiować i otworzyć w oknie przeglądarki WWW.\n\n%s\n\nJeśli to nie Ty poprosiłeś o zmianę hasła, zignoruj tą wiadomość.\n\nAnuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym systemem do śledzenia czasu. Odwiedź https://www.anuko.com aby uzyskać więcej informacji.\n\n", +'form.reset_password.email_body' => "Drogi Użytkowniku,\n\nktoś, IP %s, poprosił o zmianę hasła w aplikacji Anuko Time Tracker. Aby ustawić nowe hasło, proszę kliknąć na poniższy link lub go skopiować i otworzyć w oknie przeglądarki WWW.\n\n%s\n\nJeśli to nie Ty poprosiłeś o zmianę hasła, zignoruj tą wiadomość.\n\nAnuko Time Tracker jest otwartoźródłowym systemem do śledzenia czasu. Odwiedź https://www.anuko.com aby uzyskać więcej informacji.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Wpisz nowe hasło i kliknij Zapisz.', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 95e9d1060..9f446ce5f 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -440,9 +440,9 @@ 'form.reset_password.message' => 'Pedido para resetar a senha enviado por e-mail.', 'form.reset_password.email_subject' => 'Pedido de alteração de senha no Anuko Time Tracker', // TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Prezado usuário,\n\nAlguém, IP %s, solicitou o reset da sua senha do Anuko Time Tracker. Entre nete link para resetar a sua senha.\n\n%s\n\nAnuko Time Tracker é um sistema, simples, de fácil uso, de código abertois, de rastreamento do tempo. Visite https://www.anuko.com para mais informações.\n\n", +'form.reset_password.email_body' => "Prezado usuário,\n\nAlguém, IP %s, solicitou o reset da sua senha do Anuko Time Tracker. Entre nete link para resetar a sua senha.\n\n%s\n\nAnuko Time Tracker é um sistema de código abertois, de rastreamento do tempo. Visite https://www.anuko.com para mais informações.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Entre com a nova senha e clique em Salvar.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index dd72ab4b6..b0ae4794a 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -440,7 +440,7 @@ // TODO: translate the following. // 'form.reset_password.message' => 'Password reset request sent by email.', // 'form.reset_password.email_subject' => 'Anuko Time Tracker password reset request', -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 55731aa05..2ca785263 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -459,10 +459,10 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Cererea de resetare a parolei a fost trimisa.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker - cerere de resetare a parolei', -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Draga Utilizator,\n\nCineva, IP %s, a cerut resetarea parolei pentru contul Anuko Time Tracker. Te rog, viziteaza acesta legatura daca doresti sa iti resetezi parola.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Draga Utilizator,\n\nCineva, IP %s, a cerut resetarea parolei pentru contul Anuko Time Tracker. Te rog, viziteaza acesta legatura daca doresti sa iti resetezi parola.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index dd6c1e1c8..53cb89b10 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -396,7 +396,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Запрос на сброс пароля отослан по e-mail.', 'form.reset_password.email_subject' => 'Сброс пароля к Anuko Time Tracker', -'form.reset_password.email_body' => "Уважаемый пользователь,\n\nКто-то c IP %s попросил сбросить ваш пароль к системе Anuko Time Tracker. Пройдите по данной ссылке для сброса пароля.\n\n%s\n\nAnuko Time Tracker - это открытая (open source), простая и лёгкая в использовании система трекинга рабочего времени. Подробности - на сайте https://www.anuko.com.", +'form.reset_password.email_body' => "Уважаемый пользователь,\n\nКто-то c IP %s попросил сбросить ваш пароль к системе Anuko Time Tracker. Пройдите по данной ссылке для сброса пароля.\n\n%s\n\nAnuko Time Tracker - это открытая (open source) система трекинга рабочего времени. Подробности - на сайте https://www.anuko.com.", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Впечатайте новый пароль и нажмите Cохранить.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 95a025a7a..56023db5a 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -449,9 +449,9 @@ 'form.reset_password.message' => 'Žiadosť o obnovenie hesla bola odoslaná e-mailom.', 'form.reset_password.email_subject' => 'Žiadosť o obnovenie hesla do Anuko Time Tracker', // TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Vážený používateľ,\n\nniekto, IP %s, si vyžiadal obnovenie vášho hesla do Anuko Time Tracker. Prosím kliknite na nasledujúcu linku, ak si prajete obnoviť heslo.\n\n%s\n\nAnuko Time Tracker je jednoduchý a ľahko použiteľný systém na sledovanie času s otvoreným zdrojovým kódom. Navštívte https://www.anuko.com pre viac informácií.\n\n", +'form.reset_password.email_body' => "Vážený používateľ,\n\nniekto, IP %s, si vyžiadal obnovenie vášho hesla do Anuko Time Tracker. Prosím kliknite na nasledujúcu linku, ak si prajete obnoviť heslo.\n\n%s\n\nAnuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom. Navštívte https://www.anuko.com pre viac informácií.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Zadajte nové heslo a kliknite na Uložiť.', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index eb8bd99dd..ae6ec81c3 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -432,10 +432,10 @@ 'form.reset_password.message' => 'Zahteva za razveljavitev gesla je bila poslana.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker zahteva za razveljavitev gesla', // TODO: translate the ending of this string properly. -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. "from IP" added. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Spoštovani uporabnik,\n\nNekdo, IP %s, je zahteval razveljavitev vašega Anuko Time Tracker gesla. Prosimo obiščite to povezavo, če želite razveljaviti vaše geslo.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Spoštovani uporabnik,\n\nNekdo, IP %s, je zahteval razveljavitev vašega Anuko Time Tracker gesla. Prosimo obiščite to povezavo, če želite razveljaviti vaše geslo.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index a80f0e67a..abfb0d7bd 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -444,8 +444,8 @@ // Izmena forme za lozinku. Pogledajte primer na https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Zahtev za izmenu lozinke je poslat mejlom.', 'form.reset_password.email_subject' => 'Anuko Time Tracker zahtev za izmenu lozinke', -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Poštovani korisniče,\n\nneko, IP %s, ste poslali zahtev za izmenu lozinke na Anuko Time Tracker nalogu. Molimo da pratite link ako želite da izmenite lozinku.\n\n%s\n\nAnuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena. Posetite nas na https://www.anuko.com za više informacija.\n\n", diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 6bae583a7..17af93fd8 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -443,8 +443,8 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Begäran om att återställa lösenordet skickades via e-post.', 'form.reset_password.email_subject' => 'Återställning av lösenord för Anuko Time Tracker begärd', -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Kära användare,\n\Någon, IP %s, begärde att ditt lösenord för Anuko Time Tracker skulle återställas. Vänligen besök den här länken ifall du vill återställa ditt lösenord.\n\n%s\n\nAnuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider. Besök https://www.anuko.com för mer information.\n\n", diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 3ba51a116..3b98e0a50 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -468,10 +468,10 @@ 'form.reset_password.message' => 'Parola sıfırlama talebi yollandı.', // TODO: add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko Time Tracker parola sıfırlama talebi', // TODO: translate the ending of the following. -// TODO: English string has changed. "from IP" added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Sayın Kullanıcı,\n\nBirisi, IP %s, Anuko Time Tracker parolanızın sıfırlanmasını istedi. Parolanızı sıfırlamak isterseniz lütfen bu bağlantıyı takip edin.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +'form.reset_password.email_body' => "Sayın Kullanıcı,\n\nBirisi, IP %s, Anuko Time Tracker parolanızın sıfırlanmasını istedi. Parolanızı sıfırlamak isterseniz lütfen bu bağlantıyı takip edin.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7eb54073a..5500155fc 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -450,7 +450,7 @@ 'form.reset_password.message' => '密码重设请求已经发送。', // TODO: Add "by email" to match the English string. 'form.reset_password.email_subject' => 'Anuko时间追踪器密码重设请求', // TODO: translate the following. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. // TODO: translate the following. diff --git a/initialize.php b/initialize.php index 1f219134f..6384b0dad 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5385"); +define("APP_VERSION", "1.19.23.5386"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ad140616820e9fae649e4adeef3663ddee6e48ea Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 26 Nov 2020 19:19:45 +0000 Subject: [PATCH 2061/2515] Minor improvements in translation files. --- WEB-INF/resources/da.lang.php | 2 +- WEB-INF/resources/de.lang.php | 2 +- WEB-INF/resources/es.lang.php | 2 +- WEB-INF/resources/et.lang.php | 2 +- WEB-INF/resources/fr.lang.php | 2 +- WEB-INF/resources/gr.lang.php | 2 +- WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 2 +- WEB-INF/resources/it.lang.php | 8 ++++---- WEB-INF/resources/ja.lang.php | 2 +- WEB-INF/resources/ko.lang.php | 2 +- WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 2 +- WEB-INF/resources/pl.lang.php | 2 +- WEB-INF/resources/pt-br.lang.php | 2 +- WEB-INF/resources/pt.lang.php | 2 +- WEB-INF/resources/ro.lang.php | 2 +- WEB-INF/resources/ru.lang.php | 2 +- WEB-INF/resources/sk.lang.php | 2 +- WEB-INF/resources/sl.lang.php | 2 +- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 2 +- WEB-INF/resources/zh-cn.lang.php | 2 +- initialize.php | 2 +- 25 files changed, 32 insertions(+), 24 deletions(-) diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 040405503..efdacc370 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -436,7 +436,7 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Nulstilling af adgangskode er sendt på email.', 'form.reset_password.email_subject' => 'Anuko Time Tracker - Anmodning om nulstilling af adgangskode', -// TODO: English string has changed. "from IP added. Re-translate the beginning. +// TODO: English string has changed. Re-translate the beginning. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Hej\n\nNogen, IP %s, har bedt om at få nulstillet din adgangskode. Tryk på linket hvis du vil have nulstillet din adgangskode.\n\n%s\n\nAnuko Time Tracker er et open source tidsregistrerings system. Besøg https://www.anuko.com for mere information.\n\n", diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 13626d9e6..e41d92b09 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -580,7 +580,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'An', 'form.mail.report_subject' => 'Time Tracker Bericht', -'form.mail.footer' => 'Anuko Time Tracker ist ein einfaches, leicht zu bedienendes, Open-Source
Zeitverwaltungs-System. Besuchen Sie www.anuko.com für weitere Informationen.', +'form.mail.footer' => 'Anuko Time Tracker ist ein Open-Source
Zeitverwaltungs-System. Besuchen Sie www.anuko.com für weitere Informationen.', 'form.mail.report_sent' => 'Der Bericht wurde gesendet.', 'form.mail.invoice_sent' => 'Die Rechnung wurde gesendet.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 05c24948c..9df814845 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -461,7 +461,7 @@ 'form.reset_password.message' => 'Se ha enviado la petición de reestablecer contraseña.', 'form.reset_password.email_subject' => 'Solicitud de reestablecimiento de la contraseña de Anuko Time Tracker', // Note to translators: the ending of this string needs to be translated. -// TODO: English string has changed. "from IP added. Re-translate. +// TODO: English string has changed. Re-translate. // 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. 'form.reset_password.email_body' => "Querido usuario, Alguien, IP %s, solicitó reestablecer su contraseña de Anuko Time Tracker. Por favor visite este enlace si quiere reestablecer su contraseña.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index d938cf079..7638ade63 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -610,7 +610,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Kellele', 'form.mail.report_subject' => 'Time Tracker raport', -'form.mail.footer' => 'Anuko Time Tracker on lihtne, lihtsalt kasutatav ja avatud lähtekoodiga
ajaarvestussüsteem. Lisainfo saamiseks külastage www.anuko.com lehekülge.', +'form.mail.footer' => 'Anuko Time Tracker on avatud lähtekoodiga
ajaarvestussüsteem. Lisainfo saamiseks külastage www.anuko.com lehekülge.', 'form.mail.report_sent' => 'Raport on saadetud.', 'form.mail.invoice_sent' => 'Arve on saadetud.', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 3d4845cc0..771ed18e3 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -598,7 +598,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'À', 'form.mail.report_subject' => 'Rapport Time Tracker', -'form.mail.footer' => 'Anuko Time Tracker est un système de gestion du temps, open source, simple et facile à utiliser. Visitez www.anuko.com pour plus d\\\'informations.', +'form.mail.footer' => 'Anuko Time Tracker est un système de gestion du temps, open source. Visitez www.anuko.com pour plus d\\\'informations.', 'form.mail.report_sent' => 'Le rapport a été envoyé.', 'form.mail.invoice_sent' => 'La facture a été envoyée.', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 61b06f6bd..e9003045c 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -590,7 +590,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Προς', 'form.mail.report_subject' => 'Time Tracker αναφορά', -'form.mail.footer' => 'Το Anuko Time Tracker είναι ένα απλό, εύχρηστο, ανοικτού κώδικα σύστημα παρακολούθησης χρόνου. Επισκεφθείτε τη διεύθυνση www.anuko.com για περισσότερες πληροφορίες.', +'form.mail.footer' => 'Το Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου. Επισκεφθείτε τη διεύθυνση www.anuko.com για περισσότερες πληροφορίες.', 'form.mail.report_sent' => 'Η αναφορά στάλθηκε.', 'form.mail.invoice_sent' => 'Το τιμολόγιο στάλθηκε.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index b8459e8b7..032e01bf0 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -628,6 +628,8 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'אל', 'form.mail.report_subject' => 'דוח Time Tracker', +// TODO: retranslate form.mail.footer as the English string has changed. +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.footer' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן. בקר באתר www.anuko.com לפרטים נוספים.', 'form.mail.report_sent' => 'הדוח נשלח.', 'form.mail.invoice_sent' => 'החשבונית נשלחה.', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a4fe12023..1909682fb 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -630,7 +630,7 @@ 'form.mail.to' => 'Címzett', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'A számla elküldve.', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 1b7f56e46..35035d3e9 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -443,10 +443,10 @@ // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Richiesta di reset password inviata via mail.', 'form.reset_password.email_subject' => 'Richiesta reset password per Anuko Time Tracker', -// TODO: English string has changed. "from IP added. Re-translate the beginning. -// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is a simple, easy to use, open source time tracking system. Visit https://www.anuko.com for more information.\n\n", +// TODO: English string has changed. Re-translate the beginning. +// 'form.reset_password.email_body' => "Dear User,\n\nSomeone from IP %s requested your Anuko Time Tracker password reset. Please visit this link if you want to reset your password.\n\n%s\n\nAnuko Time Tracker is an open source time tracking system. Visit https://www.anuko.com for more information.\n\n", // "IP %s" probably sounds awkward. -'form.reset_password.email_body' => "Caro utente,\n\n qualcuno, IP %s, ha richiesto di reimpostare la tua password per Anuko Time Tracker. Per favore visita questo link per reimpostare la tua password.\n\n%s\n\nAnuko Time Tracker è un sistema semplice e open source per registrare i tempi di lavoro. Visita https://www.anuko.com per maggiori informazioni.\n\n", +'form.reset_password.email_body' => "Caro utente,\n\n qualcuno, IP %s, ha richiesto di reimpostare la tua password per Anuko Time Tracker. Per favore visita questo link per reimpostare la tua password.\n\n%s\n\nAnuko Time Tracker è un sistema open source per registrare i tempi di lavoro. Visita https://www.anuko.com per maggiori informazioni.\n\n", // Changing Password form. See example at https://timetracker.anuko.com/password_change.php?ref=1. 'form.change_password.tip' => 'Digita una nuova password e clicca su Salva.', @@ -605,7 +605,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'A', 'form.mail.report_subject' => 'Rapporto Time Tracker', -'form.mail.footer' => 'Anuko Time Tracker è un sistema semplice e open source
per registrare i tempi di lavoro. Visita www.anuko.com per maggiori informazioni.', +'form.mail.footer' => 'Anuko Time Tracker è un sistema open source
per registrare i tempi di lavoro. Visita www.anuko.com per maggiori informazioni.', 'form.mail.report_sent' => 'Rapporto inviato.', 'form.mail.invoice_sent' => 'Fattura inviata.', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 07db51091..0ba848ba0 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -633,7 +633,7 @@ 'form.mail.to' => 'まで', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => '送信した送り状。', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 975719ebd..975e42169 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -631,7 +631,7 @@ 'form.mail.to' => '까지', // TODO: is this correct? The meaning is that we send an email TO this person. // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => '송신한 송장.', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ac8431264..6d51082c7 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -546,6 +546,8 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Aan', 'form.mail.report_subject' => 'Time Tracker rapport', +// TODO: retranslate form.mail.footer as the English string has changed. +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.footer' => 'Anuko Time Tracker is een eenvoudig en gemakkelijk te gebruiken open source tijdregistratiesysteem. Bezoek www.anuko.com voor meer informatie.', 'form.mail.report_sent' => 'Rapport is verzonden.', 'form.mail.invoice_sent' => 'Factuur is verzonden.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index eb406d0f9..cfaf305b5 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -632,7 +632,7 @@ 'form.mail.to' => 'Til', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', // 'form.mail.invoice_sent' => 'Invoice sent.', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 79952ff56..24664d693 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -610,7 +610,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Do', 'form.mail.report_subject' => 'Raport Time Tracker', -'form.mail.footer' => 'Anuko Time Tracker jest prostym, łatwym w użyciu, otwartoźródłowym
systemem śledzenia czasu. Odwiedź www.anuko.com, aby uzyskać więcej informacji.', +'form.mail.footer' => 'Anuko Time Tracker jest otwartoźródłowym
systemem śledzenia czasu. Odwiedź www.anuko.com, aby uzyskać więcej informacji.', 'form.mail.report_sent' => 'Wysłano raport', 'form.mail.invoice_sent' => 'Wysłano fakturę', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 9f446ce5f..e41cf26c3 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -605,7 +605,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Para', 'form.mail.report_subject' => 'Relatório do Time Tracker', -'form.mail.footer' => 'Anuko Time Tracker é um sistema, simples, de fácil uso, de código aberto,
de rastreamento do tempo. Visite www.anuko.com para mais informações.', +'form.mail.footer' => 'Anuko Time Tracker é um sistema de código aberto,
de rastreamento do tempo. Visite www.anuko.com para mais informações.', 'form.mail.report_sent' => 'Relatório enviado.', 'form.mail.invoice_sent' => 'Fatura enviada.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index b0ae4794a..13912a44d 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -612,7 +612,7 @@ 'form.mail.to' => 'Para', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', // 'form.mail.invoice_sent' => 'Invoice sent.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 2ca785263..0c531ad11 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -633,7 +633,7 @@ 'form.mail.to' => 'Catre', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Factura trimisa.', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 53cb89b10..835b90048 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -543,7 +543,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Кому', 'form.mail.report_subject' => 'Time Tracker отчёт', -'form.mail.footer' => 'Anuko Time Tracker - это открытая (open source), простая и лёгкая в использовании система трекинга рабочего времени. Подробности на сайте www.anuko.com.', +'form.mail.footer' => 'Anuko Time Tracker - это открытая (open source) система трекинга рабочего времени. Подробности на сайте www.anuko.com.', 'form.mail.report_sent' => 'Отчёт отправлен.', 'form.mail.invoice_sent' => 'Счёт отправлен.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 56023db5a..57c14a7db 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -615,7 +615,7 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Komu', 'form.mail.report_subject' => 'Time Tracker zostava', -'form.mail.footer' => 'Anuko Time Tracker je jednoduchý a ľahko použiteľný systém na sledovanie času s otvoreným zdrojovým kódom.
Navštívte www.anuko.com pre viac informácií.', +'form.mail.footer' => 'Anuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom.
Navštívte www.anuko.com pre viac informácií.', 'form.mail.report_sent' => 'Zostava odoslaná.', 'form.mail.invoice_sent' => 'Faktúra odoslaná.', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index ae6ec81c3..32e200f81 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -606,7 +606,7 @@ 'form.mail.to' => 'Za', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', // 'form.mail.invoice_sent' => 'Invoice sent.', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index abfb0d7bd..38cf8565b 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -610,6 +610,8 @@ // Forma mejla. Pogledajte primer na https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Za', 'form.mail.report_subject' => 'Evidencija vremena', +// TODO: retranslate form.mail.footer as the English string has changed. +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.footer' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje
radnog vremena. Posetite www.anuko.com za više informacija.', 'form.mail.report_sent' => 'Izveštaj poslat.', 'form.mail.invoice_sent' => 'Račun poslat.', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 17af93fd8..fe05e89a7 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -609,6 +609,8 @@ // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.to' => 'Till', 'form.mail.report_subject' => 'Tidsrapport', +// TODO: retranslate form.mail.footer as the English string has changed. +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', 'form.mail.footer' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod för att enkelt spåra och hålla koll på arbetstider. Besök www.anuko.com för mer information.', 'form.mail.report_sent' => 'Rapporten skickades.', 'form.mail.invoice_sent' => 'Fakturan skickades.', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 3b98e0a50..777440e88 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -646,7 +646,7 @@ 'form.mail.to' => 'Kime', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => 'Fatura yollandı.', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 5500155fc..01e639bdd 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -620,7 +620,7 @@ 'form.mail.to' => '到', // TODO: translate the following. // 'form.mail.report_subject' => 'Time Tracker Report', -// 'form.mail.footer' => 'Anuko Time Tracker is a simple, easy to use, open source
time tracking system. Visit www.anuko.com for more information.', +// 'form.mail.footer' => 'Anuko Time Tracker is an open source
time tracking system. Visit www.anuko.com for more information.', // 'form.mail.report_sent' => 'Report sent.', 'form.mail.invoice_sent' => '发票已送出。', diff --git a/initialize.php b/initialize.php index 6384b0dad..52148e8b1 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5386"); +define("APP_VERSION", "1.19.23.5387"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0ac7c8645b11b61d51a1da55685112c8ba7d97b5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 15:29:40 +0000 Subject: [PATCH 2062/2515] Added separators on some forms to improve UI. --- WEB-INF/templates/client_add2.tpl | 1 + WEB-INF/templates/client_edit2.tpl | 1 + WEB-INF/templates/project_add2.tpl | 2 ++ WEB-INF/templates/project_edit2.tpl | 2 ++ WEB-INF/templates/task_add2.tpl | 1 + WEB-INF/templates/task_edit2.tpl | 1 + initialize.php | 2 +- 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/client_add2.tpl b/WEB-INF/templates/client_add2.tpl index 5fe001b23..2704a133c 100644 --- a/WEB-INF/templates/client_add2.tpl +++ b/WEB-INF/templates/client_add2.tpl @@ -24,6 +24,7 @@ License: See license.txt *}
{if $show_projects} + diff --git a/WEB-INF/templates/client_edit2.tpl b/WEB-INF/templates/client_edit2.tpl index 91f2b1c39..67b79ecdf 100644 --- a/WEB-INF/templates/client_edit2.tpl +++ b/WEB-INF/templates/client_edit2.tpl @@ -30,6 +30,7 @@ License: See license.txt *} {if $show_projects} + diff --git a/WEB-INF/templates/project_add2.tpl b/WEB-INF/templates/project_add2.tpl index 4f2c14286..cd900cf36 100644 --- a/WEB-INF/templates/project_add2.tpl +++ b/WEB-INF/templates/project_add2.tpl @@ -24,6 +24,7 @@ License: See license.txt *} {/if} {if $show_users} + @@ -32,6 +33,7 @@ License: See license.txt *} {/if} {if $show_tasks} + diff --git a/WEB-INF/templates/project_edit2.tpl b/WEB-INF/templates/project_edit2.tpl index 8ce9ae9c7..f7b23a9ac 100644 --- a/WEB-INF/templates/project_edit2.tpl +++ b/WEB-INF/templates/project_edit2.tpl @@ -22,6 +22,7 @@ License: See license.txt *} {if $show_users} + @@ -30,6 +31,7 @@ License: See license.txt *} {/if} {if $show_tasks} + diff --git a/WEB-INF/templates/task_add2.tpl b/WEB-INF/templates/task_add2.tpl index 534c9525e..1b1c4e42e 100644 --- a/WEB-INF/templates/task_add2.tpl +++ b/WEB-INF/templates/task_add2.tpl @@ -16,6 +16,7 @@ License: See license.txt *} {if $show_projects} + diff --git a/WEB-INF/templates/task_edit2.tpl b/WEB-INF/templates/task_edit2.tpl index e66a93e10..9292ad151 100644 --- a/WEB-INF/templates/task_edit2.tpl +++ b/WEB-INF/templates/task_edit2.tpl @@ -22,6 +22,7 @@ License: See license.txt *} {if $show_projects} + diff --git a/initialize.php b/initialize.php index 52148e8b1..2d5f9964d 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5387"); +define("APP_VERSION", "1.19.23.5388"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1a9ec2adbc3adb32a857f2300ade94da1af8a37f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 16:19:46 +0000 Subject: [PATCH 2063/2515] Styles client address field. --- default.css | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/default.css b/default.css index 820382bdf..40d085f01 100644 --- a/default.css +++ b/default.css @@ -243,14 +243,14 @@ input[type="file"] { width: 237px; } -#description { +#description, #address { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; padding: .4rem; } -#description:focus { +#description:focus, #address:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index 2d5f9964d..472e4f37f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5388"); +define("APP_VERSION", "1.19.23.5389"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 706fa5628098a513ab667ed8f3261e89310ad3b1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 16:25:15 +0000 Subject: [PATCH 2064/2515] Styled item_name field for expenses. --- default.css | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/default.css b/default.css index 40d085f01..fea2e8da5 100644 --- a/default.css +++ b/default.css @@ -243,14 +243,14 @@ input[type="file"] { width: 237px; } -#description, #address { +#description, #address, #item_name { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; padding: .4rem; } -#description:focus, #address:focus { +#description:focus, #address:focus, #item_name:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index 472e4f37f..837759f2b 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5389"); +define("APP_VERSION", "1.19.23.5390"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From fef326c0478e77feff6a5b14dad4450b172e8017 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 16:58:05 +0000 Subject: [PATCH 2065/2515] Improved x-scrollable-table styles to alternate rows background. --- WEB-INF/templates/entity_files2.tpl | 3 ++- default.css | 6 ++++-- initialize.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/entity_files2.tpl b/WEB-INF/templates/entity_files2.tpl index d6b892b38..07a46443d 100644 --- a/WEB-INF/templates/entity_files2.tpl +++ b/WEB-INF/templates/entity_files2.tpl @@ -23,6 +23,7 @@ License: See license.txt *} {/if} {if $can_edit} +
{$forms.fileUploadForm.open}
 Anuko Time Tracker 1.19.18.5218 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5219 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 837ef05b3..55d047caa 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -1,3 +1,4 @@ + diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index ec0b05926..054c75363 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -1,3 +1,4 @@ + From 07c9f1d30e074481292412cda209f1516550ec1e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 15:28:35 +0000 Subject: [PATCH 1868/2515] Starting refactoring Calendar.class.php. --- WEB-INF/lib/form/Calendar.class.php | 8 +------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 74f52895d..61b393cba 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -31,9 +31,7 @@ import('ttTimeHelper'); class Calendar extends FormElement { - var $holidays = array(); - var $showHolidays = true; - var $weekStartDay = 0; + var $weekStartDay = 0; // Defaults to Sunday. var $mHeader = "padding: 5px; font-size: 8pt; color: #333333; background-color: #d9d9d9;"; var $mDayCell = "padding: 5px; border: 1px solid silver; font-size: 8pt; color: #333333; background-color: #ffffff;"; @@ -72,10 +70,6 @@ function setCellStyle($style) { $this->mCellStyle = $style; } function setACellStyle($style) { $this->mACellStyle = $style; } function setLinkStyle($style) { $this->mLinkStyle = $style; } - function setShowHolidays($value) { - $this->showHolidays = $value; - } - /** * @return void * @param date diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0390d8a25..2278dd082 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} - + - +
Anuko Time Tracker 1.19.18.5219 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5220 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 20156f595b5b9716fa7e7ab4789ba838e52f1192 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 15:53:33 +0000 Subject: [PATCH 1869/2515] Work in progress moving styles out of Calendar class into css file. --- WEB-INF/lib/form/Calendar.class.php | 12 +++--------- WEB-INF/templates/footer.tpl | 2 +- default.css | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 61b393cba..8ce99cc7e 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -33,9 +33,6 @@ class Calendar extends FormElement { var $weekStartDay = 0; // Defaults to Sunday. - var $mHeader = "padding: 5px; font-size: 8pt; color: #333333; background-color: #d9d9d9;"; - var $mDayCell = "padding: 5px; border: 1px solid silver; font-size: 8pt; color: #333333; background-color: #ffffff;"; - var $mDaySelected = "padding: 5px; border: 1px solid silver; font-size: 8pt; color: #666666; background-color: #a6ccf7;"; var $mDayWeekend = "padding: 5px; border: 1px solid silver; font-size: 8pt; color: #666666; background-color: #f7f7f7;"; var $mDayHoliday = "padding: 5px; border: 1px solid silver; font-size: 8pt; color: #666666; background-color: #f7f7f7;"; var $mDayHeader = "padding: 5px; border: 1px solid white; font-size: 8pt; color: #333333;"; @@ -106,7 +103,7 @@ function toString($date="") { $str = $this->_genStyles(); $str .= ' - {/if} - + - +
'. +
'. //'<< '. '<<< '. $this->mMonthNames[$thismonth-1].' '.$thisyear. @@ -159,7 +156,7 @@ function toString($date="") { $stl_cell = ' class="CalendarDayWeekend"'; $stl_link = ' class="CalendarLinkWeekend"'; } else { - $stl_cell = ' class="CalendarDay"'; + $stl_cell = ' class="calendarDay"'; } // holidays @@ -171,7 +168,7 @@ function toString($date="") { // selected day if ( $indate == strftime(DB_DATEFORMAT, $date)) - $stl_cell = ' class="CalendarDaySelected"'; + $stl_cell = ' class="calendarDaySelected"'; $str .= ''; @@ -238,9 +235,6 @@ function _getWeekDayBefore($year, $month) { function _genStyles() { $str = "\n"; - return $str; - } - // _getActiveDates returns an array of dates, for which entries exist for user. // Type of entries (time or expenses) is determined by $this->highlight value. function _getActiveDates($start, $end) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2f8b120bf..369e61911 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- @@ -129,14 +120,14 @@ function toString($date="") { $str .= "\n"; - list($wkstart,$monthstart,$monthend,$start_date) = $this->_getWeekDayBefore( $thisyear, $thismonth ); + list($wkstart,$monthstart,$monthend,$start_date) = $this->_getWeekDayBefore( $selectedYear, $selectedMonth ); $active_dates = $this->_getActiveDates($monthstart, $monthend); - for ( $i = $wkstart; $i<=$monthend; $i=mktime(0,0,0,$thismonth,$start_date+=7,$thisyear) ) { + for ( $i = $wkstart; $i<=$monthend; $i=mktime(0,0,0,$selectedMonth,$start_date+=7,$selectedYear) ) { $str .= "\n"; for ( $j = 0; $j < 7; $j++ ) { - $date = mktime(0,0,0,$thismonth,$start_date+$j,$thisyear); + $date = mktime(0,0,0,$selectedMonth,$start_date+$j,$selectedYear); if (($date >= $monthstart) && ($date <= $monthend)) { $stl_cell = ""; @@ -151,14 +142,14 @@ function toString($date="") { } // holidays - $date_to_check = ttTimeHelper::dateInDatabaseFormat($thisyear, $thismonth, $start_date+$j); + $date_to_check = ttTimeHelper::dateInDatabaseFormat($selectedYear, $selectedMonth, $start_date+$j); if (ttTimeHelper::isHoliday($date_to_check)) { $stl_cell = ' class="calendarDayHoliday"'; $stl_link = ' class="calendarLinkHoliday"'; } // selected day - if ( $indate == strftime(DB_DATEFORMAT, $date)) + if ( $selectedDate == strftime(DB_DATEFORMAT, $date)) $stl_cell = ' class="calendarDaySelected"'; @@ -196,7 +187,7 @@ function toString($date="") { $str .= "\n"; $str .= "
Anuko Time Tracker 1.19.18.5222 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5223 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/default.css b/default.css index 7f138ed38..3eac29ec2 100644 --- a/default.css +++ b/default.css @@ -133,6 +133,22 @@ input[type=checkbox], label { font-size: 8pt; color: #999999; } + +.calendarLinkWeekend { + color: #999999; +} + +.calendarLinkHoliday { + color: #999999; +} + +.calendarLinkRecordsExist { + color: #ff0000; +} + +.calendarLinkNonCompleteDay { + color: #800080; +} /* end of calendar styles */ .tableHeader { From 8dd1f536714f1bc6f09d2176dc84871d33ab94a3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 11 Jul 2020 17:18:16 +0000 Subject: [PATCH 1872/2515] Some more refactoring in Calendar class. --- WEB-INF/lib/form/Calendar.class.php | 57 +++++++++++------------------ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 23 insertions(+), 36 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index e7db6bcfd..dee9fbc0c 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -58,37 +58,28 @@ function localize() { $this->weekStartDay = $user->getWeekStart(); } - // TODO: refactoring ongoing down from here... - - /** - * @return void - * @param date - * @desc Enter description here... - */ - function toString($date="") { - global $i18n; - - $indate = $this->value; - if (!$indate) $indate = strftime(DB_DATEFORMAT); - - //current year and month - if ( strlen ( $indate ) > 0 ) { - $indateObj = new DateAndTime(DB_DATEFORMAT, $indate); - $thismonth = $indateObj->getMonth(); - $thisyear = $indateObj->getYear(); - } else { - $thismonth = date("m"); - $thisyear = date("Y"); - } + // Generates html code for Calendar control. + function getHtml() { + global $i18n; // Needed to print Today. + + $selectedDate = $this->value; + if (!$selectedDate) $selectedDate = strftime(DB_DATEFORMAT); + + // Determine month and year for selected date. + $selectedDateObject = new DateAndTime(DB_DATEFORMAT, $selectedDate); + $selectedMonth = $selectedDateObject->getMonth(); + $selectedYear = $selectedDateObject->getYear(); + + // TODO: refactoring ongoing down from here... // next date, month, year - $next = mktime ( 2, 0, 0, $thismonth + 1, 1, $thisyear ); + $next = mktime ( 2, 0, 0, $selectedMonth + 1, 1, $selectedYear ); $nextyear = date ( "Y", $next ); $nextmonth = date ( "m", $next ); $nextdate = strftime (DB_DATEFORMAT, $next ); // prev date, month, year - $prev = mktime ( 2, 0, 0, $thismonth - 1, 1, $thisyear ); + $prev = mktime ( 2, 0, 0, $selectedMonth - 1, 1, $selectedYear ); $prevyear = date ( "Y", $prev ); $prevmonth = date ( "m", $prev ); $prevdate = strftime(DB_DATEFORMAT, $prev ); @@ -97,7 +88,7 @@ function toString($date="") {
'. //'<< '. '<<< '. - $this->monthNames[$thismonth-1].' '.$thisyear. + $this->monthNames[$selectedMonth-1].' '.$selectedYear. ' >>>'. //' >>'. '
name."=".strftime(DB_DATEFORMAT)."\" tabindex=\"-1\">".$i18n->get('label.today')."
\n"; - $str .= "name\" value=\"$indate\">\n"; + $str .= "name\" value=\"$selectedDate\">\n"; // Add script to adjust today link to match browser today, as PHP may run in a different timezone. $str .= "\n"; - - return $str; - } + // Add a hidden control for selected date. + $html .= "name\" value=\"$selectedDate\">\n"; - function _getWeekDayBefore($year, $month) { - $weekday = date ( "w", mktime ( 2, 0, 0, $month, 1 - $this->weekStartDay, $year ) ); - return array( - mktime ( 0, 0, 0, $month, 1 - $weekday, $year ), - mktime ( 0, 0, 0, $month, 1, $year ), - mktime ( 0, 0, 0, $month + 1, 0, $year ), - (1 - $weekday) - ); - } + // Add script to adjust today link to match browser today, as PHP may run in a different timezone. + $html .= "\n"; + + $html .= "\n\n\n\n\n\n\n"; + return $html; + } - // _getActiveDates returns an array of dates, for which entries exist for user. - // Type of entries (time or expenses) is determined by $this->highlight value. - function _getActiveDates($start, $end) { + // getActiveDates returns an array of dates, for which entries exist for user. + // Type of entries (time or expenses) is determined by $this->highlight value. + function getActiveDates($start, $end) { - global $user; - $user_id = $user->getUser(); + global $user; + $user_id = $user->getUser(); - $table = ($this->highlight == 'expenses') ? 'tt_expense_items' : 'tt_log'; + $table = ($this->highlight == 'expenses') ? 'tt_expense_items' : 'tt_log'; - $mdb2 = getConnection(); - - $start_date = date("Y-m-d", $start); - $end_date = date("Y-m-d", $end); - $sql = "SELECT date FROM $table WHERE date >= '$start_date' AND date <= '$end_date' AND user_id = $user_id AND status = 1"; - $res = $mdb2->query($sql); - if (!is_a($res, 'PEAR_Error')) { - while ($row = $res->fetchRow()) { - $out[] = date('Y-m-d', strtotime($row['date'])); - } - return @$out; + $mdb2 = getConnection(); + + $start_date = date("Y-m-d", $start); + $end_date = date("Y-m-d", $end); + $sql = "SELECT date FROM $table WHERE date >= '$start_date' AND date <= '$end_date' AND user_id = $user_id AND status = 1"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + while ($row = $res->fetchRow()) { + $out[] = date('Y-m-d', strtotime($row['date'])); } - else - return false; + return @$out; } + else + return false; + } } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7e4eb8f09..d6e3c31ac 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + + {/foreach}
Anuko Time Tracker 1.19.18.5225 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5226 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 6c7355065a9e027cc82979e6ea54c62a598a03a9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 12 Jul 2020 16:49:19 +0000 Subject: [PATCH 1875/2515] Cosmetic. --- WEB-INF/lib/form/Calendar.class.php | 6 +++--- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index e3bf05924..e80f87380 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -134,7 +134,7 @@ function getHtml() { // Iterate through week days. for ($j = 0; $j < 7; $j++) { $cellDate0am = mktime(0, 0, 0, $selectedMonth, $startDayIdx + $j, $selectedYear); - if (($cellDate0am >= $firstDayOfSelectedMonth0am) && ($cellDate0am <= $lastDayOfSelectedMonth0am)) { + if ($cellDate0am >= $firstDayOfSelectedMonth0am && $cellDate0am <= $lastDayOfSelectedMonth0am) { $cell_style = ""; $link_style = ""; @@ -157,9 +157,9 @@ function getHtml() { $cell_style = ' class="calendarDaySelected"'; $html .= ''; - if($active_dates) { + if ($active_dates) { // Entries exist. - if( in_array(strftime(DB_DATEFORMAT, $cellDate0am), $active_dates) ){ + if (in_array(strftime(DB_DATEFORMAT, $cellDate0am), $active_dates)) { // TODO: add a config option to eliminate these call for users not wanting this feature. $day_total_minutes = ttTimeHelper::toMinutes(ttTimeHelper::getTimeForDay($date_to_check)); // Check if entries total to a complete work day. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d6e3c31ac..9e70ecb45 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + + + + diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9e70ecb45..3e158c480 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.18.5226 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5227 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 447afd69ce1a81cfaa2d17de1d050e418ffb68f2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 12 Jul 2020 18:52:07 +0000 Subject: [PATCH 1876/2515] Added a config option whether to show not complete days in calendar. --- WEB-INF/lib/form/Calendar.class.php | 19 +++-- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 2 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/display_options.tpl | 4 + WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/test.tpl | 17 +++++ display_options.php | 4 + test.php | 106 ++++++++++++++++++++++++++ 36 files changed, 176 insertions(+), 8 deletions(-) create mode 100644 WEB-INF/templates/test.tpl create mode 100644 test.php diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index e80f87380..b624a8da2 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -126,6 +126,8 @@ function getHtml() { // Determine active dates where entries exist for user. $active_dates = $this->getActiveDates($firstDayOfSelectedMonth0am, $lastDayOfSelectedMonth0am); + $handleHolidays = $user->getHolidays() != null; + $handleNotCompleteDays = $user->isOptionEnabled('time_not_complete_days'); $workday_minutes = $user->getWorkdayMinutes(); // Print calendar cells one week row at a time. @@ -147,7 +149,7 @@ function getHtml() { // Handle holidays. $date_to_check = ttTimeHelper::dateInDatabaseFormat($selectedYear, $selectedMonth, $startDayIdx+$j); - if (ttTimeHelper::isHoliday($date_to_check)) { + if ($handleHolidays && ttTimeHelper::isHoliday($date_to_check)) { $cell_style = ' class="calendarDayHoliday"'; $link_style = ' class="calendarLinkHoliday"'; } @@ -157,16 +159,19 @@ function getHtml() { $cell_style = ' class="calendarDaySelected"'; $html .= ''; + // Handle days with existing entries. if ($active_dates) { // Entries exist. if (in_array(strftime(DB_DATEFORMAT, $cellDate0am), $active_dates)) { - // TODO: add a config option to eliminate these call for users not wanting this feature. - $day_total_minutes = ttTimeHelper::toMinutes(ttTimeHelper::getTimeForDay($date_to_check)); - // Check if entries total to a complete work day. - if ($day_total_minutes >= $workday_minutes) - $link_style = ' class="calendarLinkRecordsExist"'; + if ($handleNotCompleteDays && $this->highlight == 'time') { + $day_total_minutes = ttTimeHelper::toMinutes(ttTimeHelper::getTimeForDay($date_to_check)); + if ($day_total_minutes >= $workday_minutes) + $link_style = ' class="calendarLinkRecordsExist"'; + else + $link_style = ' class="calendarLinkNonCompleteDay"'; + } else - $link_style = ' class="calendarLinkNonCompleteDay"'; + $link_style = ' class="calendarLinkRecordsExist"'; } } $html .= "name."=".strftime(DB_DATEFORMAT, $cellDate0am)."\" tabindex=\"-1\">".date("d",$cellDate0am).""; diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 9893ad523..5260ecc1d 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -706,6 +706,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 59756d1b5..2ae8ed511 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -719,6 +719,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index a8a14b53d..f15a08b09 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -681,6 +681,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index a8f1d165a..fa0407b8f 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -657,6 +657,8 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', 'form.display_options.note_on_separate_row' => 'Beschreibung in separater Zeile', +// TODO: translate the following. +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 2beefaa1c..c96415300 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -637,6 +637,7 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.menu' => 'Menu', 'form.display_options.note_on_separate_row' => 'Note on separate row', +'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php 'work.error.work_not_available' => 'Work item is not available.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 1cf3ce768..fe77bf299 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -721,6 +721,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 5e2e78caa..9dc067415 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -688,6 +688,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index e078a0a34..a9a1d76f0 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -705,6 +705,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 575dc04f6..6e1787474 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -687,6 +687,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5fe0f76d7..a4a9a74f7 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -677,6 +677,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 5d0dd6bde..8137dbd58 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -670,6 +670,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 199e26533..5010087a8 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -706,6 +706,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a4a4dd005..683636a67 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -711,6 +711,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index b10575302..4d3540592 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -684,6 +684,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8ebec5955..cfbeca196 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -714,6 +714,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 76c159472..2ed5c1bfc 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -712,6 +712,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 06f764d4c..6d815c746 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -640,6 +640,8 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.menu' => 'Menu', 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', +// TODO: translate the following. +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index ad95bd7e3..8afcf5c17 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -711,6 +711,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index f988df4a4..4dbf608fe 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -690,6 +690,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 5c9d89a32..cca28d179 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -685,6 +685,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 3043e8bba..57db2d012 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -693,6 +693,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index add70a4ea..eab6eb7a5 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -714,6 +714,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index fb050a1a0..1050013e0 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -618,6 +618,7 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.menu' => 'Меню', 'form.display_options.note_on_separate_row' => 'Комментарий в отдельном ряду', +'form.display_options.not_complete_days' => 'Незавершенные дни', // Work plugin strings. See example at https://timetracker.anuko.com/work.php 'work.error.work_not_available' => 'Работа отсутствует.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index cf0b8432b..e0ae714fc 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -695,6 +695,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index f4aa21b58..0dd6f7206 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -687,6 +687,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index be5739b6e..b7b93ffbd 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -688,6 +688,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 43b0d92b6..24797672a 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -686,6 +686,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e241cace8..c2f30dfbb 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -727,6 +727,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b1d81418b..9cbb47534 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -698,6 +698,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 05615586d..774b8024a 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -704,6 +704,7 @@ // TODO: translate the following. // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', +// 'form.display_options.not_complete_days' => 'Not complete days', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index d7bbdd57d..918a48f9e 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -5,6 +5,10 @@
{$forms.displayOptionsForm.time_note_on_separate_row.control} {$i18n.label.what_is_it}
{$forms.displayOptionsForm.time_not_complete_days.control} {$i18n.label.what_is_it}
- {/if} {if $u.group_id != $user->group_id || $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)} - - {if $u.id != $user->id}{else}{/if} + + {if $u.id != $user->id}{else}{/if} {else} @@ -76,8 +76,8 @@ {/if} {if $u.group_id != $user->group_id || $u.rank < $user->rank} - - + + {else} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 5ac3be85e..9d3ef0bf2 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -149,23 +149,23 @@ function fillDropdowns() { {if $show_files} {if $record.has_files} - + {else} - + {/if} {/if} diff --git a/WEB-INF/templates/work/admin_work.tpl b/WEB-INF/templates/work/admin_work.tpl index 39050ab3e..929b4d619 100644 --- a/WEB-INF/templates/work/admin_work.tpl +++ b/WEB-INF/templates/work/admin_work.tpl @@ -22,8 +22,8 @@ - - + + {/foreach}
Anuko Time Tracker 1.19.18.5227 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5228 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/test.tpl b/WEB-INF/templates/test.tpl new file mode 100644 index 000000000..325d686bc --- /dev/null +++ b/WEB-INF/templates/test.tpl @@ -0,0 +1,17 @@ + + +{$forms.timeRecordForm.open} + + + + +
+ + +
{$forms.timeRecordForm.date.control}
+
+{$forms.timeRecordForm.close} diff --git a/display_options.php b/display_options.php index d65f15ab3..7dd724d44 100644 --- a/display_options.php +++ b/display_options.php @@ -41,9 +41,11 @@ if ($request->isPost()) { $cl_time_note_on_separate_row = $request->getParameter('time_note_on_separate_row'); + $cl_time_not_complete_days = $request->getParameter('time_not_complete_days'); $cl_report_note_on_separate_row = $request->getParameter('report_note_on_separate_row'); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); + $cl_time_not_complete_days = $config->getDefinedValue('time_not_complete_days'); $cl_report_note_on_separate_row = $config->getDefinedValue('report_note_on_separate_row'); } @@ -58,6 +60,7 @@ // $form->addInput(array('type'=>'checkbox','name'=>'time_duration','value'=>$cl_time_duration)); // $form->addInput(array('type'=>'checkbox','name'=>'time_note','value'=>$cl_time_note)); $form->addInput(array('type'=>'checkbox','name'=>'time_note_on_separate_row','value'=>$cl_time_note_on_separate_row)); +$form->addInput(array('type'=>'checkbox','name'=>'time_not_complete_days','value'=>$cl_time_not_complete_days)); // TODO: consider adding other fields (timesheet, work_units, invoice, approved, cost, paid)? // Reports. @@ -70,6 +73,7 @@ if ($err->no()) { // Update config. $config->setDefinedValue('time_note_on_separate_row', $cl_time_note_on_separate_row); + $config->setDefinedValue('time_not_complete_days', $cl_time_not_complete_days); $config->setDefinedValue('report_note_on_separate_row', $cl_report_note_on_separate_row); if ($user->updateGroup(array('config' => $config->getConfig()))) { header('Location: success.php'); diff --git a/test.php b/test.php new file mode 100644 index 000000000..971ebaf36 --- /dev/null +++ b/test.php @@ -0,0 +1,106 @@ +behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { + header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. + exit(); +} +if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { + header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. + exit(); +} +if ($request->isPost()) { + $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { + header('Location: access_denied.php'); // User changed, but no right or wrong user id. + exit(); + } +} +// End of access checks. + +// Determine user for whom we display this page. +if ($request->isPost() && $userChanged) { + $user_id = $request->getParameter('user'); + $user->setOnBehalfUser($user_id); +} else { + $user_id = $user->getUser(); +} + +$group_id = $user->getGroup(); +$config = new ttConfigHelper($user->getConfig()); + +// Initialize and store date in session. +$cl_date = $request->getParameter('date', @$_SESSION['date']); +$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); +if($selected_date->isError()) + $selected_date = new DateAndTime(DB_DATEFORMAT); +if(!$cl_date) + $cl_date = $selected_date->toString(DB_DATEFORMAT); +$_SESSION['date'] = $cl_date; + +// Elements of timeRecordForm. +$form = new Form('timeRecordForm'); + +// Calendar. +$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar + +// A hidden control for today's date from user's browser. +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. + +if ($request->isPost()) { + if ($request->getParameter('btn_submit')) { + + } +} // isPost + + +$smarty->assign('selected_date', $selected_date); +$smarty->assign('week_total', $week_total); +$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('onload', 'onLoad="fillDropdowns();prepopulateNote();"'); +$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); +$smarty->assign('title', $i18n->get('title.time')); +$smarty->assign('content_page_name', 'test.tpl'); +$smarty->display('index.tpl'); + From 86ac2ba703cf3477f4cd5d28dd4ee55e09ee8671 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 12 Jul 2020 18:53:45 +0000 Subject: [PATCH 1877/2515] Removed test page. --- WEB-INF/templates/test.tpl | 17 ------ test.php | 106 ------------------------------------- 2 files changed, 123 deletions(-) delete mode 100644 WEB-INF/templates/test.tpl delete mode 100644 test.php diff --git a/WEB-INF/templates/test.tpl b/WEB-INF/templates/test.tpl deleted file mode 100644 index 325d686bc..000000000 --- a/WEB-INF/templates/test.tpl +++ /dev/null @@ -1,17 +0,0 @@ - - -{$forms.timeRecordForm.open} - - - - -
- - -
{$forms.timeRecordForm.date.control}
-
-{$forms.timeRecordForm.close} diff --git a/test.php b/test.php deleted file mode 100644 index 971ebaf36..000000000 --- a/test.php +++ /dev/null @@ -1,106 +0,0 @@ -behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { - header('Location: access_denied.php'); // User changed, but no right or wrong user id. - exit(); - } -} -// End of access checks. - -// Determine user for whom we display this page. -if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -$group_id = $user->getGroup(); -$config = new ttConfigHelper($user->getConfig()); - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -// Elements of timeRecordForm. -$form = new Form('timeRecordForm'); - -// Calendar. -$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. - -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - - } -} // isPost - - -$smarty->assign('selected_date', $selected_date); -$smarty->assign('week_total', $week_total); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns();prepopulateNote();"'); -$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); -$smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'test.tpl'); -$smarty->display('index.tpl'); - From 275fa15951ebfe27ba05572471de9e0ef914680c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 13 Jul 2020 13:28:47 +0000 Subject: [PATCH 1878/2515] Cosmetic. Removed some white space. --- WEB-INF/lib/form/Calendar.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index b624a8da2..1847b3fa8 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -80,7 +80,7 @@ function getHtml() { $firstOfPreviousMonth = strftime(DB_DATEFORMAT, $firstOfPreviousMonth2AM); // Print calendar header. - $html .= "\n\n\n\n\n\n\n"; + $html .= "\n\n\n"; $html .= ''."\n"; $html .= ' + {else} - + {/if} {/if} - - + + {/foreach}
'; $html .= '
'; @@ -201,7 +201,7 @@ function getHtml() { $html .= "adjustToday();\n"; $html .= "\n"; - $html .= "\n\n\n\n\n\n\n"; + $html .= "\n\n"; return $html; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3e158c480..549a20384 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if defined(CUSTOM_CSS_DEBUG)} + + + + + +{/if} + diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f0706ae07..0ae53d506 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.18.5228 | Copyright © Anuko | + Anuko Time Tracker 1.19.18.5229 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 28992336205e7e453226a26273b4e5743eb81da0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 14 Jul 2020 18:22:40 +0000 Subject: [PATCH 1879/2515] Starting to work on custom css. Introduced a database field. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 10 ++++++---- mysql.sql | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 549a20384..f0706ae07 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
Anuko Time Tracker 1.19.18.5229 | Copyright © Anuko | + Anuko Time Tracker 1.19.19.5230 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index f596a05e6..242d57b84 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1161,7 +1161,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to11917"]) { + if ($_POST["convert11900to11919"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1188,6 +1188,8 @@ function ttGenerateKeys() { ttExecute("create index template_idx on tt_project_template_binds(template_id)"); ttExecute("create unique index project_template_idx on tt_project_template_binds(project_id, template_id)"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.17', modified = now() where param_name = 'version_db' and param_value = '1.19.14'"); + ttExecute("ALTER TABLE `tt_groups` ADD `custom_css` text default NULL AFTER `config`"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.19', modified = now() where param_name = 'version_db' and param_value = '1.19.17'"); } if ($_POST["cleanup"]) { @@ -1238,7 +1240,7 @@ function ttGenerateKeys() {

DB Install

-
Create database structure (v1.19.17) + Create database structure (v1.19.19)
(applies only to new installations, do not execute when updating)
@@ -1287,8 +1289,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.19.17)Update database structure (v1.19 to v1.19.19)
diff --git a/mysql.sql b/mysql.sql index ae31890b5..e3ccd7d2c 100644 --- a/mysql.sql +++ b/mysql.sql @@ -39,6 +39,7 @@ CREATE TABLE `tt_groups` ( `workday_minutes` smallint(4) default 480, # number of work minutes in a regular working day `custom_logo` tinyint(4) default 0, # whether to use a custom logo or not `config` text default NULL, # miscellaneous group configuration settings + `custom_css` text default NULL, # custom css for group `created` datetime default NULL, # creation timestamp `created_ip` varchar(45) default NULL, # creator ip `created_by` int(11) default NULL, # creator user_id @@ -655,4 +656,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.17', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.19', now()); # TODO: change when structure changes. From c6d062ac68917e6e08f0e9f0706c071a09fb04d4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 14 Jul 2020 19:58:59 +0000 Subject: [PATCH 1880/2515] Some more work in progress on custom css feature. --- WEB-INF/lib/ttUser.class.php | 12 ++++++++++-- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/display_options.tpl | 8 ++++++++ WEB-INF/templates/footer.tpl | 2 +- display_options.php | 1 + 34 files changed, 50 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 4ef5d26e0..ed3dc437b 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -74,6 +74,7 @@ class ttUser { // Refactoring ongoing. Towards using helper instead of config string? var $config = null; // Comma-separated list of miscellaneous config options. var $configHelper = null; // An instance of ttConfigHelper class. + var $custom_css = null; // Custom css. var $custom_logo = 0; // Whether to use a custom logo for group. var $lock_spec = null; // Cron specification for record locking. @@ -97,7 +98,7 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.group_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id,". " u.quota_percent, u.email, g.org_id, g.group_key, g.name as group_name, g.currency, g.lang, g.decimal_mark, g.date_format,". " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.task_required, g.record_type,". - " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.holidays, g.workday_minutes, g.custom_logo". + " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.holidays, g.workday_minutes, g.custom_logo". " FROM tt_users u LEFT JOIN tt_groups g ON (u.group_id = g.id) LEFT JOIN tt_roles r on (r.id = u.role_id) WHERE "; if ($id) $sql .= "u.id = $id"; @@ -155,7 +156,9 @@ function __construct($login, $id = null) { $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); $this->future_entries = $this->configHelper->getDefinedValue('future_entries'); - + + $this->custom_css = $val['custom_css']; + // Set "on behalf" id and name (user). if (isset($_SESSION['behalf_id'])) { $this->behalf_id = $_SESSION['behalf_id']; @@ -304,6 +307,11 @@ function getConfigInt($name, $defaultVal) { return $config->getIntValue($name, $defaultVal); } + // getCustomCss returns custom css for active group. + function getCustomCss() { + return ($this->behalfGroup ? $this->behalfGroup->custom_css : $this->custom_css); + } + // can - determines whether user has a right to do something. function can($do_something) { return in_array($do_something, $this->rights); diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 5260ecc1d..30efec063 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -707,6 +707,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2ae8ed511..707b3dcbe 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -720,6 +720,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index f15a08b09..9b061118f 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -682,6 +682,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index fa0407b8f..a66723626 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -659,6 +659,7 @@ 'form.display_options.note_on_separate_row' => 'Beschreibung in separater Zeile', // TODO: translate the following. // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index c96415300..4b17bc464 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -638,6 +638,7 @@ 'form.display_options.menu' => 'Menu', 'form.display_options.note_on_separate_row' => 'Note on separate row', 'form.display_options.not_complete_days' => 'Not complete days', +'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php 'work.error.work_not_available' => 'Work item is not available.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index fe77bf299..0bd854328 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -722,6 +722,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9dc067415..0b4603566 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -689,6 +689,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index a9a1d76f0..ef7591192 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -706,6 +706,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 6e1787474..2d91252ef 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -688,6 +688,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index a4a9a74f7..a4452a4e2 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -678,6 +678,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 8137dbd58..d2d036ddf 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -671,6 +671,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5010087a8..3f0cf5d66 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -707,6 +707,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 683636a67..82f1ff081 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -712,6 +712,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 4d3540592..15407a6b9 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -685,6 +685,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index cfbeca196..b116fb35b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -715,6 +715,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 2ed5c1bfc..6b17d47d2 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -713,6 +713,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 6d815c746..5881139e3 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -642,6 +642,7 @@ 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', // TODO: translate the following. // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8afcf5c17..3677fdda5 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -712,6 +712,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 4dbf608fe..dff252c93 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -691,6 +691,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index cca28d179..db5e0f17c 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -686,6 +686,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 57db2d012..b88fb9f18 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -694,6 +694,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index eab6eb7a5..c569adb7e 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -715,6 +715,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 1050013e0..5302c225b 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -619,6 +619,7 @@ 'form.display_options.menu' => 'Меню', 'form.display_options.note_on_separate_row' => 'Комментарий в отдельном ряду', 'form.display_options.not_complete_days' => 'Незавершенные дни', +'form.display_options.custom_css' => 'Пользовательская CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php 'work.error.work_not_available' => 'Работа отсутствует.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e0ae714fc..53c5ee3dc 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -696,6 +696,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 0dd6f7206..a3d350ca6 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -688,6 +688,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index b7b93ffbd..fe385a67c 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -689,6 +689,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 24797672a..221c39d4a 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -687,6 +687,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c2f30dfbb..0f0537325 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -728,6 +728,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 9cbb47534..29422cc5f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -699,6 +699,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 774b8024a..d4720b341 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -705,6 +705,7 @@ // 'form.display_options.menu' => 'Menu', // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', +// 'form.display_options.custom_css' => 'Custom CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php // TODO: translate the following. diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index 918a48f9e..0f78e082e 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -19,6 +19,14 @@
{$forms.displayOptionsForm.report_note_on_separate_row.control} {$i18n.label.what_is_it}
 
{$i18n.form.display_options.custom_css}
{$forms.displayOptionsForm.custom_css.control}
 
{$forms.displayOptionsForm.btn_save.control}
- -{if defined(CUSTOM_CSS_DEBUG)} -{/if} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0ae53d506..50ff6f264 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.19.5230 | Copyright © Anuko | + Anuko Time Tracker 1.19.19.5231 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/display_options.php b/display_options.php index 7dd724d44..4430af38b 100644 --- a/display_options.php +++ b/display_options.php @@ -67,6 +67,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'report_note_on_separate_row','value'=>$cl_report_note_on_separate_row)); // TODO: add PDF break controller here. +$form->addInput(array('type'=>'textarea','name'=>'custom_css','style'=>'width: 250px; height: 40px;','value'=>$cl_custom_css)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ From f33ed44a6703ba05d933c2b37d44900bca8cfd49 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 15 Jul 2020 01:08:39 +0000 Subject: [PATCH 1881/2515] Initial implementation of custom css for groups. --- WEB-INF/lib/ttUser.class.php | 3 ++- WEB-INF/templates/display_options.tpl | 2 -- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/header.tpl | 3 +++ WEB-INF/templates/mobile/header.tpl | 3 +++ custom_css.php | 34 +++++++++++++++++++++++++++ display_options.php | 6 ++++- 7 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 custom_css.php diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index ed3dc437b..a62fc5809 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -716,6 +716,7 @@ function updateGroup($fields) { if (isset($fields['allow_ip'])) $allow_ip_part = ', allow_ip = '.$mdb2->quote($fields['allow_ip']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); + if (isset($fields['custom_css'])) $custom_css_part = ', custom_css = '.$mdb2->quote($fields['custom_css']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['holidays'])) $holidays_part = ', holidays = '.$mdb2->quote($fields['holidays']); if (isset($fields['workday_minutes'])) $workday_minutes_part = ', workday_minutes = '.$mdb2->quote($fields['workday_minutes']); @@ -723,7 +724,7 @@ function updateGroup($fields) { $parts = trim($name_part.$description_part.$currency_part.$lang_part.$decimal_mark_part.$date_format_part. $time_format_part.$week_start_part.$tracking_mode_part.$task_required_part.$project_required_part.$record_type_part. - $bcc_email_part.$allow_ip_part.$plugins_part.$config_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); + $bcc_email_part.$allow_ip_part.$plugins_part.$config_part.$custom_css_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); $sql = "update tt_groups set $parts where id = $group_id and org_id = $this->org_id"; $affected = $mdb2->exec($sql); diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index 0f78e082e..f41bd6f58 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -19,13 +19,11 @@ {$forms.displayOptionsForm.report_note_on_separate_row.control} {$i18n.label.what_is_it}
 
{$i18n.form.display_options.custom_css}
{$forms.displayOptionsForm.custom_css.control}
 
- - + {/if} diff --git a/WEB-INF/templates/time_edit.tpl b/WEB-INF/templates/time_edit.tpl index f1eca33cf..45c9bc666 100644 --- a/WEB-INF/templates/time_edit.tpl +++ b/WEB-INF/templates/time_edit.tpl @@ -57,7 +57,7 @@ function confirmSave() { {/if} {if $show_task} - + {/if} diff --git a/group_edit.php b/group_edit.php index c4fdc2174..2196d280b 100644 --- a/group_edit.php +++ b/group_edit.php @@ -85,7 +85,6 @@ $cl_holidays = trim($request->getParameter('holidays')); $cl_tracking_mode = $request->getParameter('tracking_mode'); $cl_project_required = $request->getParameter('project_required'); - $cl_task_required = $request->getParameter('task_required'); $cl_record_type = $request->getParameter('record_type'); $cl_punch_mode = $request->getParameter('punch_mode'); $cl_allow_overlap = $request->getParameter('allow_overlap'); @@ -102,7 +101,6 @@ $cl_holidays = $group['holidays']; $cl_tracking_mode = $group['tracking_mode']; $cl_project_required = $group['project_required']; - $cl_task_required = $group['task_required']; $cl_record_type = $group['record_type']; $cl_punch_mode = $config->getDefinedValue('punch_mode'); $cl_allow_overlap = $config->getDefinedValue('allow_overlap'); @@ -177,9 +175,8 @@ $tracking_mode_options[MODE_TIME] = $i18n->get('form.group_edit.mode_time'); $tracking_mode_options[MODE_PROJECTS] = $i18n->get('form.group_edit.mode_projects'); $tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->get('form.group_edit.mode_projects_and_tasks'); -$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode,'onchange'=>'handleTaskRequiredCheckbox()')); +$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode)); $form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required)); -$form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required)); // Prepare record type choices. $record_type_options = array(); @@ -241,7 +238,6 @@ 'holidays' => $cl_holidays, 'tracking_mode' => $cl_tracking_mode, 'project_required' => $cl_project_required, - 'task_required' => $cl_task_required, 'record_type' => $cl_record_type, 'uncompleted_indicators' => $cl_uncompleted_indicators, 'config' => $config->getConfig()))) { @@ -255,7 +251,7 @@ $smarty->assign('group_dropdown', count($groups) > 1); $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="handleTaskRequiredCheckbox(); handlePluginCheckboxes();"'); +$smarty->assign('onload', 'onLoad="handlePluginCheckboxes();"'); $smarty->assign('title', $i18n->get('title.edit_group')); $smarty->assign('content_page_name', 'group_edit.tpl'); $smarty->display('index.tpl'); diff --git a/mobile/time.php b/mobile/time.php index 8f4ca0a32..58661632a 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -73,6 +73,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; @@ -306,7 +307,7 @@ if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } if (strlen($cl_duration) == 0) { @@ -396,6 +397,7 @@ $smarty->assign('show_billable', $showBillable); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('show_start', $showStart); $smarty->assign('show_duration', $showDuration); $smarty->assign('client_list', $client_list); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 1aa7dd1f4..fb3a918dc 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -58,6 +58,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; @@ -302,7 +303,7 @@ if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $task_required) { if (!$cl_task) $err->add($i18n->get('error.task')); } if (!$cl_duration) { @@ -480,6 +481,7 @@ $smarty->assign('show_paid_status', $showPaidStatus); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('show_start', $showStart); $smarty->assign('show_duration', $showDuration); $smarty->assign('client_list', $client_list); diff --git a/tasks.php b/tasks.php index 7b5f99790..2e13ead5c 100644 --- a/tasks.php +++ b/tasks.php @@ -41,12 +41,35 @@ } // End of access checks. +$config = $user->getConfigHelper(); + +if ($request->isPost()) { + $cl_task_required = $request->getParameter('task_required'); +} else { + $cl_task_required = $config->getDefinedValue('task_required'); +} + if($user->can('manage_tasks')) { $active_tasks = ttGroupHelper::getActiveTasks(); $inactive_tasks = ttGroupHelper::getInactiveTasks(); } else $active_tasks = $user->getAssignedTasks(); +$form = new Form('tasksForm'); +$form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required)); +$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); + +if ($request->isPost()) { + if ($request->getParameter('btn_save')) { + // Save button clicked. Update config. + $config->setDefinedValue('task_required', $cl_task_required); + if (!$user->updateGroup(array('config' => $config->getConfig()))) { + $err->add($i18n->get('error.db')); + } + } +} + +$smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('active_tasks', $active_tasks); $smarty->assign('inactive_tasks', $inactive_tasks); $smarty->assign('title', $i18n->get('title.tasks')); diff --git a/time.php b/time.php index bbd5d14a3..5e0dda153 100644 --- a/time.php +++ b/time.php @@ -74,6 +74,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; @@ -349,7 +350,7 @@ if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } if (strlen($cl_duration) == 0) { @@ -481,6 +482,7 @@ $smarty->assign('show_billable', $showBillable); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('show_start', $showStart); $smarty->assign('show_duration', $showDuration); $smarty->assign('show_note_column', $showNoteColumn); diff --git a/time_edit.php b/time_edit.php index 44f04253c..b672c41cb 100644 --- a/time_edit.php +++ b/time_edit.php @@ -58,6 +58,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; @@ -302,7 +303,7 @@ if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } if (!$cl_duration) { @@ -480,6 +481,7 @@ $smarty->assign('show_paid_status', $showPaidStatus); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('show_start', $showStart); $smarty->assign('show_duration', $showDuration); $smarty->assign('client_list', $client_list); From c2306552c7c718337bb40f22642db073ac44d336 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 25 Jul 2020 20:24:01 +0000 Subject: [PATCH 1913/2515] Refactoring and some fixes for task_required config option. --- WEB-INF/lib/ttGroup.class.php | 4 +--- WEB-INF/lib/ttGroupExportHelper.class.php | 1 - WEB-INF/lib/ttGroupHelper.class.php | 3 +-- WEB-INF/lib/ttOrgImportHelper.class.php | 4 +--- WEB-INF/lib/ttUser.class.php | 7 ++----- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/time_script.tpl | 2 +- WEB-INF/templates/week.tpl | 2 +- week.php | 4 +++- 9 files changed, 11 insertions(+), 18 deletions(-) diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index 46ce5be56..bd0f944e3 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -44,7 +44,6 @@ class ttGroup { var $week_start = 0; // Week start day. var $tracking_mode = 0; // Tracking mode. var $project_required = 0; // Whether project selection is required on time entires. - var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). var $punch_mode = 0; // Whether punch mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. @@ -92,8 +91,7 @@ function __construct($id, $org_id) { $this->tracking_mode = $val['tracking_mode']; /* TODO: initialize other things here. $this->project_required = $val['project_required']; - $this->task_required = $val['task_required']; - */ + */ $this->record_type = $val['record_type']; /* $this->bcc_email = $val['bcc_email']; diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index d6415daea..a510da274 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -152,7 +152,6 @@ function writeData() { $group_part .= " week_start=\"".$group['week_start']."\""; $group_part .= " tracking_mode=\"".$group['tracking_mode']."\""; $group_part .= " project_required=\"".$group['project_required']."\""; - $group_part .= " task_required=\"".$group['task_required']."\""; $group_part .= " record_type=\"".$group['record_type']."\""; $group_part .= " bcc_email=\"".$group['bcc_email']."\""; $group_part .= " allow_ip=\"".$group['allow_ip']."\""; diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index af8d55345..895fa1dc6 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -97,7 +97,7 @@ static function insertSubgroup($fields) { $attrs = ttGroupHelper::getGroupAttrs($parent_id); $columns = '(parent_id, org_id, group_key, name, description, currency, decimal_mark, lang, date_format,'. - ' time_format, week_start, tracking_mode, project_required, task_required, record_type, bcc_email,'. + ' time_format, week_start, tracking_mode, project_required, record_type, bcc_email,'. ' allow_ip, password_complexity, plugins, lock_spec,'. ' workday_minutes, config, created, created_ip, created_by)'; @@ -113,7 +113,6 @@ static function insertSubgroup($fields) { $values .= ', '.(int)$attrs['week_start']; $values .= ', '.(int)$attrs['tracking_mode']; $values .= ', '.(int)$attrs['project_required']; - $values .= ', '.(int)$attrs['task_required']; $values .= ', '.(int)$attrs['record_type']; $values .= ', '.$mdb2->quote($attrs['bcc_email']); $values .= ', '.$mdb2->quote($attrs['allow_ip']); diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index dbf838281..ac970426f 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -114,7 +114,6 @@ function startElement($parser, $name, $attrs) { 'week_start' => $attrs['WEEK_START'], 'tracking_mode' => $attrs['TRACKING_MODE'], 'project_required' => $attrs['PROJECT_REQUIRED'], - 'task_required' => $attrs['TASK_REQUIRED'], 'record_type' => $attrs['RECORD_TYPE'], 'bcc_email' => $attrs['BCC_EMAIL'], 'allow_ip' => $attrs['ALLOW_IP'], @@ -705,7 +704,7 @@ private function createGroup($fields) { $mdb2 = getConnection(); $columns = '(parent_id, org_id, group_key, name, description, currency, decimal_mark, lang, date_format, time_format,'. - ' week_start, tracking_mode, project_required, task_required, record_type, bcc_email,'. + ' week_start, tracking_mode, project_required, record_type, bcc_email,'. ' allow_ip, password_complexity, plugins, lock_spec,'. ' workday_minutes, config, custom_css, created, created_ip, created_by)'; @@ -723,7 +722,6 @@ private function createGroup($fields) { $values .= ', '.(int)$fields['week_start']; $values .= ', '.(int)$fields['tracking_mode']; $values .= ', '.(int)$fields['project_required']; - $values .= ', '.(int)$fields['task_required']; $values .= ', '.(int)$fields['record_type']; $values .= ', '.$mdb2->quote($fields['bcc_email']); $values .= ', '.$mdb2->quote($fields['allow_ip']); diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 8bf029921..58c51c632 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -60,7 +60,6 @@ class ttUser { var $week_start = 0; // Week start day. var $tracking_mode = 0; // Tracking mode. var $project_required = 0; // Whether project selection is required on time entires. - var $task_required = 0; // Whether task selection is required on time entires. var $record_type = 0; // Record type (duration vs start and finish, or both). var $punch_mode = 0; // Whether punch mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. @@ -96,7 +95,7 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.group_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id,". " u.quota_percent, u.email, g.org_id, g.group_key, g.name as group_name, g.currency, g.lang, g.decimal_mark, g.date_format,". - " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.task_required, g.record_type,". + " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.record_type,". " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.holidays, g.workday_minutes, g.custom_logo". " FROM tt_users u LEFT JOIN tt_groups g ON (u.group_id = g.id) LEFT JOIN tt_roles r on (r.id = u.role_id) WHERE "; if ($id) @@ -134,7 +133,6 @@ function __construct($login, $id = null) { $this->week_start = $val['week_start']; $this->tracking_mode = $val['tracking_mode']; $this->project_required = $val['project_required']; - $this->task_required = $val['task_required']; $this->record_type = $val['record_type']; $this->bcc_email = $val['bcc_email']; $this->allow_ip = $val['allow_ip']; @@ -707,7 +705,6 @@ function updateGroup($fields) { if (isset($fields['tracking_mode'])) { $tracking_mode_part = ', tracking_mode = '.(int) $fields['tracking_mode']; $project_required_part = ' , project_required = '.(int) $fields['project_required']; - $task_required_part = ' , task_required = '.(int) $fields['task_required']; } if (isset($fields['record_type'])) $record_type_part = ', record_type = '.(int) $fields['record_type']; if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']); @@ -721,7 +718,7 @@ function updateGroup($fields) { $modified_part = ', modified = now(), modified_ip = '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$mdb2->quote($this->id); $parts = trim($name_part.$description_part.$currency_part.$lang_part.$decimal_mark_part.$date_format_part. - $time_format_part.$week_start_part.$tracking_mode_part.$task_required_part.$project_required_part.$record_type_part. + $time_format_part.$week_start_part.$tracking_mode_part.$project_required_part.$record_type_part. $bcc_email_part.$allow_ip_part.$plugins_part.$config_part.$custom_css_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); $sql = "update tt_groups set $parts where id = $group_id and org_id = $this->org_id"; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9a2f53491..9668dfc5c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.19.5231 | Copyright © Anuko | + Anuko Time Tracker 1.19.20.5232 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 55d047caa..4d140ed3e 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -7,6 +7,9 @@ {if $i18n.language.rtl} +{/if} +{if $user->getCustomCss()} + {/if} Time Tracker{if $title} - {$title}{/if} diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index 054c75363..6290dd025 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -8,6 +8,9 @@ {if $i18n.language.rtl} +{/if} +{if $user->getCustomCss()} + {/if} Time Tracker{if $title} - {$title}{/if} diff --git a/custom_css.php b/custom_css.php new file mode 100644 index 000000000..979e9a5bd --- /dev/null +++ b/custom_css.php @@ -0,0 +1,34 @@ +getCustomCss(); diff --git a/display_options.php b/display_options.php index 4430af38b..37a584657 100644 --- a/display_options.php +++ b/display_options.php @@ -43,10 +43,12 @@ $cl_time_note_on_separate_row = $request->getParameter('time_note_on_separate_row'); $cl_time_not_complete_days = $request->getParameter('time_not_complete_days'); $cl_report_note_on_separate_row = $request->getParameter('report_note_on_separate_row'); + $cl_custom_css = trim($request->getParameter('custom_css')); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); $cl_time_not_complete_days = $config->getDefinedValue('time_not_complete_days'); $cl_report_note_on_separate_row = $config->getDefinedValue('report_note_on_separate_row'); + $cl_custom_css = $user->getCustomCss(); } $form = new Form('displayOptionsForm'); @@ -76,7 +78,9 @@ $config->setDefinedValue('time_note_on_separate_row', $cl_time_note_on_separate_row); $config->setDefinedValue('time_not_complete_days', $cl_time_not_complete_days); $config->setDefinedValue('report_note_on_separate_row', $cl_report_note_on_separate_row); - if ($user->updateGroup(array('config' => $config->getConfig()))) { + if ($user->updateGroup(array( + 'config' => $config->getConfig(), + 'custom_css' => $cl_custom_css))) { header('Location: success.php'); exit(); } else From 1b2c65d92bb6a1afff12080cd9713ffa90e331a2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 15 Jul 2020 15:12:13 +0000 Subject: [PATCH 1882/2515] Added a user input validator for custom css. --- WEB-INF/lib/common.lib.php | 19 +++++++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- display_options.php | 4 ++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 1f2829442..e01deeaa5 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -177,6 +177,25 @@ function ttValidString($val, $emptyValid = false) return true; } +// ttValidCss is used to check user input for custom css. +function ttValidCss($val) +{ + $val = trim($val); + if (strlen($val) == 0) + return true; + + // String must not contain any tags. + if (stristr($val, '<')) + return false; + + // Security note: the above may not be enough. + // Currently it is unclear how vulnerable we are assuming custom css is available only to a logged on user + // (one custom css per group). + // However, if abuse occurs or when the issue is better understood, we may have to rewrite this function, + // perhaps by specifying what exactly we allow to style. + return true; +} + // ttValidTemplateText is used to check template-based user input. // When templates are used, required input parts must be filled by user. // We identify these parts by 3 "stop sign" emojis (aka "octagonal sign" U+1F6D1). diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 50ff6f264..d10afc302 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
Anuko Time Tracker 1.19.20.5232 | Copyright © Anuko | + Anuko Time Tracker 1.19.20.5233 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/display_options.php b/display_options.php index 37a584657..a4d3deacb 100644 --- a/display_options.php +++ b/display_options.php @@ -73,6 +73,10 @@ $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ + // Validate user input. + if (!ttValidCss($cl_custom_css)) $err->add($i18n->get('error.field'), $i18n->get('form.display_options.custom_css')); + // Finished validating user input. + if ($err->no()) { // Update config. $config->setDefinedValue('time_note_on_separate_row', $cl_time_note_on_separate_row); From ddf4f8e805d3ae7c551ea86a55392af1db92b7d3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 15 Jul 2020 16:06:22 +0000 Subject: [PATCH 1883/2515] Fixed future entries behaviour for subgroups. --- WEB-INF/lib/ttGroup.class.php | 4 +--- WEB-INF/lib/ttUser.class.php | 2 -- WEB-INF/lib/ttWeekViewHelper.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- expenses.php | 2 +- mobile/expense_edit.php | 2 +- mobile/expenses.php | 2 +- mobile/time.php | 2 +- mobile/time_edit.php | 2 +- mobile/timer.php | 2 +- time.php | 2 +- time_edit.php | 2 +- 12 files changed, 11 insertions(+), 15 deletions(-) diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index 5e1885af9..46ce5be56 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -34,7 +34,7 @@ class ttGroup { var $id = null; // Group id. var $group_key = null; // Group key. - var $parent_id = null; // Paerent group id. + var $parent_id = null; // Parent group id. var $org_id = null; // Organization id. var $name = null; // Group name. var $lang = null; // Language. @@ -48,7 +48,6 @@ class ttGroup { var $record_type = 0; // Record type (duration vs start and finish, or both). var $punch_mode = 0; // Whether punch mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. - var $future_entries = 0; // Whether to allow creating future entries. var $bcc_email = null; // Bcc email. var $allow_ip = null; // Specification from where user is allowed access. var $password_complexity = null; // Password complexity example. @@ -117,7 +116,6 @@ function __construct($id, $org_id) { // Set user config options. $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); - $this->future_entries = $this->configHelper->getDefinedValue('future_entries'); } // Determine active user count in a separate query. diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index a62fc5809..8bf029921 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -64,7 +64,6 @@ class ttUser { var $record_type = 0; // Record type (duration vs start and finish, or both). var $punch_mode = 0; // Whether punch mode is enabled for user. var $allow_overlap = 0; // Whether to allow overlapping time entries. - var $future_entries = 0; // Whether to allow creating future entries. var $bcc_email = null; // Bcc email. var $allow_ip = null; // Specification from where user is allowed access. var $password_complexity = null; // Password complexity example. @@ -155,7 +154,6 @@ function __construct($login, $id = null) { // Set user config options. $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); - $this->future_entries = $this->configHelper->getDefinedValue('future_entries'); $this->custom_css = $val['custom_css']; diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 05ec4e9d0..aee8c8d61 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -537,7 +537,7 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { $objEntryDate = new DateAndTime(DB_DATEFORMAT, $entry_date); // Prohibit creating entries in future. - if (!$user->future_entries && $fields['browser_today']) { + if (!$user->isOptionEnabled('future_entries') && $fields['browser_today']) { $objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']); if ($objEntryDate->after($objBrowserToday)) { $err->add($i18n->get('error.future_date')); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d10afc302..687331f88 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + diff --git a/WEB-INF/templates/mobile/time.tpl b/WEB-INF/templates/mobile/time.tpl index 07e50fb39..a346ad6c6 100644 --- a/WEB-INF/templates/mobile/time.tpl +++ b/WEB-INF/templates/mobile/time.tpl @@ -73,7 +73,7 @@ {/if} {if $show_task} - + {/if} {if $show_start} diff --git a/WEB-INF/templates/mobile/time_edit.tpl b/WEB-INF/templates/mobile/time_edit.tpl index 5fd10ad15..3025a63f7 100644 --- a/WEB-INF/templates/mobile/time_edit.tpl +++ b/WEB-INF/templates/mobile/time_edit.tpl @@ -44,7 +44,7 @@ function confirmSave() { {/if} {if $show_task} - + {/if} {if $show_start} diff --git a/WEB-INF/templates/tasks.tpl b/WEB-INF/templates/tasks.tpl index 24fd04380..c5afab227 100644 --- a/WEB-INF/templates/tasks.tpl +++ b/WEB-INF/templates/tasks.tpl @@ -2,6 +2,7 @@ function chLocation(newLocation) { document.location = newLocation; } +{$forms.tasksForm.open}
Anuko Time Tracker 1.19.20.5233 | Copyright © Anuko | + Anuko Time Tracker 1.19.20.5234 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/expenses.php b/expenses.php index 2b7a15bc4..7959bb311 100644 --- a/expenses.php +++ b/expenses.php @@ -202,7 +202,7 @@ if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); // Prohibit creating entries in future. - if (!$user->getConfigOption('future_entries')) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php index 654d1698d..67813a6f1 100644 --- a/mobile/expense_edit.php +++ b/mobile/expense_edit.php @@ -167,7 +167,7 @@ $new_date = new DateAndTime($user->getDateFormat(), $cl_date); // Prohibit creating entries in future. - if (!$user->getConfigOption('future_entries')) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/mobile/expenses.php b/mobile/expenses.php index 3b229368e..05d469985 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -203,7 +203,7 @@ if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); // Prohibit creating entries in future. - if (!$user->getConfigOption('future_entries')) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/mobile/time.php b/mobile/time.php index 233f1d16f..1e5276cdf 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -340,7 +340,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (!$user->future_entries) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/mobile/time_edit.php b/mobile/time_edit.php index 6fefebd86..7e50731b6 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -305,7 +305,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (!$user->future_entries) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/mobile/timer.php b/mobile/timer.php index c7c1c2d40..0b513c235 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -218,7 +218,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (!$user->future_entries) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/time.php b/time.php index 9f85d5981..6664243a6 100644 --- a/time.php +++ b/time.php @@ -383,7 +383,7 @@ // Finished validating user input. // Prohibit creating entries in future. - if (!$user->future_entries) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); diff --git a/time_edit.php b/time_edit.php index 83989404f..918ecea52 100644 --- a/time_edit.php +++ b/time_edit.php @@ -310,7 +310,7 @@ $new_date = new DateAndTime($user->date_format, $cl_date); // Prohibit creating entries in future. - if (!$user->future_entries) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->get('error.future_date')); From bacffb8ff036d508d8004f6b169adda11696627a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 15 Jul 2020 16:09:40 +0000 Subject: [PATCH 1884/2515] Forgot to check in one file. --- expense_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expense_edit.php b/expense_edit.php index 3cebac129..f736f2132 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -172,7 +172,7 @@ $new_date = new DateAndTime($user->getDateFormat(), $cl_date); // Prohibit creating entries in future. - if (!$user->getConfigOption('future_entries')) { + if (!$user->isOptionEnabled('future_entries')) { $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->get('error.future_date')); From b6a3fe7a3cf32bcfa0c20d57cf855cbbe670893f Mon Sep 17 00:00:00 2001 From: WizardStan Date: Thu, 16 Jul 2020 09:27:49 -0400 Subject: [PATCH 1885/2515] Replace cal_days_in_month with generic date call (#99) --- plugins/MonthlyQuota.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index c8559ad46..0a8ee4e9b 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -133,7 +133,7 @@ private function getMany($year){ // getNumWorkdays returns a number of work days in a given month. private function getNumWorkdays($month, $year) { - $daysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year); // Number of calendar days in month. + $daysInMonth = date('t', mktime(0, 0, 0, $month, 1, $year)); $workdaysInMonth = 0; // Iterate through the entire month. From 671b1a087c997ada7a9435a1ea8eb19e447e0f59 Mon Sep 17 00:00:00 2001 From: WizardStan Date: Thu, 16 Jul 2020 09:51:00 -0400 Subject: [PATCH 1886/2515] Create notifications that trigger based on hours (#98) --- WEB-INF/lib/common.lib.php | 3 ++- WEB-INF/lib/ttReportHelper.class.php | 30 +++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index e01deeaa5..725f343c0 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -343,7 +343,8 @@ function ttValidCondition($val, $emptyValid = true) if (stristr($val, ' {$forms.groupForm.open} @@ -74,7 +60,7 @@ function handleTaskRequiredCheckbox() {
{$i18n.form.group_edit.tracking_mode}:{$forms.groupForm.tracking_mode.control} {$forms.groupForm.task_required.control} {$forms.groupForm.tracking_mode.control}
{$i18n.form.group_edit.record_type}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}:
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
{$forms.timeRecordForm.project.control}
{$i18n.label.task}:
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
@@ -78,7 +79,20 @@ {/foreach} {/if}
- {/if} +{/if} +
+ + + + + + + + +
{$forms.tasksForm.task_required.control} {$i18n.label.what_is_it}
{$forms.tasksForm.btn_save.control}
+ +
+{$forms.tasksForm.close} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 0cbf0caca..377b26c01 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -53,7 +53,7 @@ {/if} {if $show_task}
{$i18n.label.task}{if $user->task_required} (*){/if}:{$i18n.label.task}{if $task_required} (*){/if}: {$forms.timeRecordForm.task.control}
{$i18n.label.task}{if $user->task_required} (*){/if}:{$i18n.label.task}{if $task_required} (*){/if}: {$forms.timeRecordForm.task.control}
- - + {/if} diff --git a/week.php b/week.php index a1a579094..d86e0c99c 100644 --- a/week.php +++ b/week.php @@ -79,6 +79,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $user->getConfigOption('task_required'); $showWeekNote = $user->isOptionEnabled('week_note'); $showWeekNotes = $user->isOptionEnabled('week_notes'); $recordType = $user->getRecordType(); @@ -416,7 +417,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } } @@ -567,6 +568,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_billable', $showBillable); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('show_week_note', $showWeekNote); $smarty->assign('show_week_list', $user->isOptionEnabled('week_list')); $smarty->assign('show_start', $showStart); From bfef42dbca33313493b40dfdd265ee55f47ab29e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 25 Jul 2020 20:34:38 +0000 Subject: [PATCH 1914/2515] Fixed mobile timer.php for subgroups regarding task_required. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/timer.tpl | 2 +- mobile/timer.php | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9668dfc5c..0109338fa 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.22.5256 | Copyright © Anuko | + Anuko Time Tracker 1.19.22.5257 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/time_script.tpl b/WEB-INF/templates/time_script.tpl index 65a691abe..977db3d6c 100644 --- a/WEB-INF/templates/time_script.tpl +++ b/WEB-INF/templates/time_script.tpl @@ -178,7 +178,7 @@ function fillTaskDropdown(id) { } // Select a task if user is required to do so and there is only one task available. - if ({$user->task_required} && dropdown.options.length == 2) { // 2 because of mandatory top option. + if ({$user->getConfigOption('task_required')} && dropdown.options.length == 2) { // 2 because of mandatory top option. dropdown.options[1].selected = true; } } diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 2ee2e68a5..5ac3be85e 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -68,7 +68,7 @@ function fillDropdowns() { {/if} {if $show_task}
{$i18n.label.task}:{$i18n.label.task}{if $task_required} (*){/if}: {$forms.weekTimeForm.task.control}
- {/if} {if $show_task} - + {/if}
Anuko Time Tracker 1.19.22.5257 | Copyright © Anuko | + Anuko Time Tracker 1.19.22.5258 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/timer.tpl b/WEB-INF/templates/mobile/timer.tpl index 65f267d40..1fee04af3 100644 --- a/WEB-INF/templates/mobile/timer.tpl +++ b/WEB-INF/templates/mobile/timer.tpl @@ -84,7 +84,7 @@ startTimer();
{$forms.timeRecordForm.project.control}
{$i18n.label.task}:
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
diff --git a/mobile/timer.php b/mobile/timer.php index ac43dc86d..e301716a4 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -46,6 +46,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $user->getConfigOption('task_required'); // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); @@ -229,7 +230,7 @@ if ($showProject) { if (!$cl_project) $err->add($i18n->get('error.project')); } - if ($showTask && $user->task_required) { + if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } // Finished validating user input. @@ -318,6 +319,7 @@ $smarty->assign('show_billable', $showBillable); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); $smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('client_list', $client_list); From 889ae54eaa95a4a69e0a4da875e2a250ca18a713 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 25 Jul 2020 20:43:05 +0000 Subject: [PATCH 1915/2515] Dropped task_required field from tt_groups table as it is now a part of config field. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 10 ++++++---- mysql.sql | 3 +-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0109338fa..80cb8a906 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
Anuko Time Tracker 1.19.22.5258 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5259 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index b6f831479..59d3923f8 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1161,7 +1161,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to11922"]) { + if ($_POST["convert11900to11923"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1192,6 +1192,8 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.19', modified = now() where param_name = 'version_db' and param_value = '1.19.17'"); ttExecute("ALTER TABLE `tt_cron` ADD `comment` text AFTER `subject`"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.22', modified = now() where param_name = 'version_db' and param_value = '1.19.19'"); + ttExecute("ALTER TABLE `tt_groups` drop `task_required`"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.23', modified = now() where param_name = 'version_db' and param_value = '1.19.22'"); } if ($_POST["cleanup"]) { @@ -1242,7 +1244,7 @@ function ttGenerateKeys() {

DB Install

-
Create database structure (v1.19.22) + Create database structure (v1.19.23)
(applies only to new installations, do not execute when updating)
@@ -1291,8 +1293,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.19.22)Update database structure (v1.19 to v1.19.23)
diff --git a/mysql.sql b/mysql.sql index 1e37a59df..e9f4cc031 100644 --- a/mysql.sql +++ b/mysql.sql @@ -27,7 +27,6 @@ CREATE TABLE `tt_groups` ( `week_start` smallint(2) NOT NULL default 0, # Week start day, 0 == Sunday. `tracking_mode` smallint(2) NOT NULL default 1, # tracking mode ("time", "projects" or "projects and tasks") `project_required` smallint(2) NOT NULL default 0, # whether a project selection is required or optional - `task_required` smallint(2) NOT NULL default 0, # whether a task selection is required or optional `record_type` smallint(2) NOT NULL default 0, # time record type ("start and finish", "duration", or both) `bcc_email` varchar(100) default NULL, # bcc email to copy all reports to `allow_ip` varchar(255) default NULL, # specification from where users are allowed access @@ -657,4 +656,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.22', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.23', now()); # TODO: change when structure changes. From cdbd32b362368570f0627288bf5f83739a055d60 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 26 Jul 2020 11:56:46 +0000 Subject: [PATCH 1916/2515] Fixed behavior of Now buttons, broken in one of recent commits. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/time_script.tpl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 80cb8a906..f752264da 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- + {else} - + {/if} {/if} diff --git a/WEB-INF/templates/timesheets.tpl b/WEB-INF/templates/timesheets.tpl index a5e893e59..237eb98be 100644 --- a/WEB-INF/templates/timesheets.tpl +++ b/WEB-INF/templates/timesheets.tpl @@ -40,13 +40,13 @@ {/if} {if $show_files} {if $timesheet.has_files} - + {else} - + {/if} {/if} - - + + {/foreach}
Anuko Time Tracker 1.19.23.5259 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5260 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/time_script.tpl b/WEB-INF/templates/time_script.tpl index 977db3d6c..3d2013832 100644 --- a/WEB-INF/templates/time_script.tpl +++ b/WEB-INF/templates/time_script.tpl @@ -177,10 +177,12 @@ function fillTaskDropdown(id) { } } +{if $user->getConfigOption('task_required')} // Select a task if user is required to do so and there is only one task available. - if ({$user->getConfigOption('task_required')} && dropdown.options.length == 2) { // 2 because of mandatory top option. + if (dropdown.options.length == 2) { // 2 because of mandatory top option. dropdown.options[1].selected = true; } +{/if} } } From 9304cf358161f2dd63b0b570d57e3d84343ca81b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 26 Jul 2020 13:24:37 +0000 Subject: [PATCH 1917/2515] Cosmetic. Updated a link to user guide. --- WEB-INF/config.php.dist | 2 +- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index a288ec0bf..24dd5a266 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -86,7 +86,7 @@ define('WEEKEND_START_DAY', 6); // Forum and help links from the main menu. // define('FORUM_LINK', 'https://www.anuko.com/forum/viewforum.php?f=4'); -define('HELP_LINK', 'https://www.anuko.com/time_tracker/user_guide/index.htm'); +define('HELP_LINK', 'https://www.anuko.com/time-tracker/user-guide/index.htm'); // Default sender for mail. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f752264da..b7e572713 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + + {/foreach}
Anuko Time Tracker 1.19.23.5260 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5261 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 9c45529c062bf66c7def4dc4d8624a7cefda0061 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 28 Jul 2020 14:45:30 +0000 Subject: [PATCH 1918/2515] Moved the Required checkbox on top of tasks.php page to make it more visible. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/tasks.tpl | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b7e572713..50b48e893 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
Anuko Time Tracker 1.19.23.5261 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5262 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/tasks.tpl b/WEB-INF/templates/tasks.tpl index c5afab227..df502c7ae 100644 --- a/WEB-INF/templates/tasks.tpl +++ b/WEB-INF/templates/tasks.tpl @@ -7,6 +7,16 @@
{if $user->can('manage_tasks')} + + + + + + + + +
{$forms.tasksForm.task_required.control} {$i18n.label.what_is_it}
{$forms.tasksForm.btn_save.control}
+
{if $inactive_tasks} @@ -80,18 +90,6 @@ {/if}
{$i18n.form.tasks.active_tasks}
{/if} -
- - - - - - - - -
{$forms.tasksForm.task_required.control} {$i18n.label.what_is_it}
{$forms.tasksForm.btn_save.control}
- -
From b243785a17e90bb671058b092f390decbf20c149 Mon Sep 17 00:00:00 2001 From: kanfil Date: Thu, 30 Jul 2020 21:32:04 +0300 Subject: [PATCH 1919/2515] Save custom field values in session (#102) --- time.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/time.php b/time.php index 5e0dda153..a76b470d5 100644 --- a/time.php +++ b/time.php @@ -155,19 +155,21 @@ $timeCustomFields = array(); // If we have time custom fields - collect input. -if ($request->isPost()) { +#if ($request->isPost()) { if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $control_name = 'time_field_'.$timeField['id']; + $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + $_SESSION[$control_name] = $cl_control_name; $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], 'control_name' => $control_name, 'label' => $timeField['label'], 'type' => $timeField['type'], 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); + 'value' => trim($cl_control_name)); } } -} +#} // Elements of timeRecordForm. $form = new Form('timeRecordForm'); From ee4536e9f776191a95e1abd86ef873572a642961 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 30 Jul 2020 18:40:01 +0000 Subject: [PATCH 1920/2515] Added time custom fields storage in session to mobile time.php as in pr #102. --- WEB-INF/templates/footer.tpl | 2 +- mobile/time.php | 24 ++++++++++++------------ time.php | 28 +++++++++++++--------------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 50b48e893..1aa8e7ba2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {else} - + {/if}
Anuko Time Tracker 1.19.23.5262 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5263 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/mobile/time.php b/mobile/time.php index 58661632a..1cda7fb63 100644 --- a/mobile/time.php +++ b/mobile/time.php @@ -119,19 +119,19 @@ $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; +// Handle time custom fields. $timeCustomFields = array(); -// If we have time custom fields - collect input. -if ($request->isPost()) { - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); - } +if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $control_name = 'time_field_'.$timeField['id']; + $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + $_SESSION[$control_name] = $cl_control_name; + $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], + 'control_name' => $control_name, + 'label' => $timeField['label'], + 'type' => $timeField['type'], + 'required' => $timeField['required'], + 'value' => trim($cl_control_name)); } } diff --git a/time.php b/time.php index a76b470d5..e375e8425 100644 --- a/time.php +++ b/time.php @@ -153,23 +153,21 @@ $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; +// Handle time custom fields. $timeCustomFields = array(); -// If we have time custom fields - collect input. -#if ($request->isPost()) { - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); - $_SESSION[$control_name] = $cl_control_name; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($cl_control_name)); - } +if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $control_name = 'time_field_'.$timeField['id']; + $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + $_SESSION[$control_name] = $cl_control_name; + $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], + 'control_name' => $control_name, + 'label' => $timeField['label'], + 'type' => $timeField['type'], + 'required' => $timeField['required'], + 'value' => trim($cl_control_name)); } -#} +} // Elements of timeRecordForm. $form = new Form('timeRecordForm'); From 070846bb07629367d044a3affbea6f8135040c3f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 31 Jul 2020 15:00:29 +0000 Subject: [PATCH 1921/2515] Started to use relative values in css for better presentation. --- WEB-INF/templates/footer.tpl | 2 +- default.css | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1aa8e7ba2..9027eee8e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {else} - + {/if}
Anuko Time Tracker 1.19.23.5263 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5264 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/default.css b/default.css index 3eac29ec2..3b4921acf 100644 --- a/default.css +++ b/default.css @@ -63,17 +63,17 @@ input[type=checkbox], label { } .systemMenu { - font-size: 11pt; + font-size: 1rem; font-weight: bold; color: white; background-color: black; - margin: 2px 4px 2px 4px; + margin: .1rem .2rem .1rem .2rem; } .mainMenu { - font-size: 11pt; + font-size: 1rem; color: #444444; - margin: 2px 4px 2px 4px; + margin: .1rem .2rem .1rem .2rem; } .onBehalf { From 7f3061d5269131fea433dd6465565c93c9dcbb70 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 31 Jul 2020 15:47:40 +0000 Subject: [PATCH 1922/2515] Renamed tt_logo.png to just logo.png. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/header.tpl | 2 +- WEB-INF/templates/mobile/header.tpl | 2 +- WEB-INF/templates/work/header.tpl | 2 +- images/{tt_logo.png => logo.png} | Bin 5 files changed, 4 insertions(+), 4 deletions(-) rename images/{tt_logo.png => logo.png} (100%) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9027eee8e..36d26a192 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {else} - + {/if}
Anuko Time Tracker 1.19.23.5264 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5265 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 4d140ed3e..4e89a8a20 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -45,7 +45,7 @@ {if $user->custom_logo} Time TrackerAnuko Time TrackerAnuko Time Tracker
diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index 6290dd025..e6d661d3a 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -46,7 +46,7 @@ {if $user->custom_logo}
Time TrackerAnuko Time TrackerAnuko Time Tracker
diff --git a/WEB-INF/templates/work/header.tpl b/WEB-INF/templates/work/header.tpl index 084870958..03f986885 100644 --- a/WEB-INF/templates/work/header.tpl +++ b/WEB-INF/templates/work/header.tpl @@ -41,7 +41,7 @@ {if $user->custom_logo}
Time TrackerAnuko Time TrackerAnuko Time Tracker
diff --git a/images/tt_logo.png b/images/logo.png similarity index 100% rename from images/tt_logo.png rename to images/logo.png From f534234e691f5b53ce6dccd3412c42d32f572c9a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 31 Jul 2020 16:33:39 +0000 Subject: [PATCH 1923/2515] Fixed language for for the login screen. --- WEB-INF/lib/ttUser.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 58c51c632..331633e11 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -53,7 +53,7 @@ class ttUser { var $group_name = null; // Group name. var $behalf_group_name = null;// Group name, on behalf of which we are working. var $email = null; // User email. - var $lang = 'en'; // Language. + var $lang = null; // Language. var $decimal_mark = '.'; // Decimal separator. var $date_format = null; // Date format. var $time_format = null; // Time format. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 36d26a192..e1a6031d3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {if $can_edit} - - + + {/if} {/foreach} diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl index c064b13de..1e9476c3d 100644 --- a/WEB-INF/templates/expenses.tpl +++ b/WEB-INF/templates/expenses.tpl @@ -207,23 +207,23 @@ function recalculateCost() { {if $show_files} {if $item.has_files} - + {else} - + {/if} {/if} diff --git a/WEB-INF/templates/groups.tpl b/WEB-INF/templates/groups.tpl index 0289ef9ee..7b2a24017 100644 --- a/WEB-INF/templates/groups.tpl +++ b/WEB-INF/templates/groups.tpl @@ -22,8 +22,8 @@ - - + + {/foreach}
Anuko Time Tracker 1.19.23.5265 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5266 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} From 10c01f419f509827c240e46f80e495269c30a6da Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 Aug 2020 13:19:49 +0000 Subject: [PATCH 1924/2515] Fixed broken PDF reposrts after renaming logo image. --- WEB-INF/templates/footer.tpl | 2 +- group_edit.php | 2 +- topdf.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e1a6031d3..dcf355e63 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + + {/foreach}
Anuko Time Tracker 1.19.23.5266 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5267 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/group_edit.php b/group_edit.php index 2196d280b..c8ad2e142 100644 --- a/group_edit.php +++ b/group_edit.php @@ -92,7 +92,7 @@ $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); $cl_confirm_save = $request->getParameter('confirm_save'); } else { - $cl_currency = ($group['currency'] == ''? CURRENCY_DEFAULT : $group['currency']); + $cl_currency = ($group['currency'] == '' ? CURRENCY_DEFAULT : $group['currency']); $cl_lang = $group['lang']; $cl_decimal_mark = $group['decimal_mark']; $cl_date_format = $group['date_format']; diff --git a/topdf.php b/topdf.php index 337a05a41..42c31e07f 100644 --- a/topdf.php +++ b/topdf.php @@ -460,7 +460,7 @@ // Extend TCPDF class so that we can use custom header and footer. class ttPDF extends TCPDF { - public $image_file = 'images/tt_logo.png'; // Image file for the logo in header. + public $image_file = 'images/logo.png'; // Image file for the logo in header. public $page_word = 'Page'; // Localized "Page" word in footer, ex: Page 1/2. // SetImageFile - sets image file name. From e650913e25f14120ac4510a740f4bbc3c19f0e98 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 2 Aug 2020 15:44:40 +0000 Subject: [PATCH 1925/2515] Added a link explaining tracking mode. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/group_edit.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index dcf355e63..53f5fb82a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + From 3094adc7be3492465d3b7336bdee3df4e0850ea9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 3 Aug 2020 16:15:17 +0000 Subject: [PATCH 1926/2515] Changed APP_NAME named constant to DIR_NAME to better reflect its meaning. --- WEB-INF/config.php.dist | 14 +++++++------- WEB-INF/lib/form/DateField.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- password_reset.php | 4 ++-- readme.txt | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 24dd5a266..9583d59b3 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -50,13 +50,13 @@ define('DSN', 'mysqli://root:no@localhost/dbname?charset=utf8mb4'); define('MULTIORG_MODE', true); -// Application name. -// If you install time tracker into a sub-directory of your site reflect this in the APP_NAME parameter. -// For example, for http://localhost/timetracker/ define APP_NAME as 'timetracker'. +// Directory name. +// If you install time tracker into a sub-directory of your site reflect this in the DIR_NAME parameter. +// For example, for http://localhost/timetracker/ define DIR_NAME as 'timetracker'. // -// define('APP_NAME', 'timetracker'); +// define('DIR_NAME', 'timetracker'); // -define('APP_NAME', ''); +define('DIR_NAME', ''); // WEEKEND_START_DAY @@ -151,7 +151,7 @@ define('AUTH_MODULE', 'db'); // 'type' => 'openldap', // Type of server. openldap type should also work with Sun Directory Server when member_of is empty. // It may work with other (non Windows AD) LDAP servers. For Windows AD use the 'ad' type. // 'base_dn' => 'ou=People,dc=example,dc=com', // Path of user's base distinguished name in LDAP catalog. -// 'user_login_attribute' => 'uid', // LDAP attribute used for login +// 'user_login_attribute' => 'uid', // LDAP attribute used for login. // 'default_domain' => 'example.com', // Default domain. // 'member_of' => array()); // List of groups, membership in which is required for user to be authenticated. @@ -172,7 +172,7 @@ define('AUTH_MODULE', 'db'); // define('DEBUG', false); // Note: enabling DEBUG breaks redirects as debug output is printed before setting redirect header. Do not enable on production systems. -// Team managers can set monthly work hour quota for years between the following values. +// Group managers can set monthly work hour quota for years between the following values. // define('MONTHLY_QUOTA_YEAR_START', 2010); // If nothing is specified, it falls back to 2015. // define('MONTHLY_QUOTA_YEAR_END', 2025); // If nothing is specified, it falls back to 2030. diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index a197126fb..73c68220a 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -406,8 +406,8 @@ function adjustiFrame(pickerDiv, iFrameDiv) { $html .= " value=\"".htmlspecialchars($this->getValue())."\""; $html .= ">"; - if (APP_NAME) - $app_root = '/'.APP_NAME; + if (DIR_NAME) + $app_root = '/'.DIR_NAME; $html .= " name."');\">\n"; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 53f5fb82a..5a7521eeb 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
Anuko Time Tracker 1.19.23.5267 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5268 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl index c55663ceb..e9b6deb56 100644 --- a/WEB-INF/templates/group_edit.tpl +++ b/WEB-INF/templates/group_edit.tpl @@ -60,7 +60,7 @@ function chLocation(newLocation) { document.location = newLocation; }
{$i18n.form.group_edit.tracking_mode}:{$forms.groupForm.tracking_mode.control}{$forms.groupForm.tracking_mode.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.record_type}:
- - - + + {/foreach} {/if} diff --git a/WEB-INF/templates/cf_custom_fields.tpl b/WEB-INF/templates/cf_custom_fields.tpl index e64f18157..e056c606b 100644 --- a/WEB-INF/templates/cf_custom_fields.tpl +++ b/WEB-INF/templates/cf_custom_fields.tpl @@ -30,8 +30,8 @@ {/if} - - + + {/foreach} {/if} diff --git a/WEB-INF/templates/cf_dropdown_options.tpl b/WEB-INF/templates/cf_dropdown_options.tpl index b920d733e..d694a1ebc 100644 --- a/WEB-INF/templates/cf_dropdown_options.tpl +++ b/WEB-INF/templates/cf_dropdown_options.tpl @@ -16,8 +16,8 @@ {foreach $options as $key=>$val} - - + + {/foreach} {/if} diff --git a/WEB-INF/templates/clients.tpl b/WEB-INF/templates/clients.tpl index ca93b92f5..cba3256c3 100644 --- a/WEB-INF/templates/clients.tpl +++ b/WEB-INF/templates/clients.tpl @@ -20,8 +20,8 @@ - - + + {/foreach}
Anuko Time Tracker 1.19.23.5268 | Copyright © Anuko | + Anuko Time Tracker 1.19.23.5269 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/password_reset.php b/password_reset.php index 4d4e24867..bbb54adb5 100644 --- a/password_reset.php +++ b/password_reset.php @@ -100,8 +100,8 @@ $http = 'http'; $cl_subject = $user_i18n->get('form.reset_password.email_subject'); - if (APP_NAME) - $pass_edit_url = $http.'://'.$_SERVER['HTTP_HOST'].'/'.APP_NAME.'/password_change.php?ref='.$temp_ref; + if (DIR_NAME) + $pass_edit_url = $http.'://'.$_SERVER['HTTP_HOST'].'/'.DIR_NAME.'/password_change.php?ref='.$temp_ref; else $pass_edit_url = $http.'://'.$_SERVER['HTTP_HOST'].'/password_change.php?ref='.$temp_ref; diff --git a/readme.txt b/readme.txt index c8929fae4..421a18cdb 100644 --- a/readme.txt +++ b/readme.txt @@ -29,7 +29,7 @@ The general installation procedure looks like this: 5) Create a config file by coping WEB-INF/config.php.dist to WEB-INF/config.php. 6) Change $dsn value in /WEB-INF/config.php file to reflect your database connection parameters (user name and password). 7) If you are upgrading from earlier Time Tracker version run dbinstall.php from your browser and do only the required "Update database structure" steps. -8) If you install time tracker into a sub-directory of your site reflect this in the APP_NAME parameter in /WEB-INF/config.php file. For example, for http://localhost/timetracker/ set APP_NAME = "timetracker". +8) If you install time tracker into a sub-directory of your site reflect this in the DIR_NAME parameter in /WEB-INF/config.php file. For example, for http://localhost/timetracker/ set DIR_NAME = "timetracker". 9) Login to your time tracker site as admin with password "secret" without quotes and create at least one group. 10) Change admin password (on the admin "options" page). You can also use the following SQL console command: update tt_users set password = md5('new_password_here') where login='admin' From 469a150062dc321309af92cfb50f249a8d931d94 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 3 Aug 2020 17:46:26 +0000 Subject: [PATCH 1927/2515] Shortened images directory name to img to keep things a bit shorter. --- WEB-INF/lib/form/DateField.class.php | 2 +- WEB-INF/templates/admin_groups.tpl | 4 ++-- WEB-INF/templates/cf_custom_fields.tpl | 4 ++-- WEB-INF/templates/cf_dropdown_options.tpl | 4 ++-- WEB-INF/templates/clients.tpl | 8 ++++---- WEB-INF/templates/entity_files.tpl | 4 ++-- WEB-INF/templates/expenses.tpl | 8 ++++---- WEB-INF/templates/groups.tpl | 4 ++-- WEB-INF/templates/header.tpl | 10 +++++----- WEB-INF/templates/invoices.tpl | 2 +- WEB-INF/templates/mobile/header.tpl | 10 +++++----- WEB-INF/templates/mobile/time.tpl | 4 ++-- WEB-INF/templates/notifications.tpl | 4 ++-- WEB-INF/templates/predefined_expenses.tpl | 4 ++-- WEB-INF/templates/projects.tpl | 18 +++++++++--------- WEB-INF/templates/report.tpl | 4 ++-- WEB-INF/templates/roles.tpl | 8 ++++---- WEB-INF/templates/tasks.tpl | 8 ++++---- WEB-INF/templates/templates.tpl | 8 ++++---- WEB-INF/templates/time.tpl | 8 ++++---- WEB-INF/templates/timesheets.tpl | 16 ++++++++-------- WEB-INF/templates/users.tpl | 8 ++++---- WEB-INF/templates/week.tpl | 8 ++++---- WEB-INF/templates/work/admin_work.tpl | 8 ++++---- WEB-INF/templates/work/header.tpl | 10 +++++----- WEB-INF/templates/work/work.tpl | 8 ++++---- {images => img}/1x1.gif | Bin {images => img}/calendar.gif | Bin {images => img}/icon_delete.png | Bin {images => img}/icon_edit.png | Bin {images => img}/icon_file.png | Bin {images => img}/icon_files.png | Bin {images => img}/logo.png | Bin {images => img}/subm_bg.gif | Bin {images => img}/top_bg.gif | Bin initialize.php | 4 ++-- password_change.php | 4 ++-- topdf.php | 6 +++--- 38 files changed, 99 insertions(+), 99 deletions(-) rename {images => img}/1x1.gif (100%) rename {images => img}/calendar.gif (100%) rename {images => img}/icon_delete.png (100%) rename {images => img}/icon_edit.png (100%) rename {images => img}/icon_file.png (100%) rename {images => img}/icon_files.png (100%) rename {images => img}/logo.png (100%) rename {images => img}/subm_bg.gif (100%) rename {images => img}/top_bg.gif (100%) diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 73c68220a..18a3ec475 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -409,7 +409,7 @@ function adjustiFrame(pickerDiv, iFrameDiv) { if (DIR_NAME) $app_root = '/'.DIR_NAME; - $html .= " name."');\">\n"; + $html .= " name."');\">\n"; } return $html; diff --git a/WEB-INF/templates/admin_groups.tpl b/WEB-INF/templates/admin_groups.tpl index 218fe77cd..9f2ecb6f4 100644 --- a/WEB-INF/templates/admin_groups.tpl +++ b/WEB-INF/templates/admin_groups.tpl @@ -22,8 +22,8 @@ {$group.name|escape} {$group.date} {$group.lang}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
{$i18n.label.type_dropdown} {$i18n.label.configure}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
{$val|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
{$client.name|escape} {$client.address|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
@@ -43,8 +43,8 @@
{$client.name|escape} {$client.address|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
diff --git a/WEB-INF/templates/entity_files.tpl b/WEB-INF/templates/entity_files.tpl index fc552b24b..fe5dc5445 100644 --- a/WEB-INF/templates/entity_files.tpl +++ b/WEB-INF/templates/entity_files.tpl @@ -16,8 +16,8 @@
{$file.name|escape} {$file.description|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
{$item.cost}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files} {if $item.approved || $item.invoice_id}   {else} - {$i18n.label.edit} + {$i18n.label.edit} {/if} {if $item.approved || $item.invoice_id}   {else} - {$i18n.label.delete} + {$i18n.label.delete} {/if}
{$subgroup.name|escape} {$subgroup.description|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 4e89a8a20..eaf163824 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -34,18 +34,18 @@ {if $user->custom_logo}
{else} - + {/if} - - + + {/foreach}
- + {if $user->custom_logo} {else} - + {/if} @@ -74,7 +74,7 @@ - - - + + {/foreach} {/if} @@ -60,8 +60,8 @@ - - + + {/foreach} diff --git a/WEB-INF/templates/templates.tpl b/WEB-INF/templates/templates.tpl index c1ffff729..fa3faac63 100644 --- a/WEB-INF/templates/templates.tpl +++ b/WEB-INF/templates/templates.tpl @@ -16,8 +16,8 @@
{$template['name']|escape} {$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
@@ -37,8 +37,8 @@
{$template['name']|escape} {$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 377b26c01..d0121d0ee 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -155,16 +155,16 @@ {/if} {if $show_files} {if $record.has_files} -
{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files} {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} - {$i18n.label.edit} + {$i18n.label.edit} {if ($record.duration == '0:00' && $record.start <> '')} @@ -177,7 +177,7 @@ {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} - {$i18n.label.delete} + {$i18n.label.delete} {/if}
{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
@@ -86,13 +86,13 @@ {/if} {if $show_files} {if $timesheet.has_files} -
{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl index 401751fcb..d7d3e3aa7 100644 --- a/WEB-INF/templates/users.tpl +++ b/WEB-INF/templates/users.tpl @@ -35,8 +35,8 @@
{$u.quota_percent}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete} {$u.quota_percent}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete} {if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files} {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} - {$i18n.label.edit} + {$i18n.label.edit} {/if} {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} - {$i18n.label.delete} + {$i18n.label.delete} {/if}
{$work_item.description|escape} {$work_item.group_name|escape} ({$work_item.site_id}.{$work_item.group_id}) {$work_item.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
@@ -48,8 +48,8 @@
{$offer.description|escape} {$offer.group_name|escape} ({$offer.site_id}.{$offer.group_id}) {$offer.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}{$i18n.label.edit}{$i18n.label.delete}
diff --git a/WEB-INF/templates/work/header.tpl b/WEB-INF/templates/work/header.tpl index 03f986885..582e76144 100644 --- a/WEB-INF/templates/work/header.tpl +++ b/WEB-INF/templates/work/header.tpl @@ -30,18 +30,18 @@ {if $user->custom_logo}
{else} - + {/if} - + - + {if $show_projects} - + {/if} - +
- + {if $user->custom_logo} {else} - + {/if} @@ -70,7 +70,7 @@ - - + {if $show_projects} - + {/if} - + - + {$forms.taskForm.close} diff --git a/WEB-INF/templates/task_edit2.tpl b/WEB-INF/templates/task_edit2.tpl index 0ec709851..e0a15e693 100644 --- a/WEB-INF/templates/task_edit2.tpl +++ b/WEB-INF/templates/task_edit2.tpl @@ -11,23 +11,23 @@ {$forms.taskForm.description.control}
{$forms.taskForm.status.control}
{$i18n.label.projects}:
{$i18n.label.projects}: {$forms.taskForm.projects.control}
{$i18n.label.required_fields}
{$forms.taskForm.btn_save.control} {$forms.taskForm.btn_copy.control}
{$forms.taskForm.close} diff --git a/WEB-INF/templates/user_add2.tpl b/WEB-INF/templates/user_add2.tpl index 6adc5f7cd..dfb4bfa19 100644 --- a/WEB-INF/templates/user_add2.tpl +++ b/WEB-INF/templates/user_add2.tpl @@ -153,10 +153,10 @@ function handleClientRole() {
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control}
{$forms.userForm.close} diff --git a/WEB-INF/templates/user_edit2.tpl b/WEB-INF/templates/user_edit2.tpl index ecc0a838e..8a3507e7b 100644 --- a/WEB-INF/templates/user_edit2.tpl +++ b/WEB-INF/templates/user_edit2.tpl @@ -191,10 +191,10 @@ function handleClientRole() {
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control}
{$forms.userForm.close} diff --git a/initialize.php b/initialize.php index 1b0d371db..d50b940b3 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5375"); +define("APP_VERSION", "1.19.23.5376"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/register.php b/register.php index a036c26d4..3430d4366 100644 --- a/register.php +++ b/register.php @@ -1,30 +1,6 @@ Date: Wed, 25 Nov 2020 15:08:27 +0000 Subject: [PATCH 2051/2515] Improved styling of the description field. --- default.css | 13 +++++++++++++ initialize.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index 3873051e6..a1784c5bc 100644 --- a/default.css +++ b/default.css @@ -239,6 +239,19 @@ input.password-field { width: 237px; } +#description { + width: 220px; + border-radius: 4px; + border: 1px solid #c9c9c9; + padding: .4rem; +} + +#description:focus { + background-color: yellow; + border: 1px solid black; + outline: none; +} + .chart-image { width: 300px; height: 300px; diff --git a/initialize.php b/initialize.php index d50b940b3..3de6ba486 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5376"); +define("APP_VERSION", "1.19.23.5377"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ccd704eabdc20299faffe089feeb555b292ca7b4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 25 Nov 2020 15:47:43 +0000 Subject: [PATCH 2052/2515] Improving style of file upload control. --- default.css | 7 +++++++ initialize.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index a1784c5bc..5e1334bc8 100644 --- a/default.css +++ b/default.css @@ -235,6 +235,13 @@ input.password-field { width: 220px; } +input[type=file] { + width: 220px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + .dropdown-field { width: 237px; } diff --git a/initialize.php b/initialize.php index 3de6ba486..092bf840f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5377"); +define("APP_VERSION", "1.19.23.5378"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1bbfcb4c137b50a8019151aeeef9b51c711409d4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 25 Nov 2020 16:25:29 +0000 Subject: [PATCH 2053/2515] Some more progress on styles. --- WEB-INF/lib/form/PasswordField.class.php | 28 ++---------------------- default.css | 13 +++++------ initialize.php | 2 +- 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/WEB-INF/lib/form/PasswordField.class.php b/WEB-INF/lib/form/PasswordField.class.php index 579be5edb..ff6802c90 100644 --- a/WEB-INF/lib/form/PasswordField.class.php +++ b/WEB-INF/lib/form/PasswordField.class.php @@ -1,30 +1,6 @@ Date: Wed, 25 Nov 2020 16:41:48 +0000 Subject: [PATCH 2054/2515] Improved style of the note field. --- default.css | 9 +++++++++ initialize.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index e2b634693..da21649f7 100644 --- a/default.css +++ b/default.css @@ -295,6 +295,15 @@ input[type="file"] { margin: 0; height: 4rem; resize: none; + border-radius: 4px; + border: 1px solid #c9c9c9; + padding: .4rem; +} + +#note:focus { + background-color: yellow; + border: 1px solid black; + outline: none; } .day-totals { diff --git a/initialize.php b/initialize.php index 5b6cc1cb3..c98543252 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5379"); +define("APP_VERSION", "1.19.23.5380"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 7322bce85707960781c50df141e1c78cac7b675f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 25 Nov 2020 17:26:45 +0000 Subject: [PATCH 2055/2515] Improved spacing between menu items on site-map.php. --- WEB-INF/templates/site_map.tpl | 76 +++++++++++++++++----------------- default.css | 9 ++++ initialize.php | 2 +- 3 files changed, 48 insertions(+), 39 deletions(-) diff --git a/WEB-INF/templates/site_map.tpl b/WEB-INF/templates/site_map.tpl index 48b8d40c1..c951f2b99 100644 --- a/WEB-INF/templates/site_map.tpl +++ b/WEB-INF/templates/site_map.tpl @@ -1,90 +1,90 @@ {if $authenticated} {if $user->can('administer_site')} {* sub menu for admin *} -

- {$i18n.menu.groups}
- {$i18n.menu.options}
+

+ + {if isTrue('WORK_SERVER_ADMINISTRATION')} - {$i18n.label.work}
+ {/if} -

+
{* end of sub menu for admin *} {* main menu for admin *} -

- {$i18n.menu.logout}
- {$i18n.menu.forum}
- {$i18n.menu.help}
-

+ {* end of main menu for admin *} {else} {* sub menu for authorized user *} -

+

{if $user->exists() && ($user->can('track_own_time') || $user->can('track_time'))} - {$i18n.menu.time}
+ {if $user->isPluginEnabled('wv') && $user->isOptionEnabled('week_menu')} - {$i18n.menu.week}
+ {/if} {/if} {if $user->exists() && $user->isPluginEnabled('ex') && ($user->can('track_own_expenses') || $user->can('track_expenses'))} - {$i18n.menu.expenses}
+ {/if} {if $user->exists() && ($user->can('view_own_reports') || $user->can('view_reports') || $user->can('view_all_reports') || $user->can('view_client_reports'))} - {$i18n.menu.reports}
+ {/if} {if $user->exists() && $user->isPluginEnabled('ts') && ($user->can('track_own_time') || $user->can('track_time'))} - {$i18n.menu.timesheets}
+ {/if} {if $user->exists() && $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->can('view_client_invoices'))} - {$i18n.title.invoices}
+ {/if} {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts'))) && (constant('MODE_PROJECTS') == $user->getTrackingMode() || constant('MODE_PROJECTS_AND_TASKS') == $user->getTrackingMode() || $user->isPluginEnabled('cl'))} - {$i18n.menu.charts}
+ {/if} {if ($user->can('view_own_projects') || $user->can('manage_projects')) && (constant('MODE_PROJECTS') == $user->getTrackingMode() || constant('MODE_PROJECTS_AND_TASKS') == $user->getTrackingMode())} - {$i18n.menu.projects}
+ {/if} {if (constant('MODE_PROJECTS_AND_TASKS') == $user->getTrackingMode() && ($user->can('view_own_tasks') || $user->can('manage_tasks')))} - {$i18n.menu.tasks}
+ {/if} {if $user->can('view_users') || $user->can('manage_users')} - {$i18n.menu.users}
+ {/if} {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))} - {$i18n.menu.clients}
+ {/if} {if $user->can('export_data')} - {$i18n.menu.export}
+ {/if} -

+
{* end of sub menu for authorized user *} {* main menu for authorized user *} -

- {$i18n.menu.logout}
+

+ {if $user->exists() && $user->can('manage_own_settings')} - {$i18n.menu.profile}
+ {/if} {if $user->can('manage_basic_settings')} - {$i18n.menu.group}
+ {/if} {if $user->can('manage_features')} - {$i18n.menu.plugins}
+ {/if} - {$i18n.menu.forum}
- {$i18n.menu.help}
-

+ + +
{* end of main menu for authorized user *} {/if} {else} {* main menu for non authorized user *} -

- {$i18n.menu.login}
+

+ {if isTrue('MULTIORG_MODE') && constant('AUTH_MODULE') == 'db'} - {$i18n.menu.register}
+ {/if} - {$i18n.menu.forum}
- {$i18n.menu.help}
-

+ + +
{* end of main menu for non authorized user *} {/if} diff --git a/default.css b/default.css index da21649f7..820382bdf 100644 --- a/default.css +++ b/default.css @@ -358,6 +358,15 @@ input[type="file"] { margin-right: auto; } +.sitemap-item-group { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.sitemap-item { + margin: .4rem; +} + @media screen and (max-width: 600px) { .large-screen-label { diff --git a/initialize.php b/initialize.php index c98543252..f2b193e74 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5380"); +define("APP_VERSION", "1.19.23.5381"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 56c1de5a9c853ad16a350c36669901f3acfa26c9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 25 Nov 2020 18:17:27 +0000 Subject: [PATCH 2056/2515] Cosmetic. Added copytight notices on refactored templates. --- WEB-INF/templates/client_add2.tpl | 3 +++ WEB-INF/templates/client_delete2.tpl | 3 +++ WEB-INF/templates/client_edit2.tpl | 3 +++ WEB-INF/templates/clients2.tpl | 3 +++ WEB-INF/templates/entity_files2.tpl | 3 +++ WEB-INF/templates/expense_delete2.tpl | 3 +++ WEB-INF/templates/expense_edit2.tpl | 3 +++ WEB-INF/templates/expenses2.tpl | 3 +++ WEB-INF/templates/login.db2.tpl | 3 +++ WEB-INF/templates/login.ldap2.tpl | 3 +++ WEB-INF/templates/login2.tpl | 3 +++ WEB-INF/templates/password_change2.tpl | 3 +++ WEB-INF/templates/password_reset2.tpl | 3 +++ WEB-INF/templates/project_add2.tpl | 3 +++ WEB-INF/templates/project_delete2.tpl | 3 +++ WEB-INF/templates/project_edit2.tpl | 3 +++ WEB-INF/templates/register2.tpl | 3 +++ WEB-INF/templates/swap_roles2.tpl | 3 +++ WEB-INF/templates/task_add2.tpl | 3 +++ WEB-INF/templates/task_delete2.tpl | 3 +++ WEB-INF/templates/task_edit2.tpl | 3 +++ WEB-INF/templates/tasks2.tpl | 3 +++ WEB-INF/templates/time2.tpl | 3 +++ WEB-INF/templates/time_delete2.tpl | 3 +++ WEB-INF/templates/time_edit2.tpl | 3 +++ WEB-INF/templates/user_add2.tpl | 3 +++ WEB-INF/templates/user_delete2.tpl | 3 +++ WEB-INF/templates/user_edit2.tpl | 3 +++ WEB-INF/templates/users2.tpl | 3 +++ initialize.php | 2 +- 30 files changed, 88 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/client_add2.tpl b/WEB-INF/templates/client_add2.tpl index e22081ef4..5fe001b23 100644 --- a/WEB-INF/templates/client_add2.tpl +++ b/WEB-INF/templates/client_add2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {$forms.clientForm.open} diff --git a/WEB-INF/templates/client_delete2.tpl b/WEB-INF/templates/client_delete2.tpl index bc583ea66..47506f79b 100644 --- a/WEB-INF/templates/client_delete2.tpl +++ b/WEB-INF/templates/client_delete2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {$forms.clientDeleteForm.open}
diff --git a/WEB-INF/templates/client_edit2.tpl b/WEB-INF/templates/client_edit2.tpl index 935c6a1e5..91f2b1c39 100644 --- a/WEB-INF/templates/client_edit2.tpl +++ b/WEB-INF/templates/client_edit2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {$forms.clientForm.open}
{$i18n.form.client.client_to_delete}:
diff --git a/WEB-INF/templates/clients2.tpl b/WEB-INF/templates/clients2.tpl index 1ec69df2f..9f7d4064b 100644 --- a/WEB-INF/templates/clients2.tpl +++ b/WEB-INF/templates/clients2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + diff --git a/WEB-INF/templates/entity_files2.tpl b/WEB-INF/templates/entity_files2.tpl index 9d48e24c1..d6b892b38 100644 --- a/WEB-INF/templates/entity_files2.tpl +++ b/WEB-INF/templates/entity_files2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {if $files}
diff --git a/WEB-INF/templates/expense_delete2.tpl b/WEB-INF/templates/expense_delete2.tpl index 9b9bab838..a9ea04d10 100644 --- a/WEB-INF/templates/expense_delete2.tpl +++ b/WEB-INF/templates/expense_delete2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {$forms.expenseItemForm.open}
diff --git a/WEB-INF/templates/expense_edit2.tpl b/WEB-INF/templates/expense_edit2.tpl index 3cea79482..ec921e007 100644 --- a/WEB-INF/templates/expense_edit2.tpl +++ b/WEB-INF/templates/expense_edit2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 33aa428e7..487bff7cf 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {include file="time_script.tpl"} {if $show_navigation} diff --git a/WEB-INF/templates/time_delete2.tpl b/WEB-INF/templates/time_delete2.tpl index 20acb783c..59d9039d1 100644 --- a/WEB-INF/templates/time_delete2.tpl +++ b/WEB-INF/templates/time_delete2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {$forms.timeRecordForm.open}
diff --git a/WEB-INF/templates/time_edit2.tpl b/WEB-INF/templates/time_edit2.tpl index dc3d78cd0..8a25c43cf 100644 --- a/WEB-INF/templates/time_edit2.tpl +++ b/WEB-INF/templates/time_edit2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + {include file="time_script.tpl"} {* Conditional include of confirmSave handler. *} diff --git a/WEB-INF/templates/user_add2.tpl b/WEB-INF/templates/user_add2.tpl index dfb4bfa19..ad421b9e8 100644 --- a/WEB-INF/templates/user_add2.tpl +++ b/WEB-INF/templates/user_add2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + diff --git a/initialize.php b/initialize.php index f2b193e74..42b94a865 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5381"); +define("APP_VERSION", "1.19.23.5382"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 25202d51cbcbe494fb4a5a30cf90687736d64342 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 25 Nov 2020 18:25:02 +0000 Subject: [PATCH 2057/2515] Cleanup. Removed no longer used legacy mobile client pages and templates. --- WEB-INF/templates/mobile/client_add.tpl | 37 ------ WEB-INF/templates/mobile/client_delete.tpl | 25 ---- WEB-INF/templates/mobile/client_edit.tpl | 41 ------- WEB-INF/templates/mobile/clients.tpl | 66 ---------- WEB-INF/templates/mobile/header.tpl | 3 - initialize.php | 2 +- mobile/client_add.php | 94 -------------- mobile/client_delete.php | 78 ------------ mobile/client_edit.php | 135 --------------------- mobile/clients.php | 54 --------- 10 files changed, 1 insertion(+), 534 deletions(-) delete mode 100644 WEB-INF/templates/mobile/client_add.tpl delete mode 100644 WEB-INF/templates/mobile/client_delete.tpl delete mode 100644 WEB-INF/templates/mobile/client_edit.tpl delete mode 100644 WEB-INF/templates/mobile/clients.tpl delete mode 100644 mobile/client_add.php delete mode 100644 mobile/client_delete.php delete mode 100644 mobile/client_edit.php delete mode 100644 mobile/clients.php diff --git a/WEB-INF/templates/mobile/client_add.tpl b/WEB-INF/templates/mobile/client_add.tpl deleted file mode 100644 index db10ede45..000000000 --- a/WEB-INF/templates/mobile/client_add.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{$forms.clientForm.open} -
- - - -
- - - - - - - - - - - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - -
{$i18n.label.client_name} (*):{$forms.clientForm.name.control}
{$i18n.label.client_address}:{$forms.clientForm.address.control}
{$i18n.label.tax}, %:{$forms.clientForm.tax.control} (0{$user->getDecimalMark()}00)
{$i18n.label.required_fields}
 
{$i18n.label.projects}:{$forms.clientForm.projects.control}
 
{$forms.clientForm.btn_submit.control}
-
-{$forms.clientForm.close} diff --git a/WEB-INF/templates/mobile/client_delete.tpl b/WEB-INF/templates/mobile/client_delete.tpl deleted file mode 100644 index f40b94c12..000000000 --- a/WEB-INF/templates/mobile/client_delete.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{$forms.clientDeleteForm.open} - - - - -
- - - - - - - - - - - - - - - - -
{$i18n.form.client.client_to_delete}:{$client_to_delete|escape}
{$i18n.form.client.client_entries}:{$forms.clientDeleteForm.delete_client_entries.control}
 
{$forms.clientDeleteForm.btn_delete.control}  {$forms.clientDeleteForm.btn_cancel.control}
-
-{$forms.clientDeleteForm.close} diff --git a/WEB-INF/templates/mobile/client_edit.tpl b/WEB-INF/templates/mobile/client_edit.tpl deleted file mode 100644 index 4f70ced7a..000000000 --- a/WEB-INF/templates/mobile/client_edit.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{$forms.clientForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - -{if $show_projects} - - - - -{/if} - - - - -
{$i18n.label.client_name} (*):{$forms.clientForm.name.control}
{$i18n.label.client_address}:{$forms.clientForm.address.control}
{$i18n.label.tax}, %:{$forms.clientForm.tax.control} (0{$user->decimal_mark}00)
{$i18n.label.status}:{$forms.clientForm.status.control}
{$i18n.label.required_fields}
 
{$i18n.label.projects}:{$forms.clientForm.projects.control}
 
{$forms.clientForm.btn_save.control} {$forms.clientForm.btn_copy.control} {$forms.clientForm.btn_delete.control}
-
-{$forms.clientForm.close} diff --git a/WEB-INF/templates/mobile/clients.tpl b/WEB-INF/templates/mobile/clients.tpl deleted file mode 100644 index 34f53a919..000000000 --- a/WEB-INF/templates/mobile/clients.tpl +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - -
-{if $user->can('manage_clients')} - - {if $inactive_clients} - - {/if} - - - - - {foreach $active_clients as $client} - - - - - {/foreach} -
{$i18n.form.clients.active_clients}
{$i18n.label.person_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}
- - - -

- - {if $inactive_clients} - - - - - - - {foreach $inactive_clients as $client} - - - - - {/foreach} -
{$i18n.form.clients.inactive_clients}
{$i18n.label.person_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}
- - - -

- {/if} -{else} - - - - - - {if $active_clients} - {foreach $active_clients as $client} - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}
-{/if} -
diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index ccea5e7e1..d4cf2c53b 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -91,9 +91,6 @@ {/if} {if $user->can('view_users') || $user->can('manage_users')} {$i18n.menu.users} - {/if} - {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))} - {$i18n.menu.clients} {/if}
{$i18n.label.required_fields}
{$i18n.label.projects}:
{$i18n.label.projects}:
{$i18n.label.required_fields}
{$i18n.label.projects}:
{$i18n.label.projects}:
{$i18n.label.users}:
{$i18n.label.users}:
{$i18n.label.tasks}:
{$i18n.label.tasks}:
{$i18n.label.users}:
{$i18n.label.users}:
{$i18n.label.tasks}:
{$i18n.label.tasks}:
{$i18n.label.projects}:
{$i18n.label.projects}:
{$i18n.label.projects}:
{$i18n.label.projects}:
@@ -37,8 +38,8 @@ License: See license.txt *} +
{$forms.fileUploadForm.description.control}
{$forms.fileUploadForm.btn_submit.control}
-
{$forms.fileUploadForm.btn_submit.control}
{$forms.fileUploadForm.close} {/if} diff --git a/default.css b/default.css index fea2e8da5..8079296aa 100644 --- a/default.css +++ b/default.css @@ -128,8 +128,7 @@ div.page-hint { margin-top: .5rem; margin-left: auto; margin-right: auto; - padding: .5rem; - background-color: #f0f0f0; + border-collapse: collapse; } .x-scrollable-table th { @@ -140,6 +139,9 @@ div.page-hint { padding: .25rem; } +.x-scrollable-table tr:nth-child(even) {background: #ffffff} +.x-scrollable-table tr:nth-child(odd) {background: #f5f5f5} + .text-cell { text-align: left; } diff --git a/initialize.php b/initialize.php index 837759f2b..2cd8198bb 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5390"); +define("APP_VERSION", "1.19.23.5391"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 83fc6da0ea7e7e2ef1e23653e9d442efa303c32e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 18:36:05 +0000 Subject: [PATCH 2066/2515] Some style fixes for calendar and x-scrollable-table. --- default.css | 5 +++++ initialize.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index 8079296aa..c4f8ac542 100644 --- a/default.css +++ b/default.css @@ -133,6 +133,7 @@ div.page-hint { .x-scrollable-table th { white-space: nowrap; + padding: .25rem; } .x-scrollable-table td { @@ -281,6 +282,10 @@ input[type="file"] { margin-right: auto; } +.small-screen-calendar a:focus, .large-screen-calendar a:focus { + outline: none; +} + .large-screen-calendar { display: block; width: 210px; diff --git a/initialize.php b/initialize.php index 2cd8198bb..627153414 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5391"); +define("APP_VERSION", "1.19.23.5392"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ad9d244216139d0c9e0aec21a00905eb3198a897 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 20:35:20 +0000 Subject: [PATCH 2067/2515] Fixed an issue with incorrect column span. --- initialize.php | 2 +- time.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index 627153414..79d1105fe 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5392"); +define("APP_VERSION", "1.19.23.5393"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 27c21d431..6bd10ad53 100644 --- a/time.php +++ b/time.php @@ -86,8 +86,7 @@ } if ($showProject) $colspan++; if ($showTask) $colspan++; - if ($showStart) $colspan++; - if ($showFinish) $colspan++; + if ($showStart) $colspan += 2; // Another for show finish. $colspan++; // There is always a duration. if ($showFiles) $colspan++; $colspan++; // There is always an edit column. From 9d37ef6efab76fa1f94cb7b534f6c31cb2d227f0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 27 Nov 2020 21:02:08 +0000 Subject: [PATCH 2068/2515] Improved UI for user pages. --- WEB-INF/templates/user_add2.tpl | 1 + WEB-INF/templates/user_edit2.tpl | 1 + default.css | 4 ++++ initialize.php | 2 +- user_add.php | 1 + user_edit.php | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/user_add2.tpl b/WEB-INF/templates/user_add2.tpl index ad421b9e8..7413fd2a2 100644 --- a/WEB-INF/templates/user_add2.tpl +++ b/WEB-INF/templates/user_add2.tpl @@ -147,6 +147,7 @@ function handleClientRole() {
-
+ {section name=i loop=$totals} {if $smarty.section.i.index <= 12} @@ -68,7 +68,7 @@ function adjustTodayLinks() {
-
+ {section name=i loop=$totals} {if $smarty.section.i.index <= 12} diff --git a/default.css b/default.css index 2aa8335f8..2262acf67 100644 --- a/default.css +++ b/default.css @@ -8,57 +8,53 @@ body { background-color: white; } +/* logo on top of pages */ div.logo { padding: .5rem; text-align: center; background-color: #a6ccf7; } +/* top menu bar for large screens */ div.top-menu-large-screen { background-color: black; display: block; } -.top-submenu-large-screen { +/* submenu for large screens */ +div.top-submenu-large-screen { background-color: #d9d9d9; display: block; } +/* top menu for small screens */ div.top-menu-small-screen { background-color: black; display: none; } -div.top-menu-small-screen a { +/* top menu items */ +div.top-menu-large-screen a, div.top-menu-small-screen a { font-size: 1rem; font-weight: bold; color: white; margin: .1rem .2rem .1rem .2rem; } -div.top-menu-large-screen a { - font-size: 1rem; - font-weight: bold; - color: white; - margin: .1rem .2rem .1rem .2rem; -} - -.top-menu-table { - margin-left: auto; - margin-right: auto; -} - -.top-submenu-table { +/* top menu tables */ +.top-menu-table, .top-submenu-table { margin-left: auto; margin-right: auto; } +/* top submenu items */ .top-submenu-large-screen a { font-size: 1rem; color: #444444; margin: .1rem .2rem .1rem .2rem; } +/* page title div */ div.page-title { font-size: 12pt; font-weight: bold; @@ -69,45 +65,60 @@ div.page-title { margin-bottom: .2rem; } +/* user details div */ div.user-details { text-align: center; padding: .2rem; } +/* page errors div */ .page-errors { margin-top: .5rem; text-align: center; color: red; } +/* page messages div */ .page-messages { margin-top: .5rem; text-align: center; color: blue; } +/* page content div */ .page-content { text-align: center; } +/* vertical separator for controls on forms for both large and small screens */ .form-control-separator { height: .5rem; } +/* vertical separator for controls on small screens */ +.small-screen-form-control-separator { + height: .25rem; + display: none; +} + +/* "about" text div on login page */ div#LoginAboutText { padding: 1rem; margin-left:auto; margin-right:auto; } +/* default domain text div for ldap login */ #ldapDefaultDomain { color: #777777; } +/* page hint div to display on top of some pages to clarify things */ div.page-hint { margin-top: 1rem; } +/* project rate table for user add and user edit pages */ .project-rate-table { width: 300px; border-collapse: collapse; @@ -117,21 +128,15 @@ div.page-hint { padding: .2rem; } +/* a table to display controls centered horizontally */ .centered-table { + display: inline-block; margin-top: .5rem; margin-left: auto; margin-right: auto; - display: inline-block; -} - -.chart-list { - border-spacing: .2rem; -} - -.record-list { - margin: 1rem; } +/* a table to hold things that may not fit into available screen width */ .x-scrollable-table { display: inline-block; margin-top: .5rem; @@ -152,40 +157,59 @@ div.page-hint { .x-scrollable-table tr:nth-child(even) {background: #ffffff} .x-scrollable-table tr:nth-child(odd) {background: #f5f5f5} +/* a text cell in tables */ .text-cell { text-align: left; } +/* time cell in tables */ .time-cell { text-align: right; } +/* text cell for note header when we display notes on separate rows */ .note-header-cell { text-align: right; } +/* control labels for large screens */ .large-screen-label { text-align: right; vertical-align: middle; display: table-cell; } -.large-screen-chart-list { +/* control labels for small screens */ +.small-screen-label { + text-align: left; + display: none; +} + +/* list of items displayed in a chart on large screens */ +.large-screen-chart-items-list { display: table-cell; } -.small-screen-chart-list { +/* list of items displayed in a chart on small screens */ +.small-screen-chart-items-list { display: none; } -.small-screen-label { - text-align: left; - display: none; +/* a div to display a chart in */ +div.chart { + padding-left: 1rem; + padding-right: 1rem; } -.small-screen-form-control-separator { - height: .25rem; - display: none; + + +/* TODO: work in progress below... */ +.chart-list { + border-spacing: .2rem; +} + +.record-list { + margin: 1rem; } .page-content input { @@ -393,11 +417,11 @@ input[type="file"] { display: none; } - .large-screen-chart-list { + .large-screen-chart-items-list { display: none; } - .small-screen-chart-list { + .small-screen-chart-items-list { display: table-cell; } diff --git a/initialize.php b/initialize.php index aced0690c..c33acb839 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5397"); +define("APP_VERSION", "1.19.23.5398"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 13bc4e28d73abdc10b4c02f264161719b6bc7866 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 2 Dec 2020 18:32:30 +0000 Subject: [PATCH 2073/2515] Some cleanup and commenting in styles. --- WEB-INF/templates/charts2.tpl | 4 ++-- default.css | 10 ++++++---- initialize.php | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/charts2.tpl b/WEB-INF/templates/charts2.tpl index 6e9f1756d..ff15ea8f2 100644 --- a/WEB-INF/templates/charts2.tpl +++ b/WEB-INF/templates/charts2.tpl @@ -54,7 +54,7 @@ function adjustTodayLinks() {
- +
{section name=i loop=$totals} {if $smarty.section.i.index <= 12} @@ -69,7 +69,7 @@ function adjustTodayLinks() {
{$totals[i].name|escape}
- +
{section name=i loop=$totals} {if $smarty.section.i.index <= 12} diff --git a/default.css b/default.css index 2262acf67..518f200db 100644 --- a/default.css +++ b/default.css @@ -145,15 +145,18 @@ div.page-hint { border-collapse: collapse; } +/* th in x-scrollable-table */ .x-scrollable-table th { white-space: nowrap; padding: .25rem; } +/* td in x-scrollable-table */ .x-scrollable-table td { padding: .25rem; } +/* alternating row background in x-scrollable-table */ .x-scrollable-table tr:nth-child(even) {background: #ffffff} .x-scrollable-table tr:nth-child(odd) {background: #f5f5f5} @@ -201,13 +204,12 @@ div.chart { padding-right: 1rem; } - - -/* TODO: work in progress below... */ -.chart-list { +/* a table to annotate items from chart picture */ +.chart-items-list-table { border-spacing: .2rem; } +/* TODO: work in progress below */ .record-list { margin: 1rem; } diff --git a/initialize.php b/initialize.php index c33acb839..0f49c474f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5398"); +define("APP_VERSION", "1.19.23.5399"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 000093299c75e46866bcccc6fd42a4092dd8a0ef Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 15:22:32 +0000 Subject: [PATCH 2074/2515] Put some more comments in default.css. --- default.css | 26 ++++++++++++++++++-------- initialize.php | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/default.css b/default.css index 518f200db..619426ef1 100644 --- a/default.css +++ b/default.css @@ -209,38 +209,48 @@ div.chart { border-spacing: .2rem; } -/* TODO: work in progress below */ -.record-list { +/* a div to display a list of records in */ +div.record-list { margin: 1rem; } +/* input controls */ .page-content input { border-radius: 4px; border: 1px solid #c9c9c9; padding: .4rem; } -.td-with-input { - text-align: left; -} - +/* input controls with focus on them */ .page-content input:focus { background-color: yellow; border: 1px solid black; outline: none; } -.contribute-msg { +/* a table cell containing input control */ +.td-with-input { + text-align: left; +} + +/* div containing how to contribute message */ +div.contribute-msg { text-align: center; margin-top: 2rem; padding: .2rem; background-color: #eeeeee; } -.version-and-copyright { + +/* div containing app version and copyright info */ +div.version-and-copyright { text-align: center; padding: .5rem; } + + + +/* TODO: work in progress below */ .centered-table td img { vertical-align: middle; } diff --git a/initialize.php b/initialize.php index 0f49c474f..82cc5d7df 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5399"); +define("APP_VERSION", "1.19.23.5400"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 82fa8f93e9a8c5cffd16db0303b9ca18ec6cd25b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 16:59:01 +0000 Subject: [PATCH 2075/2515] Added more comments in default.css. --- default.css | 131 ++++++++++++++++++++++++++++++------------------- initialize.php | 2 +- 2 files changed, 82 insertions(+), 51 deletions(-) diff --git a/default.css b/default.css index 619426ef1..30160902b 100644 --- a/default.css +++ b/default.css @@ -247,82 +247,95 @@ div.version-and-copyright { padding: .5rem; } - - - -/* TODO: work in progress below */ +/* img in td in centered-table, ex: now icons */ .centered-table td img { vertical-align: middle; } -.what-is-it-img { +/* span for what is it icon image */ +span.what-is-it-img { display: none; } -.what-is-it-text { +/* span for what is it text */ +span.what-is-it-text { display: inline-block; } -input[type="submit"] { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -input[type="button"] { +/* buttons */ +input[type="submit"], input[type="button"] { -webkit-appearance: none; -moz-appearance: none; appearance: none; } -input[type="text"] { +/* input controls */ +input[type="text"], input[type="password"], input[type="file"] { width: 220px; } +/* project rate input control */ input[type="text"].project-rate-field { width: 50px; } -input[type="password"] { - width: 220px; +/* dropdown control */ +.dropdown-field { + width: 236px; } -input[type="file"] { +/* textareas for fields */ +#description, #address, #item_name { width: 220px; + border-radius: 4px; + border: 1px solid #c9c9c9; + padding: .4rem; } -.dropdown-field { - width: 237px; +/* textareas with focus */ +#description:focus, #address:focus, #item_name:focus { + background-color: yellow; + border: 1px solid black; + outline: none; } -#description, #address, #item_name { - width: 220px; +/* textarea for note field */ +#note { + width: 100%; + margin: 0; + height: 4rem; + resize: none; border-radius: 4px; border: 1px solid #c9c9c9; padding: .4rem; } -#description:focus, #address:focus, #item_name:focus { +/* note field with focus */ +#note:focus { background-color: yellow; border: 1px solid black; outline: none; } +/* chart image */ .chart-image { width: 300px; height: 300px; } +/* chart color cell for annotations */ .chart-color-cell { width: .4rem; height: 1rem; } +/* chart description cell for annotations */ .chart-description-cell { text-align: left; padding-left: .25rem; } +/* calendar for small screens */ .small-screen-calendar { display: none; width: 210px; @@ -331,10 +344,12 @@ input[type="file"] { margin-right: auto; } +/* calendars with focus */ .small-screen-calendar a:focus, .large-screen-calendar a:focus { outline: none; } +/* calendar for large screens */ .large-screen-calendar { display: block; width: 210px; @@ -342,143 +357,159 @@ input[type="file"] { margin-top: 1rem; } +/* label for checkboxes */ .checkbox-label { float: left; } -#note { - width: 100%; - margin: 0; - height: 4rem; - resize: none; - border-radius: 4px; - border: 1px solid #c9c9c9; - padding: .4rem; -} - -#note:focus { - background-color: yellow; - border: 1px solid black; - outline: none; -} - -.day-totals { +/* div for day totals */ +div.day-totals { margin-bottom: 1rem; + width: 100%; } +/* column 1 for day totals */ .day-totals-col1 { text-align: left; padding-left: .5rem; padding-right: .5rem; } +/* column 2 for day totals */ .day-totals-col2 { padding-left: .5rem; padding-right: .5rem; text-align: right; } +/* not billable items */ .not-billable { - color: #ff6666; + color: red; } -.remaining-quota { +/* remaining quota span */ +span.remaining-quota { color: red; } -.remaining-quota-balance { +/* remaining quota balance span */ +span.remaining-quota-balance { color: red; } -.over-quota { +/* over quota span */ +span.over-quota { color: green; } -.over-quota-balance { +/* over quota balance span */ +span.over-quota-balance { color: green; } -.optional-nav { +/* div for optional navigation, ex: week view */ +div.optional-nav { margin-top: .5rem; } +/* div for a set of buttons, ex: save, copy, delete */ .button-set { margin-top: .5rem; margin-bottom: 1rem; } -.section-header { +/* section header div */ +div.section-header { font-weight: bold; text-align: center; margin-left: auto; margin-right: auto; } -.sitemap-item-group { +/* div for a group of items in site map */ +div.sitemap-item-group { margin-top: 2rem; margin-bottom: 2rem; } -.sitemap-item { +/* div for a single item in site map */ +div.sitemap-item { margin: .4rem; } +/* media rules for small screens */ @media screen and (max-width: 600px) { + /* hide large screen labels */ .large-screen-label { display: none; } + /* hide large screen chart annotations */ .large-screen-chart-items-list { display: none; } + /* show small screen chart annotations */ .small-screen-chart-items-list { display: table-cell; } + /* show small screen labels */ .small-screen-label { display: block; } + /* show small screen calendar */ .small-screen-calendar { display: block; } + /* hide large screen calendar */ .large-screen-calendar { display: none; } + /* show small screen form control separators */ .small-screen-form-control-separator { display: block; } - .what-is-it-img { + /* show what is it icons */ + span.what-is-it-img { display: inline-block; } - .what-is-it-text { + /* hide what is it text */ + span.what-is-it-text { display: none; } + /* hide how to contribute message */ div.contribute-msg { display: none; } + /* hide version and copyright */ div.version-and-copyright { display: none; } } +/* media rules for menus on small screens */ @media screen and (max-width: 1170px) { + + /* show small screen menu */ div.top-menu-small-screen { display: block; } + /* hide large screen menu */ div.top-menu-large-screen { display: none; } + /* hide large screen submenu */ div.top-submenu-large-screen { display: none; } diff --git a/initialize.php b/initialize.php index 82cc5d7df..2978e7a1b 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5400"); +define("APP_VERSION", "1.19.23.5401"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 05988b6d9bf9be8fc5f64f55cc9c61e602058638 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 17:43:38 +0000 Subject: [PATCH 2076/2515] Removed no longer used files. --- charts1.php | 227 -------------------- clients1.php | 55 ----- default.css | 4 - expense_delete1.php | 88 -------- expense_edit1.php | 243 --------------------- expenses1.php | 251 ---------------------- initialize.php | 2 +- project_add1.php | 118 ----------- project_edit1.php | 136 ------------ projects1.php | 58 ----- task_add1.php | 89 -------- task_edit1.php | 122 ----------- tasks1.php | 77 ------- time1.php | 506 -------------------------------------------- user_add1.php | 244 --------------------- user_edit1.php | 308 --------------------------- users1.php | 69 ------ 17 files changed, 1 insertion(+), 2596 deletions(-) delete mode 100644 charts1.php delete mode 100644 clients1.php delete mode 100644 expense_delete1.php delete mode 100644 expense_edit1.php delete mode 100644 expenses1.php delete mode 100644 project_add1.php delete mode 100644 project_edit1.php delete mode 100644 projects1.php delete mode 100644 task_add1.php delete mode 100644 task_edit1.php delete mode 100644 tasks1.php delete mode 100644 time1.php delete mode 100644 user_add1.php delete mode 100644 user_edit1.php delete mode 100644 users1.php diff --git a/charts1.php b/charts1.php deleted file mode 100644 index 3b4ce15a1..000000000 --- a/charts1.php +++ /dev/null @@ -1,227 +0,0 @@ -isPluginEnabled('ch')) { - header('Location: feature_disabled.php'); - exit(); -} -if (!$user->exists()) { - header('Location: access_denied.php'); // Nobody to display a chart for. - exit(); -} -if ($user->behalf_id && (!$user->can('view_charts') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('view_own_charts') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to view on behalf. - exit(); -} -if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid($request->getParameter('user'))) { - header('Location: access_denied.php'); // Wrong user id on post. - exit(); - } -} -// End of access checks. - -// Determine user for which we display this page. -$userChanged = $request->getParameter('user_changed'); -if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -$uc = new ttUserConfig(); -$tracking_mode = $user->getTrackingMode(); - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -if(!$cl_date) { - $now = new DateAndTime(DB_DATEFORMAT); - $cl_date = $now->toString(DB_DATEFORMAT); -} -$_SESSION['date'] = $cl_date; - -if ($request->isPost()) { - $cl_interval = $request->getParameter('interval'); - if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; - $_SESSION['chart_interval'] = $cl_interval; - $uc->setValue(SYSC_CHART_INTERVAL, $cl_interval); - - $cl_type = $request->getParameter('type'); - if (!$cl_type) $cl_type = ttChartHelper::adjustType($cl_type); - $_SESSION['chart_type'] = $cl_type; - $uc->setValue(SYSC_CHART_TYPE, $cl_type); -} else { - // Initialize chart interval. - $cl_interval = $_SESSION['chart_interval']; - if (!$cl_interval) $cl_interval = $uc->getValue(SYSC_CHART_INTERVAL); - if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; - $_SESSION['chart_interval'] = $cl_interval; - - // Initialize chart type. - $cl_type = $_SESSION['chart_type']; - if (!$cl_type) $cl_type = $uc->getValue(SYSC_CHART_TYPE); - $cl_type = ttChartHelper::adjustType($cl_type); - $_SESSION['chart_type'] = $cl_type; -} - -// Elements of chartForm. -$chart_form = new Form('chartForm'); - -// User dropdown. Changes the user "on behalf" of whom we are working. -if ($user->can('view_charts')) { - $rank = $user->getMaxRankForGroup($user->getGroup()); - if ($user->can('view_own_charts')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $chart_form->addInput(array('type'=>'combobox', - 'onchange'=>'this.form.user_changed.value=1;this.form.submit();', - 'name'=>'user', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'), - )); - $chart_form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Chart interval options. -$intervals = array(); -$intervals[INTERVAL_THIS_DAY] = $i18n->get('dropdown.selected_day'); -$intervals[INTERVAL_THIS_WEEK] = $i18n->get('dropdown.selected_week'); -$intervals[INTERVAL_THIS_MONTH] = $i18n->get('dropdown.selected_month'); -$intervals[INTERVAL_THIS_YEAR] = $i18n->get('dropdown.selected_year'); -$intervals[INTERVAL_ALL_TIME] = $i18n->get('dropdown.all_time'); - -// Chart interval dropdown. -$chart_form->addInput(array('type' => 'combobox', - 'onchange' => 'this.form.submit();', - 'name' => 'interval', - 'value' => $cl_interval, - 'data' => $intervals -)); - -// Chart type options. -$chart_selector = (MODE_PROJECTS_AND_TASKS == $tracking_mode || $user->isPluginEnabled('cl')); -if ($chart_selector) { - $types = array(); - if (MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode) - $types[CHART_PROJECTS] = $i18n->get('dropdown.projects'); - if (MODE_PROJECTS_AND_TASKS == $tracking_mode) - $types[CHART_TASKS] = $i18n->get('dropdown.tasks'); - if ($user->isPluginEnabled('cl')) - $types[CHART_CLIENTS] = $i18n->get('dropdown.clients'); - - // Add chart type dropdown. - $chart_form->addInput(array('type' => 'combobox', - 'onchange' => 'this.form.submit();', - 'name' => 'type', - 'value' => $cl_type, - 'data' => $types - )); -} - -// Calendar. -$chart_form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar - -// Get data for our chart. -$totals = ttChartHelper::getTotals($user_id, $cl_type, $cl_date, $cl_interval); -$smarty->assign('totals', $totals); - -// Prepare chart for drawing. -/* - * We use libchart.php library to draw chart images. It can draw chart labels, too (embed in the image). - * But quality of such auto-scaled text is not good. Therefore, we only use libchart to draw a pie-chart picture with - * auto-calculated percentage markers around it. We print labels (to the side of the picture) ourselves, - * using the same colors libchart is using. For labels printout, the $totals array (which is used for picture points) - * is also passed to charts.tpl Smarty template. - * - * To make all of the above possible with only one database call to obtain $totals we have to print the chart image - * to a file here (see code below). Once the image is available as a .png file, the charts.tpl can render it. - * - * PieChartEx class is a little extension to libchart-provided PieChart class. It allows us to print the chart - * without title, logo, and labels. - */ -$chart = new PieChartEx(300, 300); -$data_set = new XYDataSet(); -foreach($totals as $total) { - $data_set->addPoint(new Point( $total['name'], $total['time'])); -} -$chart->setDataSet($data_set); - -// Prepare a file name. -$img_dir = TEMPLATE_DIR.'_c/'; // Directory. -$file_name = uniqid('chart_').'.png'; // Short file name. Unique ID here is to avoid problems with browser caching. -$img_ref = 'WEB-INF/templates_c/'.$file_name; // Image reference for html. -$file_name = $img_dir.$file_name; // Full file name. - -// Clean up the file system from older images. -$img_files = glob($img_dir.'chart_*.png'); -if (is_array($img_files)) { - foreach($img_files as $file) { - // If file creation time is older than 1 minute, delete it. - if (filemtime($file) < (time() - 60)) { - unlink($file); - } - } -} - -// Write chart image to file system. -$chart->renderEx(array('fileName'=>$file_name,'hideLogo'=>true,'hideTitle'=>true,'hideLabel'=>true)); -// At this point libchart usage is complete and we have chart image on disk. - -$smarty->assign('img_file_name', $img_ref); -$smarty->assign('chart_selector', $chart_selector); -$smarty->assign('forms', array($chart_form->getName() => $chart_form->toArray())); -$smarty->assign('title', $i18n->get('title.charts')); -$smarty->assign('content_page_name', 'charts.tpl'); -$smarty->display('index.tpl'); diff --git a/clients1.php b/clients1.php deleted file mode 100644 index a299d3061..000000000 --- a/clients1.php +++ /dev/null @@ -1,55 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -if($user->can('manage_clients')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $inactive_clients = ttGroupHelper::getInactiveClients(true); -} else - $active_clients = $user->getAssignedClients(); - -$smarty->assign('active_clients', $active_clients); -$smarty->assign('inactive_clients', $inactive_clients); -$smarty->assign('title', $i18n->get('title.clients')); -$smarty->assign('content_page_name', 'clients.tpl'); -$smarty->display('index.tpl'); diff --git a/default.css b/default.css index 30160902b..595967e64 100644 --- a/default.css +++ b/default.css @@ -515,10 +515,6 @@ div.sitemap-item { } } - - - - /* TODO: below are legacy styles. Review as work on mobile-friendly pages continues. */ a { color: blue; text-decoration: none; } diff --git a/expense_delete1.php b/expense_delete1.php deleted file mode 100644 index 788fb59fa..000000000 --- a/expense_delete1.php +++ /dev/null @@ -1,88 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -// Get the expense item we are deleting. -$expense_item = ttExpenseHelper::getItem($cl_id); -if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { - // Prohibit deleting not ours, approved, or invoiced items. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -if ($request->isPost()) { - if ($request->getParameter('delete_button')) { // Delete button pressed. - - // Determine if it is okay to delete the record. - $item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); - if ($user->isDateLocked($item_date)) - $err->add($i18n->get('error.range_locked')); - - if ($err->no()) { - // Mark the record as deleted. - if (ttExpenseHelper::markDeleted($cl_id)) { - header('Location: expenses.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } - if ($request->getParameter('cancel_button')) { // Cancel button pressed. - header('Location: expenses.php'); - exit(); - } -} // isPost - -$form = new Form('expenseItemForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'submit','name'=>'delete_button','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'cancel_button','value'=>$i18n->get('button.cancel'))); - -$show_project = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); - -$smarty->assign('forms', array($form->getName() => $form->toArray())); -$smarty->assign('expense_item', $expense_item); -$smarty->assign('show_project', $show_project); -$smarty->assign('title', $i18n->get('title.delete_expense')); -$smarty->assign('content_page_name', 'expense_delete.tpl'); -$smarty->display('index.tpl'); diff --git a/expense_edit1.php b/expense_edit1.php deleted file mode 100644 index d8b452d56..000000000 --- a/expense_edit1.php +++ /dev/null @@ -1,243 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -// Get the expense item we are editing. -$expense_item = ttExpenseHelper::getItem($cl_id); -if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { - // Prohibit editing not ours, approved, or invoiced items. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); -$confirm_save = $user->getConfigOption('confirm_save'); -$trackingMode = $user->getTrackingMode(); -$show_project = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; - -// Initialize variables. -$cl_date = $cl_client = $cl_project = $cl_item_name = $cl_cost = null; -if ($request->isPost()) { - $cl_date = trim($request->getParameter('date')); - $cl_client = $request->getParameter('client'); - $cl_project = $request->getParameter('project'); - $cl_item_name = trim($request->getParameter('item_name')); - $cl_cost = trim($request->getParameter('cost')); - if ($user->isPluginEnabled('ps')) - $cl_paid = $request->getParameter('paid'); -} else { - $cl_date = $item_date->toString($user->getDateFormat()); - $cl_client = $expense_item['client_id']; - $cl_project = $expense_item['project_id']; - $cl_item_name = $expense_item['name']; - $cl_cost = $expense_item['cost']; - $cl_paid = $expense_item['paid']; -} - -// Initialize elements of 'expenseItemForm'. -$form = new Form('expenseItemForm'); - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $trackingMode && $user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -if ($show_project) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} -// If predefined expenses are configured, add controls to select an expense and quantity. -$predefined_expenses = ttGroupHelper::getPredefinedExpenses(); -if ($predefined_expenses) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'recalculateCost();', - 'name'=>'predefined_expense', - 'style'=>'width: 250px;', - 'value'=>$cl_predefined_expense, - 'data'=>$predefined_expenses, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity','style'=>'width: 100px;','value'=>$cl_quantity)); -} -$form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); -if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) - $form->addInput(array('type'=>'checkbox','name'=>'paid','value'=>$cl_paid)); -$form->addInput(array('type'=>'datefield','name'=>'date','maxlength'=>'20','value'=>$cl_date)); -// Hidden control for record id. -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save or btn_copy click. -$on_click_action = 'browser_today.value=get_date();'; -$form->addInput(array('type'=>'submit','name'=>'btn_copy','onclick'=>$on_click_action,'value'=>$i18n->get('button.copy'))); -if ($confirm_save) $on_click_action .= 'return(confirmSave());'; -$form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>$on_click_action,'value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - if ($show_project && !$cl_project) - $err->add($i18n->get('error.project')); - if (!ttValidString($cl_item_name)) $err->add($i18n->get('error.field'), $i18n->get('label.item')); - if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); - if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date')); - - // This is a new date for the expense item. - $new_date = new DateAndTime($user->getDateFormat(), $cl_date); - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($new_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating user input. - - // Save record. - if ($request->getParameter('btn_save')) { - // We need to: - // 1) Prohibit updating locked entries (that are in locked range). - // 2) Prohibit saving unlocked entries into locked range. - - // Now, step by step. - // 1) Prohibit saving locked entries in any form. - if ($user->isDateLocked($item_date)) - $err->add($i18n->get('error.range_locked')); - - // 2) Prohibit saving unlocked entries into locked range. - if ($err->no() && $user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // Now, an update. - if ($err->no()) { - if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(DB_DATEFORMAT), - 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'paid'=>$cl_paid))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } - } - } - - // Save as new record. - if ($request->getParameter('btn_copy')) { - // We need to prohibit saving into locked interval. - if ($user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // Now, a new insert. - if ($err->no()) { - if (ttExpenseHelper::insert(array('date'=>$new_date->toString(DB_DATEFORMAT),'client_id'=>$cl_client, - 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } - - if ($request->getParameter('btn_delete')) { - header("Location: expense_delete.php?id=$cl_id"); - exit(); - } -} // isPost - -if ($confirm_save) { - $smarty->assign('confirm_save', true); - $smarty->assign('entry_date', $cl_date); -} -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_project', $show_project); -$smarty->assign('predefined_expenses', $predefined_expenses); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('title', $i18n->get('title.edit_expense')); -$smarty->assign('content_page_name', 'expense_edit.tpl'); -$smarty->display('index.tpl'); diff --git a/expenses1.php b/expenses1.php deleted file mode 100644 index cd930a8b8..000000000 --- a/expenses1.php +++ /dev/null @@ -1,251 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -if (!$user->exists()) { - header('Location: access_denied.php'); // Nobody to enter expenses for. - exit(); -} -if ($user->behalf_id && (!$user->can('track_expenses') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_expenses') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid($request->getParameter('user'))) { - header('Location: access_denied.php'); // Wrong user id on post. - exit(); - } -} -// End of access checks. - -// Determine user for which we display this page. -$userChanged = $request->getParameter('user_changed'); -if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -$tracking_mode = $user->getTrackingMode(); -$show_project = MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode; -$showFiles = $user->isPluginEnabled('at'); - -// Initialize variables. -$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_item_name = $request->getParameter('item_name'); -$cl_cost = $request->getParameter('cost'); - -// Elements of expensesForm. -$form = new Form('expensesForm'); - -if ($user->can('track_expenses')) { - $rank = $user->getMaxRankForGroup($user->getGroup()); - if ($user->can('track_own_expenses')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'this.form.user_changed.value=1;this.form.submit();', - 'name'=>'user', - 'style'=>'width: 250px;', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'))); - $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $tracking_mode && $user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -if ($show_project) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} -// If predefined expenses are configured, add controls to select an expense and quantity. -$predefined_expenses = ttGroupHelper::getPredefinedExpenses(); -if ($predefined_expenses) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'recalculateCost();', - 'name'=>'predefined_expense', - 'style'=>'width: 250px;', - 'value'=>$cl_predefined_expense, - 'data'=>$predefined_expenses, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity','style'=>'width: 100px;','value'=>$cl_quantity)); -} -$form->addInput(array('type'=>'textarea','maxlength'=>'800','name'=>'item_name','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_item_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); -if ($showFiles) - $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); -$form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses','value'=>$cl_date)); // calendar -$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->get('button.submit'))); - -// Submit. -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - if ($show_project && !$cl_project) - $err->add($i18n->get('error.project')); - if (!ttValidString($cl_item_name)) $err->add($i18n->get('error.field'), $i18n->get('label.comment')); - if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating input data. - - // Prohibit creating entries in locked range. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->get('error.range_locked')); - - // Insert record. - if ($err->no()) { - $id = ttExpenseHelper::insert(array('date'=>$cl_date,'client_id'=>$cl_client, - 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1)); - - // Put a new file in storage if we have it. - if ($id && $showFiles && $_FILES['newfile']['name']) { - $fileHelper = new ttFileHelper($err); - $fields = array('entity_type'=>'expense', - 'entity_id' => $id, - 'file_name' => $_FILES['newfile']['name']); - $fileHelper->putFile($fields); - } - - if ($id) { - header('Location: expenses.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } -} - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_project', $show_project); -$smarty->assign('show_files', $showFiles); -$smarty->assign('day_total', ttExpenseHelper::getTotalForDay($cl_date)); -$smarty->assign('expense_items', ttExpenseHelper::getItems($cl_date, $showFiles)); -$smarty->assign('predefined_expenses', $predefined_expenses); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); -$smarty->assign('title', $i18n->get('title.expenses')); -$smarty->assign('content_page_name', 'expenses.tpl'); -$smarty->display('index.tpl'); diff --git a/initialize.php b/initialize.php index 2978e7a1b..f176802f5 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5401"); +define("APP_VERSION", "1.19.23.5402"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/project_add1.php b/project_add1.php deleted file mode 100644 index 5768d5fb5..000000000 --- a/project_add1.php +++ /dev/null @@ -1,118 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$showFiles = $user->isPluginEnabled('at'); -$users = ttGroupHelper::getActiveUsers(); -foreach ($users as $user_item) - $all_users[$user_item['id']] = $user_item['name']; - -$tasks = ttGroupHelper::getActiveTasks(); -foreach ($tasks as $task_item) - $all_tasks[$task_item['id']] = $task_item['name']; -$show_tasks = MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && count($tasks) > 0; - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('project_name')); - $cl_description = trim($request->getParameter('description')); - $cl_users = $request->getParameter('users', array()); - $cl_tasks = $request->getParameter('tasks', array()); -} else { - foreach ($users as $user_item) - $cl_users[] = $user_item['id']; - foreach ($tasks as $task_item) - $cl_tasks[] = $task_item['id']; -} - -$form = new Form('projectForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -if ($showFiles) - $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); -$form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); -if ($show_tasks) - $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); -$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); - - if ($err->no()) { - if (!ttProjectHelper::getProjectByName($cl_name)) { - $id = ttProjectHelper::insert(array('name' => $cl_name, - 'description' => $cl_description, - 'users' => $cl_users, - 'tasks' => $cl_tasks, - 'status' => ACTIVE)); - - // Put a new file in storage if we have it. - if ($id && $showFiles && $_FILES['newfile']['name']) { - $fileHelper = new ttFileHelper($err); - $fields = array('entity_type'=>'project', - 'entity_id' => $id, - 'file_name' => $_FILES['newfile']['name']); - $fileHelper->putFile($fields); - } - if ($id) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); -$smarty->assign('show_files', $showFiles); -$smarty->assign('show_users', count($users) > 0); -$smarty->assign('show_tasks', $show_tasks); -$smarty->assign('title', $i18n->get('title.add_project')); -$smarty->assign('content_page_name', 'project_add.tpl'); -$smarty->display('index.tpl'); diff --git a/project_edit1.php b/project_edit1.php deleted file mode 100644 index e1792e48c..000000000 --- a/project_edit1.php +++ /dev/null @@ -1,136 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_project_id = (int)$request->getParameter('id'); -$project = ttProjectHelper::get($cl_project_id); -if (!$project) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$users = ttGroupHelper::getActiveUsers(); -foreach ($users as $user_item) - $all_users[$user_item['id']] = $user_item['name']; - -$tasks = ttGroupHelper::getActiveTasks(); -foreach ($tasks as $task_item) - $all_tasks[$task_item['id']] = $task_item['name']; -$show_tasks = MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && count($tasks) > 0; - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('project_name')); - $cl_description = trim($request->getParameter('description')); - $cl_status = $request->getParameter('status'); - $cl_users = $request->getParameter('users', array()); - $cl_tasks = $request->getParameter('tasks', array()); -} else { - $cl_name = $project['name']; - $cl_description = $project['description']; - $cl_status = $project['status']; - $cl_users = ttProjectHelper::getAssignedUsers($cl_project_id); - $cl_tasks = explode(',', $project['tasks']); -} - -$form = new Form('projectForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_project_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); -if ($show_tasks) - $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $existing_project = ttProjectHelper::getProjectByName($cl_name); - if (!$existing_project || ($cl_project_id == $existing_project['id'])) { - // Update project information. - if (ttProjectHelper::update(array( - 'id' => $cl_project_id, - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'users' => $cl_users, - 'tasks' => $cl_tasks))) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttProjectHelper::getProjectByName($cl_name)) { - if (ttProjectHelper::insert(array('name' => $cl_name, - 'description' => $cl_description, - 'users' => $cl_users, - 'tasks' => $cl_tasks, - 'status' => ACTIVE))) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); -$smarty->assign('show_users', count($users) > 0); -$smarty->assign('show_tasks', $show_tasks); -$smarty->assign('title', $i18n->get('title.edit_project')); -$smarty->assign('content_page_name', 'project_edit.tpl'); -$smarty->display('index.tpl'); diff --git a/projects1.php b/projects1.php deleted file mode 100644 index 0075c038f..000000000 --- a/projects1.php +++ /dev/null @@ -1,58 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$showFiles = $user->isPluginEnabled('at'); - -if($user->can('manage_projects')) { - $active_projects = ttGroupHelper::getActiveProjects($showFiles); - $inactive_projects = ttGroupHelper::getInactiveProjects($showFiles); -} else { - $options['include_files'] = $showFiles; - $active_projects = $user->getAssignedProjects($options); -} - -$smarty->assign('active_projects', $active_projects); -$smarty->assign('inactive_projects', $inactive_projects); -$smarty->assign('show_files', $showFiles); -$smarty->assign('title', $i18n->get('title.projects')); -$smarty->assign('content_page_name', 'projects.tpl'); -$smarty->display('index.tpl'); diff --git a/task_add1.php b/task_add1.php deleted file mode 100644 index 078bd5ca1..000000000 --- a/task_add1.php +++ /dev/null @@ -1,89 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_description = trim($request->getParameter('description')); - $cl_projects = $request->getParameter('projects'); -} else { - foreach ($projects as $project_item) - $cl_projects[] = $project_item['id']; -} - -$form = new Form('taskForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -$form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - - if ($err->no()) { - if (!ttTaskHelper::getTaskByName($cl_name)) { - if (ttTaskHelper::insert(array( - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => ACTIVE, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_projects', count($projects) > 0); -$smarty->assign('onload', 'onLoad="document.taskForm.name.focus()"'); -$smarty->assign('title', $i18n->get('title.add_task')); -$smarty->assign('content_page_name', 'task_add.tpl'); -$smarty->display('index.tpl'); diff --git a/task_edit1.php b/task_edit1.php deleted file mode 100644 index 10410c4b3..000000000 --- a/task_edit1.php +++ /dev/null @@ -1,122 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_task_id = (int)$request->getParameter('id'); -$task = ttTaskHelper::get($cl_task_id); -if (!$task) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_description = trim($request->getParameter('description')); - $cl_status = $request->getParameter('status'); - $cl_projects = $request->getParameter('projects'); -} else { - $cl_name = $task['name']; - $cl_description = $task['description']; - $cl_status = $task['status']; - $assigned_projects = ttTaskHelper::getAssignedProjects($cl_task_id); - foreach ($assigned_projects as $project_item) - $cl_projects[] = $project_item['id']; -} - -$form = new Form('taskForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_task_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $existing_task = ttTaskHelper::getTaskByName($cl_name); - if (!$existing_task || ($cl_task_id == $existing_task['id'])) { - // Update task information. - if (ttTaskHelper::update(array( - 'task_id' => $cl_task_id, - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttTaskHelper::getTaskByName($cl_name)) { - if (ttTaskHelper::insert(array( - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_projects', count($projects) > 0); -$smarty->assign('title', $i18n->get('title.edit_task')); -$smarty->assign('content_page_name', 'task_edit.tpl'); -$smarty->display('index.tpl'); diff --git a/tasks1.php b/tasks1.php deleted file mode 100644 index 2e13ead5c..000000000 --- a/tasks1.php +++ /dev/null @@ -1,77 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$config = $user->getConfigHelper(); - -if ($request->isPost()) { - $cl_task_required = $request->getParameter('task_required'); -} else { - $cl_task_required = $config->getDefinedValue('task_required'); -} - -if($user->can('manage_tasks')) { - $active_tasks = ttGroupHelper::getActiveTasks(); - $inactive_tasks = ttGroupHelper::getInactiveTasks(); -} else - $active_tasks = $user->getAssignedTasks(); - -$form = new Form('tasksForm'); -$form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_save')) { - // Save button clicked. Update config. - $config->setDefinedValue('task_required', $cl_task_required); - if (!$user->updateGroup(array('config' => $config->getConfig()))) { - $err->add($i18n->get('error.db')); - } - } -} - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('active_tasks', $active_tasks); -$smarty->assign('inactive_tasks', $inactive_tasks); -$smarty->assign('title', $i18n->get('title.tasks')); -$smarty->assign('content_page_name', 'tasks.tpl'); -$smarty->display('index.tpl'); diff --git a/time1.php b/time1.php deleted file mode 100644 index b249f05b7..000000000 --- a/time1.php +++ /dev/null @@ -1,506 +0,0 @@ -behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { - header('Location: access_denied.php'); // User changed, but no right or wrong user id. - exit(); - } -} -// End of access checks. - -// Determine user for whom we display this page. -if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -$group_id = $user->getGroup(); -$config = new ttConfigHelper($user->getConfig()); - -$showClient = $user->isPluginEnabled('cl'); -$showBillable = $user->isPluginEnabled('iv'); -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); -$recordType = $user->getRecordType(); -$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; -$showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; -$showFiles = $user->isPluginEnabled('at'); -$showRecordCustomFields = $user->isOptionEnabled('record_custom_fields'); - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -$showNoteColumn = !$config->getDefinedValue('time_note_on_separate_row'); -$showNoteRow = $config->getDefinedValue('time_note_on_separate_row'); -if ($showNoteRow) { - // Determine column span for note field. - $colspan = 0; - if ($showClient) $colspan++; - if ($showRecordCustomFields && $custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $colspan++; - } - } - if ($showProject) $colspan++; - if ($showTask) $colspan++; - if ($showStart) $colspan++; - if ($showFinish) $colspan++; - $colspan++; // There is always a duration. - if ($showFiles) $colspan++; - $colspan++; // There is always an edit column. - // $colspan++; // There is always a delete column. - // $colspan--; // Remove one column for label. - $smarty->assign('colspan', $colspan); -} - -if ($user->isPluginEnabled('mq')){ - require_once('plugins/MonthlyQuota.class.php'); - $quota = new MonthlyQuota(); - $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth); - $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date); - $month_total = ttTimeHelper::getTimeForMonth($selected_date); - $month_total_minutes = ttTimeHelper::toMinutes($month_total); - $balance_left = $quota_minutes_from_1st - $month_total_minutes; - $minutes_left = $month_quota_minutes - $month_total_minutes; - - $smarty->assign('month_total', $month_total); - $smarty->assign('month_quota', ttTimeHelper::toAbsDuration($month_quota_minutes)); - $smarty->assign('over_balance', $balance_left < 0); - $smarty->assign('balance_remaining', ttTimeHelper::toAbsDuration($balance_left)); - $smarty->assign('over_quota', $minutes_left < 0); - $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); -} - -// Initialize variables. -$cl_start = trim($request->getParameter('start')); -$cl_finish = trim($request->getParameter('finish')); -$cl_duration = trim($request->getParameter('duration')); -$cl_note = trim($request->getParameter('note')); -$cl_billable = 1; -if ($showBillable) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; -} -$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); -$_SESSION['task'] = $cl_task; - -// Handle time custom fields. -$timeCustomFields = array(); -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); - $_SESSION[$control_name] = $cl_control_name; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($cl_control_name)); - } -} - -// Elements of timeRecordForm. -$form = new Form('timeRecordForm'); - -// Dropdown for user and a hidden control to indicate user change. -if ($user->can('track_time')) { - $rank = $user->getMaxRankForGroup($group_id); - if ($user->can('track_own_time')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'document.timeRecordForm.user_changed.value=1;document.timeRecordForm.submit();', - 'name'=>'user', - 'style'=>'width: 250px;', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'))); - $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Dropdown for clients in MODE_TIME. Use all active clients. -// Note: for other tracking modes the control is added further below. -if (MODE_TIME == $trackingMode && $showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -// Billable checkbox. -if ($showBillable) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); - -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -// If we show project dropdown, add controls for project and client. -if ($showProject) { - // Dropdown for projects assigned to user. - $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); - $project_list = $user->getAssignedProjects($options); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);fillTemplateDropdown(this.value);prepopulateNote();', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Client dropdown. - if ($showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} - -// Task dropdown. -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'style'=>'width: 250px;', - 'value'=>$cl_task, - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -} - -// Start and finish controls. -if ($showStart) { - $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); - $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode && !$user->canOverridePunchMode()) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); - } -} - -// Duration control. -if ($showDuration) - $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); - -// File upload control. -if ($showFiles) - $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); - -// If we have templates, add a dropdown to select one. -if ($user->isPluginEnabled('tp')){ - $template_list = ttGroupHelper::getActiveTemplates(); - if (count($template_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillNote(this.value);', - 'name'=>'template', - 'style'=>'width: 250px;', - 'data'=>$template_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $smarty->assign('template_dropdown', 1); - $smarty->assign('bind_templates_with_projects', $config->getDefinedValue('bind_templates_with_projects')); - $smarty->assign('prepopulate_note', $config->getDefinedValue('prepopulate_note')); - $smarty->assign('template_list', $template_list); - } -} - -// Note control. -if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); -$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); - -// Calendar. -$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. - -// Submit button. -$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Submit button clicked. - // Validate user input. - if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($timeCustomFields as $timeField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); - } - } - if ($showProject) { - if (!$cl_project) $err->add($i18n->get('error.project')); - } - if ($showTask && $taskRequired) { - if (!$cl_task) $err->add($i18n->get('error.task')); - } - if (strlen($cl_duration) == 0) { - if ($cl_start || $cl_finish) { - if (!ttTimeHelper::isValidTime($cl_start)) - $err->add($i18n->get('error.field'), $i18n->get('label.start')); - if ($cl_finish) { - if (!ttTimeHelper::isValidTime($cl_finish)) - $err->add($i18n->get('error.field'), $i18n->get('label.finish')); - if (!ttTimeHelper::isValidInterval($cl_start, $cl_finish)) - $err->add($i18n->get('error.interval'), $i18n->get('label.finish'), $i18n->get('label.start')); - } - } else { - if ($showStart) { - $err->add($i18n->get('error.empty'), $i18n->get('label.start')); - $err->add($i18n->get('error.empty'), $i18n->get('label.finish')); - } - if ($showDuration) - $err->add($i18n->get('error.empty'), $i18n->get('label.duration')); - } - } else { - if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) - $err->add($i18n->get('error.field'), $i18n->get('label.duration')); - } - if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note')); - if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { - $err->add($i18n->get('error.field'), $i18n->get('label.note')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating user input. - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - - // Prohibit creating entries in locked range. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->get('error.range_locked')); - - // Prohibit creating another uncompleted record. - if ($err->no()) { - if (($not_completed_rec = ttTimeHelper::getUncompleted($user_id)) && (($cl_finish == '') && ($cl_duration == ''))) - $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); - } - - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user_id, $cl_date, $cl_start, $cl_finish)) - $err->add($i18n->get('error.overlap')); - } - - // Insert record. - if ($err->no()) { - $id = ttTimeHelper::insert(array( - 'date' => $cl_date, - 'client' => $cl_client, - 'project' => $cl_project, - 'task' => $cl_task, - 'start' => $cl_start, - 'finish' => $cl_finish, - 'duration' => $cl_duration, - 'note' => $cl_note, - 'billable' => $cl_billable)); - - // Insert time custom fields if we have them. - $result = true; - if ($id && $custom_fields && $custom_fields->timeFields) { - $result = $custom_fields->insertTimeFields($id, $timeCustomFields); - } - - // Put a new file in storage if we have it. - if ($id && $showFiles && $_FILES['newfile']['name']) { - $fileHelper = new ttFileHelper($err); - $fields = array('entity_type'=>'time', - 'entity_id' => $id, - 'file_name' => $_FILES['newfile']['name']); - $fileHelper->putFile($fields); - } - - if ($id && $result && $err->no()) { - header('Location: time.php'); - exit(); - } - $err->add($i18n->get('error.db')); - } - } elseif ($request->getParameter('btn_stop')) { - // Stop button pressed to finish an uncompleted record. - $record_id = $request->getParameter('record_id'); - $record = ttTimeHelper::getRecord($record_id); - $browser_date = $request->getParameter('browser_date'); - $browser_time = $request->getParameter('browser_time'); - - // Can we complete this record? - if ($record['date'] == $browser_date // closing today's record - && ttTimeHelper::isValidInterval($record['start'], $browser_time) // finish time is greater than start time - && !ttTimeHelper::overlaps($user_id, $browser_date, $record['start'], $browser_time)) { // no overlap - $res = ttTimeHelper::update(array( - 'id'=>$record['id'], - 'date'=>$record['date'], - 'client'=>$record['client_id'], - 'project'=>$record['project_id'], - 'task'=>$record['task_id'], - 'start'=>$record['start'], - 'finish'=>$browser_time, - 'note'=>$record['comment'], - 'billable'=>$record['billable'])); - if (!$res) - $err->add($i18n->get('error.db')); - } else { - // Cannot complete, redirect for manual edit. - header('Location: time_edit.php?id='.$record_id); - exit(); - } - } -} // isPost - -$week_total = ttTimeHelper::getTimeForWeek($selected_date); -$timeRecords = ttTimeHelper::getRecords($cl_date, $showFiles); - -$smarty->assign('selected_date', $selected_date); -$smarty->assign('week_total', $week_total); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); -$smarty->assign('time_records', $timeRecords); -$smarty->assign('show_record_custom_fields', $showRecordCustomFields); -$smarty->assign('show_navigation', $user->isPluginEnabled('wv') && !$user->isOptionEnabled('week_menu')); -$smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('task_required', $taskRequired); -$smarty->assign('show_start', $showStart); -$smarty->assign('show_duration', $showDuration); -$smarty->assign('show_note_column', $showNoteColumn); -$smarty->assign('show_note_row', $showNoteRow); -$smarty->assign('show_files', $showFiles); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns();prepopulateNote();"'); -$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); -$smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'time.tpl'); -$smarty->display('index.tpl'); diff --git a/user_add1.php b/user_add1.php deleted file mode 100644 index b7c2bc7a6..000000000 --- a/user_add1.php +++ /dev/null @@ -1,244 +0,0 @@ -isPluginEnabled('mq'); -if ($user->isPluginEnabled('cl')) - $clients = ttGroupHelper::getActiveClients(); - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -$assigned_projects = array(); -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_login = trim($request->getParameter('login')); - if (!$auth->isPasswordExternal()) { - $cl_password1 = $request->getParameter('pas1'); - $cl_password2 = $request->getParameter('pas2'); - } - $cl_email = trim($request->getParameter('email')); - $cl_role_id = $request->getParameter('role'); - $cl_client_id = $request->getParameter('client'); - $cl_quota_percent = $request->getParameter('quota_percent'); - // If we have user custom fields - collect input. - if ($custom_fields && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $control_name = 'user_field_'.$userField['id']; - $userCustomFields[$userField['id']] = array('field_id' => $userField['id'], - 'control_name' => $control_name, - 'label' => $userField['label'], - 'type' => $userField['type'], - 'required' => $userField['required'], - 'value' => trim($request->getParameter($control_name))); - } - } - $cl_rate = $request->getParameter('rate'); - $cl_projects = $request->getParameter('projects'); - if (is_array($cl_projects)) { - foreach ($cl_projects as $p) { - if (ttValidFloat($request->getParameter('rate_'.$p), true)) { - $project_with_rate = array(); - $project_with_rate['id'] = $p; - $project_with_rate['rate'] = $request->getParameter('rate_'.$p); - $assigned_projects[] = $project_with_rate; - } else - $err->add($i18n->get('error.field'), 'rate_'.$p); - } - } -} - -$form = new Form('userForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 300px;','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;','value'=>$cl_login)); -if (!$auth->isPasswordExternal()) { - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1)); - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); - -$active_roles = ttTeamHelper::getActiveRolesForUser(); -$form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','name'=>'role','value'=>$cl_role_id,'data'=>$active_roles,'datakeys'=>array('id', 'name'))); -if ($user->isPluginEnabled('cl')) - $form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->get('dropdown.select')))); - -// If we have custom fields - add controls for them. -if ($custom_fields && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $field_name = 'user_field_'.$userField['id']; - if ($userField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$userCustomFields[$userField['id']]['value'])); - } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($userField['id']), - 'value'=>$userCustomFields[$userField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); -if ($show_quota) - $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'quota_percent','format'=>'.2','value'=>$cl_quota_percent)); - -$show_projects = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); -if ($show_projects) { - $projects = ttGroupHelper::getActiveProjects(); - if (count($projects) == 0) $show_projects = false; -} - -// Define classes for the projects table. -class NameCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200)); - $this->setValue(''); - return $this->toString(); - } -} -class RateCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $assigned_projects; - $field = new FloatField('rate_'.$table->getValueAtName($row, 'id')); - $field->setFormName($table->getFormName()); - $field->setSize(5); - $field->setFormat('.2'); - foreach ($assigned_projects as $p) { - if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']); - } - $this->setValue($field->getHtml()); - return $this->toString(); - } -} -// Create projects table. -$table = new Table('projects'); -$table->setIAScript('setDefaultRate'); -$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); -$table->setData($projects); -$table->setKeyField('id'); -$table->setValue($cl_projects); -$table->addColumn(new TableColumn('name', $i18n->get('label.project'), new NameCellRenderer())); -$table->addColumn(new TableColumn('p_rate', $i18n->get('form.users.rate'), new RateCellRenderer())); -$form->addInputElement($table); - -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.person_name')); - if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); - if (!$auth->isPasswordExternal()) { - if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); - if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); - } - if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); - // Require selection of a client for a client role. - if ($user->isPluginEnabled('cl') && ttRoleHelper::isClientRole($cl_role_id) && !$cl_client_id) $err->add($i18n->get('error.client')); - if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); - // Validate input in user custom fields. - if ($custom_fields && $custom_fields->userFields) { - foreach ($userCustomFields as $userField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($userField['value'], !$userField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($userField['label'])); - } - } - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->get('error.field'), $i18n->get('form.users.default_rate')); - if (!ttUserHelper::canAdd()) $err->add($i18n->get('error.user_count')); - - if ($err->no()) { - if (!ttUserHelper::getUserByLogin($cl_login)) { - $fields = array( - 'name' => $cl_name, - 'login' => $cl_login, - 'password' => $cl_password1, - 'rate' => $cl_rate, - 'quota_percent' => $cl_quota_percent, - 'group_id' => $user->getGroup(), - 'org_id' => $user->org_id, - 'role_id' => $cl_role_id, - 'client_id' => $cl_client_id, - 'projects' => $assigned_projects, - 'email' => $cl_email); - $user_id = ttUserHelper::insert($fields); - - // Insert user custom fields if we have them. - $result = true; - if ($user_id && $custom_fields && $custom_fields->userFields) { - $result = $custom_fields->insertEntityFields(CustomFields::ENTITY_USER, $user_id, $userCustomFields); - } - - if ($user_id && $result) { - if (!$user->exists()) { - // We added a user to an empty subgroup. Set new user as on behalf user. - // Needed for user-based things to work (such as notifications config). - $user->setOnBehalfUser($user_id); - } - header('Location: users.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.user_exists')); - } -} // isPost - -$smarty->assign('auth_external', $auth->isPasswordExternal()); -$smarty->assign('active_roles', $active_roles); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"'); -$smarty->assign('show_quota', $show_quota); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('title', $i18n->get('title.add_user')); -$smarty->assign('content_page_name', 'user_add.tpl'); -$smarty->display('index.tpl'); diff --git a/user_edit1.php b/user_edit1.php deleted file mode 100644 index d74ae2785..000000000 --- a/user_edit1.php +++ /dev/null @@ -1,308 +0,0 @@ -getParameter('id'); -$user_details = $user->getUserDetails($user_id); -if (!$user_details) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$show_quota = $user->isPluginEnabled('mq'); -if ($user->isPluginEnabled('cl')) - $clients = ttGroupHelper::getActiveClients(); - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -$show_projects = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); -if ($show_projects) { - $projects = ttGroupHelper::getActiveProjects(); - if (count($projects) == 0) $show_projects = false; -} -$assigned_projects = array(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_login = trim($request->getParameter('login')); - if (!$auth->isPasswordExternal()) { - $cl_password1 = $request->getParameter('pas1'); - $cl_password2 = $request->getParameter('pas2'); - } - $cl_email = trim($request->getParameter('email')); - $cl_role_id = $request->getParameter('role'); - $cl_client_id = $request->getParameter('client'); - $cl_status = $request->getParameter('status'); - $cl_quota_percent = $request->getParameter('quota_percent'); - // If we have user custom fields - collect input. - if ($custom_fields && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $control_name = 'user_field_'.$userField['id']; - $userCustomFields[$userField['id']] = array('field_id' => $userField['id'], - 'control_name' => $control_name, - 'label' => $userField['label'], - 'type' => $userField['type'], - 'required' => $userField['required'], - 'value' => trim($request->getParameter($control_name))); - } - } - $cl_rate = $request->getParameter('rate'); - $cl_projects = $request->getParameter('projects'); - if (is_array($cl_projects)) { - foreach ($cl_projects as $p) { - if (ttValidFloat($request->getParameter('rate_'.$p), true)) { - $project_with_rate = array(); - $project_with_rate['id'] = $p; - $project_with_rate['rate'] = $request->getParameter('rate_'.$p); - $assigned_projects[] = $project_with_rate; - } else - $err->add($i18n->get('error.field'), 'rate_'.$p); - } - } -} else { - $cl_name = $user_details['name']; - $cl_login = $user_details['login']; - $cl_email = $user_details['email']; - $cl_quota_percent = str_replace('.', $user->getDecimalMark(), $user_details['quota_percent']); - // If we have user custom fields - collect values from database. - if ($custom_fields && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $control_name = 'user_field_'.$userField['id']; - $userCustomFields[$userField['id']] = array('field_id' => $userField['id'], - 'control_name' => $control_name, - 'label' => $userField['label'], - 'type' => $userField['type'], - 'required' => $userField['required'], - 'value' => $custom_fields->getEntityFieldValue(CustomFields::ENTITY_USER, $user_id, $userField['id'], $userField['type'])); - } - } - $cl_rate = str_replace('.', $user->getDecimalMark(), $user_details['rate']); - $cl_role_id = $user_details['role_id']; - $cl_client_id = $user_details['client_id']; - $cl_status = $user_details['status']; - $cl_projects = array(); - $assigned_projects = ttProjectHelper::getAssignedProjects($user_id); - foreach($assigned_projects as $p) { - $cl_projects[] = $p['id']; - } -} - -$form = new Form('userForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 300px;','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;','value'=>$cl_login)); -if (!$auth->isPasswordExternal()) { - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1)); - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','style'=>'width: 300px;','value'=>$cl_email)); - -$active_roles = ttTeamHelper::getActiveRolesForUser(); -$form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','name'=>'role','value'=>$cl_role_id,'data'=>$active_roles, 'datakeys'=>array('id', 'name'))); -if ($user->isPluginEnabled('cl')) - $form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->get('dropdown.select')))); - -// If we have custom fields - add controls for them. -if ($custom_fields && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $field_name = 'user_field_'.$userField['id']; - if ($userField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$userCustomFields[$userField['id']]['value'])); - } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($userField['id']), - 'value'=>$userCustomFields[$userField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); -if ($show_quota) - $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'quota_percent','format'=>'.2','value'=>$cl_quota_percent)); - -// Define classes for the projects table. -class NameCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200)); - $this->setValue(''); - return $this->toString(); - } -} -class RateCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $assigned_projects; - - $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); - $field->setFormName($table->getFormName()); - $field->setSize(5); - $field->setFormat('.2'); - foreach ($assigned_projects as $p) { - if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']); - } - $this->setValue($field->getHtml()); - return $this->toString(); - } -} -// Create projects table. -$table = new Table('projects'); -$table->setIAScript('setRate'); -$table->setTableOptions(array('width'=>'300','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); -$table->setData($projects); -$table->setKeyField('id'); -$table->setValue($cl_projects); -$table->addColumn(new TableColumn('name', $i18n->get('label.project'), new NameCellRenderer())); -$table->addColumn(new TableColumn('p_rate', $i18n->get('form.users.rate'), new RateCellRenderer())); -$form->addInputElement($table); - -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$user_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.save'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.person_name')); - if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); - if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { - if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); - if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); - } - if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); - // Require selection of a client for a client role. - if ($user->isPluginEnabled('cl') && ttRoleHelper::isClientRole($cl_role_id) && !$cl_client_id) $err->add($i18n->get('error.client')); - if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); - // Validate input in user custom fields. - if ($custom_fields && $custom_fields->userFields) { - foreach ($userCustomFields as $userField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($userField['value'], !$userField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($userField['label'])); - } - } - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->get('error.field'), $i18n->get('form.users.default_rate')); - - if ($err->no()) { - $existing_user = ttUserHelper::getUserByLogin($cl_login); - if (!$existing_user || ($user_id == $existing_user['id'])) { - - $fields = array( - 'name' => $cl_name, - 'login' => $cl_login, - 'password' => $cl_password1, - 'email' => $cl_email, - 'status' => $cl_status, - 'rate' => $cl_rate, - 'quota_percent' => $cl_quota_percent, - 'projects' => $assigned_projects); - if (in_array('manage_users', $user->rights) && $cl_role_id) { - $fields['role_id'] = $cl_role_id; - $fields['client_id'] = $cl_client_id; - } - - $result = ttUserHelper::update($user_id, $fields); - // Update user custom fields if we have them. - if ($result && $custom_fields && $custom_fields->userFields) { - $result = $custom_fields->updateEntityFields(CustomFields::ENTITY_USER, $user_id, $userCustomFields); - } - - if ($result) { - // If our own login changed, set new one in cookie to remember it. - if (($user_id == $user->id) && ($user->login != $cl_login)) { - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - } - - // In case the name of the "on behalf" user has changed - set it in session. - if (($user->behalf_id == $user_id) && ($user->behalf_name != $cl_name)) { - $_SESSION['behalf_name'] = $cl_name; - } - - // If we deactivated our own account, do housekeeping and logout. - if ($user->id == $user_id && !is_null($cl_status) && $cl_status == INACTIVE) { - // Remove LOGIN_COOKIE_NAME cookie that stores login name. - unset($_COOKIE[LOGIN_COOKIE_NAME]); - setcookie(LOGIN_COOKIE_NAME, NULL, -1); - - $auth->doLogout(); - header('Location: login.php'); - exit(); - } - - header('Location: users.php'); - exit(); - - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.user_exists')); - } -} // isPost - -$can_swap = false; -if ($user->id == $user_id && $user->can('swap_roles')) { - $users_for_swap = ttTeamHelper::getUsersForSwap(); - if (is_array($users_for_swap) && sizeof($users_for_swap) > 0) - $can_swap = true; -} - -$rates = ttProjectHelper::getRates($user_id); -$smarty->assign('rates', $rates); - -$smarty->assign('auth_external', $auth->isPasswordExternal()); -$smarty->assign('active_roles', $active_roles); -$smarty->assign('can_swap', $can_swap); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"'); -$smarty->assign('show_quota', $show_quota); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('user_id', $user_id); -$smarty->assign('title', $i18n->get('title.edit_user')); -$smarty->assign('content_page_name', 'user_edit.tpl'); -$smarty->display('index.tpl'); diff --git a/users1.php b/users1.php deleted file mode 100644 index 2fbcb5d20..000000000 --- a/users1.php +++ /dev/null @@ -1,69 +0,0 @@ -getMaxRankForGroup($user->getGroup()); -if ($user->can('view_users')) - $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true); -else /* if ($user->can('manage_users')) */ - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true); -$active_users = $user->getUsers($options); - -// Prepare a list of inactive users. -if($user->can('manage_users')) { - $options = array('status'=>INACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_login'=>true,'include_role'=>true); - $inactive_users = $user->getUsers($options); -} - -$uncompleted_indicators = $user->getConfigOption('uncompleted_indicators'); -if ($uncompleted_indicators) { - // Check each active user if they have an uncompleted time entry. - foreach ($active_users as $key => $active_user) { - $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($active_user['id']); - } - $smarty->assign('uncompleted_indicators', true); -} - -$smarty->assign('active_users', $active_users); -$smarty->assign('inactive_users', $inactive_users); -$smarty->assign('show_quota', $user->isPluginEnabled('mq')); -$smarty->assign('title', $i18n->get('title.users')); -$smarty->assign('content_page_name', 'users.tpl'); -$smarty->display('index.tpl'); From ba13f2e7523c2913c1af268ff85e3392657872f0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 18:27:09 +0000 Subject: [PATCH 2077/2515] Made file_edit.php page mobile-friendly. --- WEB-INF/templates/file_edit2.tpl | 22 ++++++ client_edit1.php | 131 ------------------------------- file_edit.php | 36 ++------- initialize.php | 2 +- 4 files changed, 29 insertions(+), 162 deletions(-) create mode 100644 WEB-INF/templates/file_edit2.tpl delete mode 100644 client_edit1.php diff --git a/WEB-INF/templates/file_edit2.tpl b/WEB-INF/templates/file_edit2.tpl new file mode 100644 index 000000000..66f72cc3d --- /dev/null +++ b/WEB-INF/templates/file_edit2.tpl @@ -0,0 +1,22 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.fileForm.open} +
{$totals[i].name|escape}
+ + + + + + + + + + + + + + +
{$forms.fileForm.file_name.control}
{$forms.fileForm.description.control}
{$i18n.label.required_fields}
+
{$forms.fileForm.btn_save.control}
+{$forms.fileForm.close} diff --git a/client_edit1.php b/client_edit1.php deleted file mode 100644 index 7b572ea7c..000000000 --- a/client_edit1.php +++ /dev/null @@ -1,131 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -$client = ttClientHelper::getClient($cl_id, true); -if (!$client) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_address = trim($request->getParameter('address')); - $cl_tax = trim($request->getParameter('tax')); - $cl_status = $request->getParameter('status'); - $cl_projects = $request->getParameter('projects'); -} else { - $cl_name = $client['name']; - $cl_address = $client['address']; - $cl_tax = $client['tax']; - $cl_status = $client['status']; - $assigned_projects = ttClientHelper::getAssignedProjects($cl_id); - foreach($assigned_projects as $project_item) { - $cl_projects[] = $project_item['id']; - } -} - -$show_projects = (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && count($projects) > 0; - -$form = new Form('clientForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'text','name'=>'name','maxlength'=>'100','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address)); -$form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -if ($show_projects) - $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'datakeys'=>array('id','name'),'layout'=>'H','value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.client_name')); - if (!ttValidString($cl_address, true)) $err->add($i18n->get('error.field'), $i18n->get('label.client_address')); - if (!ttValidFloat($cl_tax, true)) $err->add($i18n->get('error.field'), $i18n->get('label.tax')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $client = ttClientHelper::getClientByName($cl_name); - if (($client && ($cl_id == $client['id'])) || !$client) { - if (ttClientHelper::update(array( - 'id' => $cl_id, - 'name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttClientHelper::getClientByName($cl_name)) { - if (ttClientHelper::insert(array('name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('title', $i18n->get('title.edit_client')); -$smarty->assign('content_page_name', 'client_edit.tpl'); -$smarty->display('index.tpl'); diff --git a/file_edit.php b/file_edit.php index d2c8f2990..745293c2e 100644 --- a/file_edit.php +++ b/file_edit.php @@ -1,30 +1,6 @@ addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_file_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'file_name','style'=>'width: 250px;','value'=>$cl_name)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'file_name','value'=>$cl_name)); $form->getElement('file_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()) { @@ -120,5 +96,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fileForm.description.focus()"'); $smarty->assign('title', $i18n->get('title.edit_file')); -$smarty->assign('content_page_name', 'file_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'file_edit2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index f176802f5..0a7d91412 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5402"); +define("APP_VERSION", "1.19.23.5403"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From b72b5fbd56be8cede708844df1fc9d19ce5e84d2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 19:46:03 +0000 Subject: [PATCH 2078/2515] Made file_delete.php mobile-friendly. --- WEB-INF/templates/file_delete2.tpl | 7 +++++++ file_delete.php | 32 ++++-------------------------- initialize.php | 2 +- 3 files changed, 12 insertions(+), 29 deletions(-) create mode 100644 WEB-INF/templates/file_delete2.tpl diff --git a/WEB-INF/templates/file_delete2.tpl b/WEB-INF/templates/file_delete2.tpl new file mode 100644 index 000000000..80abe01ce --- /dev/null +++ b/WEB-INF/templates/file_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.fileDeleteForm.open} +
{$file_to_delete|escape}
+
{$forms.fileDeleteForm.btn_delete.control} {$forms.fileDeleteForm.btn_cancel.control}
+{$forms.fileDeleteForm.close} diff --git a/file_delete.php b/file_delete.php index ff56f118b..1b415c19b 100644 --- a/file_delete.php +++ b/file_delete.php @@ -1,30 +1,6 @@ assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fileDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_file')); -$smarty->assign('content_page_name', 'file_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'file_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 0a7d91412..a863d270f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5403"); +define("APP_VERSION", "1.19.23.5404"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 509a401638a0eaba661196cc38e0b3159e71db7c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 20:36:33 +0000 Subject: [PATCH 2079/2515] Cleanup: removed no longer used templates. --- WEB-INF/templates/charts.tpl | 37 ---- WEB-INF/templates/client_add.tpl | 37 ---- WEB-INF/templates/client_delete.tpl | 25 --- WEB-INF/templates/client_edit.tpl | 41 ----- WEB-INF/templates/clients.tpl | 74 -------- WEB-INF/templates/entity_files.tpl | 47 ------ WEB-INF/templates/expense_delete.tpl | 39 ----- WEB-INF/templates/expense_edit.tpl | 189 --------------------- WEB-INF/templates/expenses.tpl | 241 --------------------------- WEB-INF/templates/file_delete.tpl | 18 -- WEB-INF/templates/file_edit.tpl | 29 ---- WEB-INF/templates/project_add.tpl | 49 ------ WEB-INF/templates/project_delete.tpl | 18 -- WEB-INF/templates/project_edit.tpl | 47 ------ WEB-INF/templates/projects.tpl | 114 ------------- WEB-INF/templates/swap_roles.tpl | 15 -- WEB-INF/templates/task_add.tpl | 36 ---- WEB-INF/templates/task_delete.tpl | 20 --- WEB-INF/templates/task_edit.tpl | 40 ----- WEB-INF/templates/tasks.tpl | 96 ----------- WEB-INF/templates/time.tpl | 234 -------------------------- WEB-INF/templates/user_add.tpl | 134 --------------- WEB-INF/templates/user_delete.tpl | 20 --- WEB-INF/templates/user_edit.tpl | 168 ------------------- WEB-INF/templates/users.tpl | 121 -------------- expense_files.php | 34 +--- initialize.php | 2 +- project_files.php | 34 +--- timesheet_delete.php | 28 +--- timesheet_files.php | 34 +--- 30 files changed, 18 insertions(+), 2003 deletions(-) delete mode 100644 WEB-INF/templates/charts.tpl delete mode 100644 WEB-INF/templates/client_add.tpl delete mode 100644 WEB-INF/templates/client_delete.tpl delete mode 100644 WEB-INF/templates/client_edit.tpl delete mode 100644 WEB-INF/templates/clients.tpl delete mode 100644 WEB-INF/templates/entity_files.tpl delete mode 100644 WEB-INF/templates/expense_delete.tpl delete mode 100644 WEB-INF/templates/expense_edit.tpl delete mode 100644 WEB-INF/templates/expenses.tpl delete mode 100644 WEB-INF/templates/file_delete.tpl delete mode 100644 WEB-INF/templates/file_edit.tpl delete mode 100644 WEB-INF/templates/project_add.tpl delete mode 100644 WEB-INF/templates/project_delete.tpl delete mode 100644 WEB-INF/templates/project_edit.tpl delete mode 100644 WEB-INF/templates/projects.tpl delete mode 100644 WEB-INF/templates/swap_roles.tpl delete mode 100644 WEB-INF/templates/task_add.tpl delete mode 100644 WEB-INF/templates/task_delete.tpl delete mode 100644 WEB-INF/templates/task_edit.tpl delete mode 100644 WEB-INF/templates/tasks.tpl delete mode 100644 WEB-INF/templates/time.tpl delete mode 100644 WEB-INF/templates/user_add.tpl delete mode 100644 WEB-INF/templates/user_delete.tpl delete mode 100644 WEB-INF/templates/user_edit.tpl delete mode 100644 WEB-INF/templates/users.tpl diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl deleted file mode 100644 index 8e05e1985..000000000 --- a/WEB-INF/templates/charts.tpl +++ /dev/null @@ -1,37 +0,0 @@ -

-{$forms.chartForm.open} - - -{if $user_dropdown} - - {if $chart_selector} - - {/if} -{else} - {if $chart_selector} - - {/if} -{/if} - - -
{$i18n.label.user}: {$forms.chartForm.user.control}{$i18n.form.charts.chart}: {$forms.chartForm.type.control}{$i18n.form.charts.chart}: {$forms.chartForm.type.control}
- - - - - -
- - {section name=i loop=$totals} - {if $smarty.section.i.index <= 12} - - {/if} - {/section} -
{$totals[i].name|escape}
-
-

- - - -
{$i18n.form.charts.interval}: {$forms.chartForm.interval.control}
{$forms.chartForm.date.control}
-{$forms.chartForm.close} diff --git a/WEB-INF/templates/client_add.tpl b/WEB-INF/templates/client_add.tpl deleted file mode 100644 index db10ede45..000000000 --- a/WEB-INF/templates/client_add.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{$forms.clientForm.open} - - - - -
- - - - - - - - - - - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - -
{$i18n.label.client_name} (*):{$forms.clientForm.name.control}
{$i18n.label.client_address}:{$forms.clientForm.address.control}
{$i18n.label.tax}, %:{$forms.clientForm.tax.control} (0{$user->getDecimalMark()}00)
{$i18n.label.required_fields}
 
{$i18n.label.projects}:{$forms.clientForm.projects.control}
 
{$forms.clientForm.btn_submit.control}
-
-{$forms.clientForm.close} diff --git a/WEB-INF/templates/client_delete.tpl b/WEB-INF/templates/client_delete.tpl deleted file mode 100644 index f40b94c12..000000000 --- a/WEB-INF/templates/client_delete.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{$forms.clientDeleteForm.open} - - - - -
- - - - - - - - - - - - - - - - -
{$i18n.form.client.client_to_delete}:{$client_to_delete|escape}
{$i18n.form.client.client_entries}:{$forms.clientDeleteForm.delete_client_entries.control}
 
{$forms.clientDeleteForm.btn_delete.control}  {$forms.clientDeleteForm.btn_cancel.control}
-
-{$forms.clientDeleteForm.close} diff --git a/WEB-INF/templates/client_edit.tpl b/WEB-INF/templates/client_edit.tpl deleted file mode 100644 index 2abf70dc1..000000000 --- a/WEB-INF/templates/client_edit.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{$forms.clientForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - -{if $show_projects} - - - - -{/if} - - - - -
{$i18n.label.client_name} (*):{$forms.clientForm.name.control}
{$i18n.label.client_address}:{$forms.clientForm.address.control}
{$i18n.label.tax}, %:{$forms.clientForm.tax.control} (0{$user->getDecimalMark()}00)
{$i18n.label.status}:{$forms.clientForm.status.control}
{$i18n.label.required_fields}
 
{$i18n.label.projects}:{$forms.clientForm.projects.control}
 
{$forms.clientForm.btn_save.control} {$forms.clientForm.btn_copy.control}
-
-{$forms.clientForm.close} diff --git a/WEB-INF/templates/clients.tpl b/WEB-INF/templates/clients.tpl deleted file mode 100644 index 07b835c87..000000000 --- a/WEB-INF/templates/clients.tpl +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - -
-{if $user->can('manage_clients')} - - {if $inactive_clients} - - {/if} - - - - - - - {foreach $active_clients as $client} - - - - - - - {/foreach} -
{$i18n.form.clients.active_clients}
{$i18n.label.person_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - -

- - {if $inactive_clients} - - - - - - - - - {foreach $inactive_clients as $client} - - - - - - - {/foreach} -
{$i18n.form.clients.inactive_clients}
{$i18n.label.person_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - -

- {/if} -{else} - - - - - - {if $active_clients} - {foreach $active_clients as $client} - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.address}
{$client.name|escape}{$client.address|escape}
-{/if} -
diff --git a/WEB-INF/templates/entity_files.tpl b/WEB-INF/templates/entity_files.tpl deleted file mode 100644 index ab9564852..000000000 --- a/WEB-INF/templates/entity_files.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - - - -
- - - - -{if $can_edit} - - -{/if} - -{if $files} - {foreach $files as $file} - - - - {if $can_edit} - - - {/if} - - {/foreach} -{/if} -
{$i18n.label.thing_name}{$i18n.label.description}
{$file.name|escape}{$file.description|escape}{$i18n.label.edit}{$i18n.label.delete}
-
- -{if $can_edit} -{$forms.fileUploadForm.open} - - - - -
- - - - - - - -
{$i18n.label.description}:{$forms.fileUploadForm.description.control}{$forms.fileUploadForm.newfile.control}
{$forms.fileUploadForm.btn_submit.control}
-
-{$forms.fileUploadForm.close} -{/if} diff --git a/WEB-INF/templates/expense_delete.tpl b/WEB-INF/templates/expense_delete.tpl deleted file mode 100644 index 6e5bf12c8..000000000 --- a/WEB-INF/templates/expense_delete.tpl +++ /dev/null @@ -1,39 +0,0 @@ -{$forms.expenseItemForm.open} - - - - -
- - -{if $user->isPluginEnabled('cl')} - -{/if} - -{if $show_project} - -{/if} - - - - -{if $user->isPluginEnabled('cl')} - -{/if} -{if $show_project} - -{/if} - - - -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.item}{$i18n.label.cost}
{$expense_item.client_name|escape}{$expense_item.project_name|escape}{$expense_item.name|escape}{$expense_item.cost}
- - - - - - - -
 
{$forms.expenseItemForm.delete_button.control}  {$forms.expenseItemForm.cancel_button.control}
-
-{$forms.expenseItemForm.close} diff --git a/WEB-INF/templates/expense_edit.tpl b/WEB-INF/templates/expense_edit.tpl deleted file mode 100644 index 671e868cf..000000000 --- a/WEB-INF/templates/expense_edit.tpl +++ /dev/null @@ -1,189 +0,0 @@ - - -{$forms.expenseItemForm.open} - - - - -
- - - - -
- -{if $user->isPluginEnabled('cl')} - - - - -{/if} -{if $show_project} - - - - -{/if} -{if $predefined_expenses} - - - - - - - - -{/if} - - - - - - - - -{if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))} - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.client} {if $user->isOptionEnabled('client_required')}(*){/if}:{$forms.expenseItemForm.client.control}
{$i18n.label.project} (*):{$forms.expenseItemForm.project.control}
{$i18n.label.expense}:{$forms.expenseItemForm.predefined_expense.control}
{$i18n.label.quantity}:{$forms.expenseItemForm.quantity.control}
{$i18n.label.comment}:{$forms.expenseItemForm.item_name.control}
{$i18n.label.cost}:{$forms.expenseItemForm.cost.control} {$user->getCurrency()|escape}
 
{$i18n.label.date}:{$forms.expenseItemForm.date.control}
 
{$forms.expenseItemForm.btn_save.control} {$forms.expenseItemForm.btn_copy.control} {$forms.expenseItemForm.btn_delete.control}
-
-
-{$forms.expenseItemForm.close} diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl deleted file mode 100644 index 3c5867279..000000000 --- a/WEB-INF/templates/expenses.tpl +++ /dev/null @@ -1,241 +0,0 @@ - - -{$forms.expensesForm.open} - - - - - -
- -{if $user_dropdown} - - - - -{/if} -{if $user->isPluginEnabled('cl')} - - - - -{/if} -{if $show_project} - - - - -{/if} -{if $predefined_expenses} - - - - - - - - -{/if} - - - - - - - - -{if $show_files} - - - - -{/if} -
{$i18n.label.user}:{$forms.expensesForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.expensesForm.client.control}
{$i18n.label.project} (*):{$forms.expensesForm.project.control}
{$i18n.label.expense}:{$forms.expensesForm.predefined_expense.control}
{$i18n.label.quantity}:{$forms.expensesForm.quantity.control}
{$i18n.label.comment} (*):{$forms.expensesForm.item_name.control}
{$i18n.label.cost} (*):{$forms.expensesForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.file}:{$forms.expensesForm.newfile.control}
-
- - -
{$forms.expensesForm.date.control}
-
- - - - - -
{$forms.expensesForm.btn_submit.control}
- - - - - -
-{if $expense_items} - - - {if $user->isPluginEnabled('cl')} - - {/if} - {if $show_project} - - {/if} - - - {if $show_files} - - {/if} - - - - {foreach $expense_items as $item} - - {if $user->isPluginEnabled('cl')} - - {/if} - {if $show_project} - - {/if} - - - {if $show_files} - {if $item.has_files} - - {else} - - {/if} - {/if} - - - - {/foreach} -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.item}{$i18n.label.cost}
{$item.client|escape}{$item.project|escape}{$item.item|escape}{$item.cost}{$i18n.label.files}{$i18n.label.files} - {if $item.approved || $item.invoice_id} -   - {else} - {$i18n.label.edit} - {/if} - - {if $item.approved || $item.invoice_id} -   - {else} - {$i18n.label.delete} - {/if} -
- - - - -
{$i18n.label.day_total}: {$user->getCurrency()|escape} {$day_total}
-{/if} -
-{$forms.expensesForm.close} diff --git a/WEB-INF/templates/file_delete.tpl b/WEB-INF/templates/file_delete.tpl deleted file mode 100644 index 81107daa5..000000000 --- a/WEB-INF/templates/file_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.fileDeleteForm.open} - - - - -
- - - - - - - - - -
{$file_to_delete|escape}
 
{$forms.fileDeleteForm.btn_delete.control}  {$forms.fileDeleteForm.btn_cancel.control}
-
-{$forms.fileDeleteForm.close} diff --git a/WEB-INF/templates/file_edit.tpl b/WEB-INF/templates/file_edit.tpl deleted file mode 100644 index 697a650ce..000000000 --- a/WEB-INF/templates/file_edit.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{$forms.fileForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.fileForm.file_name.control}
{$i18n.label.description}:{$forms.fileForm.description.control}
{$i18n.label.required_fields}
 
{$forms.fileForm.btn_save.control}
-
-{$forms.fileForm.close} diff --git a/WEB-INF/templates/project_add.tpl b/WEB-INF/templates/project_add.tpl deleted file mode 100644 index 309b13788..000000000 --- a/WEB-INF/templates/project_add.tpl +++ /dev/null @@ -1,49 +0,0 @@ -{$forms.projectForm.open} - - - - -
- - - - - - - - - -{if $show_files} - - - - -{/if} -{if $show_users} - - - - - -{/if} -{if $show_tasks} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.projectForm.project_name.control}
{$i18n.label.description}:{$forms.projectForm.description.control}
{$i18n.label.file}:{$forms.projectForm.newfile.control}
 
{$i18n.label.users}:{$forms.projectForm.users.control}
 
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}
{$i18n.label.required_fields}
 
{$forms.projectForm.btn_add.control}
-
-{$forms.projectForm.close} diff --git a/WEB-INF/templates/project_delete.tpl b/WEB-INF/templates/project_delete.tpl deleted file mode 100644 index 98d3e836d..000000000 --- a/WEB-INF/templates/project_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.projectDeleteForm.open} - - - - -
- - - - - - - - - -
{$project_to_delete|escape}
 
{$forms.projectDeleteForm.btn_delete.control}  {$forms.projectDeleteForm.btn_cancel.control}
-
-{$forms.projectDeleteForm.close} diff --git a/WEB-INF/templates/project_edit.tpl b/WEB-INF/templates/project_edit.tpl deleted file mode 100644 index 2a2364f20..000000000 --- a/WEB-INF/templates/project_edit.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{$forms.projectForm.open} - - - - -
- - - - - - - - - - - - - -{if $show_users} - - - - - -{/if} -{if $show_tasks} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.projectForm.project_name.control}
{$i18n.label.description}:{$forms.projectForm.description.control}
{$i18n.label.status}:{$forms.projectForm.status.control}
 
{$i18n.label.users}:{$forms.projectForm.users.control}
 
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}
{$i18n.label.required_fields}
 
{$forms.projectForm.btn_save.control} {$forms.projectForm.btn_copy.control}
-
-{$forms.projectForm.close} diff --git a/WEB-INF/templates/projects.tpl b/WEB-INF/templates/projects.tpl deleted file mode 100644 index 19bbe2373..000000000 --- a/WEB-INF/templates/projects.tpl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -
-{if $user->can('manage_projects')} - - {if $inactive_projects} - - {/if} - {if $active_projects} - - - - {if $show_files} - - {/if} - - - - {foreach $active_projects as $project} - - - - {if $show_files} - {if $project.has_files} - - {else} - - {/if} - {/if} - - - - {/foreach} - {/if} -
{$i18n.form.projects.active_projects}
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- - {if $inactive_projects} - - - - - - {if $show_files} - - {/if} - - - - {foreach $inactive_projects as $project} - - - - {if $show_files} - {if $project.has_files} - - {else} - - {/if} - {/if} - - - - {/foreach} -
{$i18n.form.projects.inactive_projects}
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- {/if} -{else} - - - - - {if $show_files} - - {/if} - - {if $active_projects} - {foreach $active_projects as $project} - - - - {if $show_files} - {if $project.has_files} - - {else} - - {/if} - {/if} - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}{$i18n.label.files} 
-{/if} -
diff --git a/WEB-INF/templates/swap_roles.tpl b/WEB-INF/templates/swap_roles.tpl deleted file mode 100644 index 2d3086329..000000000 --- a/WEB-INF/templates/swap_roles.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{$forms.swapForm.open} - -
- - - - - - - - -
{$i18n.form.swap.hint}
 
{$i18n.form.swap.swap_with}:{$forms.swapForm.swap_with.control}
{$forms.swapForm.btn_submit.control} {$forms.swapForm.btn_cancel.control}
-
-{$forms.swapForm.close} diff --git a/WEB-INF/templates/task_add.tpl b/WEB-INF/templates/task_add.tpl deleted file mode 100644 index d1892709a..000000000 --- a/WEB-INF/templates/task_add.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{$forms.taskForm.open} - - - - -
- - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.taskForm.name.control}
{$i18n.label.description}:{$forms.taskForm.description.control}
 
{$i18n.label.projects}:{$forms.taskForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.taskForm.btn_submit.control}
-
-{$forms.taskForm.close} diff --git a/WEB-INF/templates/task_delete.tpl b/WEB-INF/templates/task_delete.tpl deleted file mode 100644 index 9f16d7c3a..000000000 --- a/WEB-INF/templates/task_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.taskDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$task_to_delete|escape}
 
{$forms.taskDeleteForm.btn_delete.control}  {$forms.taskDeleteForm.btn_cancel.control}
-
-{$forms.taskDeleteForm.close} diff --git a/WEB-INF/templates/task_edit.tpl b/WEB-INF/templates/task_edit.tpl deleted file mode 100644 index 0c2b1a555..000000000 --- a/WEB-INF/templates/task_edit.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{$forms.taskForm.open} - - - - -
- - - - - - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.taskForm.name.control}
{$i18n.label.description}:{$forms.taskForm.description.control}
{$i18n.label.status}:{$forms.taskForm.status.control}
 
{$i18n.label.projects}:{$forms.taskForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.taskForm.btn_save.control} {$forms.taskForm.btn_copy.control}
-
-{$forms.taskForm.close} diff --git a/WEB-INF/templates/tasks.tpl b/WEB-INF/templates/tasks.tpl deleted file mode 100644 index 591820199..000000000 --- a/WEB-INF/templates/tasks.tpl +++ /dev/null @@ -1,96 +0,0 @@ - - -{$forms.tasksForm.open} - - - - -
-{if $user->can('manage_tasks')} - - - - - - - - -
{$forms.tasksForm.task_required.control} {$i18n.label.what_is_it}
{$forms.tasksForm.btn_save.control}
-
- - {if $inactive_tasks} - - {/if} - - - - - - - {if $active_tasks} - {foreach $active_tasks as $task} - - - - - - - {/foreach} - {/if} -
{$i18n.form.tasks.active_tasks}
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- - {if $inactive_tasks} - - - - - - - - - {foreach $inactive_tasks as $task} - - - - - - - {/foreach} -
{$i18n.form.tasks.inactive_tasks}
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- {/if} -{else} - - - - - - {if $active_tasks} - {foreach $active_tasks as $task} - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}
-{/if} -
-{$forms.tasksForm.close} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl deleted file mode 100644 index 69d214127..000000000 --- a/WEB-INF/templates/time.tpl +++ /dev/null @@ -1,234 +0,0 @@ -{include file="time_script.tpl"} - - - -{$forms.timeRecordForm.open} - -{if $show_navigation} - - - -{/if} - - - - -
- {$i18n.label.day_view} / {$i18n.label.week_view} -
- -{if $user_dropdown} - - - - -{/if} -{if $show_client} - - - - -{/if} -{if $show_billable} - - - - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - - {/foreach} -{/if} -{if $show_project} - - - - -{/if} -{if $show_task} - - - - -{/if} -{if $show_start} - - - - - - - - -{/if} -{if $show_duration} - - - - -{/if} -{if $show_files} - - - - -{/if} -{if $template_dropdown} - - - - -{/if} -
{$i18n.label.user}:{$forms.timeRecordForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.timeRecordForm.client.control}
 
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.timeRecordForm.$control_name.control}
{$i18n.label.project} (*):{$forms.timeRecordForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:{$forms.timeRecordForm.task.control}
{$i18n.label.start}:{$forms.timeRecordForm.start.control} 
{$i18n.label.finish}:{$forms.timeRecordForm.finish.control} 
{$i18n.label.duration}:{$forms.timeRecordForm.duration.control} {if $user->getDecimalMark() == ','}{str_replace('.', ',', $i18n.form.time.duration_format)}{else}{$i18n.form.time.duration_format}{/if}
{$i18n.label.file}:{$forms.timeRecordForm.newfile.control}
{$i18n.label.template}:{$forms.timeRecordForm.template.control}
-
- - -
{$forms.timeRecordForm.date.control}
-
- - - - - - - - - -
{$i18n.label.note}:{$forms.timeRecordForm.note.control}
{$forms.timeRecordForm.btn_submit.control}
- - - - - -
-{if $time_records} - - - {if $show_client} - - {/if} - {if $show_record_custom_fields && $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - {/foreach} - {/if} - {if $show_project} - - {/if} - {if $show_task} - - {/if} - {if $show_start} - - - {/if} - - {if $show_note_column} - - {/if} - {if $show_files} - - {/if} - - - - {foreach $time_records as $record} - - {if $show_client} - - {/if} - {* record custom fileds *} - {if $show_record_custom_fields && $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - {/foreach} - {/if} - {if $show_project} - - {/if} - {if $show_task} - - {/if} - {if $show_start} - - - {/if} - - {if $show_note_column} - - {/if} - {if $show_files} - {if $record.has_files} - - {else} - - {/if} - {/if} - - - - {if $show_note_row && $record.comment} - - - - - {/if} - {/foreach} -
{$i18n.label.client}{$timeField['label']|escape}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.note}
{$record.client|escape}{$record.$control_name|escape}{$record.project|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files} - {if $record.approved || $record.timesheet_id || $record.invoice_id} -   - {else} - {$i18n.label.edit} - {if ($record.duration == '0:00' && $record.start <> '')} - - - - - {/if} - {/if} - - {if $record.approved || $record.timesheet_id || $record.invoice_id} -   - {else} - {$i18n.label.delete} - {/if} -
{$i18n.label.note}:{$record.comment|escape}
-{/if} -
- - - - - - - {if $user->isPluginEnabled('mq')} - - - {if $over_balance} - - {else} - - {/if} - - - - {if $over_quota} - - {else} - - {/if} - - {/if} -
{$i18n.label.week_total}: {$week_total}{$i18n.label.day_total}: {$day_total}
{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_balance}: {$balance_remaining}{$i18n.form.time.remaining_balance}: {$balance_remaining}
{$i18n.label.quota}: {$month_quota}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}
- -{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/user_add.tpl b/WEB-INF/templates/user_add.tpl deleted file mode 100644 index 35040f3c4..000000000 --- a/WEB-INF/templates/user_add.tpl +++ /dev/null @@ -1,134 +0,0 @@ - - -{$forms.userForm.open} - -
- - - - - - - - -{if !$auth_external} - - - - - - - - -{/if} - - - - - - - - - -{if $show_quota} - - - - -{/if} -{if $custom_fields && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - - - {assign var="control_name" value='user_field_'|cat:$userField['id']} - - - {/foreach} -{/if} - - - - - -{if $show_projects} - - - - - - - -{/if} - - - - - - -
{$i18n.label.person_name} (*):{$forms.userForm.name.control}
{$i18n.label.login} (*):{$forms.userForm.login.control}
{$i18n.label.password} (*):{$forms.userForm.pas1.control}
{$i18n.label.confirm_password} (*):{$forms.userForm.pas2.control}
{$i18n.label.email}:{$forms.userForm.email.control}
{$i18n.form.users.role}:{$forms.userForm.role.control} {$forms.userForm.client.control}
{$i18n.label.quota} (%):{$forms.userForm.quota_percent.control} {$i18n.label.what_is_it}
{$userField['label']|escape}{if $userField['required']} (*){/if}:{$forms.userForm.$control_name.control}
{$i18n.form.users.default_rate} (0{$user->getDecimalMark()}00):{$forms.userForm.rate.control}
 
{$i18n.label.projects}:{$forms.userForm.projects.control}
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control}
-
-{$forms.userForm.close} diff --git a/WEB-INF/templates/user_delete.tpl b/WEB-INF/templates/user_delete.tpl deleted file mode 100644 index e85d97f1f..000000000 --- a/WEB-INF/templates/user_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.userDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$user_to_delete|escape}
 
{$forms.userDeleteForm.btn_delete.control}  {$forms.userDeleteForm.btn_cancel.control}
-
-{$forms.userDeleteForm.close} diff --git a/WEB-INF/templates/user_edit.tpl b/WEB-INF/templates/user_edit.tpl deleted file mode 100644 index 49fa4ae50..000000000 --- a/WEB-INF/templates/user_edit.tpl +++ /dev/null @@ -1,168 +0,0 @@ - - -{$forms.userForm.open} - -
- - - - - - - - -{if !$auth_external} - - - - - - - - -{/if} - - - - -{if $user->id != $user_id} - - - - - - - - -{/if} -{if $user->id == $user_id} - - - - -{/if} - -{if $show_quota} - - - - -{/if} -{if $custom_fields && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - - - {assign var="control_name" value='user_field_'|cat:$userField['id']} - - - {/foreach} -{/if} - - - - - -{if $show_projects} - - - - - - - -{/if} - - - - - - -
{$i18n.label.person_name} (*):{$forms.userForm.name.control}
{$i18n.label.login} (*):{$forms.userForm.login.control}
{$i18n.label.password} (*):{$forms.userForm.pas1.control}
{$i18n.label.confirm_password} (*):{$forms.userForm.pas2.control}
{$i18n.label.email}:{$forms.userForm.email.control}
{$i18n.form.users.role}:{$forms.userForm.role.control} {$forms.userForm.client.control}
{$i18n.label.status}:{$forms.userForm.status.control}
{$i18n.form.users.role}:{$user->role_name} {if $can_swap}{$i18n.form.user_edit.swap_roles}{/if}
{$i18n.label.quota} (%):{$forms.userForm.quota_percent.control} {$i18n.label.what_is_it}
{$userField['label']|escape}{if $userField['required']} (*){/if}:{$forms.userForm.$control_name.control}
{$i18n.form.users.default_rate} (0{$user->getDecimalMark()}00):{$forms.userForm.rate.control}
 
{$i18n.label.projects}:{$forms.userForm.projects.control}
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control}
-
-{$forms.userForm.close} diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl deleted file mode 100644 index c3f6861ea..000000000 --- a/WEB-INF/templates/users.tpl +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - -
-{if $user->can('manage_users')} - - {if $inactive_users} - - {/if} - {if $active_users} - - - - - {if $show_quota} - - {/if} - - - - {foreach $active_users as $u} - - - - - {if $show_quota} - - {/if} - {if $u.group_id != $user->group_id || $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)} - - {if $u.id != $user->id}{else}{/if} - {else} - - - {/if} - - {/foreach} - {/if} -
{$i18n.label.active_users}
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}{$i18n.label.quota}
- {if $uncompleted_indicators} - - {/if} - {$u.name|escape} - {$u.login|escape}{$u.role_name|escape}{$u.quota_percent}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- - {if $inactive_users} - - - - - - - {if $show_quota} - - {/if} - - - - {foreach $inactive_users as $u} - - - - - {if $show_quota} - - {/if} - {if $u.group_id != $user->group_id || $u.rank < $user->rank} - - - {else} - - - {/if} - - {/foreach} - -
{$i18n.label.inactive_users}
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}{$i18n.label.quota}
{$u.name|escape}{$u.login|escape}{$u.role_name|escape}{$u.quota_percent}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -
-
-
- {/if} -{else} - - - - - - - {foreach $active_users as $u} - - - - - - {/foreach} -
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}
- {if $uncompleted_indicators} - - {/if} - {$u.name|escape} - {$u.login|escape}{$u.role_name|escape}
-{/if} -
diff --git a/expense_files.php b/expense_files.php index feab9b611..5642cb383 100644 --- a/expense_files.php +++ b/expense_files.php @@ -1,30 +1,6 @@ addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -85,5 +61,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.expense_files')); -$smarty->assign('content_page_name', 'entity_files.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'entity_files2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index a863d270f..a222510c9 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5404"); +define("APP_VERSION", "1.19.23.5405"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/project_files.php b/project_files.php index 6ffe123f1..5dd816d6c 100644 --- a/project_files.php +++ b/project_files.php @@ -1,30 +1,6 @@ addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_project_id)); $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -85,5 +61,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.project_files').': '.$project['name']); -$smarty->assign('content_page_name', 'entity_files.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'entity_files2.tpl'); +$smarty->display('index2.tpl'); diff --git a/timesheet_delete.php b/timesheet_delete.php index 5e98a6cc9..ff1e4e180 100644 --- a/timesheet_delete.php +++ b/timesheet_delete.php @@ -1,30 +1,6 @@ addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_timesheet_id)); $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -85,5 +61,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.timesheet_files').': '.$timesheet['name']); -$smarty->assign('content_page_name', 'entity_files.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'entity_files2.tpl'); +$smarty->display('index2.tpl'); From 4500d03942456a4be84e82635412c0ebacf5d152 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Dec 2020 21:35:10 +0000 Subject: [PATCH 2080/2515] Some more cleanup. --- .../{access_denied.tpl => access_denied2.tpl} | 0 .../{file_download.tpl => file_download2.tpl} | 0 access_denied.php | 2 +- client_add1.php | 94 ------------------- client_delete1.php | 78 --------------- feature_disabled.php | 32 +------ file_download.php | 4 +- initialize.php | 2 +- 8 files changed, 8 insertions(+), 204 deletions(-) rename WEB-INF/templates/{access_denied.tpl => access_denied2.tpl} (100%) rename WEB-INF/templates/{file_download.tpl => file_download2.tpl} (100%) delete mode 100644 client_add1.php delete mode 100644 client_delete1.php diff --git a/WEB-INF/templates/access_denied.tpl b/WEB-INF/templates/access_denied2.tpl similarity index 100% rename from WEB-INF/templates/access_denied.tpl rename to WEB-INF/templates/access_denied2.tpl diff --git a/WEB-INF/templates/file_download.tpl b/WEB-INF/templates/file_download2.tpl similarity index 100% rename from WEB-INF/templates/file_download.tpl rename to WEB-INF/templates/file_download2.tpl diff --git a/access_denied.php b/access_denied.php index 7025d8739..2aa3c5d77 100644 --- a/access_denied.php +++ b/access_denied.php @@ -8,5 +8,5 @@ if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'access_denied.tpl'); +$smarty->assign('content_page_name', 'access_denied2.tpl'); $smarty->display('index2.tpl'); diff --git a/client_add1.php b/client_add1.php deleted file mode 100644 index 820a32fde..000000000 --- a/client_add1.php +++ /dev/null @@ -1,94 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_address = trim($request->getParameter('address')); - $cl_tax = $request->getParameter('tax'); - $cl_projects = $request->getParameter('projects'); -} 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']; -} - -$show_projects = (MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode()) && count($projects) > 0; - -$form = new Form('clientForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 350px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px; height: 80px;','value'=>$cl_address)); -$form->addInput(array('type'=>'floatfield','name'=>'tax','size'=>'10','format'=>'.2','value'=>$cl_tax)); -if ($show_projects) - $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','data'=>$projects,'layout'=>'H','datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.client_name')); - if (!ttValidString($cl_address, true)) $err->add($i18n->get('error.field'), $i18n->get('label.client_address')); - if (!ttValidFloat($cl_tax, true)) $err->add($i18n->get('error.field'), $i18n->get('label.tax')); - - if ($err->no()) { - if (!ttClientHelper::getClientByName($cl_name)) { - if (ttClientHelper::insert(array('name' => $cl_name, - 'address' => $cl_address, - 'tax' => $cl_tax, - 'projects' => $cl_projects, - 'status' => ACTIVE))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.clientForm.name.focus()"'); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('title', $i18n->get('title.add_client')); -$smarty->assign('content_page_name', 'client_add.tpl'); -$smarty->display('index.tpl'); diff --git a/client_delete1.php b/client_delete1.php deleted file mode 100644 index a5f00656e..000000000 --- a/client_delete1.php +++ /dev/null @@ -1,78 +0,0 @@ -isPluginEnabled('cl')) { - header('Location: feature_disabled.php'); - exit(); -} -$id = (int)$request->getParameter('id'); -$client = ttClientHelper::getClient($id); -if (!$client) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$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->get('dropdown.do_not_delete'),'1'=>$i18n->get('dropdown.delete')))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if (ttClientHelper::delete($id, $request->getParameter('delete_client_entries'))) { - header('Location: clients.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - - if ($request->getParameter('btn_cancel')) { - header('Location: clients.php'); - exit(); - } -} // isPost - -$smarty->assign('client_to_delete', $client_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.delete_client')); -$smarty->assign('content_page_name', 'client_delete.tpl'); -$smarty->display('index.tpl'); diff --git a/feature_disabled.php b/feature_disabled.php index 7f0bb81f5..c04afe734 100644 --- a/feature_disabled.php +++ b/feature_disabled.php @@ -1,30 +1,6 @@ isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'access_denied.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'access_denied2.tpl'); +$smarty->display('index2.tpl'); diff --git a/file_download.php b/file_download.php index ac076b27e..0c323f7f3 100644 --- a/file_download.php +++ b/file_download.php @@ -83,5 +83,5 @@ } $smarty->assign('title', $i18n->get('title.download_file')); -$smarty->assign('content_page_name', 'file_download.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'file_download2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index a222510c9..0af6f6c3c 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5405"); +define("APP_VERSION", "1.19.23.5406"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 684c41fbf421859d01fbd7391d7bbb7fef430bc8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 7 Dec 2020 17:28:19 +0000 Subject: [PATCH 2081/2515] Removed no longer used mobile pages. --- WEB-INF/templates/mobile/access_denied.tpl | 1 - WEB-INF/templates/mobile/expense_delete.tpl | 39 -- WEB-INF/templates/mobile/expense_edit.tpl | 183 -------- WEB-INF/templates/mobile/project_add.tpl | 43 -- WEB-INF/templates/mobile/project_delete.tpl | 18 - WEB-INF/templates/mobile/project_edit.tpl | 47 -- WEB-INF/templates/mobile/task_add.tpl | 33 -- WEB-INF/templates/mobile/task_delete.tpl | 20 - WEB-INF/templates/mobile/task_edit.tpl | 37 -- WEB-INF/templates/mobile/time_delete.tpl | 32 -- WEB-INF/templates/mobile/time_edit.tpl | 76 --- WEB-INF/templates/mobile/user_add.tpl | 124 ----- WEB-INF/templates/mobile/user_delete.tpl | 20 - WEB-INF/templates/mobile/user_edit.tpl | 153 ------ initialize.php | 2 +- mobile/access_denied.php | 36 -- mobile/expense_delete.php | 88 ---- mobile/expense_edit.php | 238 ---------- mobile/expenses.php | 5 + mobile/feature_disabled.php | 36 -- mobile/index.php | 5 + mobile/project_add.php | 103 ---- mobile/project_delete.php | 75 --- mobile/project_edit.php | 142 ------ mobile/projects.php | 5 + mobile/task_add.php | 87 ---- mobile/task_delete.php | 78 ---- mobile/task_edit.php | 128 ----- mobile/tasks.php | 5 + mobile/time_delete.php | 89 ---- mobile/time_edit.php | 494 -------------------- mobile/user_add.php | 186 -------- mobile/user_delete.php | 87 ---- mobile/user_edit.php | 245 ---------- mobile/users.php | 5 + 35 files changed, 26 insertions(+), 2939 deletions(-) delete mode 100644 WEB-INF/templates/mobile/access_denied.tpl delete mode 100644 WEB-INF/templates/mobile/expense_delete.tpl delete mode 100644 WEB-INF/templates/mobile/expense_edit.tpl delete mode 100644 WEB-INF/templates/mobile/project_add.tpl delete mode 100644 WEB-INF/templates/mobile/project_delete.tpl delete mode 100644 WEB-INF/templates/mobile/project_edit.tpl delete mode 100644 WEB-INF/templates/mobile/task_add.tpl delete mode 100644 WEB-INF/templates/mobile/task_delete.tpl delete mode 100644 WEB-INF/templates/mobile/task_edit.tpl delete mode 100644 WEB-INF/templates/mobile/time_delete.tpl delete mode 100644 WEB-INF/templates/mobile/time_edit.tpl delete mode 100644 WEB-INF/templates/mobile/user_add.tpl delete mode 100644 WEB-INF/templates/mobile/user_delete.tpl delete mode 100644 WEB-INF/templates/mobile/user_edit.tpl delete mode 100644 mobile/access_denied.php delete mode 100644 mobile/expense_delete.php delete mode 100644 mobile/expense_edit.php delete mode 100644 mobile/feature_disabled.php delete mode 100644 mobile/project_add.php delete mode 100644 mobile/project_delete.php delete mode 100644 mobile/project_edit.php delete mode 100644 mobile/task_add.php delete mode 100644 mobile/task_delete.php delete mode 100644 mobile/task_edit.php delete mode 100644 mobile/time_delete.php delete mode 100644 mobile/time_edit.php delete mode 100644 mobile/user_add.php delete mode 100644 mobile/user_delete.php delete mode 100644 mobile/user_edit.php diff --git a/WEB-INF/templates/mobile/access_denied.tpl b/WEB-INF/templates/mobile/access_denied.tpl deleted file mode 100644 index c341a4039..000000000 --- a/WEB-INF/templates/mobile/access_denied.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/WEB-INF/templates/mobile/expense_delete.tpl b/WEB-INF/templates/mobile/expense_delete.tpl deleted file mode 100644 index bd14824e2..000000000 --- a/WEB-INF/templates/mobile/expense_delete.tpl +++ /dev/null @@ -1,39 +0,0 @@ -{$forms.expenseItemForm.open} - - - - -
- - -{if $user->isPluginEnabled('cl')} - -{/if} - -{if $show_project} - -{/if} - - - - -{if $user->isPluginEnabled('cl')} - -{/if} -{if $show_project} - -{/if} - - - -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.item}{$i18n.label.cost}
{$expense_item.client_name|escape}{$expense_item.project_name|escape}{$expense_item.name|escape}{$expense_item.cost}
- - - - - - - -
 
{$forms.expenseItemForm.delete_button.control}  {$forms.expenseItemForm.cancel_button.control}
-
-{$forms.expenseItemForm.close} diff --git a/WEB-INF/templates/mobile/expense_edit.tpl b/WEB-INF/templates/mobile/expense_edit.tpl deleted file mode 100644 index d4834ae1a..000000000 --- a/WEB-INF/templates/mobile/expense_edit.tpl +++ /dev/null @@ -1,183 +0,0 @@ - - -{$forms.expenseItemForm.open} - - - - -
- - - - -
- -{if $user->isPluginEnabled('cl')} - - - - -{/if} -{if $show_project} - - - - -{/if} -{if $predefined_expenses} - - - - - - - - -{/if} - - - - - - - - - - - - - - - - - - - -
{$i18n.label.client} {if $user->isOptionEnabled('client_required')}(*){/if}:{$forms.expenseItemForm.client.control}
{$i18n.label.project} (*):{$forms.expenseItemForm.project.control}
{$i18n.label.expense}:{$forms.expenseItemForm.predefined_expense.control}
{$i18n.label.quantity}:{$forms.expenseItemForm.quantity.control}
{$i18n.label.item}:{$forms.expenseItemForm.item_name.control}
{$i18n.label.cost}:{$forms.expenseItemForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.date}:{$forms.expenseItemForm.date.control}
 
{$forms.expenseItemForm.btn_save.control} {$forms.expenseItemForm.btn_copy.control} {$forms.expenseItemForm.btn_delete.control}
-
-
-{$forms.expenseItemForm.close} diff --git a/WEB-INF/templates/mobile/project_add.tpl b/WEB-INF/templates/mobile/project_add.tpl deleted file mode 100644 index d49b9a33e..000000000 --- a/WEB-INF/templates/mobile/project_add.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{$forms.projectForm.open} - - - - -
- - - - - - - - - -{if $show_users} - - - - - -{/if} -{if $show_tasks} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.projectForm.project_name.control}
{$i18n.label.description}:{$forms.projectForm.description.control}
 
{$i18n.label.users}:{$forms.projectForm.users.control}
 
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}
{$i18n.label.required_fields}
 
{$forms.projectForm.btn_add.control}
-
-{$forms.projectForm.close} diff --git a/WEB-INF/templates/mobile/project_delete.tpl b/WEB-INF/templates/mobile/project_delete.tpl deleted file mode 100644 index 98d3e836d..000000000 --- a/WEB-INF/templates/mobile/project_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.projectDeleteForm.open} - - - - -
- - - - - - - - - -
{$project_to_delete|escape}
 
{$forms.projectDeleteForm.btn_delete.control}  {$forms.projectDeleteForm.btn_cancel.control}
-
-{$forms.projectDeleteForm.close} diff --git a/WEB-INF/templates/mobile/project_edit.tpl b/WEB-INF/templates/mobile/project_edit.tpl deleted file mode 100644 index 871f5c1dc..000000000 --- a/WEB-INF/templates/mobile/project_edit.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{$forms.projectForm.open} - - - - -
- - - - - - - - - - - - - -{if $show_users} - - - - - -{/if} -{if $show_tasks} - - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.projectForm.project_name.control}
{$i18n.label.description}:{$forms.projectForm.description.control}
{$i18n.label.status}:{$forms.projectForm.status.control}
 
{$i18n.label.users}:{$forms.projectForm.users.control}
 
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}
{$i18n.label.required_fields}
 
{$forms.projectForm.btn_save.control} {$forms.projectForm.btn_copy.control} {$forms.projectForm.btn_delete.control}
-
-{$forms.projectForm.close} diff --git a/WEB-INF/templates/mobile/task_add.tpl b/WEB-INF/templates/mobile/task_add.tpl deleted file mode 100644 index 68e415e1c..000000000 --- a/WEB-INF/templates/mobile/task_add.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{$forms.taskForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.taskForm.name.control}
{$i18n.label.description}:{$forms.taskForm.description.control}
{$i18n.label.projects}:{$forms.taskForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.taskForm.btn_submit.control}
-
-{$forms.taskForm.close} diff --git a/WEB-INF/templates/mobile/task_delete.tpl b/WEB-INF/templates/mobile/task_delete.tpl deleted file mode 100644 index 9f16d7c3a..000000000 --- a/WEB-INF/templates/mobile/task_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.taskDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$task_to_delete|escape}
 
{$forms.taskDeleteForm.btn_delete.control}  {$forms.taskDeleteForm.btn_cancel.control}
-
-{$forms.taskDeleteForm.close} diff --git a/WEB-INF/templates/mobile/task_edit.tpl b/WEB-INF/templates/mobile/task_edit.tpl deleted file mode 100644 index f6672c739..000000000 --- a/WEB-INF/templates/mobile/task_edit.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{$forms.taskForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.taskForm.name.control}
{$i18n.label.description}:{$forms.taskForm.description.control}
{$i18n.label.status}:{$forms.taskForm.status.control}
{$i18n.label.projects}:{$forms.taskForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.taskForm.btn_save.control} {$forms.taskForm.btn_copy.control} {$forms.taskForm.btn_delete.control}
-
-{$forms.taskForm.close} diff --git a/WEB-INF/templates/mobile/time_delete.tpl b/WEB-INF/templates/mobile/time_delete.tpl deleted file mode 100644 index 2e3ac7fea..000000000 --- a/WEB-INF/templates/mobile/time_delete.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{$forms.timeRecordForm.open} - - - - -
- - -{if $show_project} - -{/if} - - - - -{if $show_project} - -{/if} - - - -
{$i18n.label.project}{$i18n.label.duration}{$i18n.label.note}
{$time_rec.project_name|escape}{if ($time_rec.duration == '0:00' && $time_rec.start <> '')}{$i18n.form.time.uncompleted}{else}{$time_rec.duration}{/if}{if $time_rec.comment}{$time_rec.comment|escape}{else} {/if}
- - - - - - - -
 
{$forms.timeRecordForm.delete_button.control}  {$forms.timeRecordForm.cancel_button.control}
-
-{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/time_edit.tpl b/WEB-INF/templates/mobile/time_edit.tpl deleted file mode 100644 index 3025a63f7..000000000 --- a/WEB-INF/templates/mobile/time_edit.tpl +++ /dev/null @@ -1,76 +0,0 @@ -{include file="time_script.tpl"} - -{* Conditional include of confirmSave handler. *} -{if $confirm_save} - -{/if} - -{$forms.timeRecordForm.open} - - - - -
- - - - -
- -{if $show_client} - - -{/if} -{if $show_billable} - -{/if} -{if $show_paid_status} - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - {/foreach} -{/if} -{if $show_project} - - -{/if} -{if $show_task} - - -{/if} -{if $show_start} - - - - -{/if} -{if $show_duration} - - -{/if} - - -{if $template_dropdown} - - -{/if} - - - -
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:
{$forms.timeRecordForm.$control_name.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
{$i18n.label.start}:
{$forms.timeRecordForm.start.control} 
{$i18n.label.finish}:
{$forms.timeRecordForm.finish.control} 
{$i18n.label.duration}:
{$forms.timeRecordForm.duration.control}
{$i18n.label.date}:
{$forms.timeRecordForm.date.control}
{$i18n.label.template}:
{$forms.timeRecordForm.template.control}
{$i18n.label.note}:
{$forms.timeRecordForm.note.control}
{$forms.timeRecordForm.btn_save.control} {$forms.timeRecordForm.btn_copy.control} {$forms.timeRecordForm.btn_delete.control}
-
-
-{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/user_add.tpl b/WEB-INF/templates/mobile/user_add.tpl deleted file mode 100644 index 9df99ff00..000000000 --- a/WEB-INF/templates/mobile/user_add.tpl +++ /dev/null @@ -1,124 +0,0 @@ - - -{$forms.userForm.open} - -
- - - - - - - - -{if !$auth_external} - - - - - - - - -{/if} - - - - - - - - - -{if $show_quota} - - - - -{/if} - - - - - -{if $show_projects} - - - - - - -{/if} - - - - - - -
{$i18n.label.person_name} (*):{$forms.userForm.name.control}
{$i18n.label.login} (*):{$forms.userForm.login.control}
{$i18n.label.password} (*):{$forms.userForm.pas1.control}
{$i18n.label.confirm_password} (*):{$forms.userForm.pas2.control}
{$i18n.label.email}:{$forms.userForm.email.control}
{$i18n.form.users.role}:{$forms.userForm.role.control} {$forms.userForm.client.control}
{$i18n.label.quota} (%):{$forms.userForm.quota_percent.control}
{$i18n.form.users.default_rate} (0{$user->decimal_mark}00):{$forms.userForm.rate.control}
{$i18n.label.projects}:{$forms.userForm.projects.control}
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control}
-
-{$forms.userForm.close} diff --git a/WEB-INF/templates/mobile/user_delete.tpl b/WEB-INF/templates/mobile/user_delete.tpl deleted file mode 100644 index e85d97f1f..000000000 --- a/WEB-INF/templates/mobile/user_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.userDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$user_to_delete|escape}
 
{$forms.userDeleteForm.btn_delete.control}  {$forms.userDeleteForm.btn_cancel.control}
-
-{$forms.userDeleteForm.close} diff --git a/WEB-INF/templates/mobile/user_edit.tpl b/WEB-INF/templates/mobile/user_edit.tpl deleted file mode 100644 index 03c5db2ef..000000000 --- a/WEB-INF/templates/mobile/user_edit.tpl +++ /dev/null @@ -1,153 +0,0 @@ - - - -{$forms.userForm.open} - -
- - - - - - - - -{if !$auth_external} - - - - - - - - -{/if} - - - - -{if $user->id != $user_id} - - - - - - - - -{/if} - -{if $show_quota} - - - - -{/if} - - - - - -{if $show_projects} - - - - - - -{/if} - - - - - - -
{$i18n.label.person_name} (*):{$forms.userForm.name.control}
{$i18n.label.login} (*):{$forms.userForm.login.control}
{$i18n.label.password} (*):{$forms.userForm.pas1.control}
{$i18n.label.confirm_password} (*):{$forms.userForm.pas2.control}
{$i18n.label.email}:{$forms.userForm.email.control}
{$i18n.form.users.role}:{$forms.userForm.role.control} {$forms.userForm.client.control}
{$i18n.label.status}:{$forms.userForm.status.control}
{$i18n.label.quota} (%):{$forms.userForm.quota_percent.control}
{$i18n.form.users.default_rate} (0{$user->decimal_mark}00):{$forms.userForm.rate.control}
{$i18n.label.projects}:{$forms.userForm.projects.control}
{$i18n.label.required_fields}
{$forms.userForm.btn_submit.control} {$forms.userForm.btn_delete.control}
-
-{$forms.userForm.close} diff --git a/initialize.php b/initialize.php index 0af6f6c3c..265d13aea 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5406"); +define("APP_VERSION", "1.19.23.5407"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/access_denied.php b/mobile/access_denied.php deleted file mode 100644 index 6e7174a26..000000000 --- a/mobile/access_denied.php +++ /dev/null @@ -1,36 +0,0 @@ -add($i18n->get('error.access_denied')); -if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. - -$smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'mobile/access_denied.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/expense_delete.php b/mobile/expense_delete.php deleted file mode 100644 index 48e74dc0e..000000000 --- a/mobile/expense_delete.php +++ /dev/null @@ -1,88 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -// Get the expense item we are deleting. -$expense_item = ttExpenseHelper::getItem($cl_id); -if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { - // Prohibit deleting not ours, approved, or invoiced items. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -if ($request->isPost()) { - if ($request->getParameter('delete_button')) { // Delete button pressed. - - // Determine if it is okay to delete the record. - $item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); - if ($user->isDateLocked($item_date)) - $err->add($i18n->get('error.range_locked')); - - if ($err->no()) { - // Mark the record as deleted. - if (ttExpenseHelper::markDeleted($cl_id)) { - header('Location: expenses.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } - if ($request->getParameter('cancel_button')) { // Cancel button pressed. - header('Location: expenses.php'); - exit(); - } -} // isPost - -$form = new Form('expenseItemForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'submit','name'=>'delete_button','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'cancel_button','value'=>$i18n->get('button.cancel'))); - -$show_project = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); - -$smarty->assign('forms', array($form->getName() => $form->toArray())); -$smarty->assign('expense_item', $expense_item); -$smarty->assign('show_project', $show_project); -$smarty->assign('title', $i18n->get('title.delete_expense')); -$smarty->assign('content_page_name', 'mobile/expense_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/expense_edit.php b/mobile/expense_edit.php deleted file mode 100644 index 67813a6f1..000000000 --- a/mobile/expense_edit.php +++ /dev/null @@ -1,238 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_id = (int)$request->getParameter('id'); -// Get the expense item we are editing. -$expense_item = ttExpenseHelper::getItem($cl_id); -if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { - // Prohibit editing not ours, approved, or invoiced items. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); -$confirm_save = $user->getConfigOption('confirm_save'); -$trackingMode = $user->getTrackingMode(); -$show_project = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; - -// Initialize variables. -$cl_date = $cl_client = $cl_project = $cl_item_name = $cl_cost = null; -if ($request->isPost()) { - $cl_date = trim($request->getParameter('date')); - $cl_client = $request->getParameter('client'); - $cl_project = $request->getParameter('project'); - $cl_item_name = trim($request->getParameter('item_name')); - $cl_cost = trim($request->getParameter('cost')); -} else { - $cl_date = $item_date->toString($user->getDateFormat()); - $cl_client = $expense_item['client_id']; - $cl_project = $expense_item['project_id']; - $cl_item_name = $expense_item['name']; - $cl_cost = $expense_item['cost']; -} - -// Initialize elements of 'expenseItemForm'. -$form = new Form('expenseItemForm'); - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $trackingMode && $user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -if ($show_project) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} -// If predefined expenses are configured, add controls to select an expense and quantity. -$predefined_expenses = ttGroupHelper::getPredefinedExpenses(); -if ($predefined_expenses) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'recalculateCost();', - 'name'=>'predefined_expense', - 'style'=>'width: 250px;', - 'value'=>$cl_predefined_expense, - 'data'=>$predefined_expenses, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity','style'=>'width: 100px;','value'=>$cl_quantity)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'item_name','style'=>'width: 250px;','value'=>$cl_item_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); -$form->addInput(array('type'=>'datefield','name'=>'date','maxlength'=>'20','value'=>$cl_date)); -// Hidden control for record id. -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save or btn_copy click. -$on_click_action = 'browser_today.value=get_date();'; -$form->addInput(array('type'=>'submit','name'=>'btn_copy','onclick'=>$on_click_action,'value'=>$i18n->get('button.copy'))); -if ($confirm_save) $on_click_action .= 'return(confirmSave());'; -$form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>$on_click_action,'value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - if ($show_project && !$cl_project) - $err->add($i18n->get('error.project')); - if (!ttValidString($cl_item_name)) $err->add($i18n->get('error.field'), $i18n->get('label.item')); - if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); - if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date')); - - // This is a new date for the expense item. - $new_date = new DateAndTime($user->getDateFormat(), $cl_date); - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($new_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating input data. - - // Save record. - if ($request->getParameter('btn_save')) { - // We need to: - // 1) Prohibit updating locked entries (that are in locked range). - // 2) Prohibit saving unlocked entries into locked range. - - // Now, step by step. - // 1) Prohibit saving locked entries in any form. - if ($user->isDateLocked($item_date)) - $err->add($i18n->get('error.range_locked')); - - // 2) Prohibit saving unlocked entries into locked range. - if ($err->no() && $user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // Now, an update. - if ($err->no()) { - if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(DB_DATEFORMAT), - 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } - } - } - - // Save as new record. - if ($request->getParameter('btn_copy')) { - // We need to prohibit saving into locked interval. - if ($user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // Now, a new insert. - if ($err->no()) { - if (ttExpenseHelper::insert(array('date'=>$new_date->toString(DB_DATEFORMAT),'client_id'=>$cl_client, - 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } - - if ($request->getParameter('btn_delete')) { - header("Location: expense_delete.php?id=$cl_id"); - exit(); - } -} // isPost - -if ($confirm_save) { - $smarty->assign('confirm_save', true); - $smarty->assign('entry_date', $cl_date); -} -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_project', $show_project); -$smarty->assign('predefined_expenses', $predefined_expenses); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('title', $i18n->get('title.edit_expense')); -$smarty->assign('content_page_name', 'mobile/expense_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/expenses.php b/mobile/expenses.php index 05d469985..463671f4a 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -34,6 +34,11 @@ import('ttTimeHelper'); import('ttExpenseHelper'); +// Mobile pages are no longer separate. Redirect to main page. +header('Location: ../expenses.php'); +exit(); +// Below is no longer used code. + // Access checks. if (!(ttAccessAllowed('track_own_expenses') || ttAccessAllowed('track_expenses'))) { header('Location: access_denied.php'); diff --git a/mobile/feature_disabled.php b/mobile/feature_disabled.php deleted file mode 100644 index cf399568e..000000000 --- a/mobile/feature_disabled.php +++ /dev/null @@ -1,36 +0,0 @@ -add($i18n->get('error.feature_disabled')); -if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. - -$smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'mobile/access_denied.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/index.php b/mobile/index.php index 8fc64b35e..88408af23 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -28,6 +28,11 @@ require_once('../initialize.php'); +// Mobile pages are no longer separate. Redirect to main page. +header('Location: ../index.php'); +exit(); +// Below is no longer used code. + // Redirects for admin and client roles. if ($auth->isAuthenticated()) { if ($user->can('administer_site')) { diff --git a/mobile/project_add.php b/mobile/project_add.php deleted file mode 100644 index c152006f3..000000000 --- a/mobile/project_add.php +++ /dev/null @@ -1,103 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$users = ttGroupHelper::getActiveUsers(); -foreach ($users as $user_item) - $all_users[$user_item['id']] = $user_item['name']; - -$tasks = ttGroupHelper::getActiveTasks(); -foreach ($tasks as $task_item) - $all_tasks[$task_item['id']] = $task_item['name']; -$show_tasks = MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && count($tasks) > 0; - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('project_name')); - $cl_description = trim($request->getParameter('description')); - $cl_users = $request->getParameter('users', array()); - $cl_tasks = $request->getParameter('tasks', array()); -} else { - foreach ($users as $user_item) - $cl_users[] = $user_item['id']; - foreach ($tasks as $task_item) - $cl_tasks[] = $task_item['id']; -} - -$form = new Form('projectForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','class'=>'mobile-textarea','value'=>$cl_description)); -$form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); -if ($show_tasks) - $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); -$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); - - if ($err->no()) { - if (!ttProjectHelper::getProjectByName($cl_name)) { - if (ttProjectHelper::insert(array('name' => $cl_name, - 'description' => $cl_description, - 'users' => $cl_users, - 'tasks' => $cl_tasks, - 'status' => ACTIVE))) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); -$smarty->assign('show_users', count($users) > 0); -$smarty->assign('show_tasks', $show_tasks); -$smarty->assign('title', $i18n->get('title.add_project')); -$smarty->assign('content_page_name', 'mobile/project_add.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/project_delete.php b/mobile/project_delete.php deleted file mode 100644 index ac957e249..000000000 --- a/mobile/project_delete.php +++ /dev/null @@ -1,75 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_project_id = (int)$request->getParameter('id'); -$project = ttProjectHelper::get($cl_project_id); -if (!$project) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$project_to_delete = $project['name']; - -$form = new Form('projectDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_project_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if (ttProjectHelper::delete($cl_project_id)) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } elseif ($request->getParameter('btn_cancel')) { - header('Location: projects.php'); - exit(); - } -} // isPost - -$smarty->assign('project_to_delete', $project_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_project')); -$smarty->assign('content_page_name', 'mobile/project_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/project_edit.php b/mobile/project_edit.php deleted file mode 100644 index 31da38903..000000000 --- a/mobile/project_edit.php +++ /dev/null @@ -1,142 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_project_id = (int)$request->getParameter('id'); -$project = ttProjectHelper::get($cl_project_id); -if (!$project) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$users = ttGroupHelper::getActiveUsers(); -foreach ($users as $user_item) - $all_users[$user_item['id']] = $user_item['name']; - -$tasks = ttGroupHelper::getActiveTasks(); -foreach ($tasks as $task_item) - $all_tasks[$task_item['id']] = $task_item['name']; -$show_tasks = MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && count($tasks) > 0; - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('project_name')); - $cl_description = trim($request->getParameter('description')); - $cl_status = $request->getParameter('status'); - $cl_users = $request->getParameter('users', array()); - $cl_tasks = $request->getParameter('tasks', array()); -} else { - $cl_name = $project['name']; - $cl_description = $project['description']; - $cl_status = $project['status']; - $cl_users = ttProjectHelper::getAssignedUsers($cl_project_id); - $cl_tasks = explode(',', $project['tasks']); -} - -$form = new Form('projectForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_project_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','class'=>'mobile-textarea','value'=>$cl_description)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); -if ($show_tasks) - $form->addInput(array('type'=>'checkboxgroup','name'=>'tasks','data'=>$all_tasks,'layout'=>'H','value'=>$cl_tasks)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); - if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $existing_project = ttProjectHelper::getProjectByName($cl_name); - if (!$existing_project || ($cl_project_id == $existing_project['id'])) { - // Update project information. - if (ttProjectHelper::update(array( - 'id' => $cl_project_id, - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'users' => $cl_users, - 'tasks' => $cl_tasks))) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttProjectHelper::getProjectByName($cl_name)) { - if (ttProjectHelper::insert(array('name' => $cl_name, - 'description' => $cl_description, - 'users' => $cl_users, - 'tasks' => $cl_tasks, - 'status' => ACTIVE))) { - header('Location: projects.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_delete')) { - header("Location: project_delete.php?id=$cl_project_id"); - exit(); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); -$smarty->assign('show_users', count($users) > 0); -$smarty->assign('show_tasks', $show_tasks); -$smarty->assign('title', $i18n->get('title.edit_project')); -$smarty->assign('content_page_name', 'mobile/project_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/projects.php b/mobile/projects.php index 6a5ac572a..ee5d8dc18 100644 --- a/mobile/projects.php +++ b/mobile/projects.php @@ -31,6 +31,11 @@ import('ttTeamHelper'); import('ttGroupHelper'); +// Mobile pages are no longer separate. Redirect to main page. +header('Location: ../projects.php'); +exit(); +// Below is no longer used code. + // Access checks. if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) { header('Location: access_denied.php'); diff --git a/mobile/task_add.php b/mobile/task_add.php deleted file mode 100644 index db73d1c77..000000000 --- a/mobile/task_add.php +++ /dev/null @@ -1,87 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_description = trim($request->getParameter('description')); - $cl_projects = $request->getParameter('projects'); -} else { - foreach ($projects as $project_item) - $cl_projects[] = $project_item['id']; -} - -$form = new Form('taskForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','class'=>'mobile-textarea','value'=>$cl_description)); -$form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - - if ($err->no()) { - if (!ttTaskHelper::getTaskByName($cl_name)) { - if (ttTaskHelper::insert(array( - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => ACTIVE, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.taskForm.name.focus()"'); -$smarty->assign('title', $i18n->get('title.add_task')); -$smarty->assign('content_page_name', 'mobile/task_add.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/task_delete.php b/mobile/task_delete.php deleted file mode 100644 index dd0dae935..000000000 --- a/mobile/task_delete.php +++ /dev/null @@ -1,78 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_task_id = (int)$request->getParameter('id'); -$task = ttTaskHelper::get($cl_task_id); -if (!$task) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$task_to_delete = $task['name']; - -$form = new Form('taskDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_task_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if(ttTaskHelper::get($cl_task_id)) { - if (ttTaskHelper::delete($cl_task_id)) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.db')); - } elseif ($request->getParameter('btn_cancel')) { - header('Location: tasks.php'); - exit(); - } -} // isPost - -$smarty->assign('task_to_delete', $task_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.taskDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_task')); -$smarty->assign('content_page_name', 'mobile/task_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/task_edit.php b/mobile/task_edit.php deleted file mode 100644 index 02a947676..000000000 --- a/mobile/task_edit.php +++ /dev/null @@ -1,128 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -$cl_task_id = (int)$request->getParameter('id'); -$task = ttTaskHelper::get($cl_task_id); -if (!$task) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$projects = ttGroupHelper::getActiveProjects(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_description = trim($request->getParameter('description')); - $cl_status = $request->getParameter('status'); - $cl_projects = $request->getParameter('projects'); -} else { - $cl_name = $task['name']; - $cl_description = $task['description']; - $cl_status = $task['status']; - $assigned_projects = ttTaskHelper::getAssignedProjects($cl_task_id); - foreach ($assigned_projects as $project_item) - $cl_projects[] = $project_item['id']; -} - -$form = new Form('taskForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_task_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','class'=>'mobile-textarea','value'=>$cl_description)); -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_copy','value'=>$i18n->get('button.copy'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $existing_task = ttTaskHelper::getTaskByName($cl_name); - if (!$existing_task || ($cl_task_id == $existing_task['id'])) { - // Update task information. - if (ttTaskHelper::update(array( - 'task_id' => $cl_task_id, - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_copy')) { - if (!ttTaskHelper::getTaskByName($cl_name)) { - if (ttTaskHelper::insert(array( - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'projects' => $cl_projects))) { - header('Location: tasks.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.object_exists')); - } - - if ($request->getParameter('btn_delete')) { - header("Location: task_delete.php?id=$cl_task_id"); - exit(); - } - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.edit_task')); -$smarty->assign('content_page_name', 'mobile/task_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/tasks.php b/mobile/tasks.php index 2745df23a..960990166 100644 --- a/mobile/tasks.php +++ b/mobile/tasks.php @@ -30,6 +30,11 @@ import('form.Form'); import('ttGroupHelper'); +// Mobile pages are no longer separate. Redirect to main page. +header('Location: ../tasks.php'); +exit(); +// Below is no longer used code. + // Access checks. if (!(ttAccessAllowed('view_own_tasks') || ttAccessAllowed('manage_tasks'))) { header('Location: access_denied.php'); diff --git a/mobile/time_delete.php b/mobile/time_delete.php deleted file mode 100644 index e80c5c733..000000000 --- a/mobile/time_delete.php +++ /dev/null @@ -1,89 +0,0 @@ -getParameter('id'); -$time_rec = ttTimeHelper::getRecord($cl_id); -if (!$time_rec || $time_rec['approved'] || $time_rec['timesheet_id'] || $time_rec['invoice_id']) { - // Prohibit deleting not ours, approved, assigned to timesheet, or invoiced records. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; - -if ($request->isPost()) { - if ($request->getParameter('delete_button')) { // Delete button pressed. - - // Determine if it's okay to delete the record. - $item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']); - - // Determine if the record is uncompleted. - $uncompleted = ($time_rec['duration'] == '0:00'); - - if ($user->isDateLocked($item_date) && !$uncompleted) - $err->add($i18n->get('error.range_locked')); - - if ($err->no()) { - // Delete the record. - if (ttTimeHelper::delete($cl_id)) { - header('Location: time.php'); - exit(); - } else { - $err->add($i18n->get('error.db')); - } - } - } - if ($request->getParameter('cancel_button')) { // Cancel button pressed. - header('Location: time.php'); - exit(); - } -} // isPost - -$form = new Form('timeRecordForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); -$form->addInput(array('type'=>'submit','name'=>'delete_button','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'cancel_button','value'=>$i18n->get('button.cancel'))); -$smarty->assign('time_rec', $time_rec); -$smarty->assign('show_project', $showProject); -$smarty->assign('forms', array($form->getName() => $form->toArray())); -$smarty->assign('title', $i18n->get('title.delete_time_record')); -$smarty->assign('content_page_name', 'mobile/time_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/time_edit.php b/mobile/time_edit.php deleted file mode 100644 index fb3a918dc..000000000 --- a/mobile/time_edit.php +++ /dev/null @@ -1,494 +0,0 @@ -getParameter('id'); -$time_rec = ttTimeHelper::getRecord($cl_id); -if (!$time_rec || $time_rec['approved'] || $time_rec['timesheet_id'] || $time_rec['invoice_id']) { - // Prohibit editing not ours, approved, assigned to timesheet, or invoiced records. - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$user_id = $user->getUser(); -$config = new ttConfigHelper($user->getConfig()); - -$showClient = $user->isPluginEnabled('cl'); -$showBillable = $user->isPluginEnabled('iv'); -$showPaidStatus = $user->isPluginEnabled('ps') && $user->can('manage_invoices'); -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); -$recordType = $user->getRecordType(); -$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; -$showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('../plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']); -$confirm_save = $user->getConfigOption('confirm_save'); - -// Initialize variables. -$cl_start = $cl_finish = $cl_duration = $cl_date = $cl_note = $cl_project = $cl_task = $cl_billable = null; -if ($request->isPost()) { - $cl_start = trim($request->getParameter('start')); - $cl_finish = trim($request->getParameter('finish')); - $cl_duration = trim($request->getParameter('duration')); - $cl_date = $request->getParameter('date'); - $cl_note = trim($request->getParameter('note')); - // If we have user custom fields - collect input. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); - } - } - $cl_client = $request->getParameter('client'); - $cl_project = $request->getParameter('project'); - $cl_task = $request->getParameter('task'); - $cl_billable = 1; - if ($showBillable) - $cl_billable = $request->getParameter('billable'); - if ($showPaidStatus) - $cl_paid = $request->getParameter('paid'); -} else { - $cl_client = $time_rec['client_id']; - $cl_project = $time_rec['project_id']; - $cl_task = $time_rec['task_id']; - $cl_start = $time_rec['start']; - $cl_finish = $time_rec['finish']; - $cl_duration = $time_rec['duration']; - $cl_date = $item_date->toString($user->getDateFormat()); - $cl_note = $time_rec['comment']; - - // If we have time custom fields - collect values from database. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => $custom_fields->getTimeFieldValue($cl_id, $timeField['id'], $timeField['type'])); - } - } - - $cl_billable = $time_rec['billable']; - $cl_paid = $time_rec['paid']; - - // Add an info message to the form if we are editing an uncompleted record. - if (strlen($cl_start) > 0 && $cl_start == $cl_finish && $cl_duration == '0:00') { - $cl_finish = ''; - $cl_duration = ''; - $msg->add($i18n->get('form.time_edit.uncompleted')); - } -} - -// Initialize elements of 'timeRecordForm'. -$form = new Form('timeRecordForm'); - -// Dropdown for clients in MODE_TIME. Use all active clients. -// Note: for other tracking modes the control is added further below. -if (MODE_TIME == $trackingMode && $showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -// Billable checkbox. -if ($showBillable) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); - -// Paid status checkbox. -if ($showPaidStatus) - $form->addInput(array('type'=>'checkbox','name'=>'paid','value'=>$cl_paid)); - -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -// If we show project dropdown, add controls for project and client. -if ($showProject) { - // Dropdown for projects assigned to user. - $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); - $project_list = $user->getAssignedProjects($options); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);fillTemplateDropdown(this.value);prepopulateNote();', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} - -// Task dropdown. -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'style'=>'width: 250px;', - 'value'=>$cl_task, - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -} - -// Start and finish controls. -if ($showStart) { - $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); - $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode && !$user->canOverridePunchMode()) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); - } -} - -// Duration control. -if ($showDuration) - $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); - -// Date field. -$form->addInput(array('type'=>'datefield','name'=>'date','maxlength'=>'20','value'=>$cl_date)); - -// If we have templates, add a dropdown to select one. -if ($user->isPluginEnabled('tp')){ - $template_list = ttGroupHelper::getActiveTemplates(); - if (count($template_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillNote(this.value);', - 'name'=>'template', - 'style'=>'width: 250px;', - 'data'=>$template_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $smarty->assign('template_dropdown', 1); - $smarty->assign('bind_templates_with_projects', $config->getDefinedValue('bind_templates_with_projects')); - $smarty->assign('prepopulate_note', $config->getDefinedValue('prepopulate_note')); - $smarty->assign('template_list', $template_list); - } -} - -// Note control. -$form->addInput(array('type'=>'textarea','name'=>'note','class'=>'mobile-textarea','value'=>$cl_note)); - -// Hidden control for record id. -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save click. - -// Copy button. -$on_click_action = 'browser_today.value=get_date();'; -$form->addInput(array('type'=>'submit','name'=>'btn_copy','onclick'=>$on_click_action,'value'=>$i18n->get('button.copy'))); - -// Save button. -if ($confirm_save) $on_click_action .= 'return(confirmSave());'; -$form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>$on_click_action,'value'=>$i18n->get('button.save'))); - -// Delete button. -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - - // Validate user input. - if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($timeCustomFields as $timeField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); - } - } - if ($showProject) { - if (!$cl_project) $err->add($i18n->get('error.project')); - } - if ($showTask && $task_required) { - if (!$cl_task) $err->add($i18n->get('error.task')); - } - if (!$cl_duration) { - if ('0' == $cl_duration) - $err->add($i18n->get('error.field'), $i18n->get('label.duration')); - elseif ($cl_start || $cl_finish) { - if (!ttTimeHelper::isValidTime($cl_start)) - $err->add($i18n->get('error.field'), $i18n->get('label.start')); - if ($cl_finish) { - if (!ttTimeHelper::isValidTime($cl_finish)) - $err->add($i18n->get('error.field'), $i18n->get('label.finish')); - if (!ttTimeHelper::isValidInterval($cl_start, $cl_finish)) - $err->add($i18n->get('error.interval'), $i18n->get('label.finish'), $i18n->get('label.start')); - } - } else { - if ($showStart) { - $err->add($i18n->get('error.empty'), $i18n->get('label.start')); - $err->add($i18n->get('error.empty'), $i18n->get('label.finish')); - } - if ($showDuration) - $err->add($i18n->get('error.empty'), $i18n->get('label.duration')); - } - } else { - if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) - $err->add($i18n->get('error.field'), $i18n->get('label.duration')); - } - if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date')); - if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note')); - if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { - $err->add($i18n->get('error.field'), $i18n->get('label.note')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating user input. - - // This is a new date for the time record. - $new_date = new DateAndTime($user->getDateFormat(), $cl_date); - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($new_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - - // Save record. - if ($request->getParameter('btn_save')) { - // We need to: - // 1) Prohibit saving locked entries in any form. - // 2) Prohibit saving completed unlocked entries into locked range. - // 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. - - // Now, step by step. - if ($err->no()) { - // 1) Prohibit saving locked entries in any form. - if ($user->isDateLocked($item_date)) - $err->add($i18n->get('error.range_locked')); - - // 2) Prohibit saving completed unlocked entries into locked range. - if ($err->no() && $user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. - $uncompleted = ($cl_finish == '' && $cl_duration == ''); - if ($uncompleted) { - $not_completed_rec = ttTimeHelper::getUncompleted($user_id); - if ($not_completed_rec && ($time_rec['id'] <> $not_completed_rec['id'])) { - // We have another not completed record. - $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); - } - } - } - - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user_id, $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish, $cl_id)) - $err->add($i18n->get('error.overlap')); - } - - // Now, an update. - if ($err->no()) { - $res = ttTimeHelper::update(array( - 'id'=>$cl_id, - 'date'=>$new_date->toString(DB_DATEFORMAT), - 'client'=>$cl_client, - 'project'=>$cl_project, - 'task'=>$cl_task, - 'start'=>$cl_start, - 'finish'=>$cl_finish, - 'duration'=>$cl_duration, - 'note'=>$cl_note, - 'billable'=>$cl_billable, - 'paid'=>$cl_paid)); - - // Update time custom fields if we have them. - if ($res && $custom_fields && $custom_fields->timeFields) { - $res = $custom_fields->updateTimeFields($cl_id, $timeCustomFields); - } - if ($res) - { - header('Location: time.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } - } - } - - // Copy record. - if ($request->getParameter('btn_copy')) { - // We need to: - // 1) Prohibit saving into locked range. - // 2) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. - - // Now, step by step. - if ($err->no()) { - // 1) Prohibit saving into locked range. - if ($user->isDateLocked($new_date)) - $err->add($i18n->get('error.range_locked')); - - // 2) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. - $uncompleted = ($cl_finish == '' && $cl_duration == ''); - if ($uncompleted) { - $not_completed_rec = ttTimeHelper::getUncompleted($user_id); - if ($not_completed_rec) { - // We have another not completed record. - $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); - } - } - } - - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user_id, $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish)) - $err->add($i18n->get('error.overlap')); - } - - // Now, a new insert. - if ($err->no()) { - - $id = ttTimeHelper::insert(array( - 'date'=>$new_date->toString(DB_DATEFORMAT), - 'client'=>$cl_client, - 'project'=>$cl_project, - 'task'=>$cl_task, - 'start'=>$cl_start, - 'finish'=>$cl_finish, - 'duration'=>$cl_duration, - 'note'=>$cl_note, - 'billable'=>$cl_billable, - 'paid'=>$cl_paid)); - - // Insert time custom fields if we have them. - $res = true; - if ($id && $custom_fields && $custom_fields->timeFields) { - $res = $custom_fields->insertTimeFields($id, $timeCustomFields); - } - if ($id && $res) { - header('Location: time.php?date='.$new_date->toString(DB_DATEFORMAT)); - exit(); - } - $err->add($i18n->get('error.db')); - } - } - - if ($request->getParameter('btn_delete')) { - header("Location: time_delete.php?id=$cl_id"); - exit(); - } -} // isPost - -if ($confirm_save) { - $smarty->assign('confirm_save', true); - $smarty->assign('entry_date', $cl_date); -} -$smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable);+ -$smarty->assign('show_paid_status', $showPaidStatus); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('task_required', $taskRequired); -$smarty->assign('show_start', $showStart); -$smarty->assign('show_duration', $showDuration); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns()"'); -$smarty->assign('title', $i18n->get('title.edit_time_record')); -$smarty->assign('content_page_name', 'mobile/time_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/user_add.php b/mobile/user_add.php deleted file mode 100644 index ed017de8a..000000000 --- a/mobile/user_add.php +++ /dev/null @@ -1,186 +0,0 @@ -isPluginEnabled('mq'); -if ($user->isPluginEnabled('cl')) - $clients = ttGroupHelper::getActiveClients(); - -$assigned_projects = array(); -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_login = trim($request->getParameter('login')); - if (!$auth->isPasswordExternal()) { - $cl_password1 = $request->getParameter('pas1'); - $cl_password2 = $request->getParameter('pas2'); - } - $cl_email = trim($request->getParameter('email')); - $cl_role_id = $request->getParameter('role'); - $cl_client_id = $request->getParameter('client'); - $cl_rate = $request->getParameter('rate'); - $cl_quota_percent = $request->getParameter('quota_percent'); - $cl_projects = $request->getParameter('projects'); - if (is_array($cl_projects)) { - foreach ($cl_projects as $p) { - if (ttValidFloat($request->getParameter('rate_'.$p), true)) { - $project_with_rate = array(); - $project_with_rate['id'] = $p; - $project_with_rate['rate'] = $request->getParameter('rate_'.$p); - $assigned_projects[] = $project_with_rate; - } else - $err->add($i18n->get('error.field'), 'rate_'.$p); - } - } -} - -$form = new Form('userForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login)); -if (!$auth->isPasswordExternal()) { - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1)); - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); - -$active_roles = ttTeamHelper::getActiveRolesForUser(); -$form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','name'=>'role','value'=>$cl_role_id,'data'=>$active_roles,'datakeys'=>array('id', 'name'))); -if ($user->isPluginEnabled('cl')) - $form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->get('dropdown.select')))); - -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); -if ($show_quota) - $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'quota_percent','format'=>'.2','value'=>$cl_quota_percent)); - -$show_projects = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); -if ($show_projects) { - $projects = ttGroupHelper::getActiveProjects(); - if (count($projects) == 0) $show_projects = false; -} - -// Define classes for the projects table. -class NameCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200,'valign'=>'top')); - $this->setValue(''); - return $this->toString(); - } -} -class RateCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $assigned_projects; - $field = new FloatField('rate_'.$table->getValueAtName($row, 'id')); - $field->setFormName($table->getFormName()); - $field->setSize(5); - $field->setFormat('.2'); - foreach ($assigned_projects as $p) { - if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']); - } - $this->setValue($field->getHtml()); - return $this->toString(); - } -} -// Create projects table. -$table = new Table('projects'); -$table->setIAScript('setDefaultRate'); -$table->setTableOptions(array('width'=>'250','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); -$table->setData($projects); -$table->setKeyField('id'); -$table->setValue($cl_projects); -$table->addColumn(new TableColumn('name', $i18n->get('label.project'), new NameCellRenderer())); -$table->addColumn(new TableColumn('p_rate', $i18n->get('form.users.rate'), new RateCellRenderer())); -$form->addInputElement($table); - -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.person_name')); - if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); - if (!$auth->isPasswordExternal()) { - if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); - if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); - } - if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->get('error.field'), $i18n->get('form.users.default_rate')); - if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); - if (!ttUserHelper::canAdd()) $err->add($i18n->get('error.user_count')); - - if ($err->no()) { - if (!ttUserHelper::getUserByLogin($cl_login)) { - $fields = array( - 'name' => $cl_name, - 'login' => $cl_login, - 'password' => $cl_password1, - 'rate' => $cl_rate, - 'quota_percent' => $cl_quota_percent, - 'group_id' => $user->getGroup(), - 'org_id' => $user->org_id, - 'role_id' => $cl_role_id, - 'client_id' => $cl_client_id, - 'projects' => $assigned_projects, - 'email' => $cl_email); - if (ttUserHelper::insert($fields)) { - header('Location: users.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.user_exists')); - } -} // isPost - -$smarty->assign('auth_external', $auth->isPasswordExternal()); -$smarty->assign('active_roles', $active_roles); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"'); -$smarty->assign('show_quota', $show_quota); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('title', $i18n->get('title.add_user')); -$smarty->assign('content_page_name', 'mobile/user_add.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/user_delete.php b/mobile/user_delete.php deleted file mode 100644 index 132f73022..000000000 --- a/mobile/user_delete.php +++ /dev/null @@ -1,87 +0,0 @@ -getParameter('id'); -$user_details = $user->getUserDetails($user_id); -if (!$user_details) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$smarty->assign('user_to_delete', $user_details['name']." (".$user_details['login'].")"); - -// Create confirmation form. -$form = new Form('userDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$user_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if ($user->markUserDeleted($user_id)) { - // If we deleted the "on behalf" user reset its info in session. - if ($user_id == $user->behalf_id) { - unset($_SESSION['behalf_id']); - unset($_SESSION['behalf_name']); - } - // If we deleted our own account, do housekeeping and logout. - if ($user->id == $user_id) { - // Remove LOGIN_COOKIE_NAME cookie that stores login name. - unset($_COOKIE[LOGIN_COOKIE_NAME]); - setcookie(LOGIN_COOKIE_NAME, NULL, -1); - - $auth->doLogout(); - header('Location: login.php'); - } else { - header('Location: users.php'); - } - exit(); - } else { - $err->add($i18n->get('error.db')); - } - } - if ($request->getParameter('btn_cancel')) { - header('Location: users.php'); - exit(); - } -} // isPost - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.delete_user')); -$smarty->assign('content_page_name', 'mobile/user_delete.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/user_edit.php b/mobile/user_edit.php deleted file mode 100644 index 58de5e8ab..000000000 --- a/mobile/user_edit.php +++ /dev/null @@ -1,245 +0,0 @@ -getParameter('id'); -$user_details = $user->getUserDetails($user_id); -if (!$user_details) { - header('Location: access_denied.php'); - exit(); -} -// End of access checks. - -$show_quota = $user->isPluginEnabled('mq'); -if ($user->isPluginEnabled('cl')) - $clients = ttGroupHelper::getActiveClients(); - -$show_projects = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); -if ($show_projects) { - $projects = ttGroupHelper::getActiveProjects(); - if (count($projects) == 0) $show_projects = false; -} -$assigned_projects = array(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('name')); - $cl_login = trim($request->getParameter('login')); - if (!$auth->isPasswordExternal()) { - $cl_password1 = $request->getParameter('pas1'); - $cl_password2 = $request->getParameter('pas2'); - } - $cl_email = trim($request->getParameter('email')); - $cl_role_id = $request->getParameter('role'); - $cl_client_id = $request->getParameter('client'); - $cl_status = $request->getParameter('status'); - $cl_rate = $request->getParameter('rate'); - $cl_quota_percent = $request->getParameter('quota_percent'); - $cl_projects = $request->getParameter('projects'); - if (is_array($cl_projects)) { - foreach ($cl_projects as $p) { - if (ttValidFloat($request->getParameter('rate_'.$p), true)) { - $project_with_rate = array(); - $project_with_rate['id'] = $p; - $project_with_rate['rate'] = $request->getParameter('rate_'.$p); - $assigned_projects[] = $project_with_rate; - } else - $err->add($i18n->get('error.field'), 'rate_'.$p); - } - } -} else { - $cl_name = $user_details['name']; - $cl_login = $user_details['login']; - $cl_email = $user_details['email']; - $cl_rate = str_replace('.', $user->getDecimalMark(), $user_details['rate']); - $cl_quota_percent = str_replace('.', $user->getDecimalMark(), $user_details['quota_percent']); - $cl_role_id = $user_details['role_id']; - $cl_client_id = $user_details['client_id']; - $cl_status = $user_details['status']; - $cl_projects = array(); - $assigned_projects = ttProjectHelper::getAssignedProjects($user_id); - foreach($assigned_projects as $p) { - $cl_projects[] = $p['id']; - } -} - -$form = new Form('userForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login)); -if (!$auth->isPasswordExternal()) { - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1)); - $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); - -$active_roles = ttTeamHelper::getActiveRolesForUser(); -$form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','name'=>'role','value'=>$cl_role_id,'data'=>$active_roles,'datakeys'=>array('id', 'name'))); -if ($user->isPluginEnabled('cl')) - $form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->get('dropdown.select')))); - -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, - 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); -if ($show_quota) - $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'quota_percent','format'=>'.2','value'=>$cl_quota_percent)); - -// Define classes for the projects table. -class NameCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - $this->setOptions(array('width'=>200,'valign'=>'top')); - $this->setValue(''); - return $this->toString(); - } -} -class RateCellRenderer extends DefaultCellRenderer { - function render(&$table, $value, $row, $column, $selected = false) { - global $assigned_projects; - $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); - $field->setFormName($table->getFormName()); - $field->setSize(5); - $field->setFormat('.2'); - foreach ($assigned_projects as $p) { - if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']); - } - $this->setValue($field->getHtml()); - return $this->toString(); - } -} -// Create projects table. -$table = new Table('projects'); -$table->setIAScript('setRate'); -$table->setTableOptions(array('width'=>'250','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); -$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader')); -$table->setData($projects); -$table->setKeyField('id'); -$table->setValue($cl_projects); -$table->addColumn(new TableColumn('name', $i18n->get('label.project'), new NameCellRenderer())); -$table->addColumn(new TableColumn('p_rate', $i18n->get('form.users.rate'), new RateCellRenderer())); -$form->addInputElement($table); - -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$user_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.save'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.person_name')); - if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); - if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { - if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); - if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password')); - if ($cl_password1 !== $cl_password2) - $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password')); - } - if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); - if (!ttValidFloat($cl_rate, true)) $err->add($i18n->get('error.field'), $i18n->get('form.users.default_rate')); - if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); - - if ($err->no()) { - $existing_user = ttUserHelper::getUserByLogin($cl_login); - if (!$existing_user || ($user_id == $existing_user['id'])) { - - $fields = array( - 'name' => $cl_name, - 'login' => $cl_login, - 'password' => $cl_password1, - 'email' => $cl_email, - 'status' => $cl_status, - 'rate' => $cl_rate, - 'quota_percent' => $cl_quota_percent, - 'projects' => $assigned_projects); - if (in_array('manage_users', $user->rights)) { - $fields['role_id'] = $cl_role_id; - $fields['client_id'] = $cl_client_id; - } - - if (ttUserHelper::update($user_id, $fields)) { - - // If our own login changed, set new one in cookie to remember it. - if (($user_id == $user->id) && ($user->login != $cl_login)) { - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - } - - // In case the name of the "on behalf" user has changed - set it in session. - if (($user->behalf_id == $user_id) && ($user->behalf_name != $cl_name)) { - $_SESSION['behalf_name'] = $cl_name; - } - - // If we deactivated our own account, do housekeeping and logout. - if ($user->id == $user_id && !is_null($cl_status) && $cl_status == INACTIVE) { - // Remove LOGIN_COOKIE_NAME cookie that stores login name. - unset($_COOKIE[LOGIN_COOKIE_NAME]); - setcookie(LOGIN_COOKIE_NAME, NULL, -1); - - $auth->doLogout(); - header('Location: login.php'); - exit(); - } - - header('Location: users.php'); - exit(); - - } else - $err->add($i18n->get('error.db')); - } else - $err->add($i18n->get('error.user_exists')); - } - } - - if ($request->getParameter('btn_delete')) { - header("Location: user_delete.php?id=$user_id"); - exit(); - } -} // isPost - -$rates = ttProjectHelper::getRates($user_id); -$smarty->assign('rates', $rates); - -$smarty->assign('auth_external', $auth->isPasswordExternal()); -$smarty->assign('active_roles', $active_roles); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.userForm.name.focus();handleClientControl();"'); -$smarty->assign('show_quota', $show_quota); -$smarty->assign('show_projects', $show_projects); -$smarty->assign('user_id', $user_id); -$smarty->assign('title', $i18n->get('title.edit_user')); -$smarty->assign('content_page_name', 'mobile/user_edit.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/users.php b/mobile/users.php index d51cafcab..0e52072fb 100644 --- a/mobile/users.php +++ b/mobile/users.php @@ -32,6 +32,11 @@ import('ttGroupHelper'); import('ttTimeHelper'); +// Mobile pages are no longer separate. Redirect to main page. +header('Location: ../users.php'); +exit(); +// Below is no longer used code. + // Access checks. if (!(ttAccessAllowed('view_users') || ttAccessAllowed('manage_users'))) { header('Location: access_denied.php'); From 5ba5e875dcf313422b5ab1ad90fc112218deea40 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 7 Dec 2020 18:13:07 +0000 Subject: [PATCH 2082/2515] Cosmetic style improvement. --- default.css | 2 ++ initialize.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index 595967e64..95f56094b 100644 --- a/default.css +++ b/default.css @@ -424,6 +424,8 @@ div.section-header { text-align: center; margin-left: auto; margin-right: auto; + margin-top: .5rem; + margin-bottom: .5rem; } /* div for a group of items in site map */ diff --git a/initialize.php b/initialize.php index 265d13aea..47f069ba8 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5407"); +define("APP_VERSION", "1.19.23.5408"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1a4d9c3418ce261883057554887f2b36f0c5425b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 8 Dec 2020 13:00:38 +0000 Subject: [PATCH 2083/2515] Improved mobile presentation of vertically stacked checkboxes. --- WEB-INF/templates/client_add2.tpl | 2 +- WEB-INF/templates/client_edit2.tpl | 2 +- WEB-INF/templates/project_add2.tpl | 4 ++-- WEB-INF/templates/project_edit2.tpl | 4 ++-- WEB-INF/templates/task_add2.tpl | 2 +- WEB-INF/templates/task_edit2.tpl | 2 +- default.css | 6 ++++++ initialize.php | 2 +- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/WEB-INF/templates/client_add2.tpl b/WEB-INF/templates/client_add2.tpl index 2704a133c..ac7a63efc 100644 --- a/WEB-INF/templates/client_add2.tpl +++ b/WEB-INF/templates/client_add2.tpl @@ -28,7 +28,7 @@ License: See license.txt *}
{$i18n.label.projects}:
{$i18n.label.projects}:{$forms.clientForm.projects.control}{$forms.clientForm.projects.control}
{$i18n.label.projects}:
{$i18n.label.projects}:{$forms.clientForm.projects.control}{$forms.clientForm.projects.control}
{$i18n.label.users}:
{$i18n.label.users}:{$forms.projectForm.users.control}{$forms.projectForm.users.control}
{$i18n.label.tasks}:
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}{$forms.projectForm.tasks.control}
{$i18n.label.users}:
{$i18n.label.users}:{$forms.projectForm.users.control}{$forms.projectForm.users.control}
{$i18n.label.tasks}:
{$i18n.label.tasks}:{$forms.projectForm.tasks.control}{$forms.projectForm.tasks.control}
{$i18n.label.projects}:
{$i18n.label.projects}:{$forms.taskForm.projects.control}{$forms.taskForm.projects.control}
{$i18n.label.projects}:
{$i18n.label.projects}:{$forms.taskForm.projects.control}{$forms.taskForm.projects.control}
'."\n"; $html .= '
'; $html .= '
'; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index c006350fd..b01ffe687 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -347,7 +347,9 @@ function getAssignedProjects($options = null) $group_id = $this->getGroup(); $org_id = $this->org_id; - if ($options['include_files']) { + $filePart = ''; + $fileJoin = ''; + if (isset($options['include_files'])) { $filePart = ', if(Sub1.entity_id is null, 0, 1) as has_files'; $fileJoin = " left join (select distinct entity_id from tt_files". " where entity_type = 'project' and group_id = $group_id and org_id = $org_id and status = 1) Sub1". diff --git a/initialize.php b/initialize.php index 55b1a1034..1aa264cca 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5411"); +define("APP_VERSION", "1.19.23.5412"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6a5b24018a7c9d5744c84e8135d588b81b9ae6cf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 20 Feb 2021 23:11:47 +0000 Subject: [PATCH 2088/2515] Updated smarty to version 3.1.39 for better php8 support. --- WEB-INF/lib/smarty/Smarty.class.php | 7 +++---- WEB-INF/lib/smarty/SmartyBC.class.php | 2 +- .../smarty_internal_compile_function.php | 5 +++++ ...internal_compile_private_special_variable.php | 8 ++++++-- .../smarty_internal_config_file_compiler.php | 4 ++-- .../sysplugins/smarty_internal_errorhandler.php | 2 +- .../smarty_internal_parsetree_template.php | 16 ++++++++-------- WEB-INF/templates/time2.tpl | 2 ++ initialize.php | 2 +- 9 files changed, 29 insertions(+), 19 deletions(-) diff --git a/WEB-INF/lib/smarty/Smarty.class.php b/WEB-INF/lib/smarty/Smarty.class.php index 9e0ca7670..375bab133 100644 --- a/WEB-INF/lib/smarty/Smarty.class.php +++ b/WEB-INF/lib/smarty/Smarty.class.php @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * version 3.0 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +27,6 @@ * @author Uwe Tews * @author Rodney Rehm * @package Smarty - * @version 3.1.34-dev */ /** * set SMARTY_DIR to absolute path to Smarty library files. @@ -112,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.36'; + const SMARTY_VERSION = '3.1.39'; /** * define variable scopes */ @@ -800,7 +799,7 @@ public function addTemplateDir($template_dir, $key = null, $isConfig = false) * @param mixed $index index of directory to get, null to get all * @param bool $isConfig true for config_dir * - * @return array list of template directories, or directory of $index + * @return array|string list of template directories, or directory of $index */ public function getTemplateDir($index = null, $isConfig = false) { diff --git a/WEB-INF/lib/smarty/SmartyBC.class.php b/WEB-INF/lib/smarty/SmartyBC.class.php index 836f98153..0550e46dc 100644 --- a/WEB-INF/lib/smarty/SmartyBC.class.php +++ b/WEB-INF/lib/smarty/SmartyBC.class.php @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * version 3.0 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php index 6e408ca72..d0f2b0f4a 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php @@ -58,6 +58,11 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) } unset($_attr[ 'nocache' ]); $_name = trim($_attr[ 'name' ], '\'"'); + + if (!preg_match('/^[a-zA-Z0-9_\x80-\xff]+$/', $_name)) { + $compiler->trigger_template_error("Function name contains invalid characters: {$_name}", null, true); + } + $compiler->parent_compiler->tpl_function[ $_name ] = array(); $save = array( $_attr, $compiler->parser->current_buffer, $compiler->template->compiled->has_nocache_code, diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_special_variable.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_special_variable.php index b317c9f33..d53ef51ff 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_special_variable.php @@ -81,6 +81,10 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $ case 'template': return 'basename($_smarty_tpl->source->filepath)'; case 'template_object': + if (isset($compiler->smarty->security_policy)) { + $compiler->trigger_template_error("(secure mode) template_object not permitted"); + break; + } return '$_smarty_tpl'; case 'current_dir': return 'dirname($_smarty_tpl->source->filepath)'; @@ -94,9 +98,9 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $ break; } if (strpos($_index[ 1 ], '$') === false && strpos($_index[ 1 ], '\'') === false) { - return "@constant('{$_index[1]}')"; + return "(defined('{$_index[1]}') ? constant('{$_index[1]}') : null)"; } else { - return "@constant({$_index[1]})"; + return "(defined({$_index[1]}) ? constant({$_index[1]}) : null)"; } // no break case 'config': diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php index a842fa8f3..90c5dcefa 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php @@ -115,7 +115,7 @@ public function compileTemplate(Smarty_Internal_Template $template) $this->smarty->_debug->start_compile($this->template); } // init the lexer/parser to compile the config file - /* @var Smarty_Internal_ConfigFileLexer $this ->lex */ + /* @var Smarty_Internal_ConfigFileLexer $this->lex */ $this->lex = new $this->lexer_class( str_replace( array( @@ -127,7 +127,7 @@ public function compileTemplate(Smarty_Internal_Template $template) ) . "\n", $this ); - /* @var Smarty_Internal_ConfigFileParser $this ->parser */ + /* @var Smarty_Internal_ConfigFileParser $this->parser */ $this->parser = new $this->parser_class($this->lex, $this); if (function_exists('mb_internal_encoding') && function_exists('ini_get') diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php index 0ba00659d..56dca18fa 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php @@ -65,7 +65,7 @@ public static function muteExpectedErrors() * * @return bool */ - public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) + public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = array()) { $_is_muted_directory = false; // add the SMARTY_DIR to the list of muted directories diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php index 477232ef8..ab4c3ec3b 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php @@ -127,12 +127,12 @@ public function to_smarty_php(Smarty_Internal_Templateparser $parser) } private function getChunkedSubtrees() { - $chunks = []; + $chunks = array(); $currentMode = null; - $currentChunk = []; + $currentChunk = array(); for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) { - if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, ['textstripped', 'text', 'tag'])) { + if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, array('textstripped', 'text', 'tag'))) { continue; } @@ -150,19 +150,19 @@ private function getChunkedSubtrees() { if ($newMode == $currentMode) { $currentChunk[] = $this->subtrees[ $key ]; } else { - $chunks[] = [ + $chunks[] = array( 'mode' => $currentMode, 'subtrees' => $currentChunk - ]; + ); $currentMode = $newMode; - $currentChunk = [$this->subtrees[ $key ]]; + $currentChunk = array($this->subtrees[ $key ]); } } if ($currentMode && $currentChunk) { - $chunks[] = [ + $chunks[] = array( 'mode' => $currentMode, 'subtrees' => $currentChunk - ]; + ); } return $chunks; } diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 487bff7cf..65216efb8 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -234,3 +234,5 @@ License: See license.txt *} {/if}
+ +{$smarty.version} diff --git a/initialize.php b/initialize.php index 1aa264cca..771995d88 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5412"); +define("APP_VERSION", "1.19.23.5413"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 85823f48d86f438909af947b57038a1090283030 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 26 Feb 2021 16:24:51 +0000 Subject: [PATCH 2089/2515] A minor fix to dbinstall.php to address a migration issue with custom fields. --- dbinstall.php | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index 59d3923f8..9960e1ade 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -691,10 +691,10 @@ function ttGenerateKeys() { print "Updated $clients_updated clients...
\n"; } - // The update_custom_fields function updates option_id field field in tt_custom_field_log table. + // The update_custom_fields function updates option_id field in tt_custom_field_log table. if ($_POST['update_custom_fields']) { $mdb2 = getConnection(); - $sql = "update tt_custom_field_log set option_id = value where field_id in (select id from tt_custom_fields where type = 2)"; + $sql = "update tt_custom_field_log set option_id = value where option_id is null and value is not null and field_id in (select id from tt_custom_fields where type = 2)"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) die($affected->getMessage()); diff --git a/initialize.php b/initialize.php index 771995d88..5323d00b8 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5413"); +define("APP_VERSION", "1.19.23.5414"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 40f3d9345adc20e6f28eb9f59e2489aff87fecf5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 16:00:53 +0000 Subject: [PATCH 2090/2515] Fixed a critical security vulnerability with password resets. --- WEB-INF/templates/report.tpl | 4 ++++ initialize.php | 2 +- password_reset.php | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/report.tpl b/WEB-INF/templates/report.tpl index f7ef4ff2e..0a13ea83a 100644 --- a/WEB-INF/templates/report.tpl +++ b/WEB-INF/templates/report.tpl @@ -117,6 +117,7 @@ {if $bean->getAttribute('chtimesheet')}
 
{$i18n.label.edit}
diff --git a/initialize.php b/initialize.php index 5323d00b8..e2aeb6c85 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.23.5414"); +define("APP_VERSION", "1.19.24.5415"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/password_reset.php b/password_reset.php index 5beafb7fc..53099b9af 100644 --- a/password_reset.php +++ b/password_reset.php @@ -46,7 +46,10 @@ if ($err->no()) { // Prepare and save a temporary reference for user. - $temp_ref = md5(uniqid()); + $cryptographically_strong = true; + $random_bytes = openssl_random_pseudo_bytes(16, $cryptographically_strong); + if ($random_bytes === false) die ("openssl_random_pseudo_bytes function call failed..."); + $temp_ref = bin2hex($random_bytes); ttUserHelper::saveTmpRef($temp_ref, $user->id); $user_i18n = null; From 1339c3a043a916cd7f5142c3aec4a956b598f69c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 16:19:09 +0000 Subject: [PATCH 2091/2515] Added protection against brute force guessing of random codes used in password resets. --- WEB-INF/lib/ttUserHelper.class.php | 5 +++++ initialize.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index eac057304..accabe1fe 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -82,6 +82,11 @@ static function getUserByEmail($email) { static function getUserIdByTmpRef($ref) { $mdb2 = getConnection(); + // Some protection for brute force attacks to guess a reference for user. + // This limits an available window for brute force guessing to 1 hour. + $sql = "delete from tt_tmp_refs where created < now() - interval 1 hour"; + $affected = $mdb2->exec($sql); + $sql = "select user_id from tt_tmp_refs where ref = ".$mdb2->quote($ref); $res = $mdb2->query($sql); diff --git a/initialize.php b/initialize.php index e2aeb6c85..63215b71e 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.24.5415"); +define("APP_VERSION", "1.19.24.5416"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 9a8ee13a037931d29130379c9ad193613b45998c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 17:35:22 +0000 Subject: [PATCH 2092/2515] Fixed SQL injection vulnerability in group_edit.php. --- group_edit.php | 6 ++++-- initialize.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/group_edit.php b/group_edit.php index c8ad2e142..f60a11331 100644 --- a/group_edit.php +++ b/group_edit.php @@ -32,15 +32,17 @@ import('ttRoleHelper'); import('ttConfigHelper'); +$id = (int)$request->getParameter('id'); + // Access checks. // There are 4 distinct situations: // 1) Editing home group in get or post. // 2) Editing a subgroup in get or post. // We'll check access separately as it is about different right checks. if ($request->isGet()) { - $group_id = $request->getParameter('id') ? $request->getParameter('id') : $user->getGroup(); + $group_id = $request->getParameter('id') ? (int)$request->getParameter('id') : $user->getGroup(); } else { - $group_id = $request->getParameter('group') ? $request->getParameter('group') : $user->getGroup(); + $group_id = $request->getParameter('group') ? (int)$request->getParameter('group') : $user->getGroup(); } $home_group = $user->group_id == $group_id; if ($home_group) { diff --git a/initialize.php b/initialize.php index 63215b71e..f069495f9 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.24.5416"); +define("APP_VERSION", "1.19.25.5417"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2b34dc2006121e466513b50015262c6936c876bf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 17:37:58 +0000 Subject: [PATCH 2093/2515] Removed garbage introduced in previous commit. --- group_edit.php | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/group_edit.php b/group_edit.php index f60a11331..49bd1e613 100644 --- a/group_edit.php +++ b/group_edit.php @@ -32,8 +32,6 @@ import('ttRoleHelper'); import('ttConfigHelper'); -$id = (int)$request->getParameter('id'); - // Access checks. // There are 4 distinct situations: // 1) Editing home group in get or post. diff --git a/initialize.php b/initialize.php index f069495f9..7863d0aba 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.25.5417"); +define("APP_VERSION", "1.19.25.5418"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From fdf67755ae8396162b19332e3b10763c9ea274b2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 17:49:19 +0000 Subject: [PATCH 2094/2515] More protection against sql injections. --- group_edit.php | 28 ++-------------------------- groups.php | 30 +++--------------------------- initialize.php | 2 +- 3 files changed, 6 insertions(+), 54 deletions(-) diff --git a/group_edit.php b/group_edit.php index 49bd1e613..d972ba387 100644 --- a/group_edit.php +++ b/group_edit.php @@ -1,30 +1,6 @@ isPost()) { - $group_id = $request->getParameter('group'); + $group_id = (int)$request->getParameter('group'); $user->setOnBehalfGroup($group_id); } else { $group_id = $user->getGroup(); diff --git a/initialize.php b/initialize.php index 7863d0aba..40ccda78d 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.25.5418"); +define("APP_VERSION", "1.19.25.5419"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 00885b9872c31eb3298b047ee2a27b278248d4c5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 18:22:24 +0000 Subject: [PATCH 2095/2515] Added casts to int to sanitize some post parameters. --- admin_group_add.php | 28 ++-------------------------- admin_group_delete.php | 28 ++-------------------------- admin_group_edit.php | 28 ++-------------------------- admin_groups.php | 28 ++-------------------------- admin_options.php | 28 ++-------------------------- cf_custom_field_add.php | 36 +++++------------------------------- initialize.php | 2 +- 7 files changed, 16 insertions(+), 162 deletions(-) diff --git a/admin_group_add.php b/admin_group_add.php index c42644f09..45aa32261 100644 --- a/admin_group_add.php +++ b/admin_group_add.php @@ -1,30 +1,6 @@ isPost()) { $cl_field_name = trim($request->getParameter('name')); - $cl_entity_type = $request->getParameter('entity'); - $cl_field_type = $request->getParameter('type'); - $cl_required = $request->getParameter('required'); - if (!$cl_required) - $cl_required = 0; + $cl_entity_type = (int)$request->getParameter('entity'); + $cl_field_type = (int)$request->getParameter('type'); + $cl_required = (int)$request->getParameter('required'); } $form = new Form('fieldForm'); diff --git a/initialize.php b/initialize.php index 40ccda78d..c5edb812a 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.25.5419"); +define("APP_VERSION", "1.19.25.5420"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bc006920353e50e27d815a8f5d529269080db40e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 27 Feb 2021 18:50:14 +0000 Subject: [PATCH 2096/2515] More sanitizing of user input. --- cf_custom_field_delete.php | 28 ++-------------------------- cf_custom_field_edit.php | 28 ++-------------------------- cf_custom_fields.php | 28 ++-------------------------- cf_dropdown_option_add.php | 28 ++-------------------------- cf_dropdown_option_delete.php | 30 +++--------------------------- cf_dropdown_option_edit.php | 30 +++--------------------------- cf_dropdown_options.php | 28 ++-------------------------- 7 files changed, 16 insertions(+), 184 deletions(-) diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index c8a133692..ba222c657 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -1,30 +1,6 @@ getParameter('id'); +$cl_id = (int)$request->getParameter('id'); $option = CustomFields::getOptionName($cl_id); if (!$option) { header('Location: access_denied.php'); diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index 4f1103d7b..4cea7358f 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -1,30 +1,6 @@ getParameter('id'); +$cl_id = (int)$request->getParameter('id'); $cl_name = CustomFields::getOptionName($cl_id); if (!$cl_name) { header('Location: access_denied.php'); diff --git a/cf_dropdown_options.php b/cf_dropdown_options.php index 3b4663f8c..06f53a7d8 100644 --- a/cf_dropdown_options.php +++ b/cf_dropdown_options.php @@ -1,30 +1,6 @@ Date: Sat, 27 Feb 2021 23:13:24 +0000 Subject: [PATCH 2097/2515] Added edit icons on reports to allow for quick edits. --- WEB-INF/lib/ttExpenseHelper.class.php | 66 ++++++++++++++++----------- WEB-INF/lib/ttReportHelper.class.php | 14 +++--- WEB-INF/lib/ttTimeHelper.class.php | 66 ++++++++++++++++----------- WEB-INF/lib/ttUserHelper.class.php | 28 +----------- WEB-INF/templates/report.tpl | 13 ++++-- expense_edit.php | 1 + initialize.php | 2 +- time_edit.php | 1 + 8 files changed, 102 insertions(+), 89 deletions(-) diff --git a/WEB-INF/lib/ttExpenseHelper.class.php b/WEB-INF/lib/ttExpenseHelper.class.php index 303ca5767..0de7eca11 100644 --- a/WEB-INF/lib/ttExpenseHelper.class.php +++ b/WEB-INF/lib/ttExpenseHelper.class.php @@ -1,30 +1,6 @@ isUserValid($user_id); + + if (!$user_valid) return false; + + // Set on behalf user. + $user->setOnBehalfUser($user_id); + // Get on behalf record. + return ttExpenseHelper::getItem($id); + } + + // getUserForItem - retrieves user id for an expense item. + static function getUserForItem($id) { + global $user; + + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $mdb2 = getConnection(); + + // Obtain user_id for the expense item. + $sql = "select ei.user_id from tt_expense_items ei ". + " where ei.id = $id and ei.group_id = $group_id and ei.org_id = $org_id and ei.status = 1"; + $res = $mdb2->query($sql); + if (is_a($res, 'PEAR_Error')) return false; + if (!$res->numRows()) return false; + + $val = $res->fetchRow(); + $user_id = $val['user_id']; + return $user_id; + } + // getItemForFileView - retrieves an expense item identified by its id for // attachment view operation. // diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 294225e0c..b24890e7d 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -350,9 +350,10 @@ static function getItems($options) { array_push($fields, "cast(l.billable * coalesce(upb.rate, 0) * time_to_sec(l.duration)/3600 as decimal(10,2)) as cost"); // Use project rate for user. array_push($fields, "null as expense"); } - // Add approved. - if ($options['show_approved']) - array_push($fields, 'l.approved'); + // Add the fields used to determine if we show an edit icon for record. + array_push($fields, 'l.approved'); + array_push($fields, 'l.timesheet_id'); + array_push($fields, 'l.invoice_id'); // Add paid status. if ($canViewReports && $options['show_paid']) array_push($fields, 'l.paid'); @@ -513,9 +514,10 @@ static function getItems($options) { array_push($fields, 'ei.name as note'); array_push($fields, 'ei.cost as cost'); array_push($fields, 'ei.cost as expense'); - // Add approved. - if ($options['show_approved']) - array_push($fields, 'ei.approved'); + // Add the fields used to determine if we show an edit icon for record. + array_push($fields, 'ei.approved'); + array_push($fields, 'null as timesheet_id'); + array_push($fields, 'ei.invoice_id'); // Add paid status. if ($canViewReports && $options['show_paid']) array_push($fields, 'ei.paid'); diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index faa1197cd..f0b1ea100 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -1,30 +1,6 @@ isUserValid($user_id); + + if (!$user_valid) return false; + + // Set on behalf user. + $user->setOnBehalfUser($user_id); + // Get on behalf record. + return ttTimeHelper::getRecord($id); + } + + // getUserForRecord - retrieves user id for a time record. + static function getUserForRecord($id) { + global $user; + + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $mdb2 = getConnection(); + + // Obtain user_id for the time record. + $sql = "select l.user_id from tt_log l ". + " where l.id = $id and l.group_id = $group_id and l.org_id = $org_id and l.status = 1"; + $res = $mdb2->query($sql); + if (is_a($res, 'PEAR_Error')) return false; + if (!$res->numRows()) return false; + + $val = $res->fetchRow(); + $user_id = $val['user_id']; + return $user_id; + } + // getRecordForFileView - retrieves a time record identified by its id for // attachment view operation. // diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index accabe1fe..d4fc8d804 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -1,30 +1,6 @@ getAttribute('chtimesheet')}
 
{$i18n.label.edit} {$i18n.label.edit}{$i18n.label.edit}
diff --git a/expense_edit.php b/expense_edit.php index 092f33c11..5d1e75044 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -21,6 +21,7 @@ $cl_id = (int)$request->getParameter('id'); // Get the expense item we are editing. $expense_item = ttExpenseHelper::getItem($cl_id); +if (!$expense_item) $expense_item = ttExpenseHelper::getOnBehalfItem($cl_id); if (!$expense_item || $expense_item['approved'] || $expense_item['invoice_id']) { // Prohibit editing not ours, approved, or invoiced items. header('Location: access_denied.php'); diff --git a/initialize.php b/initialize.php index c5edb812a..3a08a9e78 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.25.5420"); +define("APP_VERSION", "1.19.26.5421"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time_edit.php b/time_edit.php index 4065bf08f..774add2c6 100644 --- a/time_edit.php +++ b/time_edit.php @@ -18,6 +18,7 @@ } $cl_id = (int)$request->getParameter('id'); $time_rec = ttTimeHelper::getRecord($cl_id); +if (!$time_rec) $time_rec = ttTimeHelper::getOnBehalfRecord($cl_id); if (!$time_rec || $time_rec['approved'] || $time_rec['timesheet_id'] || $time_rec['invoice_id']) { // Prohibit editing not ours, approved, assigned to timesheet, or invoiced records. header('Location: access_denied.php'); From 9c9e7d7976fed5b80c0d9dd74b7424f890584fc8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 5 Mar 2021 21:06:24 +0000 Subject: [PATCH 2098/2515] Sanitizing of user input on charts.php. --- WEB-INF/templates/time2.tpl | 2 -- charts.php | 4 ++-- initialize.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 65216efb8..487bff7cf 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -234,5 +234,3 @@ License: See license.txt *} {/if}
- -{$smarty.version} diff --git a/charts.php b/charts.php index d4fb52b3b..026f97463 100644 --- a/charts.php +++ b/charts.php @@ -35,7 +35,7 @@ exit(); } if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid($request->getParameter('user'))) { + if (!$user->isUserValid((int)$request->getParameter('user'))) { header('Location: access_denied.php'); // Wrong user id on post. exit(); } @@ -45,7 +45,7 @@ // Determine user for which we display this page. $userChanged = $request->getParameter('user_changed'); if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/initialize.php b/initialize.php index 3a08a9e78..faa912032 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5421"); +define("APP_VERSION", "1.19.26.5422"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d0af0f472a64e19dfb48473cca1c374363fb6471 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 5 Mar 2021 21:24:18 +0000 Subject: [PATCH 2099/2515] Some more sanitizing of post parameters. --- charts.php | 6 +++--- initialize.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts.php b/charts.php index 026f97463..9dc29f588 100644 --- a/charts.php +++ b/charts.php @@ -43,7 +43,7 @@ // End of access checks. // Determine user for which we display this page. -$userChanged = $request->getParameter('user_changed'); +$userChanged = (int)$request->getParameter('user_changed'); if ($request->isPost() && $userChanged) { $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); @@ -63,12 +63,12 @@ $_SESSION['date'] = $cl_date; if ($request->isPost()) { - $cl_interval = $request->getParameter('interval'); + $cl_interval = (int)$request->getParameter('interval'); if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; $_SESSION['chart_interval'] = $cl_interval; $uc->setValue(SYSC_CHART_INTERVAL, $cl_interval); - $cl_type = $request->getParameter('type'); + $cl_type = (int)$request->getParameter('type'); if (!$cl_type) $cl_type = ttChartHelper::adjustType($cl_type); $_SESSION['chart_type'] = $cl_type; $uc->setValue(SYSC_CHART_TYPE, $cl_type); diff --git a/initialize.php b/initialize.php index faa912032..f54941375 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5422"); +define("APP_VERSION", "1.19.26.5423"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2eaab13803846b91c90d49680099968731d4718e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 6 Mar 2021 15:12:37 +0000 Subject: [PATCH 2100/2515] A bit more of sanitizing work for posts. --- WEB-INF/lib/ttUser.class.php | 14 ++++++++------ cron.php | 28 ++-------------------------- custom_css.php | 28 ++-------------------------- dbinstall.php | 28 ++-------------------------- display_options.php | 36 ++++++------------------------------ initialize.php | 2 +- 6 files changed, 21 insertions(+), 115 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index b01ffe687..fcfc1b9d5 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -617,6 +617,7 @@ function getUserDetails($user_id) { $mdb2 = getConnection(); $group_id = $this->getGroup(); $org_id = $this->org_id; + $uid = (int)$user_id; // Determine max rank. If we are searching in on behalf group // then rank restriction does not apply. @@ -624,7 +625,7 @@ function getUserDetails($user_id) { $sql = "select u.id, u.name, u.login, u.role_id, u.client_id, u.status, u.rate, u.quota_percent, u.email from tt_users u". " left join tt_roles r on (u.role_id = r.id)". - " where u.id = $user_id and u.group_id = $group_id and u.org_id = $org_id and u.status is not null". + " where u.id = $uid and u.group_id = $group_id and u.org_id = $org_id and u.status is not null". " and (r.rank < $max_rank or (r.rank = $max_rank and u.id = $this->id))"; // Users with lesser roles or self. $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { @@ -897,6 +898,7 @@ function setOnBehalfGroup($group_id) { // setOnBehalfUser sets on behalf user both the object and the session. function setOnBehalfUser($user_id) { + $uid = (int)$user_id; // In case we forgot to sanitize $user_id before getting here. // Unset things first. $this->behalf_id = null; @@ -906,16 +908,16 @@ function setOnBehalfUser($user_id) { unset($_SESSION['behalf_name']); // No need to set if user is us. - if ($user_id == $this->id) return; + if ($uid == $this->id) return; // No need to set if user id is not valid. - if (!$this->isUserValid($user_id)) return; + if (!$this->isUserValid($uid)) return; // We are good to set on behalf user. - $onBehalfUserName = ttUserHelper::getUserName($user_id); - $_SESSION['behalf_id'] = $user_id; + $onBehalfUserName = ttUserHelper::getUserName($uid); + $_SESSION['behalf_id'] = $uid; $_SESSION['behalf_name'] = $onBehalfUserName; - $this->behalf_id = $user_id; + $this->behalf_id = $uid; $this->behalf_name = $onBehalfUserName; $this->behalfUser = new ttBehalfUser($this->behalf_id, $this->org_id); diff --git a/cron.php b/cron.php index 331b4f36e..5adced71e 100644 --- a/cron.php +++ b/cron.php @@ -1,30 +1,6 @@ getConfigHelper(); if ($request->isPost()) { - $cl_time_note_on_separate_row = $request->getParameter('time_note_on_separate_row'); - $cl_time_not_complete_days = $request->getParameter('time_not_complete_days'); - $cl_record_custom_fields = $request->getParameter('record_custom_fields'); - $cl_report_note_on_separate_row = $request->getParameter('report_note_on_separate_row'); + $cl_time_note_on_separate_row = (bool)$request->getParameter('time_note_on_separate_row'); + $cl_time_not_complete_days = (bool)$request->getParameter('time_not_complete_days'); + $cl_record_custom_fields = (bool)$request->getParameter('record_custom_fields'); + $cl_report_note_on_separate_row = (bool)$request->getParameter('report_note_on_separate_row'); $cl_custom_css = trim($request->getParameter('custom_css')); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); diff --git a/initialize.php b/initialize.php index f54941375..eb9fd4b94 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5423"); +define("APP_VERSION", "1.19.26.5424"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 477f47a63e8e476f6c84edff830bba03c7610667 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 6 Mar 2021 15:55:04 +0000 Subject: [PATCH 2101/2515] Some more sanitizing. --- expense_edit.php | 4 ++-- expenses.php | 6 +++--- initialize.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/expense_edit.php b/expense_edit.php index 5d1e75044..9c85bdb79 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -43,14 +43,14 @@ $cl_item_name = trim($request->getParameter('item_name')); $cl_cost = trim($request->getParameter('cost')); if ($user->isPluginEnabled('ps')) - $cl_paid = $request->getParameter('paid'); + $cl_paid = (bool)$request->getParameter('paid'); } else { $cl_date = $item_date->toString($user->getDateFormat()); $cl_client = $expense_item['client_id']; $cl_project = $expense_item['project_id']; $cl_item_name = $expense_item['name']; $cl_cost = $expense_item['cost']; - $cl_paid = $expense_item['paid']; + $cl_paid = (bool)$expense_item['paid']; } // Initialize elements of 'expenseItemForm'. diff --git a/expenses.php b/expenses.php index 170f0cd3b..e82d9d379 100644 --- a/expenses.php +++ b/expenses.php @@ -33,7 +33,7 @@ exit(); } if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid($request->getParameter('user'))) { + if (!$user->isUserValid((int)$request->getParameter('user'))) { header('Location: access_denied.php'); // Wrong user id on post. exit(); } @@ -41,9 +41,9 @@ // End of access checks. // Determine user for which we display this page. -$userChanged = $request->getParameter('user_changed'); +$userChanged = (int)$request->getParameter('user_changed'); if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/initialize.php b/initialize.php index eb9fd4b94..344ec8229 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5424"); +define("APP_VERSION", "1.19.26.5425"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3a3c14ffd3a4266aeac52e7da19d7c0fa684792d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 6 Mar 2021 17:57:57 +0000 Subject: [PATCH 2102/2515] A bit more sanitizing of post parameters. --- export.php | 28 ++-------------------------- file_download.php | 28 ++-------------------------- group_add.php | 28 ++-------------------------- group_advanced_edit.php | 28 ++-------------------------- group_delete.php | 28 ++-------------------------- group_edit.php | 12 ++++++------ import.php | 28 ++-------------------------- initialize.php | 2 +- invoice_add.php | 30 +++--------------------------- invoice_delete.php | 28 ++-------------------------- invoice_send.php | 28 ++-------------------------- invoice_view.php | 28 ++-------------------------- invoices.php | 28 ++-------------------------- 13 files changed, 30 insertions(+), 294 deletions(-) diff --git a/export.php b/export.php index 2206def2d..2bcba2dce 100644 --- a/export.php +++ b/export.php @@ -1,30 +1,6 @@ getParameter('group_changed'); +$groupChanged = (bool)$request->getParameter('group_changed'); if ($request->isPost() && $groupChanged) { $user->setOnBehalfGroup($group_id); } @@ -62,11 +62,11 @@ $cl_tracking_mode = $request->getParameter('tracking_mode'); $cl_project_required = $request->getParameter('project_required'); $cl_record_type = $request->getParameter('record_type'); - $cl_punch_mode = $request->getParameter('punch_mode'); - $cl_allow_overlap = $request->getParameter('allow_overlap'); - $cl_future_entries = $request->getParameter('future_entries'); - $cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators'); - $cl_confirm_save = $request->getParameter('confirm_save'); + $cl_punch_mode = (bool)$request->getParameter('punch_mode'); + $cl_allow_overlap = (bool)$request->getParameter('allow_overlap'); + $cl_future_entries = (bool)$request->getParameter('future_entries'); + $cl_uncompleted_indicators = (bool)$request->getParameter('uncompleted_indicators'); + $cl_confirm_save = (bool)$request->getParameter('confirm_save'); } else { $cl_currency = ($group['currency'] == '' ? CURRENCY_DEFAULT : $group['currency']); $cl_lang = $group['lang']; diff --git a/import.php b/import.php index 938fdb3dd..b743b3f5a 100644 --- a/import.php +++ b/import.php @@ -1,30 +1,6 @@ isPost()) { $cl_date = $request->getParameter('date'); - $cl_client = $request->getParameter('client'); + $cl_client = (int)$request->getParameter('client'); $cl_project = $request->getParameter('project'); $cl_number = trim($request->getParameter('number')); $cl_start = $request->getParameter('start'); diff --git a/invoice_delete.php b/invoice_delete.php index 89ea372a3..5b473dfa0 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -1,30 +1,6 @@ Date: Sat, 6 Mar 2021 21:19:21 +0000 Subject: [PATCH 2103/2515] Some more sanitizing work. --- locking.php | 28 ++---------------- login.php | 28 ++---------------- logout.php | 28 ++---------------- notification_add.php | 28 ++---------------- notification_delete.php | 28 ++---------------- notification_edit.php | 28 ++---------------- notifications.php | 28 ++---------------- password_change.php | 28 ++---------------- plugins.php | 64 +++++++++++++---------------------------- 9 files changed, 36 insertions(+), 252 deletions(-) diff --git a/locking.php b/locking.php index 9b23c876a..04c8d9419 100644 --- a/locking.php +++ b/locking.php @@ -1,30 +1,6 @@ doLogout(); diff --git a/notification_add.php b/notification_add.php index b7f743256..83cd7a538 100644 --- a/notification_add.php +++ b/notification_add.php @@ -1,30 +1,6 @@ isPost()) { // Plugins that user wants to save for the current group. - $cl_charts = $request->getParameter('charts'); - $cl_clients = $request->getParameter('clients'); - $cl_client_required = $request->getParameter('client_required'); - $cl_invoices = $request->getParameter('invoices'); - $cl_paid_status = $request->getParameter('paid_status'); - $cl_custom_fields = $request->getParameter('custom_fields'); - $cl_expenses = $request->getParameter('expenses'); - $cl_tax_expenses = $request->getParameter('tax_expenses'); - $cl_notifications = $request->getParameter('notifications'); - $cl_locking = $request->getParameter('locking'); - $cl_quotas = $request->getParameter('quotas'); - $cl_week_view = $request->getParameter('week_view'); - $cl_work_units = $request->getParameter('work_units'); - $cl_approval = $request->getParameter('approval'); - $cl_timesheets = $request->getParameter('timesheets'); - $cl_templates = $request->getParameter('templates'); - $cl_attachments = $request->getParameter('attachments'); - $cl_work = $request->getParameter('work'); + $cl_charts = (bool)$request->getParameter('charts'); + $cl_clients = (bool)$request->getParameter('clients'); + $cl_client_required = (bool)$request->getParameter('client_required'); + $cl_invoices = (bool)$request->getParameter('invoices'); + $cl_paid_status = (bool)$request->getParameter('paid_status'); + $cl_custom_fields = (bool)$request->getParameter('custom_fields'); + $cl_expenses = (bool)$request->getParameter('expenses'); + $cl_tax_expenses = (bool)$request->getParameter('tax_expenses'); + $cl_notifications = (bool)$request->getParameter('notifications'); + $cl_locking = (bool)$request->getParameter('locking'); + $cl_quotas = (bool)$request->getParameter('quotas'); + $cl_week_view = (bool)$request->getParameter('week_view'); + $cl_work_units = (bool)$request->getParameter('work_units'); + $cl_approval = (bool)$request->getParameter('approval'); + $cl_timesheets = (bool)$request->getParameter('timesheets'); + $cl_templates = (bool)$request->getParameter('templates'); + $cl_attachments = (bool)$request->getParameter('attachments'); + $cl_work = (bool)$request->getParameter('work'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? From 5a9248484ea3248963da71b955449ce6f354580b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 6 Mar 2021 21:27:05 +0000 Subject: [PATCH 2104/2515] Some cosmetic refactoring. --- initialize.php | 2 +- predefined_expense_add.php | 28 ++------------------------- predefined_expense_delete.php | 36 ++++++----------------------------- predefined_expense_edit.php | 30 +++-------------------------- predefined_expenses.php | 28 ++------------------------- 5 files changed, 14 insertions(+), 110 deletions(-) diff --git a/initialize.php b/initialize.php index 22d73352c..c454c8337 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5426"); +define("APP_VERSION", "1.19.26.5427"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/predefined_expense_add.php b/predefined_expense_add.php index 2a0ab6be9..e300fa43e 100644 --- a/predefined_expense_add.php +++ b/predefined_expense_add.php @@ -1,30 +1,6 @@ getParameter('id'); -$predefined_expense = ttPredefinedExpenseHelper::get($cl_predefined_expense_id); +$predefined_expense_id = (int)$request->getParameter('id'); +$predefined_expense = ttPredefinedExpenseHelper::get($predefined_expense_id); if (!$predefined_expense) { header('Location: access_denied.php'); exit(); @@ -51,13 +27,13 @@ $predefined_expense_to_delete = $predefined_expense['name']; $form = new Form('predefinedExpenseDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_predefined_expense_id)); +$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$predefined_expense_id)); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); if ($request->isPost()) { if ($request->getParameter('btn_delete')) { - if (ttPredefinedExpenseHelper::delete($cl_predefined_expense_id)) { + if (ttPredefinedExpenseHelper::delete($predefined_expense_id)) { header('Location: predefined_expenses.php'); exit(); } else diff --git a/predefined_expense_edit.php b/predefined_expense_edit.php index 3f0cb0c8c..1eca3a2c7 100644 --- a/predefined_expense_edit.php +++ b/predefined_expense_edit.php @@ -1,30 +1,6 @@ getParameter('id'); +$predefined_expense_id = (int)$request->getParameter('id'); $predefined_expense = ttPredefinedExpenseHelper::get($predefined_expense_id); if (!$predefined_expense) { header('Location: access_denied.php'); diff --git a/predefined_expenses.php b/predefined_expenses.php index e1c14d802..9f94bd1cc 100644 --- a/predefined_expenses.php +++ b/predefined_expenses.php @@ -1,30 +1,6 @@ Date: Sat, 6 Mar 2021 22:24:50 +0000 Subject: [PATCH 2105/2515] Cosmetic. --- WEB-INF/lib/ttRoleHelper.class.php | 2 +- initialize.php | 2 +- profile_edit.php | 28 ++------------------------ quotas.php | 28 ++------------------------ report.php | 32 ++++-------------------------- report_send.php | 28 ++------------------------ reports.php | 28 ++------------------------ role_add.php | 28 ++------------------------ role_delete.php | 28 ++------------------------ role_edit.php | 28 ++------------------------ 10 files changed, 20 insertions(+), 212 deletions(-) diff --git a/WEB-INF/lib/ttRoleHelper.class.php b/WEB-INF/lib/ttRoleHelper.class.php index 7fa9f8fb2..a3753d238 100644 --- a/WEB-INF/lib/ttRoleHelper.class.php +++ b/WEB-INF/lib/ttRoleHelper.class.php @@ -149,7 +149,7 @@ static function delete($role_id) { $group_id = $user->getGroup(); $org_id = $user->org_id; - // Mark the task as deleted. + // Mark the role as deleted. $sql = "update tt_roles set status = NULL where id = $role_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); diff --git a/initialize.php b/initialize.php index c454c8337..fc27cbaaa 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5427"); +define("APP_VERSION", "1.19.26.5428"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/profile_edit.php b/profile_edit.php index d0d3de5fe..26091823f 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -1,30 +1,6 @@ getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) @@ -199,7 +175,7 @@ $item_ids = ttReportHelper::getFromSession(); $time_log_ids = $item_ids['report_item_ids']; $expense_item_ids = $item_ids['report_item_expense_ids']; - // The above code is here beacues the arrays are used in both "Mark paid" and "Assign to invoice" handlers below. + // The above code is here because the arrays are used in both "Mark paid" and "Assign to invoice" handlers below. } if ($err->no()) { diff --git a/report_send.php b/report_send.php index e837f3e50..a2747b957 100644 --- a/report_send.php +++ b/report_send.php @@ -1,30 +1,6 @@ Date: Sun, 7 Mar 2021 17:35:27 +0000 Subject: [PATCH 2106/2515] Finished work on sanitizing post parameters to reduce risk of SQL injections. --- initialize.php | 2 +- mobile/expenses.php | 30 +++--------------------------- mobile/index.php | 28 ++-------------------------- mobile/login.php | 28 ++-------------------------- mobile/projects.php | 28 ++-------------------------- mobile/tasks.php | 28 ++-------------------------- mobile/time.php | 34 +++++----------------------------- mobile/timer.php | 28 ++-------------------------- mobile/users.php | 28 ++-------------------------- roles.php | 28 ++-------------------------- site_map.php | 28 ++-------------------------- success.php | 28 ++-------------------------- template_add.php | 28 ++-------------------------- template_delete.php | 30 +++--------------------------- template_edit.php | 30 +++--------------------------- templates.php | 28 ++-------------------------- time.php | 6 +++--- timesheet_add.php | 28 ++-------------------------- timesheet_edit.php | 28 ++-------------------------- timesheet_view.php | 28 ++-------------------------- timesheets.php | 34 +++++----------------------------- tofile.php | 28 ++-------------------------- topdf.php | 28 ++-------------------------- week.php | 34 +++++----------------------------- week_view.php | 36 ++++++------------------------------ work_units.php | 34 +++++----------------------------- 26 files changed, 71 insertions(+), 647 deletions(-) diff --git a/initialize.php b/initialize.php index fc27cbaaa..fca2f15a5 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5428"); +define("APP_VERSION", "1.19.26.5429"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/expenses.php b/mobile/expenses.php index 463671f4a..4f3b097fd 100644 --- a/mobile/expenses.php +++ b/mobile/expenses.php @@ -1,30 +1,6 @@ isPost() && $request->getParameter('user')) { - if (!$user->isUserValid($request->getParameter('user'))) { + if (!$user->isUserValid((int)$request->getParameter('user'))) { header('Location: access_denied.php'); // Wrong user id on post. exit(); } diff --git a/mobile/index.php b/mobile/index.php index 88408af23..4da5fab10 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -1,30 +1,6 @@ isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { + $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { header('Location: access_denied.php'); // User changed, but no right or wrong user id. exit(); } @@ -64,7 +40,7 @@ // Determine user for whom we display this page. if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/mobile/timer.php b/mobile/timer.php index e301716a4..1d870b1ca 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -1,30 +1,6 @@ getParameter('id'); +$cl_template_id = (int)$request->getParameter('id'); $template = ttTemplateHelper::get($cl_template_id); if (!$template) { header('Location: access_denied.php'); diff --git a/template_edit.php b/template_edit.php index 117b8166b..e3fa38947 100644 --- a/template_edit.php +++ b/template_edit.php @@ -1,30 +1,6 @@ getParameter('id'); +$cl_template_id = (int)$request->getParameter('id'); $template = ttTemplateHelper::get($cl_template_id); if (!$template) { header('Location: access_denied.php'); diff --git a/templates.php b/templates.php index 45ea2e477..636d4bc10 100644 --- a/templates.php +++ b/templates.php @@ -1,30 +1,6 @@ isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { + $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { header('Location: access_denied.php'); // User changed, but no right or wrong user id. exit(); } @@ -36,7 +36,7 @@ // Determine user for whom we display this page. if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/timesheet_add.php b/timesheet_add.php index 7c7633c6c..536241d62 100644 --- a/timesheet_add.php +++ b/timesheet_add.php @@ -1,30 +1,6 @@ isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { + $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { header('Location: access_denied.php'); // Group changed, but no rght or wrong user id. exit(); } @@ -59,7 +35,7 @@ // Determine user for whom we display this page. if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/tofile.php b/tofile.php index 996ffe9fd..b10bdee02 100644 --- a/tofile.php +++ b/tofile.php @@ -1,30 +1,6 @@ isPost()) { - $userChanged = $request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid($request->getParameter('user')))) { + $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { header('Location: access_denied.php'); // User changed, but no right or wrong user id. exit(); } @@ -66,7 +42,7 @@ // Determine user for whom we display this page. if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); + $user_id = (int)$request->getParameter('user'); $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); diff --git a/week_view.php b/week_view.php index 149842e87..1718afd4b 100644 --- a/week_view.php +++ b/week_view.php @@ -1,30 +1,6 @@ getConfigHelper(); if ($request->isPost()) { - $cl_week_menu = $request->getParameter('week_menu'); - $cl_week_note = $request->getParameter('week_note'); - $cl_week_list = $request->getParameter('week_list'); - $cl_notes = $request->getParameter('notes'); + $cl_week_menu = (bool)$request->getParameter('week_menu'); + $cl_week_note = (bool)$request->getParameter('week_note'); + $cl_week_list = (bool)$request->getParameter('week_list'); + $cl_notes = (bool)$request->getParameter('notes'); } else { $cl_week_menu = $config->getDefinedValue('week_menu'); $cl_week_note = $config->getDefinedValue('week_note'); diff --git a/work_units.php b/work_units.php index e4d198d5c..826f899ab 100644 --- a/work_units.php +++ b/work_units.php @@ -1,30 +1,6 @@ getConfig()); if ($request->isPost()) { - $cl_minutes_in_unit = $request->getParameter('minutes_in_unit'); - $cl_1st_unit_threshold = $request->getParameter('1st_unit_threshold'); - $cl_totals_only = $request->getParameter('totals_only'); + $cl_minutes_in_unit = (int)$request->getParameter('minutes_in_unit'); + $cl_1st_unit_threshold = (int)$request->getParameter('1st_unit_threshold'); + $cl_totals_only = (bool)$request->getParameter('totals_only'); } else { $cl_minutes_in_unit = $user->getConfigInt('minutes_in_unit', 15); $cl_1st_unit_threshold = $user->getConfigInt('1st_unit_threshold', 0); From 464291697900e30ae782477930ef45a9cb8e4cc0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 7 Mar 2021 18:15:58 +0000 Subject: [PATCH 2107/2515] Removed some more no longer used mobile pages. --- WEB-INF/templates/mobile/expenses.tpl | 226 ------------------------- WEB-INF/templates/mobile/projects.tpl | 76 --------- WEB-INF/templates/mobile/tasks.tpl | 76 --------- WEB-INF/templates/mobile/users.tpl | 95 ----------- initialize.php | 2 +- mobile/expenses.php | 235 -------------------------- mobile/projects.php | 36 ---- mobile/tasks.php | 35 ---- mobile/users.php | 51 ------ 9 files changed, 1 insertion(+), 831 deletions(-) delete mode 100644 WEB-INF/templates/mobile/expenses.tpl delete mode 100644 WEB-INF/templates/mobile/projects.tpl delete mode 100644 WEB-INF/templates/mobile/tasks.tpl delete mode 100644 WEB-INF/templates/mobile/users.tpl delete mode 100644 mobile/expenses.php delete mode 100644 mobile/projects.php delete mode 100644 mobile/tasks.php delete mode 100644 mobile/users.php diff --git a/WEB-INF/templates/mobile/expenses.tpl b/WEB-INF/templates/mobile/expenses.tpl deleted file mode 100644 index 81d7a214a..000000000 --- a/WEB-INF/templates/mobile/expenses.tpl +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - -
<<{$timestring}>>
- -{$forms.expensesForm.open} - - - - - -
- -{if $user_dropdown} - - - - -{/if} -{if $user->isPluginEnabled('cl')} - - - - -{/if} -{if $show_project} - - - - -{/if} -{if $predefined_expenses} - - - - - - - - -{/if} - - - - - - - - -
{$i18n.label.user}:{$forms.expensesForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.expensesForm.client.control}
{$i18n.label.project} (*):{$forms.expensesForm.project.control}
{$i18n.label.expense}:{$forms.expensesForm.predefined_expense.control}
{$i18n.label.quantity}:{$forms.expensesForm.quantity.control}
{$i18n.label.item} (*):{$forms.expensesForm.item_name.control}
{$i18n.label.cost} (*):{$forms.expensesForm.cost.control} {$user->getCurrency()|escape}
-
- - - - - -
{$forms.expensesForm.btn_submit.control}
- - - - - -
-{if $expense_items} - - - {if $user->isPluginEnabled('cl')} - - {/if} - {if $show_project} - - {/if} - - - - {foreach $expense_items as $item} - - {if $user->isPluginEnabled('cl')} - - {/if} - {if $show_project} - - {/if} - - - - {/foreach} -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.item}{$i18n.label.cost}
{$item.client|escape}{$item.project|escape} - {if $item.approved || $item.invoice_id} - {$item.item|escape} - {else} - {$item.item|escape} - {/if} - {$item.cost}
- - - - -
{$i18n.label.day_total}: {$user->getCurrency()|escape} {$day_total}
-{/if} -
-{$forms.expensesForm.close} diff --git a/WEB-INF/templates/mobile/projects.tpl b/WEB-INF/templates/mobile/projects.tpl deleted file mode 100644 index 96d27054f..000000000 --- a/WEB-INF/templates/mobile/projects.tpl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - -
-{if $user->can('manage_projects')} - - {if $inactive_projects} - - {/if} - {if $active_projects} - - - - - {foreach $active_projects as $project} - - - - - {/foreach} - {/if} -
{$i18n.form.projects.active_projects}
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}
- - - - - -

-
-
- - {if $inactive_projects} - - - - - - - {foreach $inactive_projects as $project} - - - - - {/foreach} -
{$i18n.form.projects.inactive_projects}
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}
- - - - - -

-
-
- {/if} -{else} - - - - - - {if $active_projects} - {foreach $active_projects as $project} - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.description}
{$project.name|escape}{$project.description|escape}
-{/if} -
diff --git a/WEB-INF/templates/mobile/tasks.tpl b/WEB-INF/templates/mobile/tasks.tpl deleted file mode 100644 index 3fbee1f7d..000000000 --- a/WEB-INF/templates/mobile/tasks.tpl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - -
-{if $user->can('manage_tasks')} - - {if $inactive_tasks} - - {/if} - - - - - {if $active_tasks} - {foreach $active_tasks as $task} - - - - - {/foreach} - {/if} -
{$i18n.form.tasks.active_tasks}
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}
- - - - - -

-
-
- - {if $inactive_tasks} - - - - - - - {foreach $inactive_tasks as $task} - - - - - {/foreach} -
{$i18n.form.tasks.inactive_tasks}
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}
- - - - - -

-
-
- {/if} -{else} - - - - - - {if $active_tasks} - {foreach $active_tasks as $task} - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.description}
{$task.name|escape}{$task.description|escape}
- {/if} -
diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl deleted file mode 100644 index eaeb4770f..000000000 --- a/WEB-INF/templates/mobile/users.tpl +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -
-{if $user->can('manage_users')} - - {if $inactive_users} - - {/if} - {if $active_users} - - - - - - {foreach $active_users as $u} - - - - - - {/foreach} - {/if} -
{$i18n.label.active_users}
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}
- {if $uncompleted_indicators} - - {/if} - {if $u.group_id != $user->group_id || $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)} - {$u.name|escape} - {else} - {$u.name|escape} - {/if} - {$u.login|escape}{$u.role_name|escape}
- - - - - -

-
-
- - {if $inactive_users} - - - - - - - - {foreach $inactive_users as $u} - - - - - - {/foreach} -
{$i18n.label.inactive_users}
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}
- {if $u.group_id != $user->group_id || $u.rank < $user->rank} - {$u.name|escape} - {else} - {$u.name|escape} - {/if} - {$u.login|escape}{$u.role_name|escape}
- - - - - -
-
-
- {/if} -{else} - - - - - - - {foreach $active_users as $u} - - - - - - {/foreach} -
{$i18n.label.person_name}{$i18n.label.login}{$i18n.form.users.role}
{$u.name|escape}{$u.login|escape}{$u.role_name|escape}
-{/if} -
diff --git a/initialize.php b/initialize.php index fca2f15a5..cbdfb3cc1 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5429"); +define("APP_VERSION", "1.19.26.5430"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/expenses.php b/mobile/expenses.php deleted file mode 100644 index 4f3b097fd..000000000 --- a/mobile/expenses.php +++ /dev/null @@ -1,235 +0,0 @@ -isPluginEnabled('ex')) { - header('Location: feature_disabled.php'); - exit(); -} -if (!$user->exists()) { - header('Location: access_denied.php'); // Nobody to enter expenses for. - exit(); -} -if ($user->behalf_id && (!$user->can('track_expenses') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_expenses') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost() && $request->getParameter('user')) { - if (!$user->isUserValid((int)$request->getParameter('user'))) { - header('Location: access_denied.php'); // Wrong user id on post. - exit(); - } -} -// End of access checks. - -// Determine user for which we display this page. -$userChanged = $request->getParameter('user_changed'); -if ($request->isPost() && $userChanged) { - $user_id = $request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -// Determine previous and next dates for simple navigation. -$prev_date = date('Y-m-d', strtotime('-1 day', strtotime($cl_date))); -$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date))); - -$tracking_mode = $user->getTrackingMode(); -$show_project = MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode; - -// Initialize variables. -$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_item_name = $request->getParameter('item_name'); -$cl_cost = $request->getParameter('cost'); - -// Elements of expensesForm. -$form = new Form('expensesForm'); - -if ($user->can('track_expenses')) { - $rank = $user->getMaxRankForGroup($user->getGroup()); - if ($user->can('track_own_expenses')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'this.form.user_changed.value=1;this.form.submit();', - 'name'=>'user', - 'style'=>'width: 250px;', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'))); - $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $tracking_mode && $user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -if ($show_project) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - // 'onchange'=>'fillTaskDropdown(this.value);', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Dropdown for clients if the clients plugin is enabled. - if ($user->isPluginEnabled('cl')) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} -// If predefined expenses are configured, add controls to select an expense and quantity. -$predefined_expenses = ttGroupHelper::getPredefinedExpenses(); -if ($predefined_expenses) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'recalculateCost();', - 'name'=>'predefined_expense', - 'style'=>'width: 250px;', - 'value'=>$cl_predefined_expense, - 'data'=>$predefined_expenses, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $form->addInput(array('type'=>'text','onchange'=>'recalculateCost();','maxlength'=>'40','name'=>'quantity','style'=>'width: 100px;','value'=>$cl_quantity)); -} -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'item_name','style'=>'width: 250px;','value'=>$cl_item_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); -$form->addInput(array('type'=>'calendar','name'=>'date','highlight'=>'expenses','value'=>$cl_date)); // calendar -$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->get('button.submit'))); - -// Submit. -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - if ($show_project && !$cl_project) - $err->add($i18n->get('error.project')); - if (!ttValidString($cl_item_name)) $err->add($i18n->get('error.field'), $i18n->get('label.item')); - if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost')); - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating input data. - - // Prohibit creating entries in locked range. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->get('error.range_locked')); - - // Insert record. - if ($err->no()) { - if (ttExpenseHelper::insert(array('date'=>$cl_date,'client_id'=>$cl_client, - 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { - header('Location: expenses.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } - } elseif ($request->getParameter('onBehalfUser')) { - if($user->can('track_expenses')) { - unset($_SESSION['behalf_id']); - unset($_SESSION['behalf_name']); - - if($on_behalf_id != $user->id) { - $_SESSION['behalf_id'] = $on_behalf_id; - $_SESSION['behalf_name'] = ttUserHelper::getUserName($on_behalf_id); - } - header('Location: expenses.php'); - exit(); - } - } -} - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_project', $show_project); -$smarty->assign('next_date', $next_date); -$smarty->assign('prev_date', $prev_date); -$smarty->assign('day_total', ttExpenseHelper::getTotalForDay($cl_date)); -$smarty->assign('expense_items', ttExpenseHelper::getItems($cl_date)); -$smarty->assign('predefined_expenses', $predefined_expenses); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); -$smarty->assign('title', $i18n->get('title.expenses')); -$smarty->assign('content_page_name', 'mobile/expenses.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/projects.php b/mobile/projects.php deleted file mode 100644 index c234d984d..000000000 --- a/mobile/projects.php +++ /dev/null @@ -1,36 +0,0 @@ -getTrackingMode() && MODE_PROJECTS_AND_TASKS != $user->getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -if($user->can('manage_projects')) { - $active_projects = ttGroupHelper::getActiveProjects(); - $inactive_projects = ttGroupHelper::getInactiveProjects(); -} else - $active_projects = $user->getAssignedProjects(); - -$smarty->assign('active_projects', $active_projects); -$smarty->assign('inactive_projects', $inactive_projects); -$smarty->assign('title', $i18n->get('title.projects')); -$smarty->assign('content_page_name', 'mobile/projects.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/tasks.php b/mobile/tasks.php deleted file mode 100644 index 98530477d..000000000 --- a/mobile/tasks.php +++ /dev/null @@ -1,35 +0,0 @@ -getTrackingMode()) { - header('Location: feature_disabled.php'); - exit(); -} -// End of access checks. - -if($user->can('manage_tasks')) { - $active_tasks = ttGroupHelper::getActiveTasks(); - $inactive_tasks = ttGroupHelper::getInactiveTasks(); -} else - $active_tasks = $user->getAssignedTasks(); - -$smarty->assign('active_tasks', $active_tasks); -$smarty->assign('inactive_tasks', $inactive_tasks); -$smarty->assign('title', $i18n->get('title.tasks')); -$smarty->assign('content_page_name', 'mobile/tasks.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/users.php b/mobile/users.php deleted file mode 100644 index 45be3fcdc..000000000 --- a/mobile/users.php +++ /dev/null @@ -1,51 +0,0 @@ -getMaxRankForGroup($user->getGroup()); -if ($user->can('view_users')) - $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true); -else /* if ($user->can('manage_users')) */ - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true); -$active_users = $user->getUsers($options); - -// Prepare a list of inactive users. -if($user->can('manage_users')) { - $options = array('status'=>INACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_login'=>true,'include_role'=>true); - $inactive_users = $user->getUsers($options); -} - -$uncompleted_indicators = $user->getConfigOption('uncompleted_indicators'); -if ($uncompleted_indicators) { - // Check each active user if they have an uncompleted time entry. - foreach ($active_users as $key => $active_user) { - $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($active_user['id']); - } - $smarty->assign('uncompleted_indicators', true); -} - -$smarty->assign('active_users', $active_users); -$smarty->assign('inactive_users', $inactive_users); -$smarty->assign('can_delete_manager', $can_delete_manager); -$smarty->assign('title', $i18n->get('title.users')); -$smarty->assign('content_page_name', 'mobile/users.tpl'); -$smarty->display('mobile/index.tpl'); From e77be7eea69df5d52e19f9f25b5b89a0e66a5b8e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 11 Apr 2021 21:57:58 +0000 Subject: [PATCH 2108/2515] An attempt to mitigate cross site request forgery vulnerability. --- WEB-INF/config.php.dist | 5 +++++ WEB-INF/lib/common.lib.php | 39 ++++++++++++++++++++++++++++++++++++++ initialize.php | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 7b6eabbd2..1b7b32b0a 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -163,6 +163,11 @@ define('AUTH_MODULE', 'db'); // define('DEBUG', false); // Note: enabling DEBUG breaks redirects as debug output is printed before setting redirect header. Do not enable on production systems. +// HTTP_TARGET - defines http target for cross site request forgery protection. +// It can be used when you access the application via a proxy. +// define('HTTP_TARGET', 'localhost'); + + // Group managers can set monthly work hour quota for years between the following values. // define('MONTHLY_QUOTA_YEAR_START', 2010); // If nothing is specified, it falls back to 2015. // define('MONTHLY_QUOTA_YEAR_END', 2025); // If nothing is specified, it falls back to 2030. diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 389b29c94..52589c6e0 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -363,6 +363,10 @@ function ttAccessAllowed($required_right) exit(); } + // Protection against cross site request forgery. + if (!ttMitigateCSRF()) + return false; + // Check IP restriction, if set. if ($user->allow_ip && !$user->can('override_allow_ip')) { $access_allowed = false; @@ -388,6 +392,41 @@ function ttAccessAllowed($required_right) return false; } +// ttMitigateCSRF verifies request headers in an attempt to block cross site request forgery. +function ttMitigateCSRF() { + // No need to do anything for get requests. + global $request; + if ($request->isGet()) + return true; + + $origin = $_SERVER['HTTP_ORIGIN']; + if ($origin) { + $pos = strpos($origin, '//'); + $origin = substr($origin, $pos+2); // Strip protocol. + } + if (!$origin) { + // Try using referer. + $origin = $_SERVER['HTTP_REFERER']; + if ($origin) { + $pos = strpos($origin, '//'); + $origin = substr($origin, $pos+2); // Strip protocol. + $pos = strpos($origin, '/'); + $origin = substr($origin, 0, $pos); // Leave host only. + } + } + error_log("origin: ".$origin); + $target = defined('HTTP_TARGET') ? HTTP_TARGET : $_SERVER['HTTP_HOST']; + error_log("target: ".$target); + if (strcmp($origin, $target)) { + error_log("Potential cross site request forgery. Origin: '$origin' does not match target: '$target'."); + return false; // Origin and target do not match, + } + + // TODO: review and improve this function for custom ports. + return true; +} + + // ttStartsWith functions checks if a string starts with a given substring. function ttStartsWith($string, $startString) { diff --git a/initialize.php b/initialize.php index cbdfb3cc1..aadc0bb07 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.26.5430"); +define("APP_VERSION", "1.19.27.5431"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e3f8222ee308322942bcebcd86b78ecf19382563 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 12 Apr 2021 17:14:30 +0000 Subject: [PATCH 2109/2515] Tested CSRF fix for custom ports - it's working, also removed unnecessary logging. --- WEB-INF/config.php.dist | 2 +- WEB-INF/lib/common.lib.php | 5 +---- initialize.php | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 1b7b32b0a..3787cbc94 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -165,7 +165,7 @@ define('AUTH_MODULE', 'db'); // HTTP_TARGET - defines http target for cross site request forgery protection. // It can be used when you access the application via a proxy. -// define('HTTP_TARGET', 'localhost'); +// define('HTTP_TARGET', 'localhost:8080'); // Group managers can set monthly work hour quota for years between the following values. diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 52589c6e0..d5b43f57f 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -414,15 +414,12 @@ function ttMitigateCSRF() { $origin = substr($origin, 0, $pos); // Leave host only. } } - error_log("origin: ".$origin); $target = defined('HTTP_TARGET') ? HTTP_TARGET : $_SERVER['HTTP_HOST']; - error_log("target: ".$target); if (strcmp($origin, $target)) { error_log("Potential cross site request forgery. Origin: '$origin' does not match target: '$target'."); - return false; // Origin and target do not match, + return false; // Origin and target do not match. } - // TODO: review and improve this function for custom ports. return true; } diff --git a/initialize.php b/initialize.php index aadc0bb07..e8588857f 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.27.5431"); +define("APP_VERSION", "1.19.27.5432"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ee6312e1a278cfbb240ae1419d6c63eeff0913f6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 13 Apr 2021 22:12:35 +0000 Subject: [PATCH 2110/2515] Added options for secure ldap authentication. --- WEB-INF/config.php.dist | 4 ++++ WEB-INF/lib/auth/Auth_ldap.class.php | 10 ++++++++++ initialize.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 3787cbc94..bbf647cec 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -144,6 +144,8 @@ define('AUTH_MODULE', 'db'); // 'base_dn' => 'ou=People,dc=example,dc=com', // Path of user's base distinguished name in LDAP catalog. // 'user_login_attribute' => 'uid', // LDAP attribute used for login. // 'default_domain' => 'example.com', // Default domain. +// 'tls_cacertdir' => null, // Path to a directory containing CA certificates for secure ldap. +// 'tls_cacertfile' => null, // CA certificate file name for secure ldap. // 'member_of' => array()); // List of groups, membership in which is required for user to be authenticated. @@ -154,6 +156,8 @@ define('AUTH_MODULE', 'db'); // 'type' => 'ad', // Type of server. // 'base_dn' => 'DC=example,DC=com', // Base distinguished name in LDAP catalog. // 'default_domain' => 'example.com', // Default domain. +// 'tls_cacertdir' => null, // Path to a directory containing CA certificates for secure ldap. +// 'tls_cacertfile' => null, // CA certificate file name for secure ldap. // 'member_of' => array()); // List of groups, membership in which is required for user to be authenticated. // Leave it empty if membership is not necessary. Otherwise list CN parts only. // For example: diff --git a/WEB-INF/lib/auth/Auth_ldap.class.php b/WEB-INF/lib/auth/Auth_ldap.class.php index 7f3495737..1ccbb0371 100644 --- a/WEB-INF/lib/auth/Auth_ldap.class.php +++ b/WEB-INF/lib/auth/Auth_ldap.class.php @@ -105,6 +105,16 @@ function authenticate($login, $password) if (isTrue('DEBUG')) { ldap_set_option($lc, LDAP_OPT_DEBUG_LEVEL, 7); } + // Additional options for secure ldap. + // This insert is based on https://www.anuko.com/forum/viewtopic.php?f=4&t=2091 + // I can't test it at the moment. If things break please let us know! + if (isset($this->params['tls_cacertdir'])) { + ldap_set_option(null, LDAP_OPT_X_TLS_CACERTDIR, $this->params['tls_cacertdir']); + } + if (isset($this->params['tls_cacertfile'])) { + ldap_set_option(null, LDAP_OPT_X_TLS_CACERTFILE, $this->params['tls_cacertfile']); + } + // End of addiitional options for secure ldap. // We need to handle Windows AD and OpenLDAP differently. if ($this->params['type'] == 'ad') { diff --git a/initialize.php b/initialize.php index e8588857f..a739b939e 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.27.5432"); +define("APP_VERSION", "1.19.28.5433"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 4fdaa18d343d0459391e62b40971843fbd0e5924 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Apr 2021 21:26:18 +0000 Subject: [PATCH 2111/2515] Resuming work on php8 warnings. --- WEB-INF/lib/ttTimeHelper.class.php | 2 ++ WEB-INF/templates/header2.tpl | 2 +- WEB-INF/templates/time2.tpl | 2 +- WEB-INF/templates/time_script.tpl | 16 +++++++++------- initialize.php | 2 +- time.php | 1 + 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index f0b1ea100..af2a436a5 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -895,6 +895,8 @@ static function getRecords($date, $includeFiles = false) { $time_fields = ", ".join(', ', $time_fields_array); } + $filePart = ''; + $fileJoin = ''; if ($includeFiles) { $filePart = ', if(Sub1.entity_id is null, 0, 1) as has_files'; $fileJoin = " left join (select distinct entity_id from tt_files". diff --git a/WEB-INF/templates/header2.tpl b/WEB-INF/templates/header2.tpl index 6bc5f65fe..74ccb1adc 100644 --- a/WEB-INF/templates/header2.tpl +++ b/WEB-INF/templates/header2.tpl @@ -6,7 +6,7 @@ -{if $i18n.language.rtl} +{if (isset($i18n.language.rtl) && $i18n.language.rtl)} {/if} {if $user->getCustomCss()} diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 487bff7cf..4a26f9bef 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -93,7 +93,7 @@ License: See license.txt *}
{$forms.timeRecordForm.date.control}
- + {* No need to escape as it is done in the class. *}
{$title}{if $timestring}: {$timestring}{/if}
{$title}{if (isset($timestring) && $timestring)}: {$timestring}{/if}
{$user->getUserPartForHeader()}
{/if} diff --git a/plugins.php b/plugins.php index 2a5f2046a..9b3bc1a27 100644 --- a/plugins.php +++ b/plugins.php @@ -86,6 +86,7 @@ // We update plugin list for the current group. // Prepare plugins string. + $plugins = ''; if ($cl_charts) $plugins .= ',ch'; if ($cl_clients) From 86bca3c33d430d68a4dd9702b973f67ea12fbb61 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 15:27:02 +0000 Subject: [PATCH 2114/2515] Resuming work on php8 warnings. --- WEB-INF/lib/ttAdmin.class.php | 2 +- initialize.php | 2 +- register.php | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttAdmin.class.php b/WEB-INF/lib/ttAdmin.class.php index 74d789d12..e40e31dba 100644 --- a/WEB-INF/lib/ttAdmin.class.php +++ b/WEB-INF/lib/ttAdmin.class.php @@ -311,7 +311,7 @@ static function createOrgManager($fields) { // The createOrg function creates an organization in Time Tracker. static function createOrg($fields) { - // There are 3 steps that we need to 2 when creating a new organization. + // There are 3 steps that we need to do when creating a new organization. // 1. Create a new group with null parent_id. // 2. Create pre-defined roles in it. // 3. Create a top manager account for new group. diff --git a/initialize.php b/initialize.php index be7ff2576..025e5dcf4 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5435"); +define("APP_VERSION", "1.19.28.5436"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/register.php b/register.php index 3430d4366..220376138 100644 --- a/register.php +++ b/register.php @@ -18,6 +18,8 @@ if (!defined('CURRENCY_DEFAULT')) define('CURRENCY_DEFAULT', '$'); +$cl_group_name = $cl_currency = $cl_lang = $cl_manager_name = $cl_manager_login = +$cl_password1 = $cl_password2 = $cl_manager_email = ''; if ($request->isPost()) { $cl_group_name = trim($request->getParameter('group_name')); $cl_currency = trim($request->getParameter('currency')); From ee71238364860fe3d693313cb72ca0f2c87c7be2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 16:15:10 +0000 Subject: [PATCH 2115/2515] Simplified ttRegistrator.class.php. --- WEB-INF/lib/ttRegistrator.class.php | 46 +++++------------------------ initialize.php | 2 +- 2 files changed, 8 insertions(+), 40 deletions(-) diff --git a/WEB-INF/lib/ttRegistrator.class.php b/WEB-INF/lib/ttRegistrator.class.php index aadd7d14f..ae499a9df 100644 --- a/WEB-INF/lib/ttRegistrator.class.php +++ b/WEB-INF/lib/ttRegistrator.class.php @@ -1,30 +1,6 @@ currency = $fields['currency']; $this->lang = $fields['lang']; if (!$this->lang) $this->lang = 'en'; - $this->created_by_id = (int) $fields['created_by_id']; $this->err = $err; // Validate passed in parameters. @@ -98,12 +69,10 @@ function register() { global $user; // Protection from too many recent bot registrations from user IP. - if (!$this->created_by_id) { // No problems for logged in user (site admin). - if ($this->registeredRecently()) { - $this->err->add($i18n->get('error.registered_recently')); - $this->err->add($i18n->get('error.access_denied')); - return false; - } + if ($this->registeredRecently()) { + $this->err->add($i18n->get('error.registered_recently')); + $this->err->add($i18n->get('error.access_denied')); + return false; } import('ttUserHelper'); @@ -134,8 +103,7 @@ function register() { } // Set created_by appropriately. - $created_by = $this->created_by_id ? $this->created_by_id : $this->user_id; - if (!$this->setCreatedBy($created_by)) + if (!$this->setCreatedBy($this->user_id)) return false; return true; diff --git a/initialize.php b/initialize.php index 025e5dcf4..d83cfe133 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5436"); +define("APP_VERSION", "1.19.28.5437"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3c85735e2f3842d16ed99505e27bfe33de3fd2a5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Apr 2021 17:02:18 +0000 Subject: [PATCH 2116/2515] Addressed a few more php8 warnings. --- WEB-INF/lib/ttTimeHelper.class.php | 5 +++-- WEB-INF/templates/time2.tpl | 2 +- initialize.php | 2 +- time.php | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 78e7a2cf5..bd2fb9898 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -881,7 +881,8 @@ static function getRecords($date, $includeFiles = false) { $time_fields_array = array(); } - if ($custom_fields && $custom_fields->timeFields) { + $time_fields = ''; + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { @@ -909,7 +910,7 @@ static function getRecords($date, $includeFiles = false) { if ($user->isPluginEnabled('cl')) $left_joins .= " left join tt_clients c on (l.client_id = c.id)"; - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $cflTable = 'cfl'.$timeField['id']; diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 4a26f9bef..14b8dcc69 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -36,7 +36,7 @@ License: See license.txt *}
- -
{$i18n.form.groups.hint}
- - - - - - - - - - -{if $groups} - {foreach $groups as $group} - - - - - - - - - {/foreach} -{/if} -
{$i18n.label.id}{$i18n.label.thing_name}{$i18n.label.date}{$i18n.label.language}
{$group.id}{$group.name|escape}{$group.date}{$group.lang}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -
-
-
-  {$i18n.label.or}  - -
-
diff --git a/WEB-INF/templates/admin_groups2.tpl b/WEB-INF/templates/admin_groups2.tpl new file mode 100644 index 000000000..467bff28b --- /dev/null +++ b/WEB-INF/templates/admin_groups2.tpl @@ -0,0 +1,36 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +
{$i18n.form.groups.hint}
+{if $groups} + + + + + + + + + + {foreach $groups as $group} + + + + + + + + + {/foreach} +
{$i18n.label.id}{$i18n.label.thing_name}{$i18n.label.date}{$i18n.label.language}
{$group.id}{$group.name|escape}{$group.date}{$group.lang}{$i18n.label.edit}{$i18n.label.delete}
+{/if} +
+
+  {$i18n.label.or}  + +
+
diff --git a/admin_groups.php b/admin_groups.php index 8dffd3931..915f7d778 100644 --- a/admin_groups.php +++ b/admin_groups.php @@ -14,5 +14,5 @@ $smarty->assign('groups', ttOrgHelper::getOrgs()); $smarty->assign('title', $i18n->get('title.groups')); -$smarty->assign('content_page_name', 'admin_groups.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'admin_groups2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 4b118fe69..ba1d0ea68 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5452"); +define("APP_VERSION", "1.19.28.5453"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a17a11f21f4ad0f2df2fc7685aee61f91ac84c91 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 22 Apr 2021 20:41:29 +0000 Subject: [PATCH 2132/2515] Addressed a few more php8 warnings. --- WEB-INF/templates/header2.tpl | 6 +++--- admin_options.php | 1 + initialize.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/header2.tpl b/WEB-INF/templates/header2.tpl index 65af554ee..1d8627a66 100644 --- a/WEB-INF/templates/header2.tpl +++ b/WEB-INF/templates/header2.tpl @@ -12,7 +12,7 @@ {if $user->getCustomCss()} {/if} - Time Tracker{if $title} - {$title}{/if} + Time Tracker{if isset($title) && $title} - {$title}{/if} - - - - - -
-{if $user->can('manage_custom_fields')} - - - - - - - {if $options} - {foreach $options as $key=>$val} - - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}
{$val|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -
-
-
- -
-
-{/if} -
diff --git a/WEB-INF/templates/cf_dropdown_options2.tpl b/WEB-INF/templates/cf_dropdown_options2.tpl new file mode 100644 index 000000000..f7a6b28b5 --- /dev/null +++ b/WEB-INF/templates/cf_dropdown_options2.tpl @@ -0,0 +1,26 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + + + + + + + +{if isset($options)} + {foreach $options as $key=>$val} + + + + + + {/foreach} +{/if} +
{$i18n.label.thing_name}
{$val|escape}{$i18n.label.edit}{$i18n.label.delete}
+
+
+
diff --git a/cf_dropdown_options.php b/cf_dropdown_options.php index 06f53a7d8..2570f0ee0 100644 --- a/cf_dropdown_options.php +++ b/cf_dropdown_options.php @@ -28,5 +28,5 @@ $smarty->assign('field_id', $field_id); $smarty->assign('options', $options); $smarty->assign('title', $i18n->get('title.cf_dropdown_options')); -$smarty->assign('content_page_name', 'cf_dropdown_options.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_options2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 0e9a60e36..64e508695 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5463"); +define("APP_VERSION", "1.19.28.5464"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 44545ac2977f87dc00ac5a179be97ce89c693a9f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 23 Apr 2021 19:22:38 +0000 Subject: [PATCH 2143/2515] Made all cf_dropdown_option_* pages mobile friendly. --- WEB-INF/templates/cf_dropdown_option_add.tpl | 27 ------------------- WEB-INF/templates/cf_dropdown_option_add2.tpl | 16 +++++++++++ .../templates/cf_dropdown_option_delete.tpl | 22 --------------- .../templates/cf_dropdown_option_delete2.tpl | 7 +++++ WEB-INF/templates/cf_dropdown_option_edit.tpl | 27 ------------------- .../templates/cf_dropdown_option_edit2.tpl | 16 +++++++++++ cf_dropdown_option_add.php | 4 +-- cf_dropdown_option_delete.php | 4 +-- cf_dropdown_option_edit.php | 4 +-- 9 files changed, 45 insertions(+), 82 deletions(-) delete mode 100644 WEB-INF/templates/cf_dropdown_option_add.tpl create mode 100644 WEB-INF/templates/cf_dropdown_option_add2.tpl delete mode 100644 WEB-INF/templates/cf_dropdown_option_delete.tpl create mode 100644 WEB-INF/templates/cf_dropdown_option_delete2.tpl delete mode 100644 WEB-INF/templates/cf_dropdown_option_edit.tpl create mode 100644 WEB-INF/templates/cf_dropdown_option_edit2.tpl diff --git a/WEB-INF/templates/cf_dropdown_option_add.tpl b/WEB-INF/templates/cf_dropdown_option_add.tpl deleted file mode 100644 index bcc1cee72..000000000 --- a/WEB-INF/templates/cf_dropdown_option_add.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{$forms.optionAddForm.open} - - - - -
-{if $user->can('manage_custom_fields')} - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.optionAddForm.name.control}
{$i18n.label.required_fields}
 
{$forms.optionAddForm.btn_add.control}
-{/if} -
-{$forms.optionAddForm.close} diff --git a/WEB-INF/templates/cf_dropdown_option_add2.tpl b/WEB-INF/templates/cf_dropdown_option_add2.tpl new file mode 100644 index 000000000..5ba70387b --- /dev/null +++ b/WEB-INF/templates/cf_dropdown_option_add2.tpl @@ -0,0 +1,16 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.optionAddForm.open} + + + + + + + + + +
{$forms.optionAddForm.name.control}
{$i18n.label.required_fields}
+
{$forms.optionAddForm.btn_add.control}
+{$forms.optionAddForm.close} diff --git a/WEB-INF/templates/cf_dropdown_option_delete.tpl b/WEB-INF/templates/cf_dropdown_option_delete.tpl deleted file mode 100644 index bec03cc32..000000000 --- a/WEB-INF/templates/cf_dropdown_option_delete.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{$forms.optionDeleteForm.open} - - - - -
-{if $user->can('manage_custom_fields')} - - - - - - - - - - - -
{$option|escape}
 
{$forms.optionDeleteForm.btn_delete.control}  {$forms.optionDeleteForm.btn_cancel.control}
-{/if} -
-{$forms.optionDeleteForm.close} diff --git a/WEB-INF/templates/cf_dropdown_option_delete2.tpl b/WEB-INF/templates/cf_dropdown_option_delete2.tpl new file mode 100644 index 000000000..8fb56d618 --- /dev/null +++ b/WEB-INF/templates/cf_dropdown_option_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.optionDeleteForm.open} +
{$option|escape}
+
{$forms.optionDeleteForm.btn_delete.control} {$forms.optionDeleteForm.btn_cancel.control}
+{$forms.optionDeleteForm.close} diff --git a/WEB-INF/templates/cf_dropdown_option_edit.tpl b/WEB-INF/templates/cf_dropdown_option_edit.tpl deleted file mode 100644 index c2b0bae9c..000000000 --- a/WEB-INF/templates/cf_dropdown_option_edit.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{$forms.optionEditForm.open} - - - - -
-{if $user->can('manage_custom_fields')} - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.optionEditForm.name.control}
{$i18n.label.required_fields}
 
{$forms.optionEditForm.btn_save.control}
-{/if} -
-{$forms.optionEditForm.close} diff --git a/WEB-INF/templates/cf_dropdown_option_edit2.tpl b/WEB-INF/templates/cf_dropdown_option_edit2.tpl new file mode 100644 index 000000000..f7f987cd8 --- /dev/null +++ b/WEB-INF/templates/cf_dropdown_option_edit2.tpl @@ -0,0 +1,16 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.optionEditForm.open} + + + + + + + + + +
{$forms.optionEditForm.name.control}
{$i18n.label.required_fields}
+
{$forms.optionEditForm.btn_save.control}
+{$forms.optionEditForm.close} diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index 537ad3313..c9e168730 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -49,5 +49,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionAddForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_add_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_add2.tpl'); +$smarty->display('index2.tpl'); diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index e6eeeeb75..e23288bd5 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -53,5 +53,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.cf_delete_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index 4cea7358f..985aab7d3 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionEditForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_edit_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_edit2.tpl'); +$smarty->display('index2.tpl'); From b9fe140cc0d5b3f958a5cb5c30abd71c89e03097 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 23 Apr 2021 19:28:40 +0000 Subject: [PATCH 2144/2515] Limited name length for a dropdown option on forms to match db limit. --- cf_dropdown_option_add.php | 2 +- cf_dropdown_option_edit.php | 2 +- initialize.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index c9e168730..f1bf00908 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -26,7 +26,7 @@ $form = new Form('optionAddForm'); if ($err->no()) { $form->addInput(array('type'=>'hidden','name'=>'field_id','value'=>$cl_field_id)); - $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>'')); + $form->addInput(array('type'=>'text','maxlength'=>'32','name'=>'name','value'=>'')); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); } diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index 985aab7d3..c73200ffc 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -25,7 +25,7 @@ $form = new Form('optionEditForm'); if ($err->no()) { - $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); + $form->addInput(array('type'=>'text','maxlength'=>'32','name'=>'name','value'=>$cl_name)); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); } diff --git a/initialize.php b/initialize.php index 64e508695..247c74c1c 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5464"); +define("APP_VERSION", "1.19.28.5465"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 9fca36776e184248152923ce5b5f519d0210fe94 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 23 Apr 2021 22:06:50 +0000 Subject: [PATCH 2145/2515] Fixed a php8 error with adding a client without projects, also eliminated a few php8 warnings. --- WEB-INF/lib/ttClientHelper.class.php | 33 +++++----------------------- charts.php | 4 ++-- client_add.php | 2 ++ client_edit.php | 3 ++- initialize.php | 2 +- 5 files changed, 12 insertions(+), 32 deletions(-) diff --git a/WEB-INF/lib/ttClientHelper.class.php b/WEB-INF/lib/ttClientHelper.class.php index 7105595d8..6264a6bb0 100644 --- a/WEB-INF/lib/ttClientHelper.class.php +++ b/WEB-INF/lib/ttClientHelper.class.php @@ -1,30 +1,6 @@ query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - if ($val['id']) { + if (isset($val['id']) && $val['id'] > 0) { return $val; } } @@ -190,6 +166,7 @@ static function insert($fields) $address = $fields['address']; $tax = $fields['tax']; $projects = $fields['projects']; + $comma_separated = null; if ($projects) $comma_separated = implode(',', $projects); // This is a comma-separated list of associated projects ids. $status = $fields['status']; @@ -205,7 +182,7 @@ static function insert($fields) return false; $last_id = $mdb2->lastInsertID('tt_clients', 'id'); - if (count($projects) > 0) + if (isset($projects) && count($projects) > 0) foreach ($projects as $p_id) { $sql = "insert into tt_client_project_binds (client_id, project_id, group_id, org_id) values($last_id, $p_id, $group_id, $org_id)"; $affected = $mdb2->exec($sql); diff --git a/charts.php b/charts.php index 9dc29f588..25e6695d4 100644 --- a/charts.php +++ b/charts.php @@ -74,13 +74,13 @@ $uc->setValue(SYSC_CHART_TYPE, $cl_type); } else { // Initialize chart interval. - $cl_interval = $_SESSION['chart_interval']; + $cl_interval = @$_SESSION['chart_interval']; if (!$cl_interval) $cl_interval = $uc->getValue(SYSC_CHART_INTERVAL); if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; $_SESSION['chart_interval'] = $cl_interval; // Initialize chart type. - $cl_type = $_SESSION['chart_type']; + $cl_type = @$_SESSION['chart_type']; if (!$cl_type) $cl_type = $uc->getValue(SYSC_CHART_TYPE); $cl_type = ttChartHelper::adjustType($cl_type); $_SESSION['chart_type'] = $cl_type; diff --git a/client_add.php b/client_add.php index 114e89ea0..1b91a4080 100644 --- a/client_add.php +++ b/client_add.php @@ -19,6 +19,8 @@ $projects = ttGroupHelper::getActiveProjects(); +$cl_name = $cl_address = $cl_tax = ''; +$cl_projects = array(); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_address = trim($request->getParameter('address')); diff --git a/client_edit.php b/client_edit.php index 2924346bf..c7e0a92e3 100644 --- a/client_edit.php +++ b/client_edit.php @@ -26,7 +26,8 @@ // End of access checks. $projects = ttGroupHelper::getActiveProjects(); - +$cl_name = $cl_address = $cl_tax = $cl_status = null; +$cl_projects = array(); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_address = trim($request->getParameter('address')); diff --git a/initialize.php b/initialize.php index 247c74c1c..356c05dd2 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5465"); +define("APP_VERSION", "1.19.28.5466"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 8861204def014a748638458ae11c708cb68174bf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 24 Apr 2021 17:26:13 +0000 Subject: [PATCH 2146/2515] Made display_options.php mobile friendly. --- WEB-INF/lib/ttClientHelper.class.php | 2 +- WEB-INF/templates/display_options.tpl | 36 ------------------ WEB-INF/templates/display_options2.tpl | 51 ++++++++++++++++++++++++++ default.css | 2 +- display_options.php | 6 +-- initialize.php | 2 +- 6 files changed, 57 insertions(+), 42 deletions(-) delete mode 100644 WEB-INF/templates/display_options.tpl create mode 100644 WEB-INF/templates/display_options2.tpl diff --git a/WEB-INF/lib/ttClientHelper.class.php b/WEB-INF/lib/ttClientHelper.class.php index 6264a6bb0..3c5f0d646 100644 --- a/WEB-INF/lib/ttClientHelper.class.php +++ b/WEB-INF/lib/ttClientHelper.class.php @@ -207,7 +207,7 @@ static function update($fields) $address = $fields['address']; $tax = $fields['tax']; $status = $fields['status']; - $projects = $fields['projects']; + $projects = isset($fields['projects']) ? $fields['projects'] : array(); $tax = str_replace(',', '.', $tax); if ($tax == '') $tax = 0; diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl deleted file mode 100644 index 025b7d984..000000000 --- a/WEB-INF/templates/display_options.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{$forms.displayOptionsForm.open} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
{$i18n.title.time}
{$forms.displayOptionsForm.time_note_on_separate_row.control} {$i18n.label.what_is_it}
{$forms.displayOptionsForm.time_not_complete_days.control} {$i18n.label.what_is_it}
{$forms.displayOptionsForm.record_custom_fields.control} {$i18n.label.what_is_it}
 
{$i18n.title.reports}
{$forms.displayOptionsForm.report_note_on_separate_row.control} {$i18n.label.what_is_it}
 
{$i18n.form.display_options.custom_css}
{$forms.displayOptionsForm.custom_css.control}
 
{$forms.displayOptionsForm.btn_save.control}
-{$forms.displayOptionsForm.close} diff --git a/WEB-INF/templates/display_options2.tpl b/WEB-INF/templates/display_options2.tpl new file mode 100644 index 000000000..e4da2cfac --- /dev/null +++ b/WEB-INF/templates/display_options2.tpl @@ -0,0 +1,51 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.displayOptionsForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$i18n.title.time}
{$forms.displayOptionsForm.time_note_on_separate_row.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.displayOptionsForm.time_not_complete_days.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.displayOptionsForm.record_custom_fields.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.title.reports}
{$forms.displayOptionsForm.report_note_on_separate_row.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.form.display_options.custom_css}
{$forms.displayOptionsForm.custom_css.control}
+
{$forms.displayOptionsForm.btn_save.control}
+{$forms.displayOptionsForm.close} diff --git a/default.css b/default.css index 6d649b69b..23098db42 100644 --- a/default.css +++ b/default.css @@ -296,7 +296,7 @@ input[type="text"].project-rate-field { } /* textareas for fields */ -#description, #address, #item_name { +#description, #address, #item_name, #custom_css { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; diff --git a/display_options.php b/display_options.php index 1d3948fd9..53a86ca9e 100644 --- a/display_options.php +++ b/display_options.php @@ -48,7 +48,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'report_note_on_separate_row','value'=>$cl_report_note_on_separate_row)); // TODO: add PDF break controller here. -$form->addInput(array('type'=>'textarea','name'=>'custom_css','style'=>'width: 250px; height: 40px;','value'=>$cl_custom_css)); +$form->addInput(array('type'=>'textarea','name'=>'custom_css','value'=>$cl_custom_css)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ @@ -74,5 +74,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.display_options')); -$smarty->assign('content_page_name', 'display_options.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'display_options2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 356c05dd2..dd9e8a636 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5466"); +define("APP_VERSION", "1.19.28.5467"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a9894c63fd4d188e74dce2b518e8b225e059839d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 24 Apr 2021 19:27:55 +0000 Subject: [PATCH 2147/2515] Made export.php and success.php mobile friendly. --- WEB-INF/lib/ttGroupExportHelper.class.php | 28 ++----------------- WEB-INF/templates/export.tpl | 23 --------------- WEB-INF/templates/export2.tpl | 16 +++++++++++ .../templates/{success.tpl => success2.tpl} | 0 WEB-INF/templates/time2.tpl | 4 +-- expense_edit.php | 3 +- export.php | 4 +-- initialize.php | 2 +- success.php | 4 +-- time.php | 2 +- 10 files changed, 27 insertions(+), 59 deletions(-) delete mode 100644 WEB-INF/templates/export.tpl create mode 100644 WEB-INF/templates/export2.tpl rename WEB-INF/templates/{success.tpl => success2.tpl} (100%) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index a510da274..b880ef6d3 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -1,30 +1,6 @@ -
-{if $user->can('export_data')} - - - - - - - - - - - - -
{$i18n.form.export.hint}
 
{$i18n.form.export.compression}:{$forms.exportForm.compression.control}
{$forms.exportForm.btn_submit.control}
-{/if} -
-{$forms.exportForm.close} diff --git a/WEB-INF/templates/export2.tpl b/WEB-INF/templates/export2.tpl new file mode 100644 index 000000000..171aa9b1b --- /dev/null +++ b/WEB-INF/templates/export2.tpl @@ -0,0 +1,16 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +
{$i18n.form.export.hint}
+ +{$forms.exportForm.open} + + + + + + + +
{$forms.exportForm.compression.control}
+
{$forms.exportForm.btn_submit.control}
+{$forms.exportForm.close} diff --git a/WEB-INF/templates/success.tpl b/WEB-INF/templates/success2.tpl similarity index 100% rename from WEB-INF/templates/success.tpl rename to WEB-INF/templates/success2.tpl diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time2.tpl index 14b8dcc69..f1ba587dc 100644 --- a/WEB-INF/templates/time2.tpl +++ b/WEB-INF/templates/time2.tpl @@ -117,7 +117,7 @@ License: See license.txt *} {if $show_client}
{$i18n.label.client}{$timeField['label']|escape}{$record.client|escape}{$record.$control_name|escape}
- - - -
- - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.groupForm.group_name.control}
{$i18n.label.description}:{$forms.groupForm.description.control}
{$i18n.label.required_fields}
 
{$forms.groupForm.btn_add.control}
-
-{$forms.groupForm.close} diff --git a/WEB-INF/templates/group_add2.tpl b/WEB-INF/templates/group_add2.tpl new file mode 100644 index 000000000..cc4231ebf --- /dev/null +++ b/WEB-INF/templates/group_add2.tpl @@ -0,0 +1,22 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.groupForm.open} + + + + + + + + + + + + + + + +
{$forms.groupForm.group_name.control}
{$forms.groupForm.description.control}
{$i18n.label.required_fields}
+
{$forms.groupForm.btn_add.control}
+{$forms.groupForm.close} diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl deleted file mode 100644 index a9369787e..000000000 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{$forms.groupAdvancedForm.open} - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.group_name} (*):{$forms.groupAdvancedForm.group_name.control}
{$i18n.label.description}:{$forms.groupAdvancedForm.description.control}
{$i18n.label.bcc}:{$forms.groupAdvancedForm.bcc_email.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.allow_ip}:{$forms.groupAdvancedForm.allow_ip.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
 
{$forms.groupAdvancedForm.btn_save.control}
-
-{$forms.groupForm.close} diff --git a/WEB-INF/templates/group_advanced_edit2.tpl b/WEB-INF/templates/group_advanced_edit2.tpl new file mode 100644 index 000000000..1f55adf77 --- /dev/null +++ b/WEB-INF/templates/group_advanced_edit2.tpl @@ -0,0 +1,40 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.groupAdvancedForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.groupAdvancedForm.group_name.control}
{$forms.groupAdvancedForm.description.control}
{$forms.groupAdvancedForm.bcc_email.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupAdvancedForm.allow_ip.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
+
{$forms.groupAdvancedForm.btn_save.control}
+{$forms.groupAdvancedForm.close} diff --git a/group_add.php b/group_add.php index 408b62168..8436acd80 100644 --- a/group_add.php +++ b/group_add.php @@ -13,6 +13,7 @@ } // End of access checks. +$cl_name = $cl_description = ''; if ($request->isPost()) { $cl_name = trim($request->getParameter('group_name')); $cl_description = trim($request->getParameter('description')); @@ -20,7 +21,7 @@ $form = new Form('groupForm'); $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'group_name','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -45,5 +46,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); $smarty->assign('title', $i18n->get('title.add_group')); -$smarty->assign('content_page_name', 'group_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'group_add2.tpl'); +$smarty->display('index2.tpl'); diff --git a/group_advanced_edit.php b/group_advanced_edit.php index 7ea077183..efb7a49e7 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -30,8 +30,8 @@ } $form = new Form('groupAdvancedForm'); -$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'group_name','value'=>$cl_group,'enable'=>$advanced_settings)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'group_name','value'=>$cl_group)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'bcc_email','value'=>$cl_bcc_email)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'allow_ip','value'=>$cl_allow_ip)); @@ -62,5 +62,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_group')); -$smarty->assign('content_page_name', 'group_advanced_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'group_advanced_edit2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 235e90f0e..0b3e606a7 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5468"); +define("APP_VERSION", "1.19.28.5469"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2c67b96e2425c21f30c179869a1018ef76c54538 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 24 Apr 2021 20:52:16 +0000 Subject: [PATCH 2149/2515] Made group_delete.php mobile friendly. --- WEB-INF/templates/group_delete.tpl | 22 ---------------------- WEB-INF/templates/group_delete2.tpl | 8 ++++++++ group_delete.php | 4 ++-- initialize.php | 2 +- 4 files changed, 11 insertions(+), 25 deletions(-) delete mode 100644 WEB-INF/templates/group_delete.tpl create mode 100644 WEB-INF/templates/group_delete2.tpl diff --git a/WEB-INF/templates/group_delete.tpl b/WEB-INF/templates/group_delete.tpl deleted file mode 100644 index a14373f55..000000000 --- a/WEB-INF/templates/group_delete.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{$forms.groupForm.open} - - - - -
- - - - - - - - - - - - - -
{$i18n.form.group_delete.hint}
 
{$group_to_delete|escape}
 
{$forms.groupForm.btn_delete.control}  {$forms.groupForm.btn_cancel.control}
-
-{$forms.groupForm.close} diff --git a/WEB-INF/templates/group_delete2.tpl b/WEB-INF/templates/group_delete2.tpl new file mode 100644 index 000000000..5a02f29af --- /dev/null +++ b/WEB-INF/templates/group_delete2.tpl @@ -0,0 +1,8 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.groupForm.open} +
{$i18n.form.group_delete.hint}
+
{$group_to_delete|escape}
+
{$forms.groupForm.btn_delete.control} {$forms.groupForm.btn_cancel.control}
+{$forms.groupForm.close} diff --git a/group_delete.php b/group_delete.php index 377bb80e9..c1e47d02c 100644 --- a/group_delete.php +++ b/group_delete.php @@ -64,5 +64,5 @@ $smarty->assign('group_to_delete', $group_name); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_group')); -$smarty->assign('content_page_name', 'group_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'group_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 0b3e606a7..23a89ec2e 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5469"); +define("APP_VERSION", "1.19.28.5470"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3657f7e6c8c58ce520324942cc72f1361a4a13b3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 13:56:08 +0000 Subject: [PATCH 2150/2515] Eliminated a few more php8 warnings. --- WEB-INF/lib/ttGroupExportHelper.class.php | 30 +++++++++++------------ initialize.php | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index b880ef6d3..a464f2e25 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -292,7 +292,7 @@ function writeData() { $user_part .= " login=\"".htmlspecialchars($user_item['login'])."\""; $user_part .= " password=\"".$user_item['password']."\""; $user_part .= " role_id=\"".$role_id."\""; - $user_part .= " client_id=\"".$this->clientMap[$user_item['client_id']]."\""; + $user_part .= " client_id=\"".@$this->clientMap[$user_item['client_id']]."\""; $user_part .= " rate=\"".$user_item['rate']."\""; $user_part .= " quota_percent=\"".$user_item['quota_percent']."\""; $user_part .= " email=\"".$user_item['email']."\""; @@ -330,8 +330,8 @@ function writeData() { foreach ($timesheets as $timesheet_item) { $timesheet_part = $this->indentation.' '."timesheetMap[$timesheet_item['id']]."\""; $timesheet_part .= " user_id=\"".$this->userMap[$timesheet_item['user_id']]."\""; - $timesheet_part .= " client_id=\"".$this->clientMap[$timesheet_item['client_id']]."\""; - $timesheet_part .= " project_id=\"".$this->projectMap[$timesheet_item['project_id']]."\""; + $timesheet_part .= " client_id=\"".@$this->clientMap[$timesheet_item['client_id']]."\""; + $timesheet_part .= " project_id=\"".@$this->projectMap[$timesheet_item['project_id']]."\""; $timesheet_part .= " name=\"".htmlspecialchars($timesheet_item['name'])."\""; $timesheet_part .= " comment=\"".htmlspecialchars($timesheet_item['comment'])."\""; $timesheet_part .= " start_date=\"".$timesheet_item['start_date']."\""; @@ -355,7 +355,7 @@ function writeData() { $invoice_part = $this->indentation.' '."invoiceMap[$invoice_item['id']]."\""; $invoice_part .= " name=\"".htmlspecialchars($invoice_item['name'])."\""; $invoice_part .= " date=\"".$invoice_item['date']."\""; - $invoice_part .= " client_id=\"".$this->clientMap[$invoice_item['client_id']]."\""; + $invoice_part .= " client_id=\"".@$this->clientMap[$invoice_item['client_id']]."\""; $invoice_part .= " status=\"".$invoice_item['status']."\""; $invoice_part .= ">\n"; fwrite($this->file, $invoice_part); @@ -380,11 +380,11 @@ function writeData() { $log_part .= " date=\"".$record['date']."\""; $log_part .= " start=\"".$record['start']."\""; $log_part .= " duration=\"".$record['duration']."\""; - $log_part .= " client_id=\"".$this->clientMap[$record['client_id']]."\""; - $log_part .= " project_id=\"".$this->projectMap[$record['project_id']]."\""; - $log_part .= " task_id=\"".$this->taskMap[$record['task_id']]."\""; - $log_part .= " timesheet_id=\"".$this->timesheetMap[$record['timesheet_id']]."\""; - $log_part .= " invoice_id=\"".$this->invoiceMap[$record['invoice_id']]."\""; + $log_part .= " client_id=\"".@$this->clientMap[$record['client_id']]."\""; + $log_part .= " project_id=\"".@$this->projectMap[$record['project_id']]."\""; + $log_part .= " task_id=\"".@$this->taskMap[$record['task_id']]."\""; + $log_part .= " timesheet_id=\"".@$this->timesheetMap[$record['timesheet_id']]."\""; + $log_part .= " invoice_id=\"".@$this->invoiceMap[$record['invoice_id']]."\""; $log_part .= " comment=\"".$this->encodeLineBreaks($record['comment'])."\""; $log_part .= " billable=\"".$record['billable']."\""; $log_part .= " approved=\"".$record['approved']."\""; @@ -440,7 +440,7 @@ function writeData() { foreach ($custom_field_log as $entry) { $custom_field_log_part = $this->indentation.' '."logMap[$entry['log_id']]."\""; $custom_field_log_part .= " field_id=\"".$this->customFieldMap[$entry['field_id']]."\""; - $custom_field_log_part .= " option_id=\"".$this->customFieldOptionMap[$entry['option_id']]."\""; + $custom_field_log_part .= " option_id=\"".@$this->customFieldOptionMap[$entry['option_id']]."\""; $custom_field_log_part .= " value=\"".htmlspecialchars($entry['value'])."\""; $custom_field_log_part .= " status=\"".$entry['status']."\""; $custom_field_log_part .= ">\n"; @@ -460,11 +460,11 @@ function writeData() { foreach ($expense_items as $expense_item) { $expense_item_part = $this->indentation.' '."userMap[$expense_item['user_id']]."\""; - $expense_item_part .= " client_id=\"".$this->clientMap[$expense_item['client_id']]."\""; + $expense_item_part .= " client_id=\"".@$this->clientMap[$expense_item['client_id']]."\""; $expense_item_part .= " project_id=\"".$this->projectMap[$expense_item['project_id']]."\""; $expense_item_part .= " name=\"".$this->encodeLineBreaks($expense_item['name'])."\""; $expense_item_part .= " cost=\"".$expense_item['cost']."\""; - $expense_item_part .= " invoice_id=\"".$this->invoiceMap[$expense_item['invoice_id']]."\""; + $expense_item_part .= " invoice_id=\"".@$this->invoiceMap[$expense_item['invoice_id']]."\""; $expense_item_part .= " approved=\"".$expense_item['approved']."\""; $expense_item_part .= " paid=\"".$expense_item['paid']."\""; $expense_item_part .= " status=\"".$expense_item['status']."\""; @@ -558,9 +558,9 @@ function writeData() { $fav_report_part .= " name=\"".htmlspecialchars($fav_report['name'])."\""; $fav_report_part .= " user_id=\"".$this->userMap[$fav_report['user_id']]."\""; $fav_report_part .= " report_spec=\"".$this->remapReportSpec($fav_report['report_spec'])."\""; - $fav_report_part .= " client_id=\"".$this->clientMap[$fav_report['client_id']]."\""; - $fav_report_part .= " project_id=\"".$this->projectMap[$fav_report['project_id']]."\""; - $fav_report_part .= " task_id=\"".$this->taskMap[$fav_report['task_id']]."\""; + $fav_report_part .= " client_id=\"".@$this->clientMap[$fav_report['client_id']]."\""; + $fav_report_part .= " project_id=\"".@$this->projectMap[$fav_report['project_id']]."\""; + $fav_report_part .= " task_id=\"".@$this->taskMap[$fav_report['task_id']]."\""; $fav_report_part .= " billable=\"".$fav_report['billable']."\""; $fav_report_part .= " approved=\"".$fav_report['approved']."\""; $fav_report_part .= " invoice=\"".$fav_report['invoice']."\""; diff --git a/initialize.php b/initialize.php index 23a89ec2e..242f96743 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5470"); +define("APP_VERSION", "1.19.28.5471"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 43464679be7b99d1f72834f94c18b2f3497b7092 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 14:26:59 +0000 Subject: [PATCH 2151/2515] Addressed a few more of php8 warnings. --- WEB-INF/lib/ttGroupHelper.class.php | 29 +++-------------------------- WEB-INF/lib/ttUser.class.php | 2 ++ initialize.php | 2 +- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 6da527085..defdb61d4 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -1,30 +1,6 @@ quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$user->id; } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 3a2f1fa49..cf1065f06 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -842,6 +842,7 @@ function setOnBehalfGroup($group_id) { $this->behalf_id = null; $this->behalf_name = null; unset($this->behalfGroup); + $this->behalfGroup = null; unset($_SESSION['behalf_group_id']); unset($_SESSION['behalf_group_name']); unset($_SESSION['behalf_id']); @@ -849,6 +850,7 @@ function setOnBehalfGroup($group_id) { // Destroy report bean if it was set in session. $form = new Form('dummyForm'); + global $request; $bean = new ActionForm('reportBean', $form, $request); if ($bean->isSaved()) { $bean->destroyBean(); diff --git a/initialize.php b/initialize.php index 242f96743..037c86626 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5471"); +define("APP_VERSION", "1.19.28.5472"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e3150e28352c26ad2c7d04faead7830b4096c0f6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 17:17:12 +0000 Subject: [PATCH 2152/2515] Made group_edit.php mobile friendly. --- WEB-INF/templates/group_edit.tpl | 123 --------------------- WEB-INF/templates/group_edit2.tpl | 171 ++++++++++++++++++++++++++++++ group_edit.php | 13 ++- initialize.php | 2 +- 4 files changed, 178 insertions(+), 131 deletions(-) delete mode 100644 WEB-INF/templates/group_edit.tpl create mode 100644 WEB-INF/templates/group_edit2.tpl diff --git a/WEB-INF/templates/group_edit.tpl b/WEB-INF/templates/group_edit.tpl deleted file mode 100644 index e9b6deb56..000000000 --- a/WEB-INF/templates/group_edit.tpl +++ /dev/null @@ -1,123 +0,0 @@ - - -{$forms.groupForm.open} -{include file="datetime_format_preview.tpl"} - - - - - -
- -{if $user->can('manage_subgroups')} - {if $group_dropdown} - - - - - {/if} - - - - -{/if} - - - - -{if $user->can('manage_roles')} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if $user->can('manage_advanced_settings')} - - - - -{/if} - - - - - {* initialize preview text *} - - - - - - - - -
{$i18n.label.group}:{$forms.groupForm.group.control}
{$i18n.label.subgroups}:{$i18n.label.configure}
{$i18n.label.currency}:{$forms.groupForm.currency.control}
{$i18n.label.roles}:{$i18n.label.configure}
{$i18n.label.language}:{$forms.groupForm.lang.control}
{$i18n.label.decimal_mark}:{$forms.groupForm.decimal_mark.control}  
{$i18n.label.date_format}:{$forms.groupForm.date_format.control}  
{$i18n.label.time_format}:{$forms.groupForm.time_format.control}  
{$i18n.label.week_start}:{$forms.groupForm.start_week.control}
{$i18n.form.group_edit.display_options}:{$i18n.label.configure}
{$i18n.form.group_edit.holidays}:{$forms.groupForm.holidays.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.tracking_mode}:{$forms.groupForm.tracking_mode.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.record_type}:{$forms.groupForm.record_type.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.punch_mode}:{$forms.groupForm.punch_mode.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.allow_overlap}:{$forms.groupForm.allow_overlap.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.future_entries}:{$forms.groupForm.future_entries.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.uncompleted_indicators}:{$forms.groupForm.uncompleted_indicators.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.confirm_save}:{$forms.groupForm.confirm_save.control} {$i18n.label.what_is_it}
{$i18n.form.group_edit.advanced_settings}:{$i18n.label.configure}
{$i18n.label.required_fields}
 
{$forms.groupForm.btn_save.control} {$forms.groupForm.btn_delete.control}
-
-{$forms.groupForm.close} diff --git a/WEB-INF/templates/group_edit2.tpl b/WEB-INF/templates/group_edit2.tpl new file mode 100644 index 000000000..0c44d3915 --- /dev/null +++ b/WEB-INF/templates/group_edit2.tpl @@ -0,0 +1,171 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{$forms.groupForm.open} +{include file="datetime_format_preview.tpl"} + +{if $user->can('manage_subgroups')} + {if isset($group_dropdown) && $group_dropdown} + + + + + + + {/if} + + + + + + +{/if} + + + + + + +{if $user->can('manage_roles')} + + + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if $user->can('manage_advanced_settings')} + + + + + + +{/if} +
{$forms.groupForm.group.control}
{$i18n.label.subgroups}:
{$i18n.label.subgroups}:{$i18n.label.configure}
{$forms.groupForm.currency.control}
{$i18n.label.roles}:
{$i18n.label.roles}:{$i18n.label.configure}
{$forms.groupForm.lang.control}
{$forms.groupForm.decimal_mark.control}  
{$forms.groupForm.date_format.control}  
{$forms.groupForm.time_format.control}  
{$forms.groupForm.start_week.control}
{$i18n.form.group_edit.display_options}:
{$i18n.form.group_edit.display_options}:{$i18n.label.configure}
{$forms.groupForm.holidays.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.tracking_mode.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.record_type.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.punch_mode.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.allow_overlap.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.future_entries.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.uncompleted_indicators.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.groupForm.confirm_save.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.form.group_edit.advanced_settings}:
{$i18n.form.group_edit.advanced_settings}:{$i18n.label.configure}
+
{$forms.groupForm.btn_save.control} {$forms.groupForm.btn_delete.control}
+{$forms.groupForm.close} diff --git a/group_edit.php b/group_edit.php index e87f4015e..e1a7a5234 100644 --- a/group_edit.php +++ b/group_edit.php @@ -91,7 +91,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'document.groupForm.group_changed.value=1;document.groupForm.submit();', 'name'=>'group', - 'style'=>'width: 250px;', 'value'=>$group_id, 'data'=>$groups, 'datakeys'=>array('id','name'))); @@ -116,7 +115,7 @@ $longname_lang[] = array('id'=>I18n::getLangFromFilename($lfile),'name'=>$lname); } $longname_lang = mu_sort($longname_lang, 'name'); -$form->addInput(array('type'=>'combobox','name'=>'lang','style'=>'width: 200px','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang)); +$form->addInput(array('type'=>'combobox','name'=>'lang','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang)); $DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>',')); $form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark, @@ -141,7 +140,7 @@ foreach ($i18n->weekdayNames as $id => $week_dn) { $week_start_options[] = array('id' => $id, 'name' => $week_dn); } -$form->addInput(array('type'=>'combobox','name'=>'start_week','style'=>'width: 150px;','data'=>$week_start_options,'datakeys'=>array('id','name'),'value'=>$cl_start_week)); +$form->addInput(array('type'=>'combobox','name'=>'start_week','data'=>$week_start_options,'datakeys'=>array('id','name'),'value'=>$cl_start_week)); // Show holidays control. $form->addInput(array('type'=>'text','name'=>'holidays','value'=>$cl_holidays)); @@ -151,7 +150,7 @@ $tracking_mode_options[MODE_TIME] = $i18n->get('form.group_edit.mode_time'); $tracking_mode_options[MODE_PROJECTS] = $i18n->get('form.group_edit.mode_projects'); $tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->get('form.group_edit.mode_projects_and_tasks'); -$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode)); +$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode)); $form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required)); // Prepare record type choices. @@ -159,7 +158,7 @@ $record_type_options[TYPE_ALL] = $i18n->get('form.group_edit.type_all'); $record_type_options[TYPE_START_FINISH] = $i18n->get('form.group_edit.type_start_finish'); $record_type_options[TYPE_DURATION] = $i18n->get('form.group_edit.type_duration'); -$form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); +$form->addInput(array('type'=>'combobox','name'=>'record_type','data'=>$record_type_options,'value'=>$cl_record_type)); // Punch mode checkbox. $form->addInput(array('type'=>'checkbox','name'=>'punch_mode','value'=>$cl_punch_mode)); @@ -229,5 +228,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="handlePluginCheckboxes();"'); $smarty->assign('title', $i18n->get('title.edit_group')); -$smarty->assign('content_page_name', 'group_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'group_edit2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 037c86626..57f1171d6 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5472"); +define("APP_VERSION", "1.19.28.5473"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 868be205b73b1ae68715d7aa091623616d8efa72 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 17:24:11 +0000 Subject: [PATCH 2153/2515] Moved script to the bottom of group_edit.php to populate format examples. --- WEB-INF/templates/group_edit2.tpl | 27 +++++++++++++++------------ initialize.php | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/WEB-INF/templates/group_edit2.tpl b/WEB-INF/templates/group_edit2.tpl index 0c44d3915..e653e6756 100644 --- a/WEB-INF/templates/group_edit2.tpl +++ b/WEB-INF/templates/group_edit2.tpl @@ -3,20 +3,9 @@ License: See license.txt *} + {$forms.groupForm.open} {include file="datetime_format_preview.tpl"} @@ -169,3 +158,17 @@ adjustDecimalPreview();
{$forms.groupForm.btn_save.control} {$forms.groupForm.btn_delete.control}
{$forms.groupForm.close} + + diff --git a/initialize.php b/initialize.php index 57f1171d6..e161a3122 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5473"); +define("APP_VERSION", "1.19.28.5474"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 56646678f4da660c3a5cd94358bc48e614f8c68b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 19:20:41 +0000 Subject: [PATCH 2154/2515] Better separation of styles from code on group_edit.php. --- WEB-INF/templates/group_edit2.tpl | 6 +++--- default.css | 10 ++++++++++ group_edit.php | 6 +++--- initialize.php | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/group_edit2.tpl b/WEB-INF/templates/group_edit2.tpl index e653e6756..05a134dd9 100644 --- a/WEB-INF/templates/group_edit2.tpl +++ b/WEB-INF/templates/group_edit2.tpl @@ -48,19 +48,19 @@ function chLocation(newLocation) { document.location = newLocation; }
{$forms.groupForm.decimal_mark.control}  {$forms.groupForm.decimal_mark.control}  
{$forms.groupForm.date_format.control}  {$forms.groupForm.date_format.control}  
{$forms.groupForm.time_format.control}  {$forms.groupForm.time_format.control}  
- - - - -
{$i18n.label.group}: {$forms.subgroupsForm.group.control}
 
-{/if} -{if $subgroups} - - - - - - - - {foreach $subgroups as $subgroup} - - - - - - - {/foreach} -
{$i18n.label.thing_name}{$i18n.label.description}
{$subgroup.name|escape}{$subgroup.description|escape}{$i18n.label.edit}{$i18n.label.delete}
-{/if} -{$forms.subgroupsForm.close} - - - - - -
-
-
- -
-
diff --git a/WEB-INF/templates/groups2.tpl b/WEB-INF/templates/groups2.tpl new file mode 100644 index 000000000..b5ed9a7b2 --- /dev/null +++ b/WEB-INF/templates/groups2.tpl @@ -0,0 +1,45 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{$forms.subgroupsForm.open} +{if isset($group_dropdown) && $group_dropdown} + + + + + + + +
{$forms.subgroupsForm.group.control}
+{/if} + +
+ +{if $subgroups} + + + + + + + + {foreach $subgroups as $subgroup} + + + + + + + {/foreach} +
{$i18n.label.thing_name}{{$i18n.label.description}}
{$subgroup.name|escape}{$subgroup.description|escape}{$i18n.label.edit}{$i18n.label.delete}
+{/if} +{$forms.subgroupsForm.close} +
+
+ +
+
diff --git a/group_edit.php b/group_edit.php index cea5a6a41..d639dfeaa 100644 --- a/group_edit.php +++ b/group_edit.php @@ -41,7 +41,10 @@ // Set on behalf group accordingly. $groupChanged = (bool)$request->getParameter('group_changed'); if ($request->isPost() && $groupChanged) { - $user->setOnBehalfGroup($group_id); + $user->setOnBehalfGroup($group_id); // User changed the group in a post using group selector on group_edit.php. +} +if ($request->isGet() && !$homeGroup) { + $user->setOnBehalfGroup($group_id); // User got here in a get by clicking an edit icon for a subgroup on groups.php. } $groups = $user->getGroupsForDropdown(); diff --git a/groups.php b/groups.php index 8d99e17fd..5773220a2 100644 --- a/groups.php +++ b/groups.php @@ -30,7 +30,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'this.form.submit();', 'name'=>'group', - 'style'=>'width: 250px;', 'value'=>$group_id, 'data'=>$groups, 'datakeys'=>array('id','name'))); @@ -40,5 +39,5 @@ $smarty->assign('subgroups', $user->getSubgroups($group_id)); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('label.subgroups')); -$smarty->assign('content_page_name', 'groups.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'groups2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index ec49622fe..592109c93 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5475"); +define("APP_VERSION", "1.19.28.5476"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1f2ff265c20002d27fb686afd3cd9ffcbb6503ad Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Apr 2021 20:23:41 +0000 Subject: [PATCH 2156/2515] Fixed a problem with misspelled variable name. --- group_edit.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/group_edit.php b/group_edit.php index d639dfeaa..097c34054 100644 --- a/group_edit.php +++ b/group_edit.php @@ -43,7 +43,7 @@ if ($request->isPost() && $groupChanged) { $user->setOnBehalfGroup($group_id); // User changed the group in a post using group selector on group_edit.php. } -if ($request->isGet() && !$homeGroup) { +if ($request->isGet() && !$home_group) { $user->setOnBehalfGroup($group_id); // User got here in a get by clicking an edit icon for a subgroup on groups.php. } diff --git a/initialize.php b/initialize.php index 592109c93..1e43f4cc4 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5476"); +define("APP_VERSION", "1.19.28.5477"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 188d9339bd3ee08a9c4fb52a55d486316d0019b8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 12:45:01 +0000 Subject: [PATCH 2157/2515] Made import.php mobile friendly, eliminated some php8 warnings. --- WEB-INF/lib/ttOrgImportHelper.class.php | 63 ++++++++----------------- WEB-INF/templates/import.tpl | 17 ------- WEB-INF/templates/import2.tpl | 15 ++++++ import.php | 4 +- initialize.php | 2 +- 5 files changed, 37 insertions(+), 64 deletions(-) delete mode 100644 WEB-INF/templates/import.tpl create mode 100644 WEB-INF/templates/import2.tpl diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index ac970426f..744b67e4b 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -1,30 +1,6 @@ $this->current_group_id, 'org_id' => $this->org_id, 'role_id' => $role_id, - 'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'client_id' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], 'name' => $attrs['NAME'], 'login' => $attrs['LOGIN'], 'password' => $attrs['PASSWORD'], @@ -285,8 +261,8 @@ function startElement($parser, $name, $attrs) { 'user_id' => $this->currentGroupUserMap[$attrs['USER_ID']], 'group_id' => $this->current_group_id, 'org_id' => $this->org_id, - 'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], - 'project_id' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']], + 'client_id' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'project_id' => @$this->currentGroupProjectMap[$attrs['PROJECT_ID']], 'name' => $attrs['NAME'], 'comment' => $attrs['COMMENT'], 'start_date' => $attrs['START_DATE'], @@ -311,7 +287,7 @@ function startElement($parser, $name, $attrs) { 'org_id' => $this->org_id, 'name' => $attrs['NAME'], 'date' => $attrs['DATE'], - 'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'client_id' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], 'status' => $attrs['STATUS'])); if ($invoice_id) { // Add a mapping. @@ -330,13 +306,13 @@ function startElement($parser, $name, $attrs) { 'org_id' => $this->org_id, 'date' => $attrs['DATE'], 'start' => $attrs['START'], - 'finish' => $attrs['FINISH'], + 'finish' => @$attrs['FINISH'], 'duration' => $attrs['DURATION'], - 'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], - 'project_id' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']], - 'task_id' => $this->currentGroupTaskMap[$attrs['TASK_ID']], - 'timesheet_id' => $this->currentGroupTimesheetMap[$attrs['TIMESHEET_ID']], - 'invoice_id' => $this->currentGroupInvoiceMap[$attrs['INVOICE_ID']], + 'client_id' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'project_id' => @$this->currentGroupProjectMap[$attrs['PROJECT_ID']], + 'task_id' => @$this->currentGroupTaskMap[$attrs['TASK_ID']], + 'timesheet_id' => @$this->currentGroupTimesheetMap[$attrs['TIMESHEET_ID']], + 'invoice_id' => @$this->currentGroupInvoiceMap[$attrs['INVOICE_ID']], 'comment' => (isset($attrs['COMMENT']) ? $attrs['COMMENT'] : ''), 'billable' => $attrs['BILLABLE'], 'approved' => $attrs['APPROVED'], @@ -387,7 +363,7 @@ function startElement($parser, $name, $attrs) { 'org_id' => $this->org_id, 'log_id' => $this->currentGroupLogMap[$attrs['LOG_ID']], 'field_id' => $this->currentGroupCustomFieldMap[$attrs['FIELD_ID']], - 'option_id' => $this->currentGroupCustomFieldOptionMap[$attrs['OPTION_ID']], + 'option_id' => @$this->currentGroupCustomFieldOptionMap[$attrs['OPTION_ID']], 'value' => $attrs['VALUE'], 'status' => $attrs['STATUS']))) { $this->errors->add($i18n->get('error.db')); @@ -402,12 +378,12 @@ function startElement($parser, $name, $attrs) { 'user_id' => $this->currentGroupUserMap[$attrs['USER_ID']], 'group_id' => $this->current_group_id, 'org_id' => $this->org_id, - 'client_id' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'client_id' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], 'project_id' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']], - 'timesheet_id' => $this->currentGroupTimesheetMap[$attrs['TIMESHEET_ID']], + 'timesheet_id' => @$this->currentGroupTimesheetMap[$attrs['TIMESHEET_ID']], 'name' => $attrs['NAME'], 'cost' => $attrs['COST'], - 'invoice_id' => $this->currentGroupInvoiceMap[$attrs['INVOICE_ID']], + 'invoice_id' => @$this->currentGroupInvoiceMap[$attrs['INVOICE_ID']], 'approved' => $attrs['APPROVED'], 'paid' => $attrs['PAID'], 'status' => $attrs['STATUS'])); @@ -477,9 +453,9 @@ function startElement($parser, $name, $attrs) { 'group_id' => $this->current_group_id, 'org_id' => $this->org_id, 'report_spec' => $this->remapReportSpec($attrs['REPORT_SPEC']), - 'client' => $this->currentGroupClientMap[$attrs['CLIENT_ID']], - 'project' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']], - 'task' => $this->currentGroupTaskMap[$attrs['TASK_ID']], + 'client' => @$this->currentGroupClientMap[$attrs['CLIENT_ID']], + 'project' => @$this->currentGroupProjectMap[$attrs['PROJECT_ID']], + 'task' => @$this->currentGroupTaskMap[$attrs['TASK_ID']], 'billable' => $attrs['BILLABLE'], 'approved' => $attrs['APPROVED'], 'invoice' => $attrs['INVOICE'], @@ -850,7 +826,6 @@ private function insertTask($fields) $org_id = (int) $fields['org_id']; $name = $fields['name']; $description = $fields['description']; - $projects = $fields['projects']; $status = $fields['status']; $sql = "insert into tt_tasks (group_id, org_id, name, description, status) diff --git a/WEB-INF/templates/import.tpl b/WEB-INF/templates/import.tpl deleted file mode 100644 index d65b64963..000000000 --- a/WEB-INF/templates/import.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{$forms.importForm.open} - - - - -
- - - - - - - - -
{$i18n.form.import.hint}
 
{$i18n.form.import.file}:{$forms.importForm.xmlfile.control}
{$forms.importForm.btn_submit.control}
-
-{$forms.importForm.close} diff --git a/WEB-INF/templates/import2.tpl b/WEB-INF/templates/import2.tpl new file mode 100644 index 000000000..5d7cd33ac --- /dev/null +++ b/WEB-INF/templates/import2.tpl @@ -0,0 +1,15 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +
{$i18n.form.import.hint}
+{$forms.importForm.open} + + + + + + + +
{$forms.importForm.xmlfile.control}
+
{$forms.importForm.btn_submit.control}
+{$forms.importForm.open} diff --git a/import.php b/import.php index b743b3f5a..c4b59c240 100644 --- a/import.php +++ b/import.php @@ -25,5 +25,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray()) ); $smarty->assign('title', $i18n->get('title.import')); -$smarty->assign('content_page_name', 'import.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'import2.tpl'); +$smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 1e43f4cc4..ee1a079f7 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5477"); +define("APP_VERSION", "1.19.28.5478"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c330fe620dd9620f71c818a569d183a872fe776e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 13:26:44 +0000 Subject: [PATCH 2158/2515] Fixed conditions for a couple of php8 warnings. --- initialize.php | 2 +- time.php | 2 +- time_edit.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index ee1a079f7..15416eaed 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5478"); +define("APP_VERSION", "1.19.28.5479"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index f6cd1daf1..d96c497e3 100644 --- a/time.php +++ b/time.php @@ -212,6 +212,7 @@ } // If we show project dropdown, add controls for project and client. +$project_list = $client_list = array(); if ($showProject) { // Dropdown for projects assigned to user. $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); @@ -226,7 +227,6 @@ $largeScreenCalendarRowSpan += 2; // Client dropdown. - $client_list = array(); if ($showClient) { $active_clients = ttGroupHelper::getActiveClients(true); // We need an array of assigned project ids to do some trimming. diff --git a/time_edit.php b/time_edit.php index f4a955776..8e9f31e56 100644 --- a/time_edit.php +++ b/time_edit.php @@ -155,6 +155,7 @@ } // If we show project dropdown, add controls for project and client. +$project_list = $client_list = array(); if ($showProject) { // Dropdown for projects assigned to user. $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); @@ -168,7 +169,6 @@ 'empty'=>array(''=>$i18n->get('dropdown.select')))); // Client dropdown. - $client_list = array(); if ($showClient) { $active_clients = ttGroupHelper::getActiveClients(true); // We need an array of assigned project ids to do some trimming. From e7152bc13119a7742c08c27ab1ef1f0033aed455 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 14:07:21 +0000 Subject: [PATCH 2159/2515] Made invoice_add.php mobile friendly. --- WEB-INF/lib/ttInvoiceHelper.class.php | 32 +++------------ WEB-INF/templates/invoice_add.tpl | 53 ------------------------- WEB-INF/templates/invoice_add2.tpl | 57 +++++++++++++++++++++++++++ initialize.php | 2 +- invoice_add.php | 5 ++- 5 files changed, 66 insertions(+), 83 deletions(-) delete mode 100644 WEB-INF/templates/invoice_add.tpl create mode 100644 WEB-INF/templates/invoice_add2.tpl diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 0afd0c9aa..8c1e6aafa 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -1,30 +1,6 @@ query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - if ($val['id']) { + if (isset($val['id']) && $val['id'] > 0) { return $val; } } @@ -255,6 +231,8 @@ static function invoiceableItemsExist($fields) { $end_date = new DateAndTime($user->date_format, $fields['end_date']); $end = $end_date->toString(DB_DATEFORMAT); + $project_id = null; + $project_part = ''; if (isset($fields['project_id'])) $project_id = (int) $fields['project_id']; // Our query is different depending on tracking mode. diff --git a/WEB-INF/templates/invoice_add.tpl b/WEB-INF/templates/invoice_add.tpl deleted file mode 100644 index f5211eeef..000000000 --- a/WEB-INF/templates/invoice_add.tpl +++ /dev/null @@ -1,53 +0,0 @@ -{$forms.invoiceForm.open} - - - - -
- - - - - - - - - - - - - -{if $show_project} - - - - -{/if} - - - - - - - - - - - - - - - - -
{$i18n.form.invoice.number} (*):{$forms.invoiceForm.number.control}
{$i18n.label.date} (*):{$forms.invoiceForm.date.control}
{$i18n.label.client} (*):{$forms.invoiceForm.client.control}
{$i18n.label.project}:{$forms.invoiceForm.project.control}
{$i18n.label.start_date} (*):{$forms.invoiceForm.start.control}
{$i18n.label.end_date} (*):{$forms.invoiceForm.finish.control}
{$i18n.label.required_fields}
 
{$forms.invoiceForm.btn_submit.control}
-
-{$forms.invoiceForm.close} - - diff --git a/WEB-INF/templates/invoice_add2.tpl b/WEB-INF/templates/invoice_add2.tpl new file mode 100644 index 000000000..78e4f5ba2 --- /dev/null +++ b/WEB-INF/templates/invoice_add2.tpl @@ -0,0 +1,57 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.invoiceForm.open} + + + + + + + + + + + + + + + + + + + +{if isset($show_project) && $show_project} + + + + + + +{/if} + + + + + + + + + + + + + + +
{$forms.invoiceForm.number.control}
{$forms.invoiceForm.date.control}
{$forms.invoiceForm.client.control}
{$forms.invoiceForm.project.control}
{$forms.invoiceForm.start.control}
{$forms.invoiceForm.finish.control}
{$i18n.label.required_fields}
+
{$forms.invoiceForm.btn_submit.control}
+{$forms.invoiceForm.close} + + diff --git a/initialize.php b/initialize.php index 15416eaed..2c6863908 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5479"); +define("APP_VERSION", "1.19.28.5480"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_add.php b/invoice_add.php index 9c5cd641a..9d127cd3d 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -19,6 +19,7 @@ } // End of access checks. +$cl_date = $cl_client = $cl_project = $cl_number = $cl_start = $cl_finish = null; if ($request->isPost()) { $cl_date = $request->getParameter('date'); $cl_client = (int)$request->getParameter('client'); @@ -79,5 +80,5 @@ $smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"'); $smarty->assign('show_project', $show_project); $smarty->assign('title', $i18n->get('title.add_invoice')); -$smarty->assign('content_page_name', 'invoice_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'invoice_add2.tpl'); +$smarty->display('index2.tpl'); From a2b54e5b995e6f5df919767b25685dbee3189ac4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 14:42:35 +0000 Subject: [PATCH 2160/2515] Made invoice_delete.php mobile friendly. --- WEB-INF/lib/ttGroupHelper.class.php | 1 + WEB-INF/lib/ttInvoiceHelper.class.php | 1 + WEB-INF/templates/invoice_delete.tpl | 34 --------------------------- WEB-INF/templates/invoice_delete2.tpl | 31 ++++++++++++++++++++++++ initialize.php | 2 +- invoice_add.php | 6 ++--- invoice_delete.php | 4 ++-- invoices.php | 1 + 8 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 WEB-INF/templates/invoice_delete.tpl create mode 100644 WEB-INF/templates/invoice_delete2.tpl diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index defdb61d4..0dd3dd412 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -403,6 +403,7 @@ static function getActiveInvoices($sort_options = false) $addPaidStatus = $user->isPluginEnabled('ps'); $result = array(); + $client_part = ''; if ($user->isClient()) $client_part = "and i.client_id = $user->client_id"; diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 8c1e6aafa..2802b57e7 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -16,6 +16,7 @@ static function getInvoice($invoice_id) { $group_id = $user->getGroup(); $org_id = $user->org_id; + $client_part = ''; if ($user->isClient()) $client_part = "and client_id = $user->client_id"; $sql = "select * from tt_invoices". diff --git a/WEB-INF/templates/invoice_delete.tpl b/WEB-INF/templates/invoice_delete.tpl deleted file mode 100644 index 3e0c0700d..000000000 --- a/WEB-INF/templates/invoice_delete.tpl +++ /dev/null @@ -1,34 +0,0 @@ - - -{$forms.invoiceDeleteForm.open} - - - - -
- - - - - - - - - - - - - - -
{$i18n.form.invoice.invoice_to_delete}:{$invoice_to_delete|escape}
{$i18n.form.invoice.invoice_entries}:{$forms.invoiceDeleteForm.delete_invoice_entries.control}
 
{$forms.invoiceDeleteForm.btn_delete.control}  {$forms.invoiceDeleteForm.btn_cancel.control}
-
-{$forms.invoiceDeleteForm.close} diff --git a/WEB-INF/templates/invoice_delete2.tpl b/WEB-INF/templates/invoice_delete2.tpl new file mode 100644 index 000000000..6fb7cb6c4 --- /dev/null +++ b/WEB-INF/templates/invoice_delete2.tpl @@ -0,0 +1,31 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{$forms.invoiceDeleteForm.open} + + + + + + + + + + + + + +
{$i18n.form.invoice.invoice_to_delete}:
{$i18n.form.invoice.invoice_to_delete}:{$invoice_to_delete|escape}
{$forms.invoiceDeleteForm.delete_invoice_entries.control}
+
{$forms.invoiceDeleteForm.btn_delete.control} {$forms.invoiceDeleteForm.btn_cancel.control}
+{$forms.invoiceDeleteForm.close} diff --git a/initialize.php b/initialize.php index 2c6863908..979fec7c0 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5480"); +define("APP_VERSION", "1.19.28.5481"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_add.php b/invoice_add.php index 9d127cd3d..bc337a000 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -35,15 +35,15 @@ // Dropdown for clients if the clients plugin is enabled. if ($user->isPluginEnabled('cl')) { $clients = ttGroupHelper::getActiveClients(); - $form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); + $form->addInput(array('type'=>'combobox','name'=>'client','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); } // Dropdown for projects. $show_project = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); if ($show_project) { $projects = ttGroupHelper::getActiveProjects(); - $form->addInput(array('type'=>'combobox','name'=>'project','style'=>'width: 250px;','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); + $form->addInput(array('type'=>'combobox','name'=>'project','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); } -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'number','style'=>'width: 250px;','value'=>$cl_number)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'number','value'=>$cl_number)); $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start','value'=>$cl_start)); $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'finish','value'=>$cl_finish)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.add'))); diff --git a/invoice_delete.php b/invoice_delete.php index 5b473dfa0..7e80b1265 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_invoice')); -$smarty->assign('content_page_name', 'invoice_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'invoice_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/invoices.php b/invoices.php index 305dcefdc..3f5faaf73 100644 --- a/invoices.php +++ b/invoices.php @@ -17,6 +17,7 @@ } // End of access checks. +$sort_option_1 = $sort_order_1 = $sort_option_2 = $sort_order_2 = null; if ($request->isPost()) { $sort_option_1 = $request->getParameter('sort_option_1'); $sort_order_1 = $request->getParameter('sort_order_1'); From 0f5cf0125c31ac88f541879e8a14efd12c7ecbad Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 18:28:09 +0000 Subject: [PATCH 2161/2515] Made invoice-view.php mobile friendly. --- WEB-INF/templates/invoice_view.tpl | 90 ------------------------ WEB-INF/templates/invoice_view2.tpl | 104 ++++++++++++++++++++++++++++ default.css | 24 +++++++ initialize.php | 2 +- invoice_view.php | 6 +- rtl.css | 8 +++ 6 files changed, 141 insertions(+), 93 deletions(-) delete mode 100644 WEB-INF/templates/invoice_view.tpl create mode 100644 WEB-INF/templates/invoice_view2.tpl diff --git a/WEB-INF/templates/invoice_view.tpl b/WEB-INF/templates/invoice_view.tpl deleted file mode 100644 index 0d8c31ffe..000000000 --- a/WEB-INF/templates/invoice_view.tpl +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - -
- - - - - -
{$i18n.title.invoice} {$invoice_name|escape}
{$i18n.label.date}: {$invoice_date}
{$i18n.label.client}: {$client_name|escape}
{$i18n.label.client_address}: {$client_address|escape}
-
-{if $invoice_items} - - - - - {if $show_project} - - {/if} - {if $show_task} - - {/if} - - - - {if $user->isPluginEnabled('ps')} - - {/if} - - {foreach $invoice_items as $invoice_item} - - - - {if $show_project} - - {/if} - {if $show_task} - - {/if} - - - - {if $user->isPluginEnabled('ps')} - - {/if} - - {/foreach} - - {if $tax} - - - - - - - - - {/if} - - - - -
{$i18n.label.date}{$i18n.form.invoice.person}{$i18n.label.project}{$i18n.label.task}{$i18n.label.note}{$i18n.label.duration}{$i18n.label.cost}{$i18n.label.paid}
{$invoice_item.date}{$invoice_item.user_name|escape}{$invoice_item.project_name|escape}{$invoice_item.task_name|escape}{$invoice_item.note|escape}{$invoice_item.duration}{$invoice_item.cost}{if $invoice_item.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
 
{$i18n.label.subtotal}:{$subtotal|escape}
{$i18n.label.tax}:{$tax|escape}
{$i18n.label.total}:{$total|escape}
- - {if $show_mark_paid} - {$forms.invoiceForm.open} - - - - -
- - -
{$i18n.label.mark_paid}: {$forms.invoiceForm.mark_paid_action_options.control} {$forms.invoiceForm.btn_mark_paid.control}
-
- {$forms.invoiceForm.close} - {/if} -{/if} -

- -
diff --git a/WEB-INF/templates/invoice_view2.tpl b/WEB-INF/templates/invoice_view2.tpl new file mode 100644 index 000000000..64caae8d2 --- /dev/null +++ b/WEB-INF/templates/invoice_view2.tpl @@ -0,0 +1,104 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +
{$i18n.title.invoice} {$invoice_name|escape}
+ + + + + + + + +{if isset($client_address)} + + + + +{/if} +
{$i18n.label.date}:{$invoice_date}
{$i18n.label.client}:{$client_name|escape}
{$i18n.label.client_address}:{$client_address|escape}
+
+ +{if $invoice_items} + + + + + {if $show_project} + + {/if} + {if $show_task} + + {/if} + + + + {if $user->isPluginEnabled('ps')} + + {/if} + + {foreach $invoice_items as $invoice_item} + + + + {if $show_project} + + {/if} + {if $show_task} + + {/if} + + + + {if $show_paid_column} + + {/if} + + {/foreach} + {if $tax} + + + + {if $show_paid_column} + + {/if} + + + + + {if $show_paid_column} + + {/if} + + {/if} + + + + {if $show_paid_column} + + {/if} + +
{$i18n.label.date}{$i18n.form.invoice.person}{$i18n.label.project}{$i18n.label.task}{$i18n.label.note}{$i18n.label.duration}{$i18n.label.cost}{$i18n.label.paid}
{$invoice_item.date}{$invoice_item.user_name|escape}{$invoice_item.project_name|escape}{$invoice_item.task_name|escape}{$invoice_item.note|escape}{$invoice_item.duration}{$invoice_item.cost}{if $invoice_item.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.subtotal}:{$subtotal|escape}
{$i18n.label.tax}:{$tax|escape}
{$i18n.label.total}:{$total|escape}
+{/if} + +{if $show_mark_paid} +{$forms.invoiceForm.open} + + + + + + + +
{$forms.invoiceForm.mark_paid_action_options.control} {$forms.invoiceForm.btn_mark_paid.control}
+{$forms.invoiceForm.close} +{/if} +
+
+ +
+
diff --git a/default.css b/default.css index 65f3be3b9..62be70136 100644 --- a/default.css +++ b/default.css @@ -175,6 +175,16 @@ div.page-hint { white-space: nowrap; } +/* money value cell in tables */ +.money-value-cell { + text-align: right; +} + +/* yes-no cell in tables */ +.yes-no-cell { + text-align: middle; +} + /* text cell for note header when we display notes on separate rows */ .note-header-cell { text-align: right; @@ -305,6 +315,11 @@ input[type="text"].project-rate-field { width: 136px; } +/* dropdown control with an associated button */ +.dropdown-field-with-button { + width: 136px; +} + /* textareas for fields */ #description, #address, #item_name, #custom_css { width: 220px; @@ -449,6 +464,15 @@ div.section-header { margin-bottom: .5rem; } +/* invoice-header div */ +div.invoice-header { + font-size: 2rem; +} + +th.invoice-label { + text-align: right; +} + /* div for a group of items in site map */ div.sitemap-item-group { margin-top: 2rem; diff --git a/initialize.php b/initialize.php index 979fec7c0..a716293b4 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5481"); +define("APP_VERSION", "1.19.28.5482"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_view.php b/invoice_view.php index a4d0cc50f..0e6cf1ebc 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -75,6 +75,7 @@ $mark_paid_action_options = array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')); $form->addInput(array('type'=>'combobox', 'name'=>'mark_paid_action_options', + 'class'=>'dropdown-field-with-button', 'data'=>$mark_paid_action_options, 'value'=>$cl_mark_paid_action_option)); $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->get('button.submit'))); @@ -103,8 +104,9 @@ $smarty->assign('client_address', $client['address']); $smarty->assign('show_project', MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode); $smarty->assign('show_task', MODE_PROJECTS_AND_TASKS == $trackingMode); +$smarty->assign('show_paid_column', $user->isPluginEnabled('ps')); $smarty->assign('invoice_items', $invoice_items); $smarty->assign('colspan', $colspan); $smarty->assign('title', $i18n->get('title.view_invoice')); -$smarty->assign('content_page_name', 'invoice_view.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'invoice_view2.tpl'); +$smarty->display('index2.tpl'); diff --git a/rtl.css b/rtl.css index b47b925ad..e85b8b5e5 100644 --- a/rtl.css +++ b/rtl.css @@ -36,6 +36,14 @@ html { text-align: left; } +.money-value-cell { + text-align: left; +} + .note-header-cell { text-align: left; } + +th.invoice-label { + text-align: left; +} From f37182bf1b9c66450058b48466005e544465d110 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 26 Apr 2021 20:07:56 +0000 Subject: [PATCH 2162/2515] Made invoices.php mobile friendly. --- WEB-INF/lib/ttInvoiceHelper.class.php | 2 + WEB-INF/templates/invoice_view2.tpl | 2 +- WEB-INF/templates/invoices.tpl | 60 --------------------------- WEB-INF/templates/invoices2.tpl | 56 +++++++++++++++++++++++++ initialize.php | 2 +- invoice_view.php | 3 +- invoices.php | 10 +++-- 7 files changed, 67 insertions(+), 68 deletions(-) delete mode 100644 WEB-INF/templates/invoices.tpl create mode 100644 WEB-INF/templates/invoices2.tpl diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 2802b57e7..9a20730ae 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -313,6 +313,8 @@ static function createInvoice($fields) { $end_date = new DateAndTime($user->date_format, $fields['end_date']); $end = $end_date->toString(DB_DATEFORMAT); + $project_id = null; + $project_part = ''; if (isset($fields['project_id'])) $project_id = (int) $fields['project_id']; // Create a new invoice record. diff --git a/WEB-INF/templates/invoice_view2.tpl b/WEB-INF/templates/invoice_view2.tpl index 64caae8d2..afa508724 100644 --- a/WEB-INF/templates/invoice_view2.tpl +++ b/WEB-INF/templates/invoice_view2.tpl @@ -59,7 +59,7 @@ License: See license.txt *} {/if}
{$i18n.label.subtotal}: {$subtotal|escape}
- - - -
- - -
{$i18n.label.sort}:{$forms.invoicesForm.sort_option_1.control}{$forms.invoicesForm.sort_order_1.control}{$forms.invoicesForm.sort_option_2.control}{$forms.invoicesForm.sort_order_2.control}
-
- - {$forms.invoicesForm.close} -{/if} - - - - - -
-{if $user->can('manage_invoices') || $user->can('view_client_invoices')} - - - - - - {if $user->isPluginEnabled('ps')} - - {/if} - {if !$user->isClient()} - - {/if} - - {foreach $invoices as $invoice} - - - - - {if $user->isPluginEnabled('ps')} - - {/if} - {if !$user->isClient()} - - {/if} - - {/foreach} -
{$i18n.label.invoice}{$i18n.label.client}{$i18n.label.date}{$i18n.label.paid}
{$invoice.name|escape}{$invoice.client|escape}{$invoice.date}{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.delete}
- - {if !$user->isClient()} - - -

- {/if} -{/if} -
diff --git a/WEB-INF/templates/invoices2.tpl b/WEB-INF/templates/invoices2.tpl new file mode 100644 index 000000000..003266cb0 --- /dev/null +++ b/WEB-INF/templates/invoices2.tpl @@ -0,0 +1,56 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{if $show_sorting_options} +{$forms.invoicesForm.open} + + + + + + + + + + + + + +
{$forms.invoicesForm.sort_option_1.control} {$forms.invoicesForm.sort_order_1.control}
{$forms.invoicesForm.sort_option_2.control} {$forms.invoicesForm.sort_order_2.control}
+{$forms.invoicesForm.close} +{/if} + + + + + + +{if $user->isPluginEnabled('ps')} + +{/if} +{if !$user->isClient()} + +{/if} + +{foreach $invoices as $invoice} + + + + + {if $user->isPluginEnabled('ps')} + + {/if} + {if !$user->isClient()} + + {/if} + +{/foreach} +
{$i18n.label.invoice}{$i18n.label.client}{$i18n.label.date}{$i18n.label.paid}
{$invoice.name|escape}{$invoice.client|escape}{$invoice.date}{if $invoice.paid}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.delete}
+ +{if !$user->isClient()} +
+{/if} diff --git a/initialize.php b/initialize.php index a716293b4..4c84012d6 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5482"); +define("APP_VERSION", "1.19.28.5483"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_view.php b/invoice_view.php index 0e6cf1ebc..621ae4a0c 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -76,8 +76,7 @@ $form->addInput(array('type'=>'combobox', 'name'=>'mark_paid_action_options', 'class'=>'dropdown-field-with-button', - 'data'=>$mark_paid_action_options, - 'value'=>$cl_mark_paid_action_option)); + 'data'=>$mark_paid_action_options)); $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->get('button.submit'))); $smarty->assign('show_mark_paid', true); } diff --git a/invoices.php b/invoices.php index 3f5faaf73..bbca99cc7 100644 --- a/invoices.php +++ b/invoices.php @@ -36,14 +36,14 @@ $form->addInput(array('type'=>'combobox', 'name'=>'sort_option_1', + 'class'=>'dropdown-field-with-button', 'onchange'=>'this.form.sorting_changed.value=1;this.form.submit();', - //'style'=>'width: 250px;', 'data'=>$sort_options, 'value'=>$sort_option_1)); $form->addInput(array('type'=>'combobox', 'name'=>'sort_option_2', + 'class'=>'dropdown-field-with-button', 'onchange'=>'this.form.sorting_changed.value=1;this.form.submit();', - //'style'=>'width: 250px;', 'data'=>$sort_options, 'value'=>$sort_option_2, 'empty'=>array(''=>$i18n->get('dropdown.no')))); @@ -54,11 +54,13 @@ $form->addInput(array('type'=>'combobox', 'name'=>'sort_order_1', + 'class'=>'dropdown-field-with-button', 'onchange'=>'this.form.sorting_changed.value=1;this.form.submit();', 'data'=>$sort_order, 'value'=>$sort_order_1)); $form->addInput(array('type'=>'combobox', 'name'=>'sort_order_2', + 'class'=>'dropdown-field-with-button', 'onchange'=>'this.form.sorting_changed.value=1;this.form.submit();', 'data'=>$sort_order, 'value'=>$sort_order_2)); @@ -88,5 +90,5 @@ $smarty->assign('show_sorting_options', count($invoices) > 1); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.invoices')); -$smarty->assign('content_page_name', 'invoices.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'invoices2.tpl'); +$smarty->display('index2.tpl'); From 1a5296eb93a70f1c97f183b40e8c2e0b940651af Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 16:39:47 +0000 Subject: [PATCH 2163/2515] Made locking.php mobile friendly. --- WEB-INF/templates/locking.tpl | 20 -------------------- WEB-INF/templates/locking2.tpl | 17 +++++++++++++++++ initialize.php | 2 +- locking.php | 4 ++-- 4 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 WEB-INF/templates/locking.tpl create mode 100644 WEB-INF/templates/locking2.tpl diff --git a/WEB-INF/templates/locking.tpl b/WEB-INF/templates/locking.tpl deleted file mode 100644 index 0d76e46cc..000000000 --- a/WEB-INF/templates/locking.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.lockingForm.open} - - - - -
- - - - - - - - - - - -
{$i18n.label.schedule}:{$forms.lockingForm.lock_spec.control} {$i18n.label.what_is_it}
 
{$forms.lockingForm.btn_save.control}
-
-{$forms.lockingForm.close} diff --git a/WEB-INF/templates/locking2.tpl b/WEB-INF/templates/locking2.tpl new file mode 100644 index 000000000..8ecf48cc9 --- /dev/null +++ b/WEB-INF/templates/locking2.tpl @@ -0,0 +1,17 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.lockingForm.open} + + + + + + + +
{$forms.lockingForm.lock_spec.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
+
{$forms.lockingForm.btn_save.control}
+{$forms.lockingForm.close} diff --git a/initialize.php b/initialize.php index 4c84012d6..876ecefb9 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5483"); +define("APP_VERSION", "1.19.28.5484"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/locking.php b/locking.php index 04c8d9419..5277ec90d 100644 --- a/locking.php +++ b/locking.php @@ -37,5 +37,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.locking')); -$smarty->assign('content_page_name', 'locking.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'locking2.tpl'); +$smarty->display('index2.tpl'); From ede52c729188fb8129565e906d992b31e4f70806 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 17:05:20 +0000 Subject: [PATCH 2164/2515] Made mail.tpl mobile friendly. --- WEB-INF/templates/mail.tpl | 39 ------------------------------------- WEB-INF/templates/mail2.tpl | 34 ++++++++++++++++++++++++++++++++ default.css | 4 ++-- initialize.php | 2 +- invoice_send.php | 12 ++++++------ report_send.php | 12 ++++++------ 6 files changed, 49 insertions(+), 54 deletions(-) delete mode 100644 WEB-INF/templates/mail.tpl create mode 100644 WEB-INF/templates/mail2.tpl diff --git a/WEB-INF/templates/mail.tpl b/WEB-INF/templates/mail.tpl deleted file mode 100644 index 13e2be598..000000000 --- a/WEB-INF/templates/mail.tpl +++ /dev/null @@ -1,39 +0,0 @@ -{$forms.mailForm.open} - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.form.mail.to} (*):{$forms.mailForm.receiver.control}
{$i18n.label.cc}:{$forms.mailForm.cc.control}
{$i18n.label.subject} (*):{$forms.mailForm.subject.control}
{$i18n.label.comment}:{$forms.mailForm.comment.control}
{$i18n.label.required_fields}
{$forms.mailForm.btn_send.control}
-
-
-{$forms.mailForm.close} diff --git a/WEB-INF/templates/mail2.tpl b/WEB-INF/templates/mail2.tpl new file mode 100644 index 000000000..3a3cf132f --- /dev/null +++ b/WEB-INF/templates/mail2.tpl @@ -0,0 +1,34 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.mailForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.mailForm.receiver.control}
{$forms.mailForm.cc.control}
{$forms.mailForm.subject.control}
{$forms.mailForm.comment.control}
{$i18n.label.required_fields}
+
{$forms.mailForm.btn_send.control}
+{$forms.mailForm.close} diff --git a/default.css b/default.css index 62be70136..85ead1d9f 100644 --- a/default.css +++ b/default.css @@ -321,7 +321,7 @@ input[type="text"].project-rate-field { } /* textareas for fields */ -#description, #address, #item_name, #custom_css { +#description, #address, #item_name, #comment, #custom_css { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; @@ -329,7 +329,7 @@ input[type="text"].project-rate-field { } /* textareas with focus */ -#description:focus, #address:focus, #item_name:focus { +#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index 876ecefb9..c42cf9cb4 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5484"); +define("APP_VERSION", "1.19.28.5485"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_send.php b/invoice_send.php index 3a4aa25f9..c3126eb9c 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -39,10 +39,10 @@ $form = new Form('mailForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_invoice_id)); -$form->addInput(array('type'=>'text','name'=>'receiver','style'=>'width: 300px;','value'=>$cl_receiver)); -$form->addInput(array('type'=>'text','name'=>'cc','style'=>'width: 300px;','value'=>$cl_cc)); -$form->addInput(array('type'=>'text','name'=>'subject','style'=>'width: 300px;','value'=>$cl_subject)); -$form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250','style'=>'width: 300px; height: 60px;')); +$form->addInput(array('type'=>'text','name'=>'receiver','value'=>$cl_receiver)); +$form->addInput(array('type'=>'text','name'=>'cc','value'=>$cl_cc)); +$form->addInput(array('type'=>'text','name'=>'subject','value'=>$cl_subject)); +$form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250')); $form->addInput(array('type'=>'submit','name'=>'btn_send','value'=>$i18n->get('button.send'))); if ($request->isPost()) { @@ -80,5 +80,5 @@ $smarty->assign('title', $i18n->get('title.send_invoice')); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"'); -$smarty->assign('content_page_name', 'mail.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'mail2.tpl'); +$smarty->display('index2.tpl'); diff --git a/report_send.php b/report_send.php index a2747b957..67e7136c6 100644 --- a/report_send.php +++ b/report_send.php @@ -28,10 +28,10 @@ } $form = new Form('mailForm'); -$form->addInput(array('type'=>'text','name'=>'receiver','style'=>'width: 300px;','value'=>$cl_receiver)); -$form->addInput(array('type'=>'text','name'=>'cc','style'=>'width: 300px;','value'=>$cl_cc)); -$form->addInput(array('type'=>'text','name'=>'subject','style'=>'width: 300px;','value'=>$cl_subject)); -$form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250','style'=>'width: 300px; height: 60px;')); +$form->addInput(array('type'=>'text','name'=>'receiver','value'=>$cl_receiver)); +$form->addInput(array('type'=>'text','name'=>'cc','value'=>$cl_cc)); +$form->addInput(array('type'=>'text','name'=>'subject','value'=>$cl_subject)); +$form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250')); $form->addInput(array('type'=>'submit','name'=>'btn_send','value'=>$i18n->get('button.send'))); if ($request->isPost()) { @@ -74,5 +74,5 @@ $smarty->assign('title', $i18n->get('title.send_report')); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"'); -$smarty->assign('content_page_name', 'mail.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'mail2.tpl'); +$smarty->display('index2.tpl'); From 47bed4f70c41b643cc87d74dd17bd3e56dd6958d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 17:15:05 +0000 Subject: [PATCH 2165/2515] Removed a couple of php8 warnings. --- WEB-INF/lib/ttUserConfig.class.php | 30 +++-------------------------- WEB-INF/templates/invoice_view2.tpl | 2 +- initialize.php | 2 +- 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/WEB-INF/lib/ttUserConfig.class.php b/WEB-INF/lib/ttUserConfig.class.php index d0907bb6d..c14430581 100644 --- a/WEB-INF/lib/ttUserConfig.class.php +++ b/WEB-INF/lib/ttUserConfig.class.php @@ -1,30 +1,6 @@ mdb2->quote($name)); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - return $val['param_value']; + return @$val['param_value']; } return false; } diff --git a/WEB-INF/templates/invoice_view2.tpl b/WEB-INF/templates/invoice_view2.tpl index afa508724..801245559 100644 --- a/WEB-INF/templates/invoice_view2.tpl +++ b/WEB-INF/templates/invoice_view2.tpl @@ -85,7 +85,7 @@ License: See license.txt *}
{/if} -{if $show_mark_paid} +{if isset($show_mark_paid)} {$forms.invoiceForm.open} diff --git a/initialize.php b/initialize.php index c42cf9cb4..e5dc29655 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5485"); +define("APP_VERSION", "1.19.28.5486"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 392a47b0feb0894dad0497063367270e1c47c648 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 18:11:24 +0000 Subject: [PATCH 2166/2515] Made notification_add.php mobile friendly. --- WEB-INF/templates/notification_add.tpl | 46 ------------------- WEB-INF/templates/notification_add2.tpl | 59 +++++++++++++++++++++++++ initialize.php | 2 +- notification_add.php | 17 +++---- 4 files changed, 69 insertions(+), 55 deletions(-) delete mode 100644 WEB-INF/templates/notification_add.tpl create mode 100644 WEB-INF/templates/notification_add2.tpl diff --git a/WEB-INF/templates/notification_add.tpl b/WEB-INF/templates/notification_add.tpl deleted file mode 100644 index b3aaed8e7..000000000 --- a/WEB-INF/templates/notification_add.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{$forms.notificationForm.open} -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.fav_report} (*):{$forms.notificationForm.fav_report.control}
{$i18n.label.schedule} (*):{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$i18n.label.cc}:{$forms.notificationForm.cc.control}
{$i18n.label.subject}:{$forms.notificationForm.subject.control}
{$i18n.label.comment}:{$forms.notificationForm.comment.control}
{$i18n.label.condition}:{$forms.notificationForm.report_condition.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
 
{$forms.notificationForm.btn_add.control}
-
-{$forms.notificationForm.close} diff --git a/WEB-INF/templates/notification_add2.tpl b/WEB-INF/templates/notification_add2.tpl new file mode 100644 index 000000000..b7e609126 --- /dev/null +++ b/WEB-INF/templates/notification_add2.tpl @@ -0,0 +1,59 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + +{$forms.notificationForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.notificationForm.fav_report.control}
{$forms.notificationForm.cron_spec.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.notificationForm.email.control}
{$forms.notificationForm.cc.control}
{$forms.notificationForm.subject.control}
{$forms.notificationForm.comment.control}
{$forms.notificationForm.report_condition.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
+
{$forms.notificationForm.btn_add.control}
+{$forms.notificationForm.close} diff --git a/initialize.php b/initialize.php index e5dc29655..95dd0b39d 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5486"); +define("APP_VERSION", "1.19.28.5487"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/notification_add.php b/notification_add.php index 83cd7a538..1290bfa23 100644 --- a/notification_add.php +++ b/notification_add.php @@ -22,6 +22,7 @@ header('Location: access_denied.php'); // No users in subgroup. exit(); } +$cl_fav_report_id = null; if ($request->isPost() && $request->getParameter('fav_report')) { $cl_fav_report_id = (int) $request->getParameter('fav_report'); if (!ttFavReportHelper::get($cl_fav_report_id)) { @@ -33,6 +34,7 @@ $fav_reports = ttFavReportHelper::getReports(); +$cl_cron_spec = $cl_email = $cl_cc = $cl_subject = $cl_comment = $cl_report_condition = null; if ($request->isPost()) { $cl_cron_spec = trim($request->getParameter('cron_spec')); $cl_email = trim($request->getParameter('email')); @@ -47,18 +49,17 @@ $form = new Form('notificationForm'); $form->addInput(array('type'=>'combobox', 'name'=>'fav_report', - 'style'=>'width: 250px;', 'value'=>$cl_fav_report_id, 'data'=>$fav_reports, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')) )); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'cron_spec','style'=>'width: 250px;','value'=>$cl_cron_spec)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','style'=>'width: 250px;','value'=>$cl_email)); -$form->addInput(array('type'=>'text','name'=>'cc','style'=>'width: 300px;','value'=>$cl_cc)); -$form->addInput(array('type'=>'text','name'=>'subject','style'=>'width: 300px;','value'=>$cl_subject)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'cron_spec','value'=>$cl_cron_spec)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); +$form->addInput(array('type'=>'text','name'=>'cc','value'=>$cl_cc)); +$form->addInput(array('type'=>'text','name'=>'subject','value'=>$cl_subject)); $form->addInput(array('type'=>'textarea','name'=>'comment','value'=>$cl_comment)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'report_condition','style'=>'width: 250px;','value'=>$cl_report_condition)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'report_condition','value'=>$cl_report_condition)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -94,5 +95,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_notification')); -$smarty->assign('content_page_name', 'notification_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'notification_add2.tpl'); +$smarty->display('index2.tpl'); From cc9b41611784a6e14274cff131aa9b1bba219282 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 19:21:39 +0000 Subject: [PATCH 2167/2515] Made notification_edit.php and notification_delete.php mobile friendly. --- WEB-INF/templates/notification_delete.tpl | 18 ------- WEB-INF/templates/notification_delete2.tpl | 7 +++ WEB-INF/templates/notification_edit.tpl | 46 ----------------- WEB-INF/templates/notification_edit2.tpl | 59 ++++++++++++++++++++++ initialize.php | 2 +- notification_delete.php | 4 +- notification_edit.php | 15 +++--- 7 files changed, 76 insertions(+), 75 deletions(-) delete mode 100644 WEB-INF/templates/notification_delete.tpl create mode 100644 WEB-INF/templates/notification_delete2.tpl delete mode 100644 WEB-INF/templates/notification_edit.tpl create mode 100644 WEB-INF/templates/notification_edit2.tpl diff --git a/WEB-INF/templates/notification_delete.tpl b/WEB-INF/templates/notification_delete.tpl deleted file mode 100644 index fac015c3a..000000000 --- a/WEB-INF/templates/notification_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.notificationDeleteForm.open} - - - - -
- - - - - - - - - -
{$notification_to_delete|escape}
 
{$forms.notificationDeleteForm.btn_delete.control}  {$forms.notificationDeleteForm.btn_cancel.control}
-
-{$forms.notificationDeleteForm.close} diff --git a/WEB-INF/templates/notification_delete2.tpl b/WEB-INF/templates/notification_delete2.tpl new file mode 100644 index 000000000..bd413463d --- /dev/null +++ b/WEB-INF/templates/notification_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.notificationDeleteForm.open} +
{$notification_to_delete|escape}
+
{$forms.notificationDeleteForm.btn_delete.control} {$forms.notificationDeleteForm.btn_cancel.control}
+{$forms.notificationDeleteForm.close} diff --git a/WEB-INF/templates/notification_edit.tpl b/WEB-INF/templates/notification_edit.tpl deleted file mode 100644 index 7c46761ea..000000000 --- a/WEB-INF/templates/notification_edit.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{$forms.notificationForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.fav_report} (*):{$forms.notificationForm.fav_report.control}
{$i18n.label.schedule} (*):{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$i18n.label.cc}:{$forms.notificationForm.cc.control}
{$i18n.label.subject}:{$forms.notificationForm.subject.control}
{$i18n.label.comment}:{$forms.notificationForm.comment.control}
{$i18n.label.condition}:{$forms.notificationForm.report_condition.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
 
{$forms.notificationForm.btn_submit.control}
-
-{$forms.notificationForm.close} diff --git a/WEB-INF/templates/notification_edit2.tpl b/WEB-INF/templates/notification_edit2.tpl new file mode 100644 index 000000000..1a0967cc6 --- /dev/null +++ b/WEB-INF/templates/notification_edit2.tpl @@ -0,0 +1,59 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + +{$forms.notificationForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.notificationForm.fav_report.control}
{$forms.notificationForm.cron_spec.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.notificationForm.email.control}
{$forms.notificationForm.cc.control}
{$forms.notificationForm.subject.control}
{$forms.notificationForm.comment.control}
{$forms.notificationForm.report_condition.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
+
{$forms.notificationForm.btn_submit.control}
+{$forms.notificationForm.close} diff --git a/initialize.php b/initialize.php index 95dd0b39d..84fbb24b3 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5487"); +define("APP_VERSION", "1.19.28.5488"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/notification_delete.php b/notification_delete.php index 93820427c..741826c03 100644 --- a/notification_delete.php +++ b/notification_delete.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.notificationDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_notification')); -$smarty->assign('content_page_name', 'notification_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'notification_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/notification_edit.php b/notification_edit.php index 3043bd8a6..43dbabcff 100644 --- a/notification_edit.php +++ b/notification_edit.php @@ -61,17 +61,16 @@ $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$notification_id)); $form->addInput(array('type'=>'combobox', 'name'=>'fav_report', - 'style'=>'width: 250px;', 'value'=>$cl_fav_report_id, 'data'=>$fav_reports, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'cron_spec','style'=>'width: 250px;','value'=>$cl_cron_spec)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','style'=>'width: 250px;','value'=>$cl_email)); -$form->addInput(array('type'=>'text','name'=>'cc','style'=>'width: 300px;','value'=>$cl_cc)); -$form->addInput(array('type'=>'text','name'=>'subject','style'=>'width: 300px;','value'=>$cl_subject)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'cron_spec','value'=>$cl_cron_spec)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); +$form->addInput(array('type'=>'text','name'=>'cc','value'=>$cl_cc)); +$form->addInput(array('type'=>'text','name'=>'subject','value'=>$cl_subject)); $form->addInput(array('type'=>'textarea','name'=>'comment','value'=>$cl_comment)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'report_condition','style'=>'width: 250px;','value'=>$cl_report_condition)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'report_condition','value'=>$cl_report_condition)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.save'))); if ($request->isPost()) { @@ -107,5 +106,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_notification')); -$smarty->assign('content_page_name', 'notification_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'notification_edit2.tpl'); +$smarty->display('index2.tpl'); From 13eb03fdd263cf11bfe5c9b300205eb53ab81a26 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Apr 2021 19:59:57 +0000 Subject: [PATCH 2168/2515] Made notifications.php mobile friendly. --- WEB-INF/templates/notifications.tpl | 36 ---------------------------- WEB-INF/templates/notifications2.tpl | 28 ++++++++++++++++++++++ initialize.php | 2 +- notifications.php | 4 ++-- 4 files changed, 31 insertions(+), 39 deletions(-) delete mode 100644 WEB-INF/templates/notifications.tpl create mode 100644 WEB-INF/templates/notifications2.tpl diff --git a/WEB-INF/templates/notifications.tpl b/WEB-INF/templates/notifications.tpl deleted file mode 100644 index d54579027..000000000 --- a/WEB-INF/templates/notifications.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{$forms.notificationsForm.open} - - - - -
-{if $user->can('manage_advanced_settings')} - - - - - - - - - - {if $notifications} - {foreach $notifications as $notification} - - - - - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.schedule}{$i18n.label.email}{$i18n.label.condition}
{$notification['name']|escape}{$notification['cron_spec']|escape}{$notification['email']|escape}{$notification['report_condition']|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - -

{$forms.notificationsForm.btn_add.control}
-{/if} -
-{$forms.notificationsForm.close} diff --git a/WEB-INF/templates/notifications2.tpl b/WEB-INF/templates/notifications2.tpl new file mode 100644 index 000000000..a1be398ea --- /dev/null +++ b/WEB-INF/templates/notifications2.tpl @@ -0,0 +1,28 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.notificationsForm.open} + + + + + + + + + +{if $notifications} + {foreach $notifications as $notification} + + + + + + + + + {/foreach} +{/if} +
{$i18n.label.thing_name}{$i18n.label.schedule}{$i18n.label.email}{$i18n.label.condition}
{$notification['name']|escape}{$notification['cron_spec']|escape}{$notification['email']|escape}{$notification['report_condition']|escape}{$i18n.label.edit}{$i18n.label.delete}
+
{$forms.notificationsForm.btn_add.control}
+{$forms.notificationsForm.close} diff --git a/initialize.php b/initialize.php index 84fbb24b3..685ceaf3d 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5488"); +define("APP_VERSION", "1.19.28.5489"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/notifications.php b/notifications.php index 5945320ef..23d1feb16 100644 --- a/notifications.php +++ b/notifications.php @@ -40,5 +40,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('notifications', $notifications); $smarty->assign('title', $i18n->get('title.notifications')); -$smarty->assign('content_page_name', 'notifications.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'notifications2.tpl'); +$smarty->display('index2.tpl'); From 4d15fb0ace9b097e76156a726fe8b7473b349c9d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Apr 2021 14:35:41 +0000 Subject: [PATCH 2169/2515] Made plugins.php mobile friendly. --- WEB-INF/templates/plugins.tpl | 182 ----------------------------- WEB-INF/templates/plugins2.tpl | 205 +++++++++++++++++++++++++++++++++ initialize.php | 2 +- plugins.php | 4 +- 4 files changed, 208 insertions(+), 185 deletions(-) delete mode 100644 WEB-INF/templates/plugins.tpl create mode 100644 WEB-INF/templates/plugins2.tpl diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl deleted file mode 100644 index 6de5ede7b..000000000 --- a/WEB-INF/templates/plugins.tpl +++ /dev/null @@ -1,182 +0,0 @@ - - -{$forms.pluginsForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$forms.pluginsForm.charts.control}
{$forms.pluginsForm.clients.control} {$forms.pluginsForm.client_required.control}
{$forms.pluginsForm.invoices.control}
{$forms.pluginsForm.paid_status.control}
{$forms.pluginsForm.custom_fields.control} {if $user->isPluginEnabled('cf')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.expenses.control} {$forms.pluginsForm.tax_expenses.control} {if $user->isPluginEnabled('ex')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.notifications.control} {$i18n.label.what_is_it}{if $user_exists && $user->isPluginEnabled('no')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.locking.control} {if $user->isPluginEnabled('lk')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.quotas.control} {if $user->isPluginEnabled('mq')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.week_view.control} {if $user->isPluginEnabled('wv')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.work_units.control} {if $user->isPluginEnabled('wu')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.approval.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.timesheets.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.templates.control} {$i18n.label.what_is_it} {if $user->isPluginEnabled('tp')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.work.control} {$i18n.label.what_is_it}
 
{$forms.pluginsForm.btn_save.control}
-
-{$forms.pluginsForm.close} diff --git a/WEB-INF/templates/plugins2.tpl b/WEB-INF/templates/plugins2.tpl new file mode 100644 index 000000000..370c93c59 --- /dev/null +++ b/WEB-INF/templates/plugins2.tpl @@ -0,0 +1,205 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{$forms.pluginsForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.pluginsForm.charts.control}
{$forms.pluginsForm.clients.control} {$forms.pluginsForm.client_required.control}
{$forms.pluginsForm.invoices.control}
{$forms.pluginsForm.paid_status.control}
{$forms.pluginsForm.custom_fields.control} {if $user->isPluginEnabled('cf')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.expenses.control} {$forms.pluginsForm.tax_expenses.control} {if $user->isPluginEnabled('ex')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.notifications.control} {$i18n.label.what_is_it}{if $user_exists && $user->isPluginEnabled('no')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.locking.control} {if $user->isPluginEnabled('lk')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.quotas.control} {if $user->isPluginEnabled('mq')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.week_view.control} {if $user->isPluginEnabled('wv')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.work_units.control} {if $user->isPluginEnabled('wu')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.approval.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.timesheets.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.templates.control} {$i18n.label.what_is_it} {if $user->isPluginEnabled('tp')}{$i18n.label.configure}{/if}
{$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.work.control} {$i18n.label.what_is_it}
+
{$forms.pluginsForm.btn_save.control}
+{$forms.pluginsForm.close} diff --git a/initialize.php b/initialize.php index 685ceaf3d..67ff18007 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5489"); +define("APP_VERSION", "1.19.28.5490"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins.php b/plugins.php index 9b3bc1a27..730889bc0 100644 --- a/plugins.php +++ b/plugins.php @@ -141,5 +141,5 @@ $smarty->assign('onload', 'onLoad="handlePluginCheckboxes();"'); $smarty->assign('user_exists', $user->exists()); $smarty->assign('title', $i18n->get('title.plugins')); -$smarty->assign('content_page_name', 'plugins.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'plugins2.tpl'); +$smarty->display('index2.tpl'); From b3eba2ab830fa80bd26eb58a3120b9a015b12b53 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Apr 2021 16:18:20 +0000 Subject: [PATCH 2170/2515] Made predefined_expense_add.php mobile friendly. --- WEB-INF/templates/predefined_expense_add.tpl | 26 ------------------- WEB-INF/templates/predefined_expense_add2.tpl | 21 +++++++++++++++ default.css | 5 ++++ initialize.php | 2 +- predefined_expense_add.php | 9 ++++--- 5 files changed, 32 insertions(+), 31 deletions(-) delete mode 100644 WEB-INF/templates/predefined_expense_add.tpl create mode 100644 WEB-INF/templates/predefined_expense_add2.tpl diff --git a/WEB-INF/templates/predefined_expense_add.tpl b/WEB-INF/templates/predefined_expense_add.tpl deleted file mode 100644 index fd2983a70..000000000 --- a/WEB-INF/templates/predefined_expense_add.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{$forms.predefinedExpenseForm.open} - - - - -
- - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.predefinedExpenseForm.name.control}
{$i18n.label.cost} (*):{$forms.predefinedExpenseForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.required_fields}
 
{$forms.predefinedExpenseForm.btn_add.control}
-
-{$forms.predefinedExpenseForm.close} diff --git a/WEB-INF/templates/predefined_expense_add2.tpl b/WEB-INF/templates/predefined_expense_add2.tpl new file mode 100644 index 000000000..5e7473848 --- /dev/null +++ b/WEB-INF/templates/predefined_expense_add2.tpl @@ -0,0 +1,21 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.predefinedExpenseForm.open} + + + + + + + + + + + + + + +
{$forms.predefinedExpenseForm.name.control}
{$forms.predefinedExpenseForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.required_fields}
+
{$forms.predefinedExpenseForm.btn_add.control}
+{$forms.predefinedExpenseForm.close} diff --git a/default.css b/default.css index 85ead1d9f..da59f9f5f 100644 --- a/default.css +++ b/default.css @@ -300,6 +300,11 @@ input[type="text"], input[type="password"], input[type="file"] { width: 220px; } +/* text field input with an associated hint */ +input.text-field-with-hint[type="text"] { + width: 136px; +} + /* project rate input control */ input[type="text"].project-rate-field { width: 50px; diff --git a/initialize.php b/initialize.php index 67ff18007..86f184b68 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5490"); +define("APP_VERSION", "1.19.28.5491"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/predefined_expense_add.php b/predefined_expense_add.php index e300fa43e..b3896585f 100644 --- a/predefined_expense_add.php +++ b/predefined_expense_add.php @@ -17,14 +17,15 @@ } // End of access checks. +$cl_name = $cl_cost = null; if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_cost = trim($request->getParameter('cost')); } $form = new Form('predefinedExpenseForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('class'=>'text-field-with-hint','type'=>'text','maxlength'=>'40','name'=>'cost','value'=>$cl_cost)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -44,5 +45,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_add2.tpl'); +$smarty->display('index2.tpl'); From 5d1ee9ce5942920336ba71d2d441801c2dc8f13c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Apr 2021 16:49:48 +0000 Subject: [PATCH 2171/2515] Made all predefined_expense* pages mobile friendly. --- .../templates/predefined_expense_delete.tpl | 18 ----------- .../templates/predefined_expense_delete2.tpl | 7 +++++ WEB-INF/templates/predefined_expense_edit.tpl | 26 ---------------- .../templates/predefined_expense_edit2.tpl | 21 +++++++++++++ WEB-INF/templates/predefined_expenses.tpl | 30 ------------------- WEB-INF/templates/predefined_expenses2.tpl | 24 +++++++++++++++ initialize.php | 2 +- predefined_expense_add.php | 2 +- predefined_expense_delete.php | 4 +-- predefined_expense_edit.php | 8 ++--- predefined_expenses.php | 4 +-- 11 files changed, 62 insertions(+), 84 deletions(-) delete mode 100644 WEB-INF/templates/predefined_expense_delete.tpl create mode 100644 WEB-INF/templates/predefined_expense_delete2.tpl delete mode 100644 WEB-INF/templates/predefined_expense_edit.tpl create mode 100644 WEB-INF/templates/predefined_expense_edit2.tpl delete mode 100644 WEB-INF/templates/predefined_expenses.tpl create mode 100644 WEB-INF/templates/predefined_expenses2.tpl diff --git a/WEB-INF/templates/predefined_expense_delete.tpl b/WEB-INF/templates/predefined_expense_delete.tpl deleted file mode 100644 index e91692f4c..000000000 --- a/WEB-INF/templates/predefined_expense_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.predefinedExpenseDeleteForm.open} - - - - -
- - - - - - - - - -
{$predefined_expense_to_delete|escape}
 
{$forms.predefinedExpenseDeleteForm.btn_delete.control}  {$forms.predefinedExpenseDeleteForm.btn_cancel.control}
-
-{$forms.predefinedExpenseDeleteForm.close} diff --git a/WEB-INF/templates/predefined_expense_delete2.tpl b/WEB-INF/templates/predefined_expense_delete2.tpl new file mode 100644 index 000000000..23a7193c8 --- /dev/null +++ b/WEB-INF/templates/predefined_expense_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.predefinedExpenseDeleteForm.open} +
{$predefined_expense_to_delete|escape}
+
{$forms.predefinedExpenseDeleteForm.btn_delete.control} {$forms.predefinedExpenseDeleteForm.btn_cancel.control}
+{$forms.predefinedExpenseDeleteForm.close} diff --git a/WEB-INF/templates/predefined_expense_edit.tpl b/WEB-INF/templates/predefined_expense_edit.tpl deleted file mode 100644 index f53b512ad..000000000 --- a/WEB-INF/templates/predefined_expense_edit.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{$forms.predefinedExpenseForm.open} - - - - -
- - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.predefinedExpenseForm.name.control}
{$i18n.label.cost} (*):{$forms.predefinedExpenseForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.required_fields}
 
{$forms.predefinedExpenseForm.btn_submit.control}
-
-{$forms.predefinedExpenseForm.close} diff --git a/WEB-INF/templates/predefined_expense_edit2.tpl b/WEB-INF/templates/predefined_expense_edit2.tpl new file mode 100644 index 000000000..06af4a315 --- /dev/null +++ b/WEB-INF/templates/predefined_expense_edit2.tpl @@ -0,0 +1,21 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.predefinedExpenseForm.open} + + + + + + + + + + + + + + +
{$forms.predefinedExpenseForm.name.control}
{$forms.predefinedExpenseForm.cost.control} {$user->getCurrency()|escape}
{$i18n.label.required_fields}
+
{$forms.predefinedExpenseForm.btn_submit.control}
+{$forms.predefinedExpenseForm.close} diff --git a/WEB-INF/templates/predefined_expenses.tpl b/WEB-INF/templates/predefined_expenses.tpl deleted file mode 100644 index d35fac0b4..000000000 --- a/WEB-INF/templates/predefined_expenses.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{$forms.predefinedExpensesForm.open} - - - - -
- - - - - - - - {if $predefined_expenses} - {foreach $predefined_expenses as $predefined_expense} - - - - - - - {/foreach} - {/if} -
{$i18n.label.thing_name}{$i18n.label.cost}
{$predefined_expense['name']|escape}{$predefined_expense['cost']|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - -

{$forms.predefinedExpensesForm.btn_add.control}
-
-{$forms.predefinedExpensesForm.close} diff --git a/WEB-INF/templates/predefined_expenses2.tpl b/WEB-INF/templates/predefined_expenses2.tpl new file mode 100644 index 000000000..c0d45af9e --- /dev/null +++ b/WEB-INF/templates/predefined_expenses2.tpl @@ -0,0 +1,24 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.predefinedExpensesForm.open} + + + + + + + +{if $predefined_expenses} + {foreach $predefined_expenses as $predefined_expense} + + + + + + + {/foreach} +{/if} +
{$i18n.label.thing_name}{$i18n.label.cost}
{$predefined_expense['name']|escape}{$predefined_expense['cost']|escape}{$i18n.label.edit}{$i18n.label.delete}
+
{$forms.predefinedExpensesForm.btn_add.control}
+{$forms.predefinedExpensesForm.close} diff --git a/initialize.php b/initialize.php index 86f184b68..e8f76c489 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5491"); +define("APP_VERSION", "1.19.28.5492"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/predefined_expense_add.php b/predefined_expense_add.php index b3896585f..8cac318f1 100644 --- a/predefined_expense_add.php +++ b/predefined_expense_add.php @@ -25,7 +25,7 @@ $form = new Form('predefinedExpenseForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); -$form->addInput(array('class'=>'text-field-with-hint','type'=>'text','maxlength'=>'40','name'=>'cost','value'=>$cl_cost)); +$form->addInput(array('type'=>'text','class'=>'text-field-with-hint','maxlength'=>'40','name'=>'cost','value'=>$cl_cost)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { diff --git a/predefined_expense_delete.php b/predefined_expense_delete.php index e965b0be2..26b726fc1 100644 --- a/predefined_expense_delete.php +++ b/predefined_expense_delete.php @@ -48,5 +48,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.predefinedExpenseDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/predefined_expense_edit.php b/predefined_expense_edit.php index 1eca3a2c7..d1b557553 100644 --- a/predefined_expense_edit.php +++ b/predefined_expense_edit.php @@ -33,8 +33,8 @@ $form = new Form('predefinedExpenseForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$predefined_expense_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'text','maxlength'=>'40','name'=>'cost','style'=>'width: 100px;','value'=>$cl_cost)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('type'=>'text','class'=>'text-field-with-hint','maxlength'=>'40','name'=>'cost','value'=>$cl_cost)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit'))); if ($request->isPost()) { @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_edit2.tpl'); +$smarty->display('index2.tpl'); diff --git a/predefined_expenses.php b/predefined_expenses.php index 9f94bd1cc..c44aee27b 100644 --- a/predefined_expenses.php +++ b/predefined_expenses.php @@ -33,5 +33,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('predefined_expenses', $predefinedExpenses); $smarty->assign('title', $i18n->get('title.predefined_expenses')); -$smarty->assign('content_page_name', 'predefined_expenses.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'predefined_expenses2.tpl'); +$smarty->display('index2.tpl'); From 0c78f71bded9c920746b8012ab88541f63795930 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Apr 2021 17:12:00 +0000 Subject: [PATCH 2172/2515] Made profile_edit.php mobile friendly. --- WEB-INF/templates/profile_edit.tpl | 43 ----------------------------- WEB-INF/templates/profile_edit2.tpl | 43 +++++++++++++++++++++++++++++ initialize.php | 2 +- profile_edit.php | 5 ++-- 4 files changed, 47 insertions(+), 46 deletions(-) delete mode 100644 WEB-INF/templates/profile_edit.tpl create mode 100644 WEB-INF/templates/profile_edit2.tpl diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl deleted file mode 100644 index 1fb040005..000000000 --- a/WEB-INF/templates/profile_edit.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{$forms.profileForm.open} - - - - - -
- - - - - - - - - -{if !$auth_external} - - - - - - - - -{/if} - - - - - - - - - - - - - - -
{$i18n.label.person_name} (*):{$forms.profileForm.name.control}
{$i18n.label.login} (*):{$forms.profileForm.login.control}
{$i18n.label.password} (*):{$forms.profileForm.password1.control}
{$i18n.label.confirm_password} (*):{$forms.profileForm.password2.control}
{$i18n.label.email}:{$forms.profileForm.email.control}
{$i18n.label.required_fields}
 
{$forms.profileForm.btn_save.control}
-
-{$forms.profileForm.close} diff --git a/WEB-INF/templates/profile_edit2.tpl b/WEB-INF/templates/profile_edit2.tpl new file mode 100644 index 000000000..772172485 --- /dev/null +++ b/WEB-INF/templates/profile_edit2.tpl @@ -0,0 +1,43 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.profileForm.open} + + + + + + + + + + + + + +{if !$auth_external} + + + + + + + + + + + + + +{/if} + + + + + + + + +
{$forms.profileForm.name.control}
{$forms.profileForm.login.control}
{$forms.profileForm.password1.control}
{$forms.profileForm.password2.control}
{$forms.profileForm.email.control}
{$i18n.label.required_fields}
+
{$forms.profileForm.btn_save.control}
+{$forms.profileForm.close} diff --git a/initialize.php b/initialize.php index e8f76c489..3e27129ac 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5492"); +define("APP_VERSION", "1.19.28.5493"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/profile_edit.php b/profile_edit.php index 26091823f..f85473fe4 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -22,6 +22,7 @@ if ($user->behalf_id) $user_details = $user->getUserDetails($user->behalf_id); $current_login = $user->behalf_id ? $user_details['login'] : $user->login; +$cl_name = $cl_login = $cl_password1 = $cl_password2 = $cl_email = null; if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_login = trim($request->getParameter('login')); @@ -86,5 +87,5 @@ $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.profile')); -$smarty->assign('content_page_name', 'profile_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'profile_edit2.tpl'); +$smarty->display('index2.tpl'); From 637d9472cfd46f74f058a6b2c0dc5ca19cb5a965 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Apr 2021 22:11:45 +0000 Subject: [PATCH 2173/2515] Made quotas.php mobile friendly. --- WEB-INF/templates/quotas.tpl | 60 ----------------------------------- WEB-INF/templates/quotas2.tpl | 50 +++++++++++++++++++++++++++++ default.css | 15 +++++++++ initialize.php | 2 +- quotas.php | 10 +++--- rtl.css | 4 +++ 6 files changed, 75 insertions(+), 66 deletions(-) delete mode 100644 WEB-INF/templates/quotas.tpl create mode 100644 WEB-INF/templates/quotas2.tpl diff --git a/WEB-INF/templates/quotas.tpl b/WEB-INF/templates/quotas.tpl deleted file mode 100644 index 1dba4f239..000000000 --- a/WEB-INF/templates/quotas.tpl +++ /dev/null @@ -1,60 +0,0 @@ - - -
{$i18n.form.quota.hint}
- -{$forms.monthlyQuotasForm.open} -
- - - - -
- - - - - -
{$i18n.form.quota.workday_hours}:{$forms.monthlyQuotasForm.workdayHours.control}
-
-
- - - - - - - - - -
{$i18n.form.quota.year}:{$forms.monthlyQuotasForm.year.control}
 
- - - - - -{foreach $months as $month} - - - - -{/foreach} - - -
{$i18n.form.quota.month}{$i18n.label.quota}
{$month}:{$forms.monthlyQuotasForm.$month.control}
 
-
-{$forms.monthlyQuotasForm.close} - - diff --git a/WEB-INF/templates/quotas2.tpl b/WEB-INF/templates/quotas2.tpl new file mode 100644 index 000000000..625fb6d9b --- /dev/null +++ b/WEB-INF/templates/quotas2.tpl @@ -0,0 +1,50 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +
{$i18n.form.quota.hint}
+ +{$forms.monthlyQuotasForm.open} + + + + + + + + + + + + + +
{$forms.monthlyQuotasForm.workdayHours.control}
{$forms.monthlyQuotasForm.year.control}
+
+ + + + + +{foreach $months as $month} + + + + +{/foreach} +
{$i18n.form.quota.month}{$i18n.label.quota}
{$month}:{$forms.monthlyQuotasForm.$month.control}
+
+{$forms.monthlyQuotasForm.close} + + diff --git a/default.css b/default.css index da59f9f5f..6f64eea5c 100644 --- a/default.css +++ b/default.css @@ -190,6 +190,11 @@ div.page-hint { text-align: right; } +/* cell containing text labels */ +.label-cell { + text-align: right; +} + /* control labels for large screens */ .large-screen-label { text-align: right; @@ -310,6 +315,11 @@ input[type="text"].project-rate-field { width: 50px; } +/* project rate input control */ +input[type="text"].quota-field { + width: 70px; +} + /* dropdown control */ .dropdown-field { width: 236px; @@ -325,6 +335,11 @@ input[type="text"].project-rate-field { width: 136px; } +/* a short dropdown control for small strings */ +.dropdown-field-short { + width: 85px; +} + /* textareas for fields */ #description, #address, #item_name, #comment, #custom_css { width: 220px; diff --git a/initialize.php b/initialize.php index 3e27129ac..41719a786 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5493"); +define("APP_VERSION", "1.19.28.5494"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/quotas.php b/quotas.php index 95eb894bf..c49fbf1f7 100644 --- a/quotas.php +++ b/quotas.php @@ -92,8 +92,8 @@ $workdayHours = ttTimeHelper::toAbsDuration($user->getWorkdayMinutes(), true); $form = new Form('monthlyQuotasForm'); -$form->addInput(array('type'=>'text', 'name'=>'workdayHours', 'value'=>$workdayHours, 'style'=>'width:60px')); -$form->addInput(array('type'=>'combobox','name'=>'year','data'=>$years,'datakeys'=>array('id','name'),'value'=>$selectedYear,'onchange'=>'yearChange(this.value);')); +$form->addInput(array('type'=>'text','class'=>'quota-field','name'=>'workdayHours','value'=>$workdayHours)); +$form->addInput(array('type'=>'combobox','class'=>'dropdown-field-short','name'=>'year','data'=>$years,'datakeys'=>array('id','name'),'value'=>$selectedYear,'onchange'=>'yearChange(this.value);')); for ($i=0; $i < count($months); $i++) { $value = ""; if (array_key_exists($i+1, $monthsData)){ @@ -101,11 +101,11 @@ $value = ttTimeHelper::toAbsDuration($value, true); } $name = $months[$i]; - $form->addInput(array('type'=>'text','name'=>$name,'maxlength'=>6,'value'=> $value,'style'=>'width:70px')); + $form->addInput(array('type'=>'text','class'=>'quota-field','name'=>$name,'maxlength'=>6,'value'=> $value)); } $smarty->assign('months', $months); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.monthly_quotas')); -$smarty->assign('content_page_name', 'quotas.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'quotas2.tpl'); +$smarty->display('index2.tpl'); diff --git a/rtl.css b/rtl.css index e85b8b5e5..310ab1e25 100644 --- a/rtl.css +++ b/rtl.css @@ -44,6 +44,10 @@ html { text-align: left; } +.label-cell { + text-align: left; +} + th.invoice-label { text-align: left; } From e96745aebafe236a065494bcf1882f67a92a04e3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 12:18:38 +0000 Subject: [PATCH 2174/2515] Made work_units.php mobile friendly. --- WEB-INF/templates/quotas2.tpl | 1 - WEB-INF/templates/work_units.tpl | 22 ------------------- WEB-INF/templates/work_units2.tpl | 35 +++++++++++++++++++++++++++++++ default.css | 5 +++++ initialize.php | 2 +- work_units.php | 8 +++---- 6 files changed, 45 insertions(+), 28 deletions(-) delete mode 100644 WEB-INF/templates/work_units.tpl create mode 100644 WEB-INF/templates/work_units2.tpl diff --git a/WEB-INF/templates/quotas2.tpl b/WEB-INF/templates/quotas2.tpl index 625fb6d9b..1c38bb322 100644 --- a/WEB-INF/templates/quotas2.tpl +++ b/WEB-INF/templates/quotas2.tpl @@ -2,7 +2,6 @@ License: See license.txt *}
{$i18n.form.quota.hint}
- {$forms.monthlyQuotasForm.open} diff --git a/WEB-INF/templates/work_units.tpl b/WEB-INF/templates/work_units.tpl deleted file mode 100644 index a4fb6b578..000000000 --- a/WEB-INF/templates/work_units.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{$forms.workUnitsForm.open} -
- - - - - - - - - - - - - - - - - - -
{$i18n.form.work_units.minutes_in_unit}:{$forms.workUnitsForm.minutes_in_unit.control} {$i18n.label.what_is_it}
{$i18n.form.work_units.1st_unit_threshold}:{$forms.workUnitsForm.1st_unit_threshold.control} {$i18n.label.what_is_it}
{$i18n.label.totals_only}:{$forms.workUnitsForm.totals_only.control} {$i18n.label.what_is_it}
 
{$forms.workUnitsForm.btn_save.control}
-{$forms.weekViewForm.close} diff --git a/WEB-INF/templates/work_units2.tpl b/WEB-INF/templates/work_units2.tpl new file mode 100644 index 000000000..a2b5626f5 --- /dev/null +++ b/WEB-INF/templates/work_units2.tpl @@ -0,0 +1,35 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.workUnitsForm.open} + + + + + + + + + + + + + + + + + + + +
{$forms.workUnitsForm.minutes_in_unit.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.workUnitsForm.1st_unit_threshold.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.workUnitsForm.totals_only.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
+
{$forms.workUnitsForm.btn_save.control}
+{$forms.workUnitsForm.close} diff --git a/default.css b/default.css index 6f64eea5c..3b59185c4 100644 --- a/default.css +++ b/default.css @@ -320,6 +320,11 @@ input[type="text"].quota-field { width: 70px; } +/* project rate input control */ +input[type="text"].short-text-field { + width: 40px; +} + /* dropdown control */ .dropdown-field { width: 236px; diff --git a/initialize.php b/initialize.php index 41719a786..e38c689a6 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5494"); +define("APP_VERSION", "1.19.28.5495"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/work_units.php b/work_units.php index 826f899ab..ab2ac81af 100644 --- a/work_units.php +++ b/work_units.php @@ -30,8 +30,8 @@ } $form = new Form('workUnitsForm'); -$form->addInput(array('type'=>'text', 'name'=>'minutes_in_unit', 'value'=>$cl_minutes_in_unit, 'style'=>'width:40px')); -$form->addInput(array('type'=>'text', 'name'=>'1st_unit_threshold', 'value'=>$cl_1st_unit_threshold, 'style'=>'width:40px')); +$form->addInput(array('type'=>'text','class'=>'short-text-field','name'=>'minutes_in_unit', 'value'=>$cl_minutes_in_unit)); +$form->addInput(array('type'=>'text','class'=>'short-text-field','name'=>'1st_unit_threshold', 'value'=>$cl_1st_unit_threshold)); $form->addInput(array('type'=>'checkbox','name'=>'totals_only','value'=>$cl_totals_only)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -53,5 +53,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.work_units')); -$smarty->assign('content_page_name', 'work_units.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'work_units2.tpl'); +$smarty->display('index2.tpl'); From 058a826464349b6137cf81df8367da7ac00e1d4f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 12:37:56 +0000 Subject: [PATCH 2175/2515] Made week_view.php mobile friendly. --- WEB-INF/templates/week_view.tpl | 27 -------------------- WEB-INF/templates/week_view2.tpl | 44 ++++++++++++++++++++++++++++++++ initialize.php | 2 +- week_view.php | 4 +-- 4 files changed, 47 insertions(+), 30 deletions(-) delete mode 100644 WEB-INF/templates/week_view.tpl create mode 100644 WEB-INF/templates/week_view2.tpl diff --git a/WEB-INF/templates/week_view.tpl b/WEB-INF/templates/week_view.tpl deleted file mode 100644 index 17b02cb4e..000000000 --- a/WEB-INF/templates/week_view.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{$forms.weekViewForm.open} - - - - - - - - - - - - - - - - - - - - - - - - -
{$forms.weekViewForm.week_menu.control} {$i18n.label.what_is_it}
{$forms.weekViewForm.week_note.control} {$i18n.label.what_is_it}
{$forms.weekViewForm.week_list.control} {$i18n.label.what_is_it}
{$forms.weekViewForm.notes.control} {$i18n.label.what_is_it}
 
{$forms.weekViewForm.btn_save.control}
-{$forms.weekViewForm.close} diff --git a/WEB-INF/templates/week_view2.tpl b/WEB-INF/templates/week_view2.tpl new file mode 100644 index 000000000..df74b402b --- /dev/null +++ b/WEB-INF/templates/week_view2.tpl @@ -0,0 +1,44 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.weekViewForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.weekViewForm.week_menu.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.weekViewForm.week_note.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.weekViewForm.week_list.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.weekViewForm.notes.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
+
{$forms.weekViewForm.btn_save.control}
+{$forms.weekViewForm.close} diff --git a/initialize.php b/initialize.php index e38c689a6..d7420664c 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5495"); +define("APP_VERSION", "1.19.28.5496"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week_view.php b/week_view.php index 1718afd4b..d612239b0 100644 --- a/week_view.php +++ b/week_view.php @@ -45,5 +45,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.week_view')); -$smarty->assign('content_page_name', 'week_view.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'week_view2.tpl'); +$smarty->display('index2.tpl'); From edcdf661d0cdc3d0bda8f5174ef4c8cc51e95602 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 14:44:37 +0000 Subject: [PATCH 2176/2515] Made timesheets.php mobile friendly. --- WEB-INF/templates/swap_roles2.tpl | 1 + WEB-INF/templates/timesheets.tpl | 107 ----------------------------- WEB-INF/templates/timesheets2.tpl | 108 ++++++++++++++++++++++++++++++ timesheets.php | 5 +- 4 files changed, 111 insertions(+), 110 deletions(-) delete mode 100644 WEB-INF/templates/timesheets.tpl create mode 100644 WEB-INF/templates/timesheets2.tpl diff --git a/WEB-INF/templates/swap_roles2.tpl b/WEB-INF/templates/swap_roles2.tpl index 23633db55..a858db84b 100644 --- a/WEB-INF/templates/swap_roles2.tpl +++ b/WEB-INF/templates/swap_roles2.tpl @@ -9,6 +9,7 @@ License: See license.txt *}
{$forms.swapForm.swap_with.control}
{$forms.swapForm.btn_submit.control} {$forms.swapForm.btn_cancel.control}
{$forms.swapForm.close} diff --git a/WEB-INF/templates/timesheets.tpl b/WEB-INF/templates/timesheets.tpl deleted file mode 100644 index 318702a71..000000000 --- a/WEB-INF/templates/timesheets.tpl +++ /dev/null @@ -1,107 +0,0 @@ - - -{$forms.timesheetsForm.open} - -{if $user_dropdown} - -{/if} - - - -
{$i18n.label.user}: {$forms.timesheetsForm.user.control}
- -{if $inactive_timesheets} - -{/if} - - -{if $show_client} - -{/if} - - -{if $show_files} - -{/if} - - - -{foreach $active_timesheets as $timesheet} - - - {if $show_client} - - {/if} - - {if $timesheet.approve_status == null} - - {else} - - {/if} - {if $show_files} - {if $timesheet.has_files} - - {else} - - {/if} - {/if} - - - -{/foreach} -
{$i18n.form.timesheets.active_timesheets}
{$i18n.label.thing_name}{$i18n.label.client}{$i18n.label.submitted}{$i18n.label.approved}
{$timesheet.name|escape}{$timesheet.client_name|escape}{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
- - - -

- -{if $inactive_timesheets} - - - - - - {if $show_client} - - {/if} - - - {if $show_files} - - {/if} - - - - {foreach $inactive_timesheets as $timesheet} - - - {if $show_client} - - {/if} - - {if $timesheet.approve_status == null} - - {else} - - {/if} - {if $show_files} - {if $timesheet.has_files} - - {else} - - {/if} - {/if} - - - - {/foreach} -
{$i18n.form.timesheets.inactive_timesheets}
{$i18n.label.thing_name}{$i18n.label.client}{$i18n.label.submitted}{$i18n.label.approved}
{$timesheet.name|escape}{$timesheet.client_name|escape}{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
- - - -

-{/if} -
-{$forms.timesheetsForm.close} diff --git a/WEB-INF/templates/timesheets2.tpl b/WEB-INF/templates/timesheets2.tpl new file mode 100644 index 000000000..254162731 --- /dev/null +++ b/WEB-INF/templates/timesheets2.tpl @@ -0,0 +1,108 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + + +{if $user_dropdown} + {$forms.timesheetsForm.open} + + + + + + + {$forms.timesheetsForm.close} +{/if} +
{$forms.timesheetsForm.user.control}
+
+{if $active_timesheets} + {if $inactive_timesheets} +
{$i18n.form.timesheets.active_timesheets}
+ {/if} + + + + {if $show_client} + + {/if} + + {/if} + + + + {foreach $active_timesheets as $timesheet} + + + {if $show_client} + + {/if} + + {if $timesheet.approve_status == null} + + {else} + + {/if} + {if $show_files} + {if $timesheet.has_files} + + {else} + + {/if} + {/if} + + + + {/foreach} +
{$i18n.label.thing_name}{$i18n.label.client}{$i18n.label.submitted} + {$i18n.label.approved} + {if $show_files} +
{$timesheet.name|escape}{$timesheet.client_name|escape}{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
+{/if} +{if !$inactive_timesheets} +
+{/if} +{if $inactive_timesheets} +
{$i18n.form.timesheets.inactive_timesheets}
+ + + + {if $show_client} + + {/if} + + {/if} + + + + {foreach $inactive_timesheets as $timesheet} + + + {if $show_client} + + {/if} + + {if $timesheet.approve_status == null} + + {else} + + {/if} + {if $show_files} + {if $timesheet.has_files} + + {else} + + {/if} + {/if} + + + + {/foreach} +
{$i18n.label.thing_name}{$i18n.label.client}{$i18n.label.submitted} + {$i18n.label.approved} + {if $show_files} +
{$timesheet.name|escape}{$timesheet.client_name|escape}{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.edit}{$i18n.label.delete}
+
+{/if} diff --git a/timesheets.php b/timesheets.php index 88a4a718c..54bbc3396 100644 --- a/timesheets.php +++ b/timesheets.php @@ -59,7 +59,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'document.timesheetsForm.user_changed.value=1;document.timesheetsForm.submit();', 'name'=>'user', - 'style'=>'width: 250px;', 'value'=>$user_id, 'data'=>$user_list, 'datakeys'=>array('id','name'))); @@ -79,5 +78,5 @@ $smarty->assign('show_files', $showFiles); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheets')); -$smarty->assign('content_page_name', 'timesheets.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'timesheets2.tpl'); +$smarty->display('index2.tpl'); From f20a75bdf5f15420984a4977207cf5296ff62e15 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 17:42:55 +0000 Subject: [PATCH 2177/2515] Made timesheet_add.php mobile friendly. --- WEB-INF/templates/timesheet_add.tpl | 49 ---------------------------- WEB-INF/templates/timesheet_add2.tpl | 49 ++++++++++++++++++++++++++++ initialize.php | 2 +- timesheet_add.php | 12 +++---- 4 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 WEB-INF/templates/timesheet_add.tpl create mode 100644 WEB-INF/templates/timesheet_add2.tpl diff --git a/WEB-INF/templates/timesheet_add.tpl b/WEB-INF/templates/timesheet_add.tpl deleted file mode 100644 index f4becf7f5..000000000 --- a/WEB-INF/templates/timesheet_add.tpl +++ /dev/null @@ -1,49 +0,0 @@ -{$forms.timesheetForm.open} - - - - -
- - - - - -{if $show_client} - - - - -{/if} -{if $show_project} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.timesheetForm.timesheet_name.control}
{$i18n.label.client}:{$forms.timesheetForm.client.control}
{$i18n.label.project}:{$forms.timesheetForm.project.control}
{$i18n.label.start_date} (*):{$forms.timesheetForm.start.control}
{$i18n.label.end_date} (*):{$forms.timesheetForm.finish.control}
{$i18n.label.comment}:{$forms.timesheetForm.comment.control}
{$i18n.label.required_fields}
 
{$forms.timesheetForm.btn_add.control}
-
-{$forms.timesheetForm.close} diff --git a/WEB-INF/templates/timesheet_add2.tpl b/WEB-INF/templates/timesheet_add2.tpl new file mode 100644 index 000000000..4f2d32d88 --- /dev/null +++ b/WEB-INF/templates/timesheet_add2.tpl @@ -0,0 +1,49 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + +{$forms.timesheetForm.open} + + + + + + + +{if $show_client} + + + + + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.timesheetForm.timesheet_name.control}
{$forms.timesheetForm.client.control}
{$forms.timesheetForm.project.control}
{$forms.timesheetForm.start.control}
{$forms.timesheetForm.finish.control}
{$forms.timesheetForm.comment.control}
{$i18n.label.required_fields}
+
{$forms.timesheetForm.btn_add.control}
+{$forms.timesheetForm.close} diff --git a/initialize.php b/initialize.php index d7420664c..bd82dfbfd 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5496"); +define("APP_VERSION", "1.19.28.5497"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timesheet_add.php b/timesheet_add.php index 536241d62..5fb15df6e 100644 --- a/timesheet_add.php +++ b/timesheet_add.php @@ -29,23 +29,23 @@ $user_id = $user->getUser(); $form = new Form('timesheetForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'timesheet_name','style'=>'width: 250px;','value'=>$cl_name)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'timesheet_name','value'=>$cl_name)); // Dropdown for clients if the clients plugin is enabled. $showClient = $user->isPluginEnabled('cl'); if ($showClient) { $clients = ttGroupHelper::getActiveClients(); - $form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); + $form->addInput(array('type'=>'combobox','name'=>'client','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); } // Dropdown for projects. $showProject = MODE_PROJECTS == $user->getTrackingMode() || MODE_PROJECTS_AND_TASKS == $user->getTrackingMode(); if ($showProject) { $projects = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox','name'=>'project','style'=>'width: 250px;','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); + $form->addInput(array('type'=>'combobox','name'=>'project','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); } $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start','value'=>$cl_start)); $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'finish','value'=>$cl_finish)); -$form->addInput(array('type'=>'textarea','name'=>'comment','style'=>'width: 250px; height: 40px;','value'=>$cl_comment)); +$form->addInput(array('type'=>'textarea','name'=>'comment','value'=>$cl_comment)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { @@ -80,5 +80,5 @@ $smarty->assign('show_client', $showClient); $smarty->assign('show_project', $showProject); $smarty->assign('title', $i18n->get('title.add_timesheet')); -$smarty->assign('content_page_name', 'timesheet_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'timesheet_add2.tpl'); +$smarty->display('index2.tpl'); From 3afdaab6c40a69cdfc1f3ad2099325e6f31fe300 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 18:53:28 +0000 Subject: [PATCH 2178/2515] Made timesheet_edit.php mobile friendly. --- WEB-INF/templates/timesheet_add2.tpl | 1 - WEB-INF/templates/timesheet_edit.tpl | 34 --------------------------- WEB-INF/templates/timesheet_edit2.tpl | 28 ++++++++++++++++++++++ initialize.php | 2 +- timesheet_edit.php | 8 +++---- 5 files changed, 33 insertions(+), 40 deletions(-) delete mode 100644 WEB-INF/templates/timesheet_edit.tpl create mode 100644 WEB-INF/templates/timesheet_edit2.tpl diff --git a/WEB-INF/templates/timesheet_add2.tpl b/WEB-INF/templates/timesheet_add2.tpl index 4f2d32d88..f69a8ff74 100644 --- a/WEB-INF/templates/timesheet_add2.tpl +++ b/WEB-INF/templates/timesheet_add2.tpl @@ -1,7 +1,6 @@ {* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt *} - {$forms.timesheetForm.open} diff --git a/WEB-INF/templates/timesheet_edit.tpl b/WEB-INF/templates/timesheet_edit.tpl deleted file mode 100644 index ec1123608..000000000 --- a/WEB-INF/templates/timesheet_edit.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{$forms.timesheetForm.open} -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.timesheetForm.timesheet_name.control}
{$i18n.label.comment}:{$forms.timesheetForm.comment.control}
{$i18n.label.status}:{$forms.timesheetForm.status.control}
{$i18n.label.required_fields}
 
{$forms.timesheetForm.btn_save.control} {if $can_delete}{$forms.timesheetForm.btn_delete.control}{/if}
-
-{$forms.timesheetForm.close} diff --git a/WEB-INF/templates/timesheet_edit2.tpl b/WEB-INF/templates/timesheet_edit2.tpl new file mode 100644 index 000000000..62cf01a8c --- /dev/null +++ b/WEB-INF/templates/timesheet_edit2.tpl @@ -0,0 +1,28 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.timesheetForm.open} + + + + + + + + + + + + + + + + + + + + + +
{$forms.timesheetForm.timesheet_name.control}
{$forms.timesheetForm.comment.control}
{$forms.timesheetForm.status.control}
{$i18n.label.required_fields}
+
{$forms.timesheetForm.btn_save.control} {if $can_delete}{$forms.timesheetForm.btn_delete.control}{/if}
+{$forms.timesheetForm.close} diff --git a/initialize.php b/initialize.php index bd82dfbfd..21f1c89b3 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5497"); +define("APP_VERSION", "1.19.28.5498"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timesheet_edit.php b/timesheet_edit.php index db6897b8a..c9676ed5a 100644 --- a/timesheet_edit.php +++ b/timesheet_edit.php @@ -40,8 +40,8 @@ $form = new Form('timesheetForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_timesheet_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'timesheet_name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'comment','style'=>'width: 250px; height: 40px;','value'=>$cl_comment)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'timesheet_name','value'=>$cl_name)); +$form->addInput(array('type'=>'textarea','name'=>'comment','value'=>$cl_comment)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -81,5 +81,5 @@ $smarty->assign('onload', 'onLoad="document.timesheetForm.timesheet_name.focus()"'); $smarty->assign('can_delete', $canDelete); $smarty->assign('title', $i18n->get('title.edit_timesheet')); -$smarty->assign('content_page_name', 'timesheet_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'timesheet_edit2.tpl'); +$smarty->display('index2.tpl'); From a6c1e3d3615edac1d98b994298feb00e2fa178b2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Apr 2021 21:42:14 +0000 Subject: [PATCH 2179/2515] Made timesheet_view and timesheet_delete.php mobile friendly. --- WEB-INF/lib/ttReportHelper.class.php | 7 +-- WEB-INF/templates/timesheet_delete.tpl | 18 ------ WEB-INF/templates/timesheet_delete2.tpl | 7 +++ WEB-INF/templates/timesheet_view.tpl | 84 ------------------------- WEB-INF/templates/timesheet_view2.tpl | 82 ++++++++++++++++++++++++ initialize.php | 2 +- timesheet_delete.php | 4 +- timesheet_view.php | 6 +- 8 files changed, 97 insertions(+), 113 deletions(-) delete mode 100644 WEB-INF/templates/timesheet_delete.tpl create mode 100644 WEB-INF/templates/timesheet_delete2.tpl delete mode 100644 WEB-INF/templates/timesheet_view.tpl create mode 100644 WEB-INF/templates/timesheet_view2.tpl diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 604f559d8..d95348e8b 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -2252,17 +2252,14 @@ static function makeGroupByHeaderPart($dropdown_value) { return null; } - // makeGroupByHeader builds a column header for a totals-only report using group_by1, - // group_by2, and group_by3 values passed in $options. + // makeGroupByHeader builds a column header for a totals-only report + // or a timesheet using group_by1, group_by2, and group_by3 values passed in $options. static function makeGroupByHeader($options) { $no_grouping = ($options['group_by1'] == null || $options['group_by1'] == 'no_grouping') && ($options['group_by2'] == null || $options['group_by2'] == 'no_grouping') && ($options['group_by3'] == null || $options['group_by3'] == 'no_grouping'); if ($no_grouping) return null; - // We only need to do it for a totals only report. - if (!$options['show_totals_only']) return null; - $group_by_header = ''; if ($options['group_by1'] != null && $options['group_by1'] != 'no_grouping') { // We have group_by1. diff --git a/WEB-INF/templates/timesheet_delete.tpl b/WEB-INF/templates/timesheet_delete.tpl deleted file mode 100644 index 87928052e..000000000 --- a/WEB-INF/templates/timesheet_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.timesheetDeleteForm.open} - - - - -
- - - - - - - - - -
{$timesheet_to_delete|escape}
 
{$forms.timesheetDeleteForm.btn_delete.control}  {$forms.timesheetDeleteForm.btn_cancel.control}
-
-{$forms.timesheetDeleteForm.close} diff --git a/WEB-INF/templates/timesheet_delete2.tpl b/WEB-INF/templates/timesheet_delete2.tpl new file mode 100644 index 000000000..a3e7b7312 --- /dev/null +++ b/WEB-INF/templates/timesheet_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.timesheetDeleteForm.open} +
{$timesheet_to_delete|escape}
+
{$forms.timesheetDeleteForm.btn_delete.control} {$forms.timesheetDeleteForm.btn_cancel.control}
+{$forms.timesheetDeleteForm.close} diff --git a/WEB-INF/templates/timesheet_view.tpl b/WEB-INF/templates/timesheet_view.tpl deleted file mode 100644 index 77cc78bd5..000000000 --- a/WEB-INF/templates/timesheet_view.tpl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - -
- - -{if $user->behalfUser} - -{/if} -{if $timesheet['client_id']} - -{/if} -{if $timesheet['project_id']} - -{/if} -{if $timesheet['comment']} - -{/if} -{if $timesheet['approve_status'] == null} - -{/if} -{if $timesheet['approve_status'] != null} - -{/if} -{if $timesheet['approve_comment']} - -{/if} -
{$timesheet['name']|escape}
{$i18n.label.user}: {$timesheet['user_name']|escape}
{$i18n.label.client}: {$timesheet['client_name']|escape}
{$i18n.label.project}: {$timesheet['project_name']|escape}
{$i18n.label.comment}: {$timesheet['comment']|escape}
{$i18n.label.submitted}: {if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.approved}: {if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.note}: {$timesheet['approve_comment']|escape}
-
- - - - - - {foreach $subtotals as $subtotal} - - - - - {/foreach} - - - - - - -
{$group_by_header|escape}{$i18n.label.duration}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}
 
{$i18n.label.total}{$totals['time']}
 
- -{$forms.timesheetForm.open} - {if $show_submit} - - - - -
- - -
{if $show_approvers}{$i18n.form.mail.to}: {$forms.timesheetForm.approver.control}{/if} {$forms.timesheetForm.btn_submit.control}
-
- {/if} - {if $show_approve} - - - - -
- - - - -
{$i18n.label.comment}:
{$forms.timesheetForm.comment.control}
{$forms.timesheetForm.btn_approve.control} {$forms.timesheetForm.btn_disapprove.control}
-
- {/if} -{$forms.timesheetForm.close} - -
diff --git a/WEB-INF/templates/timesheet_view2.tpl b/WEB-INF/templates/timesheet_view2.tpl new file mode 100644 index 000000000..a7d8b0e14 --- /dev/null +++ b/WEB-INF/templates/timesheet_view2.tpl @@ -0,0 +1,82 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +
{$timesheet['name']|escape}
+ +{if $user->behalfUser} + + + + +{/if} +{if $timesheet['client_id']} + + + + +{/if} +{if $timesheet['project_id']} + + + + +{/if} +{if $timesheet['comment']} + + + + +{/if} +{if $timesheet['approve_status'] == null} + + + + +{/if} +{if $timesheet['approve_status'] != null} + + + + +{/if} +{if $timesheet['approve_comment']} + + + + +{/if} +
{$i18n.label.user}:{$timesheet['user_name']|escape}
{$i18n.label.client}:{$timesheet['client_name']|escape}
{$i18n.label.project}:{$timesheet['project_name']|escape}
{$i18n.label.comment}:{$timesheet['comment']|escape}
{$i18n.label.submitted}:{if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.approved}:{if $timesheet.approve_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.note}:{$timesheet['approve_comment']|escape}
+
+ + + + + + {foreach $subtotals as $subtotal} + + + + + {/foreach} + + + + +
{$group_by_header|escape}{$i18n.label.duration}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}
{$i18n.label.total}:{$totals['time']}
+ +{$forms.timesheetForm.open} +{if $show_submit} +
{if $show_approvers}{$i18n.form.mail.to}: {$forms.timesheetForm.approver.control}{/if} {$forms.timesheetForm.btn_submit.control}
+{/if} +{if $show_approve} + + + +
{$forms.timesheetForm.comment.control}
+
{$forms.timesheetForm.btn_approve.control} {$forms.timesheetForm.btn_disapprove.control}
+{/if} +{$forms.timesheetForm.close} diff --git a/initialize.php b/initialize.php index 21f1c89b3..7afef50d1 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5498"); +define("APP_VERSION", "1.19.28.5499"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timesheet_delete.php b/timesheet_delete.php index ff1e4e180..b0b847973 100644 --- a/timesheet_delete.php +++ b/timesheet_delete.php @@ -47,5 +47,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_timesheet')); -$smarty->assign('content_page_name', 'timesheet_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'timesheet_delete2.tpl'); +$smarty->display('index2.tpl'); diff --git a/timesheet_view.php b/timesheet_view.php index ff5f169b6..a74424a6b 100644 --- a/timesheet_view.php +++ b/timesheet_view.php @@ -59,7 +59,7 @@ } if ($showApprove) { - $form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250','style'=>'width: 300px; height: 60px;')); + $form->addInput(array('type'=>'textarea','name'=>'comment','maxlength'=>'250')); $form->addInput(array('type'=>'submit','name'=>'btn_approve','value'=>$i18n->get('button.approve'))); $form->addInput(array('type'=>'submit','name'=>'btn_disapprove','value'=>$i18n->get('button.disapprove'))); } @@ -126,5 +126,5 @@ $smarty->assign('show_approve', $showApprove); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheet').": ".$timesheet['start_date']." - ".$timesheet['end_date']); -$smarty->assign('content_page_name', 'timesheet_view.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'timesheet_view2.tpl'); +$smarty->display('index2.tpl'); From 4585b7e2b5b026f44d4ddad35fd6e61e7958c300 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 14:56:37 +0000 Subject: [PATCH 2180/2515] Made templates.php mobile friendly. --- WEB-INF/templates/templates.tpl | 68 ------------------------------ WEB-INF/templates/templates2.tpl | 69 +++++++++++++++++++++++++++++++ WEB-INF/templates/timesheets2.tpl | 8 +--- default.css | 1 + initialize.php | 2 +- templates.php | 4 +- 6 files changed, 75 insertions(+), 77 deletions(-) delete mode 100644 WEB-INF/templates/templates.tpl create mode 100644 WEB-INF/templates/templates2.tpl diff --git a/WEB-INF/templates/templates.tpl b/WEB-INF/templates/templates.tpl deleted file mode 100644 index 282387830..000000000 --- a/WEB-INF/templates/templates.tpl +++ /dev/null @@ -1,68 +0,0 @@ -{$forms.templatesForm.open} - - - - -
- -{if $inactive_templates} - -{/if} - - - - - - - {foreach $active_templates as $template} - - - - - - - {/foreach} -
{$i18n.form.templates.active_templates}
{$i18n.label.thing_name}{$i18n.label.description}
{$template['name']|escape}{$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}
- - -

{$forms.templatesForm.btn_add.control}
-{if $inactive_templates} - - - - - - - - - {foreach $inactive_templates as $template} - - - - - - - {/foreach} -
{$i18n.form.templates.inactive_templates}
{$i18n.label.thing_name}{$i18n.label.description}
{$template['name']|escape}{$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}
- - -

{$forms.templatesForm.btn_add.control}
-{/if} -
- -{if $show_bind_with_projects_checkbox} - - - - -{/if} - - - - - - - -
{$forms.templatesForm.bind_templates_with_projects.control} {$i18n.label.what_is_it}
{$forms.templatesForm.prepopulate_note.control} {$i18n.label.what_is_it}
{$forms.templatesForm.btn_save.control}
-
-{$forms.templatesForm.close} diff --git a/WEB-INF/templates/templates2.tpl b/WEB-INF/templates/templates2.tpl new file mode 100644 index 000000000..b37de3051 --- /dev/null +++ b/WEB-INF/templates/templates2.tpl @@ -0,0 +1,69 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.templatesForm.open} +{if $inactive_templates} +
{$i18n.form.templates.active_templates}
+{/if} + + + + + + + + {foreach $active_templates as $template} + + + + + + + {/foreach} +
{$i18n.label.thing_name}{$i18n.label.description}
{$template['name']|escape}{$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}
+
{$forms.templatesForm.btn_add.control}
+ +{if $inactive_templates} +
{$i18n.form.templates.inactive_templates}
+ + + + + + + + {foreach $inactive_templates as $template} + + + + + + + {/foreach} +
{$i18n.label.thing_name}{$i18n.label.description}
{$template['name']|escape}{$template['description']|escape}{$i18n.label.edit}{$i18n.label.delete}
+
{$forms.templatesForm.btn_add.control}
+{/if} + +{if $show_bind_with_projects_checkbox} + + + + + + +{/if} + + + + + + +
{$forms.templatesForm.bind_templates_with_projects.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.templatesForm.prepopulate_note.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
+
{$forms.templatesForm.btn_save.control}
+{$forms.templatesForm.close} diff --git a/WEB-INF/templates/timesheets2.tpl b/WEB-INF/templates/timesheets2.tpl index 254162731..fe6a9603f 100644 --- a/WEB-INF/templates/timesheets2.tpl +++ b/WEB-INF/templates/timesheets2.tpl @@ -18,10 +18,9 @@ License: See license.txt *} {/if}
-{if $active_timesheets} - {if $inactive_timesheets} +{if $inactive_timesheets}
{$i18n.form.timesheets.active_timesheets}
- {/if} +{/if} @@ -60,10 +59,7 @@ License: See license.txt *} {/foreach}
{$i18n.label.thing_name}
-{/if} -{if !$inactive_timesheets}
-{/if} {if $inactive_timesheets}
{$i18n.form.timesheets.inactive_timesheets}
diff --git a/default.css b/default.css index 3b59185c4..2304d07b2 100644 --- a/default.css +++ b/default.css @@ -286,6 +286,7 @@ span.what-is-it-img { /* span for what is it text */ span.what-is-it-text { display: inline-block; + vertical-align: middle; } /* span for what format example */ diff --git a/initialize.php b/initialize.php index 7afef50d1..9cc24fc1b 100644 --- a/initialize.php +++ b/initialize.php @@ -13,7 +13,7 @@ ini_set('display_errors', 'Off'); // require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5499"); +define("APP_VERSION", "1.19.28.5500"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/templates.php b/templates.php index 636d4bc10..53d57b86f 100644 --- a/templates.php +++ b/templates.php @@ -59,5 +59,5 @@ $smarty->assign('inactive_templates', $inactiveTemplates); $smarty->assign('show_bind_with_projects_checkbox', $showBindWithProjectsCheckbox); $smarty->assign('title', $i18n->get('title.templates')); -$smarty->assign('content_page_name', 'templates.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'templates2.tpl'); +$smarty->display('index2.tpl'); From 64bdd80ce896ffc5b2d14d3619068a767437dde4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 15:21:25 +0000 Subject: [PATCH 2181/2515] Made template_delete.php mobile friendly. --- WEB-INF/templates/template_delete.tpl | 18 ------------------ WEB-INF/templates/template_delete2.tpl | 7 +++++++ initialize.php | 3 +-- template_delete.php | 4 ++-- 4 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 WEB-INF/templates/template_delete.tpl create mode 100644 WEB-INF/templates/template_delete2.tpl diff --git a/WEB-INF/templates/template_delete.tpl b/WEB-INF/templates/template_delete.tpl deleted file mode 100644 index 2dc4114aa..000000000 --- a/WEB-INF/templates/template_delete.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{$forms.templateDeleteForm.open} -
- - - -
- - - - - - - - - -
{$template_to_delete|escape}
 
{$forms.templateDeleteForm.btn_delete.control}  {$forms.templateDeleteForm.btn_cancel.control}
-
-{$forms.templateDeleteForm.close} diff --git a/WEB-INF/templates/template_delete2.tpl b/WEB-INF/templates/template_delete2.tpl new file mode 100644 index 000000000..a7ca2e75f --- /dev/null +++ b/WEB-INF/templates/template_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.templateDeleteForm.open} +
{$template_to_delete|escape}
+
{$forms.templateDeleteForm.btn_delete.control} {$forms.templateDeleteForm.btn_cancel.control}
+{$forms.templateDeleteForm.close} diff --git a/initialize.php b/initialize.php index 9cc24fc1b..c10e5278f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,8 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -// require_once('init_auth.php'); -define("APP_VERSION", "1.19.28.5500"); +define("APP_VERSION", "1.19.28.5501"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/template_delete.php b/template_delete.php index a4996e05b..792cadbd0 100644 --- a/template_delete.php +++ b/template_delete.php @@ -47,5 +47,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.templateDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_template')); -$smarty->assign('content_page_name', 'template_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'template_delete2.tpl'); +$smarty->display('index2.tpl'); From e4775fa7fba7660febf591d8fc72339593e2b625 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 16:24:21 +0000 Subject: [PATCH 2182/2515] Made template_add.php mobile friendly. --- WEB-INF/templates/template_add.tpl | 37 ----------------------------- WEB-INF/templates/template_add2.tpl | 37 +++++++++++++++++++++++++++++ default.css | 4 ++-- initialize.php | 2 +- template_add.php | 10 ++++---- 5 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 WEB-INF/templates/template_add.tpl create mode 100644 WEB-INF/templates/template_add2.tpl diff --git a/WEB-INF/templates/template_add.tpl b/WEB-INF/templates/template_add.tpl deleted file mode 100644 index bfd624028..000000000 --- a/WEB-INF/templates/template_add.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{$forms.templateForm.open} - - - - -
- - - - - - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.templateForm.name.control}
{$i18n.label.description}:{$forms.templateForm.description.control}
{$i18n.label.template} (*):{$forms.templateForm.content.control}
 
{$i18n.label.projects}:{$forms.templateForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.templateForm.btn_add.control}
-
-{$forms.templateForm.close} diff --git a/WEB-INF/templates/template_add2.tpl b/WEB-INF/templates/template_add2.tpl new file mode 100644 index 000000000..554267b20 --- /dev/null +++ b/WEB-INF/templates/template_add2.tpl @@ -0,0 +1,37 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.templateForm.open} + + + + + + + + + + + + + + + + + + + +{if $show_projects} + + + + + + + +{/if} + + +
{$forms.templateForm.name.control}
{$forms.templateForm.description.control}
{$forms.templateForm.content.control}
{$forms.templateForm.projects.control}
{$i18n.label.required_fields}
+
{$forms.templateForm.btn_add.control}
+{$forms.templateForm.close} diff --git a/default.css b/default.css index 2304d07b2..c2c9e1d13 100644 --- a/default.css +++ b/default.css @@ -347,7 +347,7 @@ input[type="text"].short-text-field { } /* textareas for fields */ -#description, #address, #item_name, #comment, #custom_css { +#description, #address, #item_name, #comment, #custom_css, #content { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; @@ -355,7 +355,7 @@ input[type="text"].short-text-field { } /* textareas with focus */ -#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus { +#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index c10e5278f..d3103443c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5501"); +define("APP_VERSION", "1.19.28.5502"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/template_add.php b/template_add.php index e68671478..6347d22e3 100644 --- a/template_add.php +++ b/template_add.php @@ -35,9 +35,9 @@ } $form = new Form('templateForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'content','style'=>'width: 250px; height: 80px;','value'=>$cl_content)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'content','value'=>$cl_content)); $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); @@ -65,5 +65,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', $bindTemplatesWithProjects && count($projects) > 0); $smarty->assign('title', $i18n->get('title.add_template')); -$smarty->assign('content_page_name', 'template_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'template_add2.tpl'); +$smarty->display('index2.tpl'); From e217bd8b4649f5991df068319fe79673ec8e98ae Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 16:36:39 +0000 Subject: [PATCH 2183/2515] Made template_edit.php mobile friendly. --- WEB-INF/templates/template_edit.tpl | 41 -------------------------- WEB-INF/templates/template_edit2.tpl | 43 ++++++++++++++++++++++++++++ initialize.php | 2 +- template_edit.php | 10 +++---- 4 files changed, 49 insertions(+), 47 deletions(-) delete mode 100644 WEB-INF/templates/template_edit.tpl create mode 100644 WEB-INF/templates/template_edit2.tpl diff --git a/WEB-INF/templates/template_edit.tpl b/WEB-INF/templates/template_edit.tpl deleted file mode 100644 index f4db77878..000000000 --- a/WEB-INF/templates/template_edit.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{$forms.templateForm.open} - - - - -
- - - - - - - - - - - - - - - - - -{if $show_projects} - - - - - -{/if} - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.templateForm.name.control}
{$i18n.label.description}:{$forms.templateForm.description.control}
{$i18n.label.template} (*):{$forms.templateForm.content.control}
{$i18n.label.status}:{$forms.templateForm.status.control}
 
{$i18n.label.projects}:{$forms.templateForm.projects.control}
{$i18n.label.required_fields}
 
{$forms.templateForm.btn_submit.control}
-
-{$forms.templateForm.close} diff --git a/WEB-INF/templates/template_edit2.tpl b/WEB-INF/templates/template_edit2.tpl new file mode 100644 index 000000000..bdcbb279f --- /dev/null +++ b/WEB-INF/templates/template_edit2.tpl @@ -0,0 +1,43 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.templateForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + +{if $show_projects} + + + + + + + +{/if} + + +
{$forms.templateForm.name.control}
{$forms.templateForm.description.control}
{$forms.templateForm.content.control}
{$forms.templateForm.status.control}
{$forms.templateForm.projects.control}
{$i18n.label.required_fields}
+
{$forms.templateForm.btn_submit.control}
+{$forms.templateForm.close} diff --git a/initialize.php b/initialize.php index d3103443c..773abee87 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5502"); +define("APP_VERSION", "1.19.28.5503"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/template_edit.php b/template_edit.php index e3fa38947..3451ff646 100644 --- a/template_edit.php +++ b/template_edit.php @@ -49,9 +49,9 @@ $form = new Form('templateForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_template_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'content','style'=>'width: 250px; height: 80px;','value'=>$cl_content)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); +$form->addInput(array('type'=>'textarea','name'=>'content','value'=>$cl_content)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); $form->addInput(array('type'=>'checkboxgroup','name'=>'projects','layout'=>'H','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_projects)); @@ -83,5 +83,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', $bindTemplatesWithProjects && count($projects) > 0); $smarty->assign('title', $i18n->get('title.edit_template')); -$smarty->assign('content_page_name', 'template_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'template_edit2.tpl'); +$smarty->display('index2.tpl'); From c63f9daaf1030ad81c544f7be58f11d7b5ee0113 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 18:21:27 +0000 Subject: [PATCH 2184/2515] Made roles.php mobile friendly. --- WEB-INF/lib/ttTemplateHelper.class.php | 31 ++--------- WEB-INF/templates/roles.tpl | 71 -------------------------- WEB-INF/templates/roles2.tpl | 56 ++++++++++++++++++++ initialize.php | 2 +- roles.php | 4 +- rtl.css | 4 ++ 6 files changed, 66 insertions(+), 102 deletions(-) delete mode 100644 WEB-INF/templates/roles.tpl create mode 100644 WEB-INF/templates/roles2.tpl diff --git a/WEB-INF/lib/ttTemplateHelper.class.php b/WEB-INF/lib/ttTemplateHelper.class.php index cedda1671..6e6ad0a02 100644 --- a/WEB-INF/lib/ttTemplateHelper.class.php +++ b/WEB-INF/lib/ttTemplateHelper.class.php @@ -1,31 +1,6 @@ quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$user->id; $status = (int) $fields['status']; - $projects = $fields['projects']; + $projects = isset($fields['projects']) ? $fields['projects'] : array(); $sql = "update tt_templates set name = ".$mdb2->quote($name). ", description = ".$mdb2->quote($description). diff --git a/WEB-INF/templates/roles.tpl b/WEB-INF/templates/roles.tpl deleted file mode 100644 index 227392489..000000000 --- a/WEB-INF/templates/roles.tpl +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -
- - {if $inactive_roles} - - {/if} - - - - - - - - {if $active_roles} - {foreach $active_roles as $role} - - - - - - - - {/foreach} - {/if} -
{$i18n.form.roles.active_roles}
{$i18n.label.thing_name}{$i18n.form.roles.rank}{$i18n.label.description}
{$role.name|escape}{$role.rank}{$role.description|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- - {if $inactive_roles} - - - - - - - - - - {foreach $inactive_roles as $role} - - - - - - - - {/foreach} -
{$i18n.form.roles.inactive_roles}
{$i18n.label.thing_name}{$i18n.form.roles.rank}{$i18n.label.description}
{$role.name|escape}{$role.rank}{$role.description|escape}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
- {/if} -
diff --git a/WEB-INF/templates/roles2.tpl b/WEB-INF/templates/roles2.tpl new file mode 100644 index 000000000..60985c520 --- /dev/null +++ b/WEB-INF/templates/roles2.tpl @@ -0,0 +1,56 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + + + +{if $inactive_roles} +
{$i18n.form.roles.active_roles}
+{/if} + + + + + + + + + {if $active_roles} + {foreach $active_roles as $role} + + + + + + + + {/foreach} + {/if} +
{$i18n.label.thing_name}{$i18n.form.roles.rank}{$i18n.label.description}
{$role.name|escape}{$role.rank}{$role.description|escape}{$i18n.label.edit}{$i18n.label.delete}
+
+ +{if $inactive_roles} +
{$i18n.form.roles.inactive_roles}
+ + + + + + + + + {if $active_roles} + {foreach $inactive_roles as $role} + + + + + + + + {/foreach} + {/if} +
{$i18n.label.thing_name}{$i18n.form.roles.rank}{$i18n.label.description}
{$role.name|escape}{$role.rank}{$role.description|escape}{$i18n.label.edit}{$i18n.label.delete}
+
+{/if} diff --git a/initialize.php b/initialize.php index 773abee87..b31e3252c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5503"); +define("APP_VERSION", "1.19.28.5504"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/roles.php b/roles.php index 569f2649a..f2795fb0f 100644 --- a/roles.php +++ b/roles.php @@ -17,5 +17,5 @@ $smarty->assign('active_roles', ttTeamHelper::getActiveRolesForUser()); $smarty->assign('inactive_roles', ttTeamHelper::getInactiveRolesForUser()); $smarty->assign('title', $i18n->get('title.roles')); -$smarty->assign('content_page_name', 'roles.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'roles2.tpl'); +$smarty->display('index2.tpl'); diff --git a/rtl.css b/rtl.css index 310ab1e25..890cdd75c 100644 --- a/rtl.css +++ b/rtl.css @@ -32,6 +32,10 @@ html { text-align: right; } +.number-cell { + text-align: left; +} + .time-cell { text-align: left; } From 13264199ec99529322632aa9ccffaae71d3c1029 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 1 May 2021 18:23:53 +0000 Subject: [PATCH 2185/2515] Forgot to check in one file in previous commit. --- default.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/default.css b/default.css index c2c9e1d13..103468576 100644 --- a/default.css +++ b/default.css @@ -170,6 +170,11 @@ div.page-hint { text-align: right; } +/* number cell in tables */ +.number-cell { + text-align: right; +} + /* date cell in tables */ .date-cell { white-space: nowrap; From eae83c07267650a8956876373670558c31e3c99c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 2 May 2021 15:43:19 +0000 Subject: [PATCH 2186/2515] Made role_delete.php mobile friendly. --- WEB-INF/templates/role_delete.tpl | 20 -------------------- WEB-INF/templates/role_delete2.tpl | 7 +++++++ initialize.php | 2 +- role_delete.php | 4 ++-- 4 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 WEB-INF/templates/role_delete.tpl create mode 100644 WEB-INF/templates/role_delete2.tpl diff --git a/WEB-INF/templates/role_delete.tpl b/WEB-INF/templates/role_delete.tpl deleted file mode 100644 index 9c85d2208..000000000 --- a/WEB-INF/templates/role_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.roleDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$role_to_delete|escape}
 
{$forms.roleDeleteForm.btn_delete.control}  {$forms.roleDeleteForm.btn_cancel.control}
-
-{$forms.roleDeleteForm.close} diff --git a/WEB-INF/templates/role_delete2.tpl b/WEB-INF/templates/role_delete2.tpl new file mode 100644 index 000000000..56c5dfa07 --- /dev/null +++ b/WEB-INF/templates/role_delete2.tpl @@ -0,0 +1,7 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.roleDeleteForm.open} +
{$role_to_delete|escape}
+
{$forms.roleDeleteForm.btn_delete.control} {$forms.roleDeleteForm.btn_cancel.control}
+{$forms.roleDeleteForm.close} diff --git a/initialize.php b/initialize.php index b31e3252c..2ecaae624 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5504"); +define("APP_VERSION", "1.19.28.5505"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/role_delete.php b/role_delete.php index e2f0805eb..805c89dba 100644 --- a/role_delete.php +++ b/role_delete.php @@ -46,5 +46,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.taskDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_role')); -$smarty->assign('content_page_name', 'role_delete.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'role_delete2.tpl'); +$smarty->display('index2.tpl'); From 564bd846e6fa89e13fc02a4f3da0788549e3d699 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 2 May 2021 16:00:02 +0000 Subject: [PATCH 2187/2515] Made role_add.php mobile friendly. --- WEB-INF/templates/role_add.tpl | 33 --------------------------------- WEB-INF/templates/role_add2.tpl | 31 +++++++++++++++++++++++++++++++ initialize.php | 2 +- role_add.php | 10 +++++----- 4 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 WEB-INF/templates/role_add.tpl create mode 100644 WEB-INF/templates/role_add2.tpl diff --git a/WEB-INF/templates/role_add.tpl b/WEB-INF/templates/role_add.tpl deleted file mode 100644 index 6a56fd253..000000000 --- a/WEB-INF/templates/role_add.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{$forms.roleForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.roleForm.name.control}
{$i18n.label.description}:{$forms.roleForm.description.control}
{$i18n.form.roles.rank}:{$forms.roleForm.rank.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
{$forms.roleForm.btn_submit.control}
 
-
-{$forms.roleForm.close} diff --git a/WEB-INF/templates/role_add2.tpl b/WEB-INF/templates/role_add2.tpl new file mode 100644 index 000000000..3fb24fee0 --- /dev/null +++ b/WEB-INF/templates/role_add2.tpl @@ -0,0 +1,31 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.roleForm.open} + + + + + + + + + + + + + + + + + + + + + +
{$forms.roleForm.name.control}
{$forms.roleForm.description.control}
{$forms.roleForm.rank.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
+
{$forms.roleForm.btn_submit.control}
+{$forms.roleForm.close} diff --git a/initialize.php b/initialize.php index 2ecaae624..513c45d50 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5505"); +define("APP_VERSION", "1.19.28.5506"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/role_add.php b/role_add.php index a52d1a38b..54fd9bdb5 100644 --- a/role_add.php +++ b/role_add.php @@ -19,12 +19,12 @@ } $form = new Form('roleForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); for ($i = 0; $i < $user->rank; $i++) { $rank_data[] = $i; } -$form->addInput(array('type'=>'combobox','name'=>'rank','data'=>$rank_data)); +$form->addInput(array('type'=>'combobox','class'=>'dropdown-field-short','name'=>'rank','data'=>$rank_data)); $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit'))); if ($request->isPost()) { @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_role')); -$smarty->assign('content_page_name', 'role_add.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'role_add2.tpl'); +$smarty->display('index2.tpl'); From 0337da14eedd7a3ef4cb23ede2fbd1e423a5e393 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 2 May 2021 16:22:01 +0000 Subject: [PATCH 2188/2515] Made role_edit.php mobile friendly. --- WEB-INF/templates/role_edit.tpl | 45 --------------------------- WEB-INF/templates/role_edit2.tpl | 53 ++++++++++++++++++++++++++++++++ initialize.php | 2 +- role_edit.php | 10 +++--- 4 files changed, 59 insertions(+), 51 deletions(-) delete mode 100644 WEB-INF/templates/role_edit.tpl create mode 100644 WEB-INF/templates/role_edit2.tpl diff --git a/WEB-INF/templates/role_edit.tpl b/WEB-INF/templates/role_edit.tpl deleted file mode 100644 index 3ad9e6cfe..000000000 --- a/WEB-INF/templates/role_edit.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{$forms.roleForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.thing_name} (*):{$forms.roleForm.name.control}
{$i18n.label.description}:{$forms.roleForm.description.control}
{$i18n.form.roles.rank}:{$forms.roleForm.rank.control} {$i18n.label.what_is_it}
{$i18n.label.status}:{$forms.roleForm.status.control}
{$i18n.label.required_fields}
{$forms.roleForm.btn_save.control}
 
{$i18n.form.roles.assigned}:{$forms.roleForm.assigned_rights.control}{$forms.roleForm.btn_delete.control}
{$i18n.form.roles.not_assigned}:{$forms.roleForm.available_rights.control}{$forms.roleForm.btn_add.control}
-
-{$forms.roleForm.close} diff --git a/WEB-INF/templates/role_edit2.tpl b/WEB-INF/templates/role_edit2.tpl new file mode 100644 index 000000000..c44d8826a --- /dev/null +++ b/WEB-INF/templates/role_edit2.tpl @@ -0,0 +1,53 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.roleForm.open} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$forms.roleForm.name.control}
{$forms.roleForm.description.control}
{$forms.roleForm.rank.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.roleForm.status.control}
{$i18n.label.required_fields}
+
{$forms.roleForm.btn_save.control}
+ + + + + + + + + + + + + + + +
{$forms.roleForm.assigned_rights.control}{$forms.roleForm.btn_delete.control}
{$forms.roleForm.available_rights.control}{$forms.roleForm.btn_add.control}
+{$forms.roleForm.close} diff --git a/initialize.php b/initialize.php index 513c45d50..bf735839c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5506"); +define("APP_VERSION", "1.19.28.5507"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/role_edit.php b/role_edit.php index bd18fd9cc..8f13acc0b 100644 --- a/role_edit.php +++ b/role_edit.php @@ -36,12 +36,12 @@ $form = new Form('roleForm'); $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_role_id)); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 250px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 250px; height: 40px;','value'=>$cl_description)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); +$form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); for ($i = 0; $i < $user->rank; $i++) { $rank_data[] = $i; } -$form->addInput(array('type'=>'combobox','name'=>'rank','data'=>$rank_data,'value'=>$cl_rank)); +$form->addInput(array('type'=>'combobox','class'=>'dropdown-field-short','name'=>'rank','data'=>$rank_data,'value'=>$cl_rank)); $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -115,5 +115,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_role')); -$smarty->assign('content_page_name', 'role_edit.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'role_edit2.tpl'); +$smarty->display('index2.tpl'); From f6947733c46efa27086710424b1bf03b6c9dd289 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 2 May 2021 16:24:44 +0000 Subject: [PATCH 2189/2515] Removed style elements from role_edit.php. --- initialize.php | 2 +- role_edit.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index bf735839c..c8f485ef7 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5507"); +define("APP_VERSION", "1.19.28.5508"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/role_edit.php b/role_edit.php index 8f13acc0b..03e1d2473 100644 --- a/role_edit.php +++ b/role_edit.php @@ -47,9 +47,9 @@ $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); // Multiple select controls for assigned and available rights. -$form->addInput(array('type'=>'combobox','name'=>'assigned_rights','style'=>'width: 250px;','multiple'=>true,'data'=>$assigned_rights)); +$form->addInput(array('type'=>'combobox','name'=>'assigned_rights','multiple'=>true,'data'=>$assigned_rights)); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('button.delete'))); -$form->addInput(array('type'=>'combobox','name'=>'available_rights','style'=>'width: 250px;','multiple'=>true,'data'=>$available_rights)); +$form->addInput(array('type'=>'combobox','name'=>'available_rights','multiple'=>true,'data'=>$available_rights)); $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); if ($request->isPost()) { From 5ec2c49b85d39d378aaee9fac6684312ac7c270b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 3 May 2021 15:00:23 +0000 Subject: [PATCH 2190/2515] Improved mobile layout for role_edit.php. --- WEB-INF/templates/role_edit2.tpl | 18 ++++++------------ default.css | 5 +++++ initialize.php | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/WEB-INF/templates/role_edit2.tpl b/WEB-INF/templates/role_edit2.tpl index c44d8826a..096716e29 100644 --- a/WEB-INF/templates/role_edit2.tpl +++ b/WEB-INF/templates/role_edit2.tpl @@ -35,19 +35,13 @@ License: See license.txt *}
{$forms.roleForm.btn_save.control}
- - - - - - + + + - - - - - - + + +
{$forms.roleForm.assigned_rights.control}{$forms.roleForm.btn_delete.control}
{$i18n.form.roles.assigned}:
{$forms.roleForm.assigned_rights.control}
{$forms.roleForm.btn_delete.control}
{$forms.roleForm.available_rights.control}{$forms.roleForm.btn_add.control}
{$i18n.form.roles.not_assigned}:
{$forms.roleForm.available_rights.control}
{$forms.roleForm.btn_add.control}
{$forms.roleForm.close} diff --git a/default.css b/default.css index 103468576..48a3fb58a 100644 --- a/default.css +++ b/default.css @@ -258,6 +258,11 @@ div.record-list { text-align: left; } +/* a table cell containing input control */ +.td-with-horizontally-centered-input { + text-align: middle; +} + /* a table cell containing a set ov vertically stacked checkboxes */ .td-with-checkboxes { text-align: left; diff --git a/initialize.php b/initialize.php index c8f485ef7..db097d442 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5508"); +define("APP_VERSION", "1.19.28.5509"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 93e6bd31d1c913049894257b2325cf5f161b5651 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 3 May 2021 21:07:39 +0000 Subject: [PATCH 2191/2515] Moved timer.php from legacy mobile directory to root. --- WEB-INF/templates/timer2.tpl | 119 ++++++++++++++ initialize.php | 2 +- timer.php | 309 +++++++++++++++++++++++++++++++++++ 3 files changed, 429 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/templates/timer2.tpl create mode 100644 timer.php diff --git a/WEB-INF/templates/timer2.tpl b/WEB-INF/templates/timer2.tpl new file mode 100644 index 000000000..a8f9b1c97 --- /dev/null +++ b/WEB-INF/templates/timer2.tpl @@ -0,0 +1,119 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{include file="time_script.tpl"} + +

00:00 + + + +{if $uncompleted} + +{/if} + +{$forms.timeRecordForm.open} + +{if $show_client} + + + + + + +{/if} +{if $show_billable} + + + + + +{/if} +{if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + + + + + + {/foreach} +{/if} +{if $show_project} + + + + + + +{/if} +{if $show_task} + + + + + + +{/if} + + +
{$forms.timeRecordForm.client.control}
 
{$forms.timeRecordForm.$control_name.control}
{$forms.timeRecordForm.project.control}
{$forms.timeRecordForm.task.control}
{$i18n.label.required_fields}
+

{$forms.timeRecordForm.btn_start.control} {$forms.timeRecordForm.btn_stop.control}
+{$forms.timeRecordForm.close} + +
+ + + + + +
{$i18n.label.week_total}: {$week_total}{$i18n.label.day_total}: {$day_total}
+
diff --git a/initialize.php b/initialize.php index db097d442..d658db002 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5509"); +define("APP_VERSION", "1.19.28.5510"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/timer.php new file mode 100644 index 000000000..59c06d89b --- /dev/null +++ b/timer.php @@ -0,0 +1,309 @@ +isPluginEnabled('cl'); +$showBillable = $user->isPluginEnabled('iv'); +$trackingMode = $user->getTrackingMode(); +$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; +$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $user->getConfigOption('task_required'); + +// Initialize and store date in session. +$cl_date = $request->getParameter('date', @$_SESSION['date']); +$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); +if($selected_date->isError()) + $selected_date = new DateAndTime(DB_DATEFORMAT); +if(!$cl_date) + $cl_date = $selected_date->toString(DB_DATEFORMAT); +$_SESSION['date'] = $cl_date; +// TODO: for time page we may limit the day to today only. + +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + +// Initialize variables. +$cl_start = trim($request->getParameter('browser_time')); +$cl_finish = trim($request->getParameter('browser_time')); +$cl_billable = 1; +if ($user->isPluginEnabled('iv')) { + if ($request->isPost()) { + $cl_billable = $request->getParameter('billable'); + $_SESSION['billable'] = (int) $cl_billable; + } else + if (isset($_SESSION['billable'])) + $cl_billable = $_SESSION['billable']; +} +$cl_client = $request->getParameter('client', @$_SESSION['client']); +$_SESSION['client'] = $cl_client; +$cl_project = $request->getParameter('project', @$_SESSION['project']); +$_SESSION['project'] = $cl_project; +$cl_task = $request->getParameter('task', @$_SESSION['task']); +$_SESSION['task'] = $cl_task; + +// Handle time custom fields. +$timeCustomFields = array(); +if (isset($custom_fields) && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $control_name = 'time_field_'.$timeField['id']; + $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + $_SESSION[$control_name] = $cl_control_name; + $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], + 'control_name' => $control_name, + 'label' => $timeField['label'], + 'type' => $timeField['type'], + 'required' => $timeField['required'], + 'value' => trim($cl_control_name)); + } +} + +// Obtain uncompleted record. Assumtion is that only 1 uncompleted record is allowed. +$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); +$enable_controls = ($uncompleted == null); + +// Elements of timeRecordForm. +$form = new Form('timeRecordForm'); + +// Dropdown for clients in MODE_TIME. Use all active clients. +if (MODE_TIME == $trackingMode && $showClient) { + $active_clients = ttGroupHelper::getActiveClients(true); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'style'=>'width: 250px;', + 'enable'=>$enable_controls, + 'value'=>$cl_client, + 'data'=>$active_clients, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + // Note: in other modes the client list is filtered to relevant clients only. See below. +} + +// Billable checkbox. +if ($showBillable) + $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable,'enable'=>$enable_controls)); + +// If we have time custom fields - add controls for them. +if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + if ($timeField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text', + 'name'=>$field_name, + 'enable'=>$enable_controls, + 'value'=>$timeCustomFields[$timeField['id']]['value'])); + } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'data'=>CustomFields::getOptions($timeField['id']), + 'value'=>$timeCustomFields[$timeField['id']]['value'], + 'enable'=>$enable_controls, + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } +} + +// If we show project dropdown, add controls for project and client. +if ($showProject) { + // Dropdown for projects assigned to user. + $project_list = $user->getAssignedProjects(); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillTaskDropdown(this.value);', + 'name'=>'project', + 'enable'=>$enable_controls, + 'value'=>$cl_project, + 'data'=>$project_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + + // Client dropdown. + if ($showClient) { + $active_clients = ttGroupHelper::getActiveClients(true); + // We need an array of assigned project ids to do some trimming. + foreach($project_list as $project) + $projects_assigned_to_user[] = $project['id']; + + // Build a client list out of active clients. Use only clients that are relevant to user. + // Also trim their associated project list to only assigned projects (to user). + foreach($active_clients as $client) { + $projects_assigned_to_client = explode(',', $client['projects']); + $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); + if ($intersection) { + $client['projects'] = implode(',', $intersection); + $client_list[] = $client; + } + } + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'enable'=>$enable_controls, + 'value'=>$cl_client, + 'data'=>$client_list, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } +} + +// Task dropdown. +if ($showTask) { + $task_list = ttGroupHelper::getActiveTasks(); + $form->addInput(array('type'=>'combobox', + 'name'=>'task', + 'enable'=>$enable_controls, + 'value'=>$cl_task, + 'data'=>$task_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); +} + +// A hidden control for today's date from user's browser. +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on button click. + +// A hidden control for current time from user's browser. +$form->addInput(array('type'=>'hidden','name'=>'browser_time','value'=>'')); // User current time, which gets filled in on button click. + +// Start and stop buttons. +$enable_start = $uncompleted ? false : true; +if (!$uncompleted) + $form->addInput(array('type'=>'submit','name'=>'btn_start','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('label.start'),'enable'=>$enable_start)); +else + $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('label.finish'),'enable'=>!$enable_start)); + +// Submit. +if ($request->isPost()) { + if ($request->getParameter('btn_start')) { + // Start button clicked. We need to create a new uncompleted record with only the start time. + $cl_finish = null; + + // Validate user input. + if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) + $err->add($i18n->get('error.client')); + // Validate input in time custom fields. + if ($custom_fields && $custom_fields->timeFields) { + foreach ($timeCustomFields as $timeField) { + // Validation is the same for text and dropdown fields. + if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); + } + } + if ($showProject) { + if (!$cl_project) $err->add($i18n->get('error.project')); + } + if ($showTask && $taskRequired) { + if (!$cl_task) $err->add($i18n->get('error.task')); + } + // Finished validating user input. + + // Prohibit creating entries in future. + if (!$user->isOptionEnabled('future_entries')) { + $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); + if ($selected_date->after($browser_today)) + $err->add($i18n->get('error.future_date')); + } + + // Prohibit creating time entries in locked interval. + if ($user->isDateLocked($selected_date)) + $err->add($i18n->get('error.range_locked')); + + // Prohibit creating another uncompleted record. + if ($err->no() && $uncompleted) { + $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); + } + + // Prohibit creating an overlapping record. + if ($err->no()) { + if (ttTimeHelper::overlaps($user->getUser(), $cl_date, $cl_start, $cl_finish)) + $err->add($i18n->get('error.overlap')); + } + + if ($err->no()) { + $id = ttTimeHelper::insert(array( + 'date' => $cl_date, + 'client' => $cl_client, + 'project' => $cl_project, + 'task' => $cl_task, + 'start' => $cl_start, + 'finish' => $cl_finish, + 'duration' => $cl_duration, + 'note' => $cl_note, + 'billable' => $cl_billable)); + + // Insert time custom fields if we have them. + $result = true; + if ($id && $custom_fields && $custom_fields->timeFields) { + $result = $custom_fields->insertTimeFields($id, $timeCustomFields); + } + + if ($id && $result) { + header('Location: timer.php'); + exit(); + } + $err->add($i18n->get('error.db')); + } + } + if ($request->getParameter('btn_stop')) { + // Stop button clicked. We need to finish an uncompleted record in progress. + $record = ttTimeHelper::getRecord($uncompleted['id']); + + // Can we complete this record? + if (ttTimeHelper::isValidInterval($record['start'], $cl_finish) // finish time is greater than start time + && !ttTimeHelper::overlaps($user->getUser(), $cl_date, $record['start'], $cl_finish)) { // no overlap + $res = ttTimeHelper::update(array( + 'id'=>$record['id'], + 'date'=>$cl_date, + 'client'=>$record['client_id'], + 'project'=>$record['project_id'], + 'task'=>$record['task_id'], + 'start'=>$record['start'], + 'finish'=>$cl_finish, + 'note'=>$record['comment'], + 'billable'=>$record['billable'])); + if ($res) { + header('Location: timer.php'); + exit(); + } else + $err->add($i18n->get('error.db')); + } else { + // Cannot complete, redirect for manual edit. + header('Location: time_edit.php?id='.$record['id']); + exit(); + } + } +} // isPost + +$week_total = ttTimeHelper::getTimeForWeek($cl_date); +$smarty->assign('week_total', $week_total); +$smarty->assign('uncompleted', $uncompleted); +$smarty->assign('show_client', $showClient); +$smarty->assign('show_billable', $showBillable); +$smarty->assign('show_project', $showProject); +$smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); +$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); +$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); +$smarty->assign('client_list', $client_list); +$smarty->assign('project_list', $project_list); +$smarty->assign('task_list', $task_list); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('onload', 'onLoad="fillDropdowns()"'); +$smarty->assign('timestring', $selected_date->toString($user->date_format)); +$smarty->assign('title', $i18n->get('title.time')); +$smarty->assign('content_page_name', 'timer2.tpl'); +$smarty->display('index2.tpl'); From 8bb32dd4cdd3480a9dfc7f8f6f56fe66d4aa6a21 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 3 May 2021 21:12:24 +0000 Subject: [PATCH 2192/2515] Removed all remaining legacy mobile pages. --- WEB-INF/templates/mobile/header.tpl | 128 -------- WEB-INF/templates/mobile/index.tpl | 3 - WEB-INF/templates/mobile/login.db.tpl | 7 - WEB-INF/templates/mobile/login.ldap.tpl | 7 - WEB-INF/templates/mobile/login.tpl | 17 - WEB-INF/templates/mobile/time.tpl | 107 ------- WEB-INF/templates/mobile/timer.tpl | 119 ------- initialize.php | 2 +- mobile/index.php | 33 -- mobile/login.php | 76 ----- mobile/time.php | 393 ------------------------ mobile/timer.php | 309 ------------------- timer.php | 1 - 13 files changed, 1 insertion(+), 1201 deletions(-) delete mode 100644 WEB-INF/templates/mobile/header.tpl delete mode 100644 WEB-INF/templates/mobile/index.tpl delete mode 100644 WEB-INF/templates/mobile/login.db.tpl delete mode 100644 WEB-INF/templates/mobile/login.ldap.tpl delete mode 100644 WEB-INF/templates/mobile/login.tpl delete mode 100644 WEB-INF/templates/mobile/time.tpl delete mode 100644 WEB-INF/templates/mobile/timer.tpl delete mode 100644 mobile/index.php delete mode 100644 mobile/login.php delete mode 100644 mobile/time.php delete mode 100644 mobile/timer.php diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl deleted file mode 100644 index d4cf2c53b..000000000 --- a/WEB-INF/templates/mobile/header.tpl +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - -{if $i18n.language.rtl} - -{/if} -{if $user->getCustomCss()} - -{/if} - Time Tracker{if $title} - {$title}{/if} - - - - - - - -{assign var="tab_width" value="300"} - - - -
- - - - -{if $user->custom_logo} - - -
-{else} - -{/if} - - - - -
- - - -{if $user->custom_logo} - -{else} - -{/if} - - -
-
- - -{if $authenticated} - {if $user->can('administer_site')} - - - - - - - - - {else} - - - - - - - - - {/if} -{/if} - - -{if $err->yes()} - - - - -
- {foreach $err->getErrors() as $error} - {$error.message}
{* No need to escape as they are not coming from user and may contain a link. *} - {/foreach} -
-{/if} - - - -{if $msg->yes()} - - - - -
- {foreach $msg->getErrors() as $message} - {$message.message}
{* No need to escape. *} - {/foreach} -
-{/if} - diff --git a/WEB-INF/templates/mobile/index.tpl b/WEB-INF/templates/mobile/index.tpl deleted file mode 100644 index babdac50e..000000000 --- a/WEB-INF/templates/mobile/index.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{include file="mobile/header.tpl"} - -{if $content_page_name}{include file="$content_page_name"}{/if} diff --git a/WEB-INF/templates/mobile/login.db.tpl b/WEB-INF/templates/mobile/login.db.tpl deleted file mode 100644 index 2968b1dab..000000000 --- a/WEB-INF/templates/mobile/login.db.tpl +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
{$i18n.label.login}:
{$forms.loginForm.login.control}
{$i18n.label.password}:
{$forms.loginForm.password.control}
{$forms.loginForm.btn_login.control}
diff --git a/WEB-INF/templates/mobile/login.ldap.tpl b/WEB-INF/templates/mobile/login.ldap.tpl deleted file mode 100644 index 2968b1dab..000000000 --- a/WEB-INF/templates/mobile/login.ldap.tpl +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
{$i18n.label.login}:
{$forms.loginForm.login.control}
{$i18n.label.password}:
{$forms.loginForm.password.control}
{$forms.loginForm.btn_login.control}
diff --git a/WEB-INF/templates/mobile/login.tpl b/WEB-INF/templates/mobile/login.tpl deleted file mode 100644 index 1a2e888e4..000000000 --- a/WEB-INF/templates/mobile/login.tpl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -
- {$forms.loginForm.open} - {include file="mobile/login.`$smarty.const.AUTH_MODULE`.tpl"} - {$forms.loginForm.close} -
diff --git a/WEB-INF/templates/mobile/time.tpl b/WEB-INF/templates/mobile/time.tpl deleted file mode 100644 index 6b8bca0c6..000000000 --- a/WEB-INF/templates/mobile/time.tpl +++ /dev/null @@ -1,107 +0,0 @@ -{include file="time_script.tpl"} - - - - - - - - - -
<<{$timestring}>>
- - - - - -
-{if $time_records} - - {foreach $time_records as $record} - - {if $show_project} - - {/if} - - - - - {/foreach} -
{$record.project|escape}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{$record.duration}{if ($record.duration == '0:00' && $record.start <> '')}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.edit}{/if}{if $record.approved || $record.timesheet_id || $record.invoice_id} {else}{$i18n.label.delete}{/if}
- - - - - - - - - -
{$i18n.label.day_total}:{$day_total}
{$i18n.label.week_total}:{$week_total}
-{/if} -
- -{$forms.timeRecordForm.open} - - - - -
- - - - - -
- -{if $user_dropdown} - - -{/if} -{if $show_client} - - -{/if} -{if $show_billable} - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - - {/foreach} -{/if} -{if $show_project} - - -{/if} -{if $show_task} - - -{/if} -{if $show_start} - - - - -{/if} -{if $show_duration} - - -{/if} -{if $template_dropdown} - - -{/if} - - -
{$i18n.label.user}:
{$forms.timeRecordForm.user.control}
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:
{$forms.timeRecordForm.$control_name.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
{$i18n.label.start}:
{$forms.timeRecordForm.start.control} 
{$i18n.label.finish}:
{$forms.timeRecordForm.finish.control} 
{$i18n.label.duration}:
{$forms.timeRecordForm.duration.control}
{$i18n.label.template}:
{$forms.timeRecordForm.template.control}
{$i18n.label.note}:
{$forms.timeRecordForm.note.control}
-
{$forms.timeRecordForm.btn_submit.control}
-
-{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/timer.tpl b/WEB-INF/templates/mobile/timer.tpl deleted file mode 100644 index 1fee04af3..000000000 --- a/WEB-INF/templates/mobile/timer.tpl +++ /dev/null @@ -1,119 +0,0 @@ -{include file="time_script.tpl"} - -

00:00 - - - -{if $uncompleted} - -{/if} - -{$forms.timeRecordForm.open} - - - - -
- - - - - - - -
- -{if $show_client} - - -{/if} -{if $show_billable} - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - - {/foreach} -{/if} -{if $show_project} - - -{/if} -{if $show_task} - - -{/if} -
{$i18n.label.client}:
{$forms.timeRecordForm.client.control}
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:
{$forms.timeRecordForm.$control_name.control}
{$i18n.label.project}:
{$forms.timeRecordForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:
{$forms.timeRecordForm.task.control}
-
{$forms.timeRecordForm.btn_start.control} {$forms.timeRecordForm.btn_stop.control}
-
-{$forms.timeRecordForm.close} - - - - - -
- {if $time_records} - - - - - - - - - -
{$i18n.label.day_total}:{$day_total}
{$i18n.label.week_total}:{$week_total}
- {/if} -
diff --git a/initialize.php b/initialize.php index d658db002..745d1e4ae 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5510"); +define("APP_VERSION", "1.19.28.5511"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mobile/index.php b/mobile/index.php deleted file mode 100644 index 4da5fab10..000000000 --- a/mobile/index.php +++ /dev/null @@ -1,33 +0,0 @@ -isAuthenticated()) { - if ($user->can('administer_site')) { - header('Location: ../admin_groups.php'); - exit(); - } elseif ($user->isClient()) { - header('Location: ../reports.php'); - exit(); - } -} -// Redirect to time.php or mobile/time.php for other roles. -?> - - - - -

Your browser does not support JavaScript. This application will not work without it.

- - diff --git a/mobile/login.php b/mobile/login.php deleted file mode 100644 index 1375b21ae..000000000 --- a/mobile/login.php +++ /dev/null @@ -1,76 +0,0 @@ -isPost()) { - $cl_login = $request->getParameter('login'); -} else { - $cl_login = @$_COOKIE[LOGIN_COOKIE_NAME]; -} -$cl_password = $request->getParameter('password'); - -$form = new Form('loginForm'); -$form->addInput(array('type'=>'text','size'=>'25','maxlength'=>'100','name'=>'login','style'=>'width: 220px;','value'=>$cl_login)); -$form->addInput(array('type'=>'password','size'=>'25','maxlength'=>'50','name'=>'password','style'=>'width: 220px;','value'=>$cl_password)); -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_login click. -$form->addInput(array('type'=>'submit','name'=>'btn_login','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.login'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); - if (!ttValidString($cl_password)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); - - if ($err->no()) { - - // Use the "limit" plugin if we have one. Ignore include errors. - // The "limit" plugin is not required for normal operation of Time Tracker. - @include('../plugins/limit/access_check.php'); - - if ($auth->doLogin($cl_login, $cl_password)) { - - // Set current user date (as determined by user browser) into session. - $current_user_date = $request->getParameter('browser_today', null); - if ($current_user_date) - $_SESSION['date'] = $current_user_date; - - // Remember user login in a cookie. - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - - $user = new ttUser(null, $auth->getUserId()); - // Redirect, depending on user role. - if ($user->can('administer_site')) { - header('Location: ../admin_groups.php'); - } elseif ($user->isClient()) { - header('Location: ../reports.php'); - } else { - header('Location: time.php'); - } - exit(); - } else - $err->add($i18n->get('error.auth')); - } -} // isPost - -if(!isTrue('MULTIORG_MODE') && !ttOrgHelper::getOrgs()) - $err->add($i18n->get('error.no_groups')); - -// Determine whether to show login hint. It is currently used only for Windows LDAP authentication. -$show_hint = ('ad' == $GLOBALS['AUTH_MODULE_PARAMS']['type']); - -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_hint', $show_hint); -$smarty->assign('onload', 'onLoad="document.loginForm.'.(!$cl_login?'login':'password').'.focus()"'); -$smarty->assign('title', $i18n->get('title.login')); -$smarty->assign('content_page_name', 'mobile/login.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/time.php b/mobile/time.php deleted file mode 100644 index 387a56a89..000000000 --- a/mobile/time.php +++ /dev/null @@ -1,393 +0,0 @@ -behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { - header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. - exit(); -} -if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { - header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. - exit(); -} -if ($request->isPost()) { - $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. - if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { - header('Location: access_denied.php'); // User changed, but no right or wrong user id. - exit(); - } -} -// End of access checks. - -// Determine user for whom we display this page. -if ($request->isPost() && $userChanged) { - $user_id = (int)$request->getParameter('user'); - $user->setOnBehalfUser($user_id); -} else { - $user_id = $user->getUser(); -} - -$group_id = $user->getGroup(); -$config = new ttConfigHelper($user->getConfig()); - -$showClient = $user->isPluginEnabled('cl'); -$showBillable = $user->isPluginEnabled('iv'); -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -if ($showTask) $taskRequired = $config->getDefinedValue('task_required'); -$recordType = $user->getRecordType(); -$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; -$showDuration = TYPE_DURATION == $recordType || TYPE_ALL == $recordType; - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; - -// Determine previous and next dates for simple navigation. -$prev_date = date('Y-m-d', strtotime('-1 day', strtotime($cl_date))); -$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date))); - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('../plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -// Initialize variables. -$cl_start = trim($request->getParameter('start')); -$cl_finish = trim($request->getParameter('finish')); -$cl_duration = trim($request->getParameter('duration')); -$cl_note = trim($request->getParameter('note')); -$cl_billable = 1; -if ($showBillable) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; -} -$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); -$_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); -$_SESSION['task'] = $cl_task; - -// Handle time custom fields. -$timeCustomFields = array(); -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); - $_SESSION[$control_name] = $cl_control_name; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($cl_control_name)); - } -} - -// Elements of timeRecordForm. -$form = new Form('timeRecordForm'); - -// Dropdown for user and a hidden control to indicate user change. -if ($user->can('track_time')) { - $rank = $user->getMaxRankForGroup($group_id); - if ($user->can('track_own_time')) - $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); - else - $options = array('status'=>ACTIVE,'max_rank'=>$rank); - $user_list = $user->getUsers($options); - if (count($user_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'document.timeRecordForm.user_changed.value=1;document.timeRecordForm.submit();', - 'name'=>'user', - 'style'=>'width: 250px;', - 'value'=>$user_id, - 'data'=>$user_list, - 'datakeys'=>array('id','name'))); - $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $smarty->assign('user_dropdown', 1); - } -} - -// Dropdown for clients in MODE_TIME. Use all active clients. -// Note: for other tracking modes the control is added further below. -if (MODE_TIME == $trackingMode && $showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -// Billable checkbox. -if ($showBillable) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); - -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -// If we show project dropdown, add controls for project and client. -if ($showProject) { - // Dropdown for projects assigned to user. - $options['include_templates'] = $user->isPluginEnabled('tp') && $config->getDefinedValue('bind_templates_with_projects'); - $project_list = $user->getAssignedProjects($options); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);fillTemplateDropdown(this.value);prepopulateNote();', - 'name'=>'project', - 'style'=>'width: 250px;', - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Client dropdown. - if ($showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} - -// Task dropdown. -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'style'=>'width: 250px;', - 'value'=>$cl_task, - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -} - -// Start and finish controls. -if ($showStart) { - $form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');")); - $form->addInput(array('type'=>'text','name'=>'finish','value'=>$cl_finish,'onchange'=>"formDisable('finish');")); - if ($user->punch_mode && !$user->canOverridePunchMode()) { - // Make the start and finish fields read-only. - $form->getElement('start')->setEnabled(false); - $form->getElement('finish')->setEnabled(false); - } -} - -// Duration control. -if ($showDuration) - $form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');")); - -// If we have templates, add a dropdown to select one. -if ($user->isPluginEnabled('tp')){ - $template_list = ttGroupHelper::getActiveTemplates(); - if (count($template_list) >= 1) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillNote(this.value);', - 'name'=>'template', - 'style'=>'width: 250px;', - 'data'=>$template_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $smarty->assign('template_dropdown', 1); - $smarty->assign('bind_templates_with_projects', $config->getDefinedValue('bind_templates_with_projects')); - $smarty->assign('prepopulate_note', $config->getDefinedValue('prepopulate_note')); - $smarty->assign('template_list', $template_list); - } -} - -// Note control. -$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height: 60px;','value'=>$cl_note)); - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click. - -// Submit button. -$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_submit')) { - // Submit button clicked. - // Validate user input. - if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($timeCustomFields as $timeField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); - } - } - if ($showProject) { - if (!$cl_project) $err->add($i18n->get('error.project')); - } - if ($showTask && $taskRequired) { - if (!$cl_task) $err->add($i18n->get('error.task')); - } - if (strlen($cl_duration) == 0) { - if ($cl_start || $cl_finish) { - if (!ttTimeHelper::isValidTime($cl_start)) - $err->add($i18n->get('error.field'), $i18n->get('label.start')); - if ($cl_finish) { - if (!ttTimeHelper::isValidTime($cl_finish)) - $err->add($i18n->get('error.field'), $i18n->get('label.finish')); - if (!ttTimeHelper::isValidInterval($cl_start, $cl_finish)) - $err->add($i18n->get('error.interval'), $i18n->get('label.finish'), $i18n->get('label.start')); - } - } else { - if ($showStart) { - $err->add($i18n->get('error.empty'), $i18n->get('label.start')); - $err->add($i18n->get('error.empty'), $i18n->get('label.finish')); - } - if ($showDuration) - $err->add($i18n->get('error.empty'), $i18n->get('label.duration')); - } - } else { - if (false === ttTimeHelper::postedDurationToMinutes($cl_duration)) - $err->add($i18n->get('error.field'), $i18n->get('label.duration')); - } - if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note')); - if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { - $err->add($i18n->get('error.field'), $i18n->get('label.note')); - } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); - // Finished validating user input. - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - - // Prohibit creating entries in locked range. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->get('error.range_locked')); - - // Prohibit creating another uncompleted record. - if ($err->no()) { - if (($not_completed_rec = ttTimeHelper::getUncompleted($user_id)) && (($cl_finish == '') && ($cl_duration == ''))) - $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); - } - - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user_id, $cl_date, $cl_start, $cl_finish)) - $err->add($i18n->get('error.overlap')); - } - - if ($err->no()) { - $id = ttTimeHelper::insert(array( - 'date' => $cl_date, - 'client' => $cl_client, - 'project' => $cl_project, - 'task' => $cl_task, - 'start' => $cl_start, - 'finish' => $cl_finish, - 'duration' => $cl_duration, - 'note' => $cl_note, - 'billable' => $cl_billable)); - - // Insert time custom fields if we have them. - $result = true; - if ($id && $custom_fields && $custom_fields->timeFields) { - $result = $custom_fields->insertTimeFields($id, $timeCustomFields); - } - - if ($id && $result) { - header('Location: time.php'); - exit(); - } - $err->add($i18n->get('error.db')); - } - } -} // isPost - -$smarty->assign('next_date', $next_date); -$smarty->assign('prev_date', $prev_date); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); -$smarty->assign('week_total', ttTimeHelper::getTimeForWeek($selected_date)); -$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); -$smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('task_required', $taskRequired); -$smarty->assign('show_start', $showStart); -$smarty->assign('show_duration', $showDuration); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns();prepopulateNote();"'); -$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); -$smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'mobile/time.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/mobile/timer.php b/mobile/timer.php deleted file mode 100644 index 1d870b1ca..000000000 --- a/mobile/timer.php +++ /dev/null @@ -1,309 +0,0 @@ -isPluginEnabled('cl'); -$showBillable = $user->isPluginEnabled('iv'); -$trackingMode = $user->getTrackingMode(); -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -if ($showTask) $taskRequired = $user->getConfigOption('task_required'); - -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; -// TODO: for time page we may limit the day to today only. - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('../plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -// Initialize variables. -$cl_start = trim($request->getParameter('browser_time')); -$cl_finish = trim($request->getParameter('browser_time')); -$cl_billable = 1; -if ($user->isPluginEnabled('iv')) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; -} -$cl_client = $request->getParameter('client', @$_SESSION['client']); -$_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', @$_SESSION['project']); -$_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', @$_SESSION['task']); -$_SESSION['task'] = $cl_task; - -$timeCustomFields = array(); -// If we have time custom fields - collect input. -if ($request->isPost()) { - if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); - } - } -} - -// Obtain uncompleted record. Assumtion is that only 1 uncompleted record is allowed. -$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); -$enable_controls = ($uncompleted == null); - -// Elements of timeRecordForm. -$form = new Form('timeRecordForm'); - -// Dropdown for clients in MODE_TIME. Use all active clients. -if (MODE_TIME == $trackingMode && $showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'enable'=>$enable_controls, - 'value'=>$cl_client, - 'data'=>$active_clients, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - // Note: in other modes the client list is filtered to relevant clients only. See below. -} - -// Billable checkbox. -if ($showBillable) - $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable,'enable'=>$enable_controls)); - -// If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', - 'data'=>CustomFields::getOptions($timeField['id']), - 'value'=>$timeCustomFields[$timeField['id']]['value'], - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } - } -} - -// If we show project dropdown, add controls for project and client. -if ($showProject) { - // Dropdown for projects assigned to user. - $project_list = $user->getAssignedProjects(); - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);', - 'name'=>'project', - 'style'=>'width: 250px;', - 'enable'=>$enable_controls, - 'value'=>$cl_project, - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - - // Client dropdown. - if ($showClient) { - $active_clients = ttGroupHelper::getActiveClients(true); - // We need an array of assigned project ids to do some trimming. - foreach($project_list as $project) - $projects_assigned_to_user[] = $project['id']; - - // Build a client list out of active clients. Use only clients that are relevant to user. - // Also trim their associated project list to only assigned projects (to user). - foreach($active_clients as $client) { - $projects_assigned_to_client = explode(',', $client['projects']); - $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); - if ($intersection) { - $client['projects'] = implode(',', $intersection); - $client_list[] = $client; - } - } - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'style'=>'width: 250px;', - 'enable'=>$enable_controls, - 'value'=>$cl_client, - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); - } -} - -// Task dropdown. -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'style'=>'width: 250px;', - 'enable'=>$enable_controls, - 'value'=>$cl_task, - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -} - -// A hidden control for today's date from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on button click. - -// A hidden control for current time from user's browser. -$form->addInput(array('type'=>'hidden','name'=>'browser_time','value'=>'')); // User current time, which gets filled in on button click. - -// Start and stop buttons. -$enable_start = $uncompleted ? false : true; -if (!$uncompleted) - $form->addInput(array('type'=>'submit','name'=>'btn_start','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('label.start'),'enable'=>$enable_start)); -else - $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('label.finish'),'enable'=>!$enable_start)); - -// Submit. -if ($request->isPost()) { - if ($request->getParameter('btn_start')) { - // Start button clicked. We need to create a new uncompleted record with only the start time. - $cl_finish = null; - - // Validate user input. - if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) - $err->add($i18n->get('error.client')); - // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { - foreach ($timeCustomFields as $timeField) { - // Validation is the same for text and dropdown fields. - if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); - } - } - if ($showProject) { - if (!$cl_project) $err->add($i18n->get('error.project')); - } - if ($showTask && $taskRequired) { - if (!$cl_task) $err->add($i18n->get('error.task')); - } - // Finished validating user input. - - // Prohibit creating entries in future. - if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) - $err->add($i18n->get('error.future_date')); - } - - // Prohibit creating time entries in locked interval. - if ($user->isDateLocked($selected_date)) - $err->add($i18n->get('error.range_locked')); - - // Prohibit creating another uncompleted record. - if ($err->no() && $uncompleted) { - $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); - } - - // Prohibit creating an overlapping record. - if ($err->no()) { - if (ttTimeHelper::overlaps($user->getUser(), $cl_date, $cl_start, $cl_finish)) - $err->add($i18n->get('error.overlap')); - } - - if ($err->no()) { - $id = ttTimeHelper::insert(array( - 'date' => $cl_date, - 'client' => $cl_client, - 'project' => $cl_project, - 'task' => $cl_task, - 'start' => $cl_start, - 'finish' => $cl_finish, - 'duration' => $cl_duration, - 'note' => $cl_note, - 'billable' => $cl_billable)); - - // Insert time custom fields if we have them. - $result = true; - if ($id && $custom_fields && $custom_fields->timeFields) { - $result = $custom_fields->insertTimeFields($id, $timeCustomFields); - } - - if ($id && $result) { - header('Location: timer.php'); - exit(); - } - $err->add($i18n->get('error.db')); - } - } - if ($request->getParameter('btn_stop')) { - // Stop button clicked. We need to finish an uncompleted record in progress. - $record = ttTimeHelper::getRecord($uncompleted['id']); - - // Can we complete this record? - if (ttTimeHelper::isValidInterval($record['start'], $cl_finish) // finish time is greater than start time - && !ttTimeHelper::overlaps($user->getUser(), $cl_date, $record['start'], $cl_finish)) { // no overlap - $res = ttTimeHelper::update(array( - 'id'=>$record['id'], - 'date'=>$cl_date, - 'client'=>$record['client_id'], - 'project'=>$record['project_id'], - 'task'=>$record['task_id'], - 'start'=>$record['start'], - 'finish'=>$cl_finish, - 'note'=>$record['comment'], - 'billable'=>$record['billable'])); - if ($res) { - header('Location: timer.php'); - exit(); - } else - $err->add($i18n->get('error.db')); - } else { - // Cannot complete, redirect for manual edit. - header('Location: time_edit.php?id='.$record['id']); - exit(); - } - } -} // isPost - -$week_total = ttTimeHelper::getTimeForWeek($cl_date); -$smarty->assign('week_total', $week_total); -$smarty->assign('uncompleted', $uncompleted); -$smarty->assign('show_client', $showClient); -$smarty->assign('show_billable', $showBillable); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('task_required', $taskRequired); -$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); -$smarty->assign('client_list', $client_list); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="fillDropdowns()"'); -$smarty->assign('timestring', $selected_date->toString($user->date_format)); -$smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'mobile/timer.tpl'); -$smarty->display('mobile/index.tpl'); diff --git a/timer.php b/timer.php index 59c06d89b..e77317d9a 100644 --- a/timer.php +++ b/timer.php @@ -89,7 +89,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'enable'=>$enable_controls, 'value'=>$cl_client, 'data'=>$active_clients, From 1659eda0051747f5b714e5d693cd44d89a9c4a08 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 14:20:40 +0000 Subject: [PATCH 2193/2515] Fixed population of time dropdown on timer.php. --- WEB-INF/lib/form/Combobox.class.php | 30 +++-------------------- WEB-INF/lib/form/Form.class.php | 28 ++------------------- WEB-INF/lib/form/FormElement.class.php | 34 ++++---------------------- initialize.php | 2 +- timer.php | 15 +++++++----- 5 files changed, 20 insertions(+), 89 deletions(-) diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index a0ae0e5a0..d494d0f6d 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -1,30 +1,6 @@ isEnabled()) $html .= " disabled"; - + $html .= ">\n"; if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0)) foreach ($this->mOptionsEmpty as $key=>$value) { diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index e991f725e..27a36e9ba 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -1,30 +1,6 @@ style; } function setEnabled($flag) { $this->enabled = $flag; } function isEnabled() { return $this->enabled; } - + function setOnChange($str) { $this->on_change = $str; } function setOnClick($str) { $this->on_click = $str; } function setPlaceholder($str) { $this->placeholder = $str; } diff --git a/initialize.php b/initialize.php index 745d1e4ae..bc2742a8a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5511"); +define("APP_VERSION", "1.19.28.5512"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/timer.php index e77317d9a..67388ce6a 100644 --- a/timer.php +++ b/timer.php @@ -60,12 +60,18 @@ $cl_task = $request->getParameter('task', @$_SESSION['task']); $_SESSION['task'] = $cl_task; +// Obtain uncompleted record. Assumption is that only 1 uncompleted record is allowed. +$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); +$enable_controls = ($uncompleted == null); + // Handle time custom fields. $timeCustomFields = array(); if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $control_name = 'time_field_'.$timeField['id']; - $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + // Note: disabled controls are not posted. Therefore, && $enable_controls condition below. + // This allows us to get values from session when controls are disabled and reset to null when not. + $cl_control_name = $request->getParameter($control_name, ($request->isPost() && $enable_controls ? null : @$_SESSION[$control_name])); $_SESSION[$control_name] = $cl_control_name; $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], 'control_name' => $control_name, @@ -76,10 +82,6 @@ } } -// Obtain uncompleted record. Assumtion is that only 1 uncompleted record is allowed. -$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); -$enable_controls = ($uncompleted == null); - // Elements of timeRecordForm. $form = new Form('timeRecordForm'); @@ -98,8 +100,9 @@ } // Billable checkbox. -if ($showBillable) +if ($showBillable) { $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable,'enable'=>$enable_controls)); +} // If we have time custom fields - add controls for them. if ($custom_fields && $custom_fields->timeFields) { From b17d96f1d73429810d9980d0d3c82646bba635b5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 14:40:14 +0000 Subject: [PATCH 2194/2515] Fixed some issues with control population on timer.php. --- initialize.php | 2 +- timer.php | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/initialize.php b/initialize.php index bc2742a8a..4e19892cb 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5512"); +define("APP_VERSION", "1.19.28.5513"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/timer.php index 67388ce6a..a2afacf9e 100644 --- a/timer.php +++ b/timer.php @@ -41,6 +41,10 @@ $smarty->assign('custom_fields', $custom_fields); } +// Obtain uncompleted record. Assumption is that only 1 uncompleted record is allowed. +$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); +$enable_controls = ($uncompleted == null); + // Initialize variables. $cl_start = trim($request->getParameter('browser_time')); $cl_finish = trim($request->getParameter('browser_time')); @@ -53,16 +57,15 @@ if (isset($_SESSION['billable'])) $cl_billable = $_SESSION['billable']; } -$cl_client = $request->getParameter('client', @$_SESSION['client']); +// Note: disabled controls are not posted. Therefore, && $enable_controls condition below. +// This allows us to get values from session when controls are disabled and reset to null when not. +$cl_client = $request->getParameter('client', ($request->isPost() && $enable_controls ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; -$cl_project = $request->getParameter('project', @$_SESSION['project']); +$cl_project = $request->getParameter('project', ($request->isPost() && $enable_controls ? null : @$_SESSION['project'])); $_SESSION['project'] = $cl_project; -$cl_task = $request->getParameter('task', @$_SESSION['task']); +$cl_task = $request->getParameter('task', ($request->isPost() && $enable_controls ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -// Obtain uncompleted record. Assumption is that only 1 uncompleted record is allowed. -$uncompleted = ttTimeHelper::getUncompleted($user->getUser()); -$enable_controls = ($uncompleted == null); // Handle time custom fields. $timeCustomFields = array(); From 78ad6891ac938c88ffd2b384bf59ecdc66e1aa89 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 14:59:58 +0000 Subject: [PATCH 2195/2515] Fixed population of the billable checkbox on timer.php. --- initialize.php | 2 +- timer.php | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/initialize.php b/initialize.php index 4e19892cb..1b85357a3 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5513"); +define("APP_VERSION", "1.19.28.5514"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/timer.php index a2afacf9e..d343f9294 100644 --- a/timer.php +++ b/timer.php @@ -48,17 +48,13 @@ // Initialize variables. $cl_start = trim($request->getParameter('browser_time')); $cl_finish = trim($request->getParameter('browser_time')); +// Disabled controls are not posted. Therefore, && $enable_controls condition in several places below. +// This allows us to get values from session when controls are disabled and reset to null when not. $cl_billable = 1; if ($user->isPluginEnabled('iv')) { - if ($request->isPost()) { - $cl_billable = $request->getParameter('billable'); - $_SESSION['billable'] = (int) $cl_billable; - } else - if (isset($_SESSION['billable'])) - $cl_billable = $_SESSION['billable']; + $cl_billable = $request->getParameter('billable', ($request->isPost() && $enable_controls ? null : @$_SESSION['billable'])); + $_SESSION['billable'] = $cl_billable; } -// Note: disabled controls are not posted. Therefore, && $enable_controls condition below. -// This allows us to get values from session when controls are disabled and reset to null when not. $cl_client = $request->getParameter('client', ($request->isPost() && $enable_controls ? null : @$_SESSION['client'])); $_SESSION['client'] = $cl_client; $cl_project = $request->getParameter('project', ($request->isPost() && $enable_controls ? null : @$_SESSION['project'])); @@ -66,14 +62,11 @@ $cl_task = $request->getParameter('task', ($request->isPost() && $enable_controls ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; - // Handle time custom fields. $timeCustomFields = array(); if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $control_name = 'time_field_'.$timeField['id']; - // Note: disabled controls are not posted. Therefore, && $enable_controls condition below. - // This allows us to get values from session when controls are disabled and reset to null when not. $cl_control_name = $request->getParameter($control_name, ($request->isPost() && $enable_controls ? null : @$_SESSION[$control_name])); $_SESSION[$control_name] = $cl_control_name; $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], From cd6a9f207afd99cf811a2e3de159496f22bc460f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 15:48:10 +0000 Subject: [PATCH 2196/2515] Addressed several php8 warnings. --- WEB-INF/lib/ttTimeHelper.class.php | 4 ++-- WEB-INF/templates/timer2.tpl | 3 ++- initialize.php | 2 +- timer.php | 12 ++++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index bd2fb9898..58f2f4222 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -416,7 +416,7 @@ static function insert($fields) $date = $fields['date']; $start = $fields['start']; $finish = $fields['finish']; - $duration = $fields['duration']; + $duration = isset($fields['duration']) ? $fields['duration'] : null; if ($duration) { $minutes = ttTimeHelper::postedDurationToMinutes($duration); $duration = ttTimeHelper::minutesToDuration($minutes); @@ -479,7 +479,7 @@ static function update($fields) $task = $fields['task']; $start = $fields['start']; $finish = $fields['finish']; - $duration = $fields['duration']; + $duration = isset($fields['duration']) ? $fields['duration'] : null; if ($duration) { $minutes = ttTimeHelper::postedDurationToMinutes($duration); $duration = ttTimeHelper::minutesToDuration($minutes); diff --git a/WEB-INF/templates/timer2.tpl b/WEB-INF/templates/timer2.tpl index a8f9b1c97..b26e07c1d 100644 --- a/WEB-INF/templates/timer2.tpl +++ b/WEB-INF/templates/timer2.tpl @@ -106,7 +106,8 @@ startTimer();
{$i18n.label.required_fields}
-
{$forms.timeRecordForm.btn_start.control} {$forms.timeRecordForm.btn_stop.control}
+{if isset($forms.timeRecordForm.btn_start.control)}
{$forms.timeRecordForm.btn_start.control}
{/if} +{if isset($forms.timeRecordForm.btn_stop.control)}
{$forms.timeRecordForm.btn_stop.control}
{/if} {$forms.timeRecordForm.close}
diff --git a/initialize.php b/initialize.php index 1b85357a3..177770fdf 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5514"); +define("APP_VERSION", "1.19.28.5515"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/timer.php index d343f9294..aa51a4dc4 100644 --- a/timer.php +++ b/timer.php @@ -22,6 +22,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$taskRequired = false; if ($showTask) $taskRequired = $user->getConfigOption('task_required'); // Initialize and store date in session. @@ -32,7 +33,7 @@ if(!$cl_date) $cl_date = $selected_date->toString(DB_DATEFORMAT); $_SESSION['date'] = $cl_date; -// TODO: for time page we may limit the day to today only. +// TODO: for timer page we may limit the day to today only. // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { @@ -48,6 +49,7 @@ // Initialize variables. $cl_start = trim($request->getParameter('browser_time')); $cl_finish = trim($request->getParameter('browser_time')); +$cl_duration = $cl_note = null; // Disabled controls are not posted. Therefore, && $enable_controls condition in several places below. // This allows us to get values from session when controls are disabled and reset to null when not. $cl_billable = 1; @@ -101,7 +103,7 @@ } // If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { +if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { @@ -120,6 +122,7 @@ } // If we show project dropdown, add controls for project and client. +$project_list = $client_list = array(); if ($showProject) { // Dropdown for projects assigned to user. $project_list = $user->getAssignedProjects(); @@ -161,6 +164,7 @@ } // Task dropdown. +$task_list = array(); if ($showTask) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', @@ -195,7 +199,7 @@ if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($timeCustomFields as $timeField) { // Validation is the same for text and dropdown fields. if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); @@ -245,7 +249,7 @@ // Insert time custom fields if we have them. $result = true; - if ($id && $custom_fields && $custom_fields->timeFields) { + if ($id && isset($custom_fields) && $custom_fields->timeFields) { $result = $custom_fields->insertTimeFields($id, $timeCustomFields); } From e6caf8fb9dc383066604b8623279763593088d0b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 16:50:18 +0000 Subject: [PATCH 2197/2515] Work started on mobile friendly reports2.php. --- WEB-INF/templates/reports2.tpl | 488 +++++++++++++++++++++++++++++++ initialize.php | 2 +- reports.php | 2 + reports2.php | 504 +++++++++++++++++++++++++++++++++ 4 files changed, 995 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/templates/reports2.tpl create mode 100644 reports2.php diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl new file mode 100644 index 000000000..14ccadd20 --- /dev/null +++ b/WEB-INF/templates/reports2.tpl @@ -0,0 +1,488 @@ + + +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{$forms.reportForm.open} + + + + + +
{$i18n.label.fav_report}:
{$forms.reportForm.favorite_report.control}
{$forms.reportForm.btn_generate.control} {$forms.reportForm.btn_delete.control}
+
+ +{if $show_client} + + + + + + +{/if} +{if $show_billable} + + + + + + +{/if} +{if $show_paid_status} + + + + + + +{/if} +{if $show_project} + + + + + + +{/if} +{if $show_task} + + + + + + +{/if} +
{$forms.reportForm.client.control}
{$forms.reportForm.include_records.control}
{$forms.reportForm.paid_status.control}
{$forms.reportForm.project.control}
{$forms.reportForm.task.control}
+{$forms.reportForm.close} + + + + + + + + + + + + + + +{$forms.reportForm.open} + + + + +
+ + + + + +{if $show_active_users} + + + + + + +{/if} +{if $show_inactive_users} + + + + + + +{/if} + + + + + + + + + + + + + + + + + + + +{if isset($custom_fields) && $custom_fields->timeFields} + + {foreach $custom_fields->timeFields as $timeField} + + + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + + + + {/foreach} +{/if} +{if isset($custom_fields) && $custom_fields->userFields} + + {foreach $custom_fields->userFields as $userField} + + + {assign var="control_name" value='user_field_'|cat:$userField['id']} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + + + + {/foreach} +{/if} + + + + + + + + + +
+ +{if $show_approved} + + +{/if} +{if $show_invoice_dropdown} + + +{/if} +{if $show_timesheet_dropdown} + + +{/if} +
{$i18n.label.approved}
{$forms.reportForm.approved.control}
{$i18n.label.invoice}
{$forms.reportForm.invoice.control}
{$i18n.label.timesheet}
{$forms.reportForm.timesheet.control}
+
{if $show_inactive_users}{$i18n.label.active_users}{else}{$i18n.label.users}{/if}
{$forms.reportForm.users_active.control}
{$i18n.label.inactive_users}
{$forms.reportForm.users_inactive.control}
{$i18n.form.reports.select_period} {$i18n.form.reports.set_period}
{$forms.reportForm.period.control}{$i18n.label.start_date}:{$forms.reportForm.start_date.control}
{$i18n.label.end_date}:{$forms.reportForm.end_date.control}
{$i18n.form.reports.show_fields}
+ + + + + + + +
+ +{if $show_client} + +{/if} +{if $show_project} + +{/if} +{if $show_timesheet_checkbox} + +{/if} +
+
+ +{if $show_start} + +{/if} +{if $show_task} + +{/if} +{if $show_ip} + +{/if} +{if $show_work_units} + +{/if} +
+
+ +{if $show_finish} + +{/if} + +{if $show_approved} + +{/if} +{if $show_invoice_checkbox} + +{/if} +
+
+ + + +{if $show_paid_status} + +{/if} +{if $show_files} + +{/if} +
+
+
{$i18n.form.reports.time_fields}
{$timeField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.user_fields}
{$userField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.group_by}
{$forms.reportForm.group_by1.control}{$forms.reportForm.group_by2.control}{$forms.reportForm.group_by3.control}
+ +
+ + + + +
+ + + + + +
{$i18n.form.reports.save_as_favorite}:{$forms.reportForm.new_fav_report.control}{$forms.reportForm.btn_save.control}
+
+
+ + + +
{$forms.reportForm.btn_generate.control}
+
+{$forms.reportForm.close} diff --git a/initialize.php b/initialize.php index 177770fdf..14a7712e3 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5515"); +define("APP_VERSION", "1.19.28.5516"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 66b958fb3..6e3849584 100644 --- a/reports.php +++ b/reports.php @@ -72,6 +72,7 @@ // Add project dropdown. $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; +$project_list = array(); if ($showProject) { if ($user->can('view_reports') || $user->can('view_all_reports')) { $project_list = ttProjectHelper::getProjects(); // All active and inactive projects. @@ -94,6 +95,7 @@ // Add task dropdown. $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$task_list = array(); if ($showTask) { $task_list = ttGroupHelper::getActiveTasks(); if (count($task_list) == 0) $showTask = false; diff --git a/reports2.php b/reports2.php new file mode 100644 index 000000000..b52c0e5aa --- /dev/null +++ b/reports2.php @@ -0,0 +1,504 @@ +exists()) { + header('Location: access_denied.php'); // No users in subgroup. + exit(); +} +// End of access checks. + +$trackingMode = $user->getTrackingMode(); + +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + +$form = new Form('reportForm'); + +// Get saved favorite reports for user. +$report_list = ttFavReportHelper::getReports(); +$form->addInput(array('type'=>'combobox', + 'name'=>'favorite_report', + 'onchange'=>'this.form.fav_report_changed.value=1;this.form.submit();', + 'data'=>$report_list, + 'datakeys'=>array('id','name'), + 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); +$form->addInput(array('type'=>'hidden','name'=>'fav_report_changed')); +// Generate and Delete buttons. +$form->addInput(array('type'=>'submit','name'=>'btn_generate','value'=>$i18n->get('button.generate'))); +$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'),'onclick'=>"return confirm('".$i18n->get('form.reports.confirm_delete')."')")); + +// Dropdown for clients if the clients plugin is enabled. +$showClient = $user->isPluginEnabled('cl') && !$user->isClient(); +$client_list = array(); +if ($showClient) { + if ($user->can('view_reports') || $user->can('view_all_reports')) { + $client_list = ttClientHelper::getClients(); // TODO: improve getClients for "view_reports" + // by filtering out not relevant clients. + } else + $client_list = ttClientHelper::getClientsForUser(); + if (count($client_list) == 0) $showClient = false; +} +if ($showClient) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'data'=>$client_list, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); +} + +// Add project dropdown. +$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; +$project_list = array(); +if ($showProject) { + if ($user->can('view_reports') || $user->can('view_all_reports')) { + $project_list = ttProjectHelper::getProjects(); // All active and inactive projects. + } elseif ($user->isClient()) { + $project_list = ttProjectHelper::getProjectsForClient(); + } else { + $project_list = ttProjectHelper::getAssignedProjects($user->getUser()); + } + if (count($project_list) == 0) $showProject = false; +} +if ($showProject) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillTaskDropdown(this.value);selectAssignedUsers(this.value);', + 'name'=>'project', + 'data'=>$project_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); +} + +// Add task dropdown. +$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$task_list = array(); +if ($showTask) { + $task_list = ttGroupHelper::getActiveTasks(); + if (count($task_list) == 0) $showTask = false; +} +if ($showTask) { + $form->addInput(array('type'=>'combobox', + 'name'=>'task', + 'data'=>$task_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); +} + +// Add billable dropdown. +$showBillable = $user->isPluginEnabled('iv'); +if ($showBillable) { + $include_options = array('1'=>$i18n->get('form.reports.include_billable'), + '2'=>$i18n->get('form.reports.include_not_billable')); + $form->addInput(array('type'=>'combobox', + 'name'=>'include_records', // TODO: how about a better name here? + 'data'=>$include_options, + 'empty'=>array(''=>$i18n->get('dropdown.all')))); +} + +// Add invoiced / not invoiced selector. +$showInvoiceDropdown = $user->isPluginEnabled('iv') && $user->can('manage_invoices'); +if ($showInvoiceDropdown) { + $invoice_options = array('1'=>$i18n->get('form.reports.include_invoiced'), + '2'=>$i18n->get('form.reports.include_not_invoiced')); + $form->addInput(array('type'=>'combobox', + 'name'=>'invoice', + 'style'=>'width: 250px;', + 'data'=>$invoice_options, + 'empty'=>array(''=>$i18n->get('dropdown.all')))); +} +$showInvoiceCheckbox = $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->isClient()); + +// Add paid status selector. +$showPaidStatus = $user->isPluginEnabled('ps') && $user->can('manage_invoices'); +if ($showPaidStatus) { + $form->addInput(array('type'=>'combobox', + 'name'=>'paid_status', + 'data'=>array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')), + 'empty'=>array(''=>$i18n->get('dropdown.all')) + )); +} + +// Add approved / not approved selector. +$showApproved = $user->isPluginEnabled('ap') && + ($user->can('view_own_reports') || $user->can('view_reports') || + $user->can('view_all_reports') || ($user->can('view_client_reports') && $user->can('view_client_unapproved'))); +if ($showApproved) { + $form->addInput(array('type'=>'combobox', + 'name'=>'approved', + 'style'=>'width: 250px;', + 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')), + 'empty'=>array(''=>$i18n->get('dropdown.all')) + )); +} + +// Add timesheet assignment selector. +$showTimesheetDropdown = $user->isPluginEnabled('ts'); +if ($showTimesheetDropdown) { + $form->addInput(array('type'=>'combobox', + 'name'=>'timesheet', + 'style'=>'width: 250px;', + 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), + TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), + TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), + TIMESHEET_APPROVED=>$i18n->get('dropdown.approved'), + TIMESHEET_NOT_APPROVED=>$i18n->get('dropdown.not_approved')), + 'empty'=>array(''=>$i18n->get('dropdown.all')) + )); +} +$showTimesheetCheckbox = $user->isPluginEnabled('ts'); + +// Add user table. +$showUsers = $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient(); +$user_list = array(); +if ($showUsers) { + // Prepare user and assigned projects arrays. + if ($user->can('view_reports') || $user->can('view_all_reports')) { + $rank = $user->getMaxRankForGroup($user->getGroup()); + if ($user->can('view_all_reports')) $max_rank = MAX_RANK; + if ($user->can('view_own_reports')) { + $options_active = array('max_rank'=>$max_rank,'include_self'=>true,'status'=>ACTIVE); + $options_inactive = array('max_rank'=>$max_rank,'include_self'=>true,'status'=>INACTIVE); + } else { + $options_active = array('max_rank'=>$max_rank,'status'=>ACTIVE); + $options_inactive = array('max_rank'=>$max_rank,'status'=>INACTIVE); + } + $active_users = $user->getUsers($options_active); + $inactive_users = $user->getUsers($options_inactive); + } + elseif ($user->isClient()) { + $options_active = array('status'=>ACTIVE); + $options_inactive = array('status'=>INACTIVE); + $active_users = ttGroupHelper::getUsersForClient($options_active); + $inactive_users = ttGroupHelper::getUsersForClient($options_inactive); + } + + foreach ($active_users as $single_user) { + $user_list_active[$single_user['id']] = $single_user['name']; + $projects = ttProjectHelper::getAssignedProjects($single_user['id']); + if ($projects) { + foreach ($projects as $single_project) { + $assigned_projects[$single_user['id']][] = $single_project['id']; + } + } + } + $row_count = is_array($user_list_active) ? ceil(count($user_list_active)/3) : 1; + $form->addInput(array('type'=>'checkboxgroup', + 'name'=>'users_active', + 'data'=>$user_list_active, + 'layout'=>'V', + 'groupin'=>$row_count, + 'style'=>'width: 100%;')); + + $user_list_inactive = array(); + foreach ($inactive_users as $single_user) { + $user_list_inactive[$single_user['id']] = $single_user['name']; + $projects = ttProjectHelper::getAssignedProjects($single_user['id']); + if ($projects) { + foreach ($projects as $single_project) { + $assigned_projects[$single_user['id']][] = $single_project['id']; + } + } + } + $row_count = ceil(count($user_list_inactive)/3); + $form->addInput(array('type'=>'checkboxgroup', + 'name'=>'users_inactive', + 'data'=>$user_list_inactive, + 'layout'=>'V', + 'groupin'=>$row_count, + 'style'=>'width: 100%;')); +} + +// Add control for time period. +$form->addInput(array('type'=>'combobox', + 'name'=>'period', + 'style'=>'width: 250px;', + 'data'=>array(INTERVAL_THIS_MONTH=>$i18n->get('dropdown.current_month'), + INTERVAL_LAST_MONTH=>$i18n->get('dropdown.previous_month'), + INTERVAL_THIS_WEEK=>$i18n->get('dropdown.current_week'), + INTERVAL_LAST_WEEK=>$i18n->get('dropdown.previous_week'), + INTERVAL_THIS_DAY=>$i18n->get('dropdown.current_day'), + INTERVAL_LAST_DAY=>$i18n->get('dropdown.previous_day')), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); +// Add controls for start and end dates. +$form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start_date')); +$form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date')); + +// Add checkboxes for "Show fields" block. +if ($showClient) + $form->addInput(array('type'=>'checkbox','name'=>'chclient')); +if ($showProject) + $form->addInput(array('type'=>'checkbox','name'=>'chproject')); +if ($showTask) + $form->addInput(array('type'=>'checkbox','name'=>'chtask')); +if ($showInvoiceCheckbox) + $form->addInput(array('type'=>'checkbox','name'=>'chinvoice')); +if ($showPaidStatus) + $form->addInput(array('type'=>'checkbox','name'=>'chpaid')); +$showIP = $user->can('view_reports') || $user->can('view_all_reports'); +if ($showIP) + $form->addInput(array('type'=>'checkbox','name'=>'chip')); +$recordType = $user->getRecordType(); +$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; +$showFinish = $showStart; +if ($showStart) + $form->addInput(array('type'=>'checkbox','name'=>'chstart')); +if ($showFinish) + $form->addInput(array('type'=>'checkbox','name'=>'chfinish')); +$form->addInput(array('type'=>'checkbox','name'=>'chduration')); +$form->addInput(array('type'=>'checkbox','name'=>'chnote')); +$form->addInput(array('type'=>'checkbox','name'=>'chcost')); +$showWorkUnits = $user->isPluginEnabled('wu'); +if ($showWorkUnits) + $form->addInput(array('type'=>'checkbox','name'=>'chunits')); +if ($showTimesheetCheckbox) + $form->addInput(array('type'=>'checkbox','name'=>'chtimesheet')); +if ($showApproved) + $form->addInput(array('type'=>'checkbox','name'=>'chapproved')); +$showFiles = $user->isPluginEnabled('at'); +if ($showFiles) + $form->addInput(array('type'=>'checkbox','name'=>'chfiles')); + +// Add a hidden control for timesheet_user_id (who to generate a timesheet for). +if ($showTimesheetCheckbox) + $form->addInput(array('type'=>'hidden','name'=>'timesheet_user_id')); + +// If we have time custom fields - add controls for them. +if (isset($custom_fields) && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + $checkbox_field_name = 'show_'.$field_name; + if ($timeField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', + 'data'=>CustomFields::getOptions($timeField['id']), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); + } + // Also add a checkbox (to print the field or not). + $form->addInput(array('type'=>'checkbox','name'=>$checkbox_field_name)); + } +} + +// If we have user custom fields - add controls for them. +if (isset($custom_fields) && $custom_fields->userFields) { + foreach ($custom_fields->userFields as $userField) { + $field_name = 'user_field_'.$userField['id']; + $checkbox_field_name = 'show_'.$field_name; + if ($userField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', + 'data'=>CustomFields::getOptions($userField['id']), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); + } + // Also add a checkbox (to print the field or not). + $form->addInput(array('type'=>'checkbox','name'=>$checkbox_field_name)); + } +} + +// Add group by control. +$group_by_options['no_grouping'] = $i18n->get('form.reports.group_by_no'); +$group_by_options['date'] = $i18n->get('form.reports.group_by_date'); +if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) + $group_by_options['user'] = $i18n->get('form.reports.group_by_user'); +if ($user->isPluginEnabled('cl') && !($user->isClient() && $user->client_id)) + $group_by_options['client'] = $i18n->get('form.reports.group_by_client'); +if (MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode) + $group_by_options['project'] = $i18n->get('form.reports.group_by_project'); +if (MODE_PROJECTS_AND_TASKS == $trackingMode) + $group_by_options['task'] = $i18n->get('form.reports.group_by_task'); +// If we have time custom fields - add group by options for them. +if (isset($custom_fields) && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + $group_by_options[$field_name] = $timeField['label']; + } +} +// If we have user custom fields - add group by options for them. +if (isset($custom_fields) && $custom_fields->userFields) { + foreach ($custom_fields->userFields as $userField) { + $field_name = 'user_field_'.$userField['id']; + $group_by_options[$field_name] = $userField['label']; + } +} +$group_by_options_size = sizeof($group_by_options); +$form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by1','data'=>$group_by_options)); +if ($group_by_options_size > 2) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by2','data'=>$group_by_options)); +if ($group_by_options_size > 3) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by3','data'=>$group_by_options)); +$form->addInput(array('type'=>'checkbox','name'=>'chtotalsonly')); + +// Add text field for a new favorite report name. +$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30','style'=>'width: 250px;')); +// Save button. +$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); + +$form->addInput(array('type'=>'submit','name'=>'btn_generate','value'=>$i18n->get('button.generate'))); + +// Create a bean (which is a mechanism to remember form values in session). +$bean = new ActionForm('reportBean', $form, $request); +// At this point form values are obtained from session if they are there. + +if ($request->isGet() && !$bean->isSaved()) { + // No previous form data were found in session. Use the following default values. + $form->setValueByElement('users_active', array_keys((array)$user_list_active)); + $period = new Period(INTERVAL_THIS_MONTH, new DateAndTime($user->getDateFormat())); + $form->setValueByElement('start_date', $period->getStartDate()); + $form->setValueByElement('end_date', $period->getEndDate()); + + $form->setValueByElement('chclient', '1'); + $form->setValueByElement('chstart', '1'); + $form->setValueByElement('chfinish', '1'); + $form->setValueByElement('chduration', '1'); + + $form->setValueByElement('chproject', '1'); + $form->setValueByElement('chtask', '1'); + $form->setValueByElement('chnote', '1'); + $form->setValueByElement('chcost', '0'); + + $form->setValueByElement('chtimesheet', '0'); + $form->setValueByElement('chip', '0'); + $form->setValueByElement('chapproved', '0'); + $form->setValueByElement('chpaid', '0'); + + $form->setValueByElement('chunits', '0'); + $form->setValueByElement('chinvoice', '0'); + $form->setValueByElement('chfiles', '1'); + + $form->setValueByElement('chtotalsonly', '0'); +} + +$form->setValueByElement('fav_report_changed',''); + +// Disable the Delete button when no favorite report is selected. +if (!$bean->getAttribute('favorite_report') || ($bean->getAttribute('favorite_report') == -1)) + $form->getElement('btn_delete')->setEnabled(false); + +if ($request->isPost()) { + if((!$bean->getAttribute('btn_generate') && ($request->getParameter('fav_report_changed')))) { + // User changed favorite report. We need to load new values into the form. + if ($bean->getAttribute('favorite_report')) { + // This loads new favorite report options into the bean (into our form). + ttFavReportHelper::loadReport($bean); + + // If user selected no favorite report - mark all user checkboxes (most probable scenario). + if ($bean->getAttribute('favorite_report') == -1) { + $form->setValueByElement('users_active', array_keys($user_list_active)); + $form->setValueByElement('users_inactive', false); + } + + // Save form data in session for future use. + $bean->saveBean(); + header('Location: reports.php'); + exit(); + } + } elseif ($bean->getAttribute('btn_save')) { + // User clicked the Save button. We need to save form options as new favorite report. + if (!ttValidString($bean->getAttribute('new_fav_report'))) $err->add($i18n->get('error.field'), $i18n->get('form.reports.save_as_favorite')); + + if ($err->no()) { + $id = ttFavReportHelper::saveReport($bean); + if (!$id) + $err->add($i18n->get('error.db')); + if ($err->no()) { + $bean->setAttribute('favorite_report', $id); + $bean->saveBean(); + header('Location: reports.php'); + exit(); + } + } + } elseif($bean->getAttribute('btn_delete')) { + // Delete button pressed. User wants to delete a favorite report. + if ($bean->getAttribute('favorite_report')) { + ttFavReportHelper::deleteReport($bean->getAttribute('favorite_report')); + // Load default report. + $bean->setAttribute('favorite_report',''); + $bean->setAttribute('new_fav_report', $report_list[0]['name']); + ttFavReportHelper::loadReport($bean); + $form->setValueByElement('users', array_keys($user_list)); + $bean->saveBean(); + header('Location: reports.php'); + exit(); + } + } else { + // Generate button pressed. Check some values. + if (!$bean->getAttribute('period')) { + $start_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('start_date')); + + if ($start_date->isError() || !$bean->getAttribute('start_date')) + $err->add($i18n->get('error.field'), $i18n->get('label.start_date')); + + $end_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('end_date')); + if ($end_date->isError() || !$bean->getAttribute('end_date')) + $err->add($i18n->get('error.field'), $i18n->get('label.end_date')); + + if ($start_date->compare($end_date) > 0) + $err->add($i18n->get('error.interval'), $i18n->get('label.end_date'), $i18n->get('label.start_date')); + } + $group_by1 = $bean->getAttribute('group_by1'); + $group_by2 = $bean->getAttribute('group_by2'); + $group_by3 = $bean->getAttribute('group_by3'); + if (($group_by3 != null && $group_by3 != 'no_grouping') && ($group_by3 == $group_by1 || $group_by3 == $group_by2)) + $err->add($i18n->get('error.field'), $i18n->get('form.reports.group_by')); + if (($group_by2 != null && $group_by2 != 'no_grouping') && ($group_by2 == $group_by1 || $group_by3 == $group_by2)) + $err->add($i18n->get('error.field'), $i18n->get('form.reports.group_by')); + // Check remaining values. + if (!ttReportHelper::verifyBean($bean)) $err->add($i18n->get('error.sys')); + + if ($err->no()) { + $bean->saveBean(); + // Now we can go ahead and create a report. + header('Location: report.php'); + exit(); + } + } +} // isPost + +$smarty->assign('client_list', $client_list); +$smarty->assign('show_client', $showClient); +$smarty->assign('show_project', $showProject); +$smarty->assign('show_task', $showTask); +$smarty->assign('show_billable', $showBillable); +$smarty->assign('show_approved', $showApproved); +$smarty->assign('show_invoice_dropdown', $showInvoiceDropdown); +$smarty->assign('show_invoice_checkbox', $showInvoiceCheckbox); +$smarty->assign('show_paid_status', $showPaidStatus); +$smarty->assign('show_timesheet_dropdown', $showTimesheetDropdown); +$smarty->assign('show_timesheet_checkbox', $showTimesheetCheckbox); +$smarty->assign('show_active_users', $showUsers && $active_users); +$smarty->assign('show_inactive_users', $showUsers && $inactive_users); +$smarty->assign('show_start', $showStart); +$smarty->assign('show_finish', $showFinish); +$smarty->assign('show_work_units', $showWorkUnits); +$smarty->assign('show_ip', $showIP); +$smarty->assign('show_files', $showFiles); +$smarty->assign('project_list', $project_list); +$smarty->assign('task_list', $task_list); +$smarty->assign('assigned_projects', $assigned_projects); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('onload', 'onLoad="handleCheckboxes();fillDropdowns()"'); +$smarty->assign('title', $i18n->get('title.reports')); +$smarty->assign('content_page_name', 'reports2.tpl'); +$smarty->display('index2.tpl'); From 0fda49817205ef9e23e14784ec6e1f58b26536e1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 4 May 2021 18:13:05 +0000 Subject: [PATCH 2198/2515] A bit more progress on making reports2.php mobile friendly. --- WEB-INF/templates/reports2.tpl | 43 +++++++++++++++++++--------------- initialize.php | 2 +- reports2.php | 3 --- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index 14ccadd20..63b156340 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -270,6 +270,14 @@ License: See license.txt *}
{$forms.reportForm.invoice.control}
{$forms.reportForm.approved.control}
{$forms.reportForm.timesheet.control}
{$forms.reportForm.close} @@ -315,25 +339,6 @@ License: See license.txt *}
- - - - {if $show_active_users} diff --git a/initialize.php b/initialize.php index 14a7712e3..b61750b8f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5516"); +define("APP_VERSION", "1.19.28.5517"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports2.php b/reports2.php index b52c0e5aa..c5ac71ab8 100644 --- a/reports2.php +++ b/reports2.php @@ -123,7 +123,6 @@ '2'=>$i18n->get('form.reports.include_not_invoiced')); $form->addInput(array('type'=>'combobox', 'name'=>'invoice', - 'style'=>'width: 250px;', 'data'=>$invoice_options, 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -146,7 +145,6 @@ if ($showApproved) { $form->addInput(array('type'=>'combobox', 'name'=>'approved', - 'style'=>'width: 250px;', 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')), 'empty'=>array(''=>$i18n->get('dropdown.all')) )); @@ -157,7 +155,6 @@ if ($showTimesheetDropdown) { $form->addInput(array('type'=>'combobox', 'name'=>'timesheet', - 'style'=>'width: 250px;', 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), From fa4ef4971d92832a9029f501ca09079ef9e8ea90 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 5 May 2021 20:42:02 +0000 Subject: [PATCH 2199/2515] A bit more progress on mobile friendly reports2.php. --- WEB-INF/templates/reports2.tpl | 68 ++++++++++++++++++---------------- initialize.php | 2 +- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index 63b156340..3824e3ef2 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -253,6 +253,43 @@ License: See license.txt *}
- -{if $show_approved} - - -{/if} -{if $show_invoice_dropdown} - - -{/if} -{if $show_timesheet_dropdown} - - -{/if} -
{$i18n.label.approved}
{$forms.reportForm.approved.control}
{$i18n.label.invoice}
{$forms.reportForm.invoice.control}
{$i18n.label.timesheet}
{$forms.reportForm.timesheet.control}
-
{if $show_inactive_users}{$i18n.label.active_users}{else}{$i18n.label.users}{/if}
+ + + + + + + + + + + + + + + + + + + + + +
{$i18n.form.reports.select_period}
{$forms.reportForm.period.control}
{$i18n.form.reports.set_period}
{$forms.reportForm.start_date.control}
{$forms.reportForm.end_date.control}
+
+{if $show_active_users} +
{if $show_inactive_users}{$i18n.label.active_users}{else}{$i18n.label.users}{/if}
+ + +
{$forms.reportForm.users_active.control}
+
+{/if} +{if $show_inactive_users} +
{$i18n.label.inactive_users}
+ + +
{$forms.reportForm.users_inactive.control}
+
+{/if} {if $show_client} @@ -339,37 +376,6 @@ License: See license.txt *} {/if} +{if $show_billable} + + + + + +{/if} +{if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + + + + + + {/foreach} +{/if} +{if $show_project} + + + + + + +{/if} +{if $show_task} + + + + + + +{/if} +{if $show_week_note} + + + + + + +{/if}
-{if $show_active_users} - - - - - - -{/if} -{if $show_inactive_users} - - - - - - -{/if} - - - - - - - - - - - - - - - {/if}
{if $show_inactive_users}{$i18n.label.active_users}{else}{$i18n.label.users}{/if}
{$forms.reportForm.users_active.control}
{$i18n.label.inactive_users}
{$forms.reportForm.users_inactive.control}
{$i18n.form.reports.select_period} {$i18n.form.reports.set_period}
{$forms.reportForm.period.control}{$i18n.label.start_date}:{$forms.reportForm.start_date.control}
{$i18n.label.end_date}:{$forms.reportForm.end_date.control}
{$i18n.form.reports.show_fields}
diff --git a/initialize.php b/initialize.php index b61750b8f..d55fd2b71 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5517"); +define("APP_VERSION", "1.19.28.5518"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0327d8ca4bffc65e7fbd8d32f9e9fbfe8335c4f6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 5 May 2021 21:15:32 +0000 Subject: [PATCH 2200/2515] More progress on reports2.tpl. --- WEB-INF/templates/reports2.tpl | 176 +++++++++++++++++++++------------ initialize.php | 2 +- 2 files changed, 113 insertions(+), 65 deletions(-) diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index 3824e3ef2..1caa61d6f 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -356,90 +356,138 @@ License: See license.txt *}
-{$forms.reportForm.close} - - - - - - - - - - - - - - -{$forms.reportForm.open} - - - {/if} {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} {foreach $report_items as $item} {* print subtotal for a block of grouped values *} @@ -107,7 +112,7 @@ {if $use_checkboxes}{/if} {* column for edit icons *} - + {/if} {$first_pass = false} {/if} @@ -154,7 +159,7 @@ {if 2 == $item.type}{/if} {/if} {if $item.approved || $item.timesheet_id || $item.invoice_id} - + {else} {if 1 == $item.type}{/if} {if 2 == $item.type}{/if} @@ -209,7 +214,7 @@ {/if} {* print totals *} - + {/if} diff --git a/initialize.php b/initialize.php index a991b8fc4..8155661fa 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5527"); +define("APP_VERSION", "1.19.28.5528"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/report.php b/report.php index 527e8ac7f..916b02f8e 100644 --- a/report.php +++ b/report.php @@ -304,6 +304,8 @@ if ($bean->getAttribute('chinvoice')) $colspan++; if ($bean->getAttribute('chtimesheet')) $colspan++; if ($bean->getAttribute('chfiles')) $colspan++; +if ($use_checkboxes) $colspan++; +$colspan++; // One more column for edit icons. // Assign variables that are used to alternate color of rows for different dates. $smarty->assign('prev_date', ''); From 860ae31a56fc0c3ada3f51f0e43c32d66548fc8e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 7 May 2021 20:03:13 +0000 Subject: [PATCH 2210/2515] Fixed one more colspan issue on report.php. --- initialize.php | 2 +- report.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/initialize.php b/initialize.php index 8155661fa..2ff973341 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5528"); +define("APP_VERSION", "1.19.28.5529"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/report.php b/report.php index 916b02f8e..cb959d488 100644 --- a/report.php +++ b/report.php @@ -275,7 +275,7 @@ } $totals = ttReportHelper::getTotals($options); -// Determine column span for note field. +// Determine column span for note field and empty rows. $colspan = 0; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++; if (isset($custom_fields) && $custom_fields->userFields) { @@ -296,6 +296,7 @@ if ($bean->getAttribute('chstart')) $colspan++; if ($bean->getAttribute('chfinish')) $colspan++; if ($bean->getAttribute('chduration')) $colspan++; +if (!$user->getConfigOption('report_note_on_separate_row') && $bean->getAttribute('chnote')) $colspan++; if ($bean->getAttribute('chunits')) $colspan++; if ($bean->getAttribute('chcost')) $colspan++; if ($bean->getAttribute('chapproved')) $colspan++; From 6cf84621339c2c41c2e8434c3c1ac14d82cd30b9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 7 May 2021 20:29:04 +0000 Subject: [PATCH 2211/2515] Fixe html closing tags on report2.tpl. --- WEB-INF/templates/report2.tpl | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report2.tpl index 8c491b196..7224b2983 100644 --- a/WEB-INF/templates/report2.tpl +++ b/WEB-INF/templates/report2.tpl @@ -167,7 +167,7 @@ License: See license.txt *} {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} - {/if} @@ -216,7 +216,7 @@ License: See license.txt *} {* print totals *} - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} {* user custom fileds *} {if isset($custom_fields) && $custom_fields->userFields} diff --git a/initialize.php b/initialize.php index 2ff973341..e7773d3d7 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5529"); +define("APP_VERSION", "1.19.28.5530"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c99954245edfe4bd80b44048afd1c15d67096094 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 13:05:15 +0000 Subject: [PATCH 2212/2515] Starting to work on mobile friendly week view. --- WEB-INF/templates/week2.tpl | 236 +++++++++++++++ initialize.php | 2 +- week2.php | 559 ++++++++++++++++++++++++++++++++++++ 3 files changed, 796 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/templates/week2.tpl create mode 100644 week2.php diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week2.tpl new file mode 100644 index 000000000..b46e9804f --- /dev/null +++ b/WEB-INF/templates/week2.tpl @@ -0,0 +1,236 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + +{include file="time_script.tpl"} + + + + + + +{if $show_navigation} + +{/if} + +{$forms.weekTimeForm.open} +
{$forms.weekTimeForm.date.control}
+
- - - - - +
{$i18n.form.reports.show_fields}
- - - - - - - -
- +
+
+ {if $show_client} - + + + + + + {/if} {if $show_project} - + + + + + + {/if} -{if $show_timesheet_checkbox} - +{if $show_task} + + + + + + {/if} -
{$i18n.form.reports.show_fields}
{$forms.reportForm.chclient.control}
{$forms.reportForm.chproject.control}
{$forms.reportForm.chtask.control}
-
- {if $show_start} - + + + + + + {/if} -{if $show_task} - +{if $show_finish} + + + + + + +{/if} + + + + + + + + + + + + +{if $show_timesheet_checkbox} + + + + + + {/if} {if $show_ip} - + + + + + + {/if} {if $show_work_units} - -{/if} -
{$forms.reportForm.chstart.control}
{$forms.reportForm.chfinish.control}
{$forms.reportForm.chduration.control}
{$forms.reportForm.chcost.control}
{$forms.reportForm.chtimesheet.control}
{$forms.reportForm.chip.control}
-
- -{if $show_finish} - + + + + + + {/if} - {if $show_approved} - + + + + + + {/if} {if $show_invoice_checkbox} - + + + + + + {/if} -
{$forms.reportForm.chunits.control}
{$forms.reportForm.chapproved.control}
{$forms.reportForm.chinvoice.control}
-
- - - {if $show_paid_status} - + + + + + + {/if} {if $show_files} - + + + + + + {/if} -
{$forms.reportForm.chpaid.control}
{$forms.reportForm.chfiles.control}
-
-
+{$forms.reportForm.close} + + + + + + + + + + + + + + +{$forms.reportForm.open} + + + + + + + + + {if $show_work_units} diff --git a/initialize.php b/initialize.php index d2838d03e..c6cdd3b6e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5523"); +define("APP_VERSION", "1.19.28.5524"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From fa6b5f9e9cbb5a73cf9ddbb7cc428527f32e84f2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 6 May 2021 23:15:05 +0000 Subject: [PATCH 2206/2515] A bit more progress on making mobile friendly report2.php. --- WEB-INF/templates/report2.tpl | 112 +++++++++++++++++++++++++++------- initialize.php | 2 +- 2 files changed, 90 insertions(+), 24 deletions(-) diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report2.tpl index 1e0fd466b..21eaa4ed0 100644 --- a/WEB-INF/templates/report2.tpl +++ b/WEB-INF/templates/report2.tpl @@ -29,41 +29,107 @@ {if $bean->getAttribute('chcost')}{/if}
+ {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} diff --git a/initialize.php b/initialize.php index d55fd2b71..be497f91b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5518"); +define("APP_VERSION", "1.19.28.5519"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 15fbcff42d84da9d5089a7b08495e314daad59da Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 5 May 2021 22:33:03 +0000 Subject: [PATCH 2201/2515] Made mobile friendly reports2.php working. --- WEB-INF/resources/ru.lang.php | 4 +- WEB-INF/templates/reports2.tpl | 152 +++++++++++++-------------------- initialize.php | 2 +- reports2.php | 15 ++-- 4 files changed, 69 insertions(+), 104 deletions(-) diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 835b90048..db94bf685 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -429,8 +429,8 @@ 'form.reports.select_period' => 'Выберите интервал времени', 'form.reports.set_period' => 'или укажите даты', 'form.reports.show_fields' => 'Показывать поля', -'form.reports.time_fields' => 'Time fields', -'form.reports.user_fields' => 'Поля времени', +'form.reports.time_fields' => 'Поля времени', +'form.reports.user_fields' => 'Поля пользователя', 'form.reports.group_by' => 'Группировать по', 'form.reports.group_by_no' => '--- без группировки ---', 'form.reports.group_by_date' => 'дате', diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index 1caa61d6f..a4c926ad1 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -405,41 +405,41 @@ License: See license.txt *} - +{if $show_work_units} + - - + + -{if $show_timesheet_checkbox} - +{/if} + - - + + -{/if} -{if $show_ip} - +{if $show_approved} + - - + + {/if} -{if $show_work_units} - +{if $show_paid_status} + - - + + {/if} -{if $show_approved} - +{if $show_ip} + - - + + {/if} @@ -451,11 +451,11 @@ License: See license.txt *} {/if} -{if $show_paid_status} - +{if $show_timesheet_checkbox} + - - + + {/if} @@ -468,80 +468,50 @@ License: See license.txt *} {/if}
{$i18n.form.reports.time_fields}
{$forms.reportForm.chduration.control}
{$forms.reportForm.chcost.control}{$forms.reportForm.chunits.control}
{$forms.reportForm.chtimesheet.control}{$forms.reportForm.chcost.control}
{$forms.reportForm.chip.control}{$forms.reportForm.chapproved.control}
{$forms.reportForm.chunits.control}{$forms.reportForm.chpaid.control}
{$forms.reportForm.chapproved.control}{$forms.reportForm.chip.control}
{$forms.reportForm.chpaid.control}{$forms.reportForm.chtimesheet.control}
-{$forms.reportForm.close} - - - - - - - - - - - - - - -{$forms.reportForm.open} - - - -
- +
+
{if isset($custom_fields) && $custom_fields->timeFields} - + {foreach $custom_fields->timeFields as $timeField} - - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - - - + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + + + + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + + + {/foreach} {/if} {if isset($custom_fields) && $custom_fields->userFields} - + {foreach $custom_fields->userFields as $userField} - - - {assign var="control_name" value='user_field_'|cat:$userField['id']} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - - - + {assign var="control_name" value='user_field_'|cat:$userField['id']} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + + + + + + {/foreach} {/if} - - - - - - - - - -
{$i18n.form.reports.time_fields}
{$i18n.form.reports.time_fields}
{$timeField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$forms.reportForm.$control_name.control} {$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.user_fields}
{$i18n.form.reports.user_fields}
{$userField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$forms.reportForm.$control_name.control} {$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.group_by}
{$forms.reportForm.group_by1.control}{$forms.reportForm.group_by2.control}{$forms.reportForm.group_by3.control}
- -
- - - - -
- - - - - -
{$i18n.form.reports.save_as_favorite}:{$forms.reportForm.new_fav_report.control}{$forms.reportForm.btn_save.control}
-
-
- - - -
{$forms.reportForm.btn_generate.control}
-
+
+ + + + + + +
{$i18n.form.reports.group_by}
{$forms.reportForm.group_by1.control}
{$forms.reportForm.group_by2.control}
{$forms.reportForm.group_by3.control}
+
+ + + + +
{$forms.reportForm.new_fav_report.control} {$forms.reportForm.btn_save.control}
+
{$forms.reportForm.btn_generate.control}
{$forms.reportForm.close} diff --git a/initialize.php b/initialize.php index be497f91b..72ad717a5 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5519"); +define("APP_VERSION", "1.19.28.5520"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports2.php b/reports2.php index c5ac71ab8..71f455bea 100644 --- a/reports2.php +++ b/reports2.php @@ -204,8 +204,7 @@ 'name'=>'users_active', 'data'=>$user_list_active, 'layout'=>'V', - 'groupin'=>$row_count, - 'style'=>'width: 100%;')); + 'groupin'=>$row_count)); $user_list_inactive = array(); foreach ($inactive_users as $single_user) { @@ -222,14 +221,12 @@ 'name'=>'users_inactive', 'data'=>$user_list_inactive, 'layout'=>'V', - 'groupin'=>$row_count, - 'style'=>'width: 100%;')); + 'groupin'=>$row_count)); } // Add control for time period. $form->addInput(array('type'=>'combobox', 'name'=>'period', - 'style'=>'width: 250px;', 'data'=>array(INTERVAL_THIS_MONTH=>$i18n->get('dropdown.current_month'), INTERVAL_LAST_MONTH=>$i18n->get('dropdown.previous_month'), INTERVAL_THIS_WEEK=>$i18n->get('dropdown.current_week'), @@ -286,10 +283,9 @@ $field_name = 'time_field_'.$timeField['id']; $checkbox_field_name = 'show_'.$field_name; if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + $form->addInput(array('type'=>'text','name'=>$field_name)); } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($timeField['id']), 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -304,10 +300,9 @@ $field_name = 'user_field_'.$userField['id']; $checkbox_field_name = 'show_'.$field_name; if ($userField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + $form->addInput(array('type'=>'text','name'=>$field_name,)); } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($userField['id']), 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -348,7 +343,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'chtotalsonly')); // Add text field for a new favorite report name. -$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30','style'=>'width: 250px;')); +$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30')); // Save button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); From 189a237fdcd6d7c269de1d3a8120bd0d3ca52b60 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 6 May 2021 13:08:10 +0000 Subject: [PATCH 2202/2515] Switched to using mobile friendly reports.php developed earlier. --- initialize.php | 2 +- reports.php | 28 +-- reports2.php | 496 ------------------------------------------------- 3 files changed, 8 insertions(+), 518 deletions(-) delete mode 100644 reports2.php diff --git a/initialize.php b/initialize.php index 72ad717a5..6494e97e1 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5520"); +define("APP_VERSION", "1.19.28.5521"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 6e3849584..71f455bea 100644 --- a/reports.php +++ b/reports.php @@ -40,7 +40,6 @@ $form->addInput(array('type'=>'combobox', 'name'=>'favorite_report', 'onchange'=>'this.form.fav_report_changed.value=1;this.form.submit();', - 'style'=>'width: 250px;', 'data'=>$report_list, 'datakeys'=>array('id','name'), 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); @@ -64,7 +63,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'data'=>$client_list, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.all')))); @@ -87,7 +85,6 @@ $form->addInput(array('type'=>'combobox', 'onchange'=>'fillTaskDropdown(this.value);selectAssignedUsers(this.value);', 'name'=>'project', - 'style'=>'width: 250px;', 'data'=>$project_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.all')))); @@ -103,7 +100,6 @@ if ($showTask) { $form->addInput(array('type'=>'combobox', 'name'=>'task', - 'style'=>'width: 250px;', 'data'=>$task_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.all')))); @@ -116,7 +112,6 @@ '2'=>$i18n->get('form.reports.include_not_billable')); $form->addInput(array('type'=>'combobox', 'name'=>'include_records', // TODO: how about a better name here? - 'style'=>'width: 250px;', 'data'=>$include_options, 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -128,7 +123,6 @@ '2'=>$i18n->get('form.reports.include_not_invoiced')); $form->addInput(array('type'=>'combobox', 'name'=>'invoice', - 'style'=>'width: 250px;', 'data'=>$invoice_options, 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -139,7 +133,6 @@ if ($showPaidStatus) { $form->addInput(array('type'=>'combobox', 'name'=>'paid_status', - 'style'=>'width: 250px;', 'data'=>array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')), 'empty'=>array(''=>$i18n->get('dropdown.all')) )); @@ -152,7 +145,6 @@ if ($showApproved) { $form->addInput(array('type'=>'combobox', 'name'=>'approved', - 'style'=>'width: 250px;', 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')), 'empty'=>array(''=>$i18n->get('dropdown.all')) )); @@ -163,7 +155,6 @@ if ($showTimesheetDropdown) { $form->addInput(array('type'=>'combobox', 'name'=>'timesheet', - 'style'=>'width: 250px;', 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), @@ -213,8 +204,7 @@ 'name'=>'users_active', 'data'=>$user_list_active, 'layout'=>'V', - 'groupin'=>$row_count, - 'style'=>'width: 100%;')); + 'groupin'=>$row_count)); $user_list_inactive = array(); foreach ($inactive_users as $single_user) { @@ -231,14 +221,12 @@ 'name'=>'users_inactive', 'data'=>$user_list_inactive, 'layout'=>'V', - 'groupin'=>$row_count, - 'style'=>'width: 100%;')); + 'groupin'=>$row_count)); } // Add control for time period. $form->addInput(array('type'=>'combobox', 'name'=>'period', - 'style'=>'width: 250px;', 'data'=>array(INTERVAL_THIS_MONTH=>$i18n->get('dropdown.current_month'), INTERVAL_LAST_MONTH=>$i18n->get('dropdown.previous_month'), INTERVAL_THIS_WEEK=>$i18n->get('dropdown.current_week'), @@ -295,10 +283,9 @@ $field_name = 'time_field_'.$timeField['id']; $checkbox_field_name = 'show_'.$field_name; if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + $form->addInput(array('type'=>'text','name'=>$field_name)); } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($timeField['id']), 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -313,10 +300,9 @@ $field_name = 'user_field_'.$userField['id']; $checkbox_field_name = 'show_'.$field_name; if ($userField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;')); + $form->addInput(array('type'=>'text','name'=>$field_name,)); } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($userField['id']), 'empty'=>array(''=>$i18n->get('dropdown.all')))); } @@ -357,7 +343,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'chtotalsonly')); // Add text field for a new favorite report name. -$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30','style'=>'width: 250px;')); +$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30')); // Save button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -506,5 +492,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="handleCheckboxes();fillDropdowns()"'); $smarty->assign('title', $i18n->get('title.reports')); -$smarty->assign('content_page_name', 'reports.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'reports2.tpl'); +$smarty->display('index2.tpl'); diff --git a/reports2.php b/reports2.php deleted file mode 100644 index 71f455bea..000000000 --- a/reports2.php +++ /dev/null @@ -1,496 +0,0 @@ -exists()) { - header('Location: access_denied.php'); // No users in subgroup. - exit(); -} -// End of access checks. - -$trackingMode = $user->getTrackingMode(); - -// Use custom fields plugin if it is enabled. -if ($user->isPluginEnabled('cf')) { - require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields(); - $smarty->assign('custom_fields', $custom_fields); -} - -$form = new Form('reportForm'); - -// Get saved favorite reports for user. -$report_list = ttFavReportHelper::getReports(); -$form->addInput(array('type'=>'combobox', - 'name'=>'favorite_report', - 'onchange'=>'this.form.fav_report_changed.value=1;this.form.submit();', - 'data'=>$report_list, - 'datakeys'=>array('id','name'), - 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); -$form->addInput(array('type'=>'hidden','name'=>'fav_report_changed')); -// Generate and Delete buttons. -$form->addInput(array('type'=>'submit','name'=>'btn_generate','value'=>$i18n->get('button.generate'))); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'),'onclick'=>"return confirm('".$i18n->get('form.reports.confirm_delete')."')")); - -// Dropdown for clients if the clients plugin is enabled. -$showClient = $user->isPluginEnabled('cl') && !$user->isClient(); -$client_list = array(); -if ($showClient) { - if ($user->can('view_reports') || $user->can('view_all_reports')) { - $client_list = ttClientHelper::getClients(); // TODO: improve getClients for "view_reports" - // by filtering out not relevant clients. - } else - $client_list = ttClientHelper::getClientsForUser(); - if (count($client_list) == 0) $showClient = false; -} -if ($showClient) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillProjectDropdown(this.value);', - 'name'=>'client', - 'data'=>$client_list, - 'datakeys'=>array('id', 'name'), - 'empty'=>array(''=>$i18n->get('dropdown.all')))); -} - -// Add project dropdown. -$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; -$project_list = array(); -if ($showProject) { - if ($user->can('view_reports') || $user->can('view_all_reports')) { - $project_list = ttProjectHelper::getProjects(); // All active and inactive projects. - } elseif ($user->isClient()) { - $project_list = ttProjectHelper::getProjectsForClient(); - } else { - $project_list = ttProjectHelper::getAssignedProjects($user->getUser()); - } - if (count($project_list) == 0) $showProject = false; -} -if ($showProject) { - $form->addInput(array('type'=>'combobox', - 'onchange'=>'fillTaskDropdown(this.value);selectAssignedUsers(this.value);', - 'name'=>'project', - 'data'=>$project_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.all')))); -} - -// Add task dropdown. -$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; -$task_list = array(); -if ($showTask) { - $task_list = ttGroupHelper::getActiveTasks(); - if (count($task_list) == 0) $showTask = false; -} -if ($showTask) { - $form->addInput(array('type'=>'combobox', - 'name'=>'task', - 'data'=>$task_list, - 'datakeys'=>array('id','name'), - 'empty'=>array(''=>$i18n->get('dropdown.all')))); -} - -// Add billable dropdown. -$showBillable = $user->isPluginEnabled('iv'); -if ($showBillable) { - $include_options = array('1'=>$i18n->get('form.reports.include_billable'), - '2'=>$i18n->get('form.reports.include_not_billable')); - $form->addInput(array('type'=>'combobox', - 'name'=>'include_records', // TODO: how about a better name here? - 'data'=>$include_options, - 'empty'=>array(''=>$i18n->get('dropdown.all')))); -} - -// Add invoiced / not invoiced selector. -$showInvoiceDropdown = $user->isPluginEnabled('iv') && $user->can('manage_invoices'); -if ($showInvoiceDropdown) { - $invoice_options = array('1'=>$i18n->get('form.reports.include_invoiced'), - '2'=>$i18n->get('form.reports.include_not_invoiced')); - $form->addInput(array('type'=>'combobox', - 'name'=>'invoice', - 'data'=>$invoice_options, - 'empty'=>array(''=>$i18n->get('dropdown.all')))); -} -$showInvoiceCheckbox = $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->isClient()); - -// Add paid status selector. -$showPaidStatus = $user->isPluginEnabled('ps') && $user->can('manage_invoices'); -if ($showPaidStatus) { - $form->addInput(array('type'=>'combobox', - 'name'=>'paid_status', - 'data'=>array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')), - 'empty'=>array(''=>$i18n->get('dropdown.all')) - )); -} - -// Add approved / not approved selector. -$showApproved = $user->isPluginEnabled('ap') && - ($user->can('view_own_reports') || $user->can('view_reports') || - $user->can('view_all_reports') || ($user->can('view_client_reports') && $user->can('view_client_unapproved'))); -if ($showApproved) { - $form->addInput(array('type'=>'combobox', - 'name'=>'approved', - 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')), - 'empty'=>array(''=>$i18n->get('dropdown.all')) - )); -} - -// Add timesheet assignment selector. -$showTimesheetDropdown = $user->isPluginEnabled('ts'); -if ($showTimesheetDropdown) { - $form->addInput(array('type'=>'combobox', - 'name'=>'timesheet', - 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), - TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), - TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), - TIMESHEET_APPROVED=>$i18n->get('dropdown.approved'), - TIMESHEET_NOT_APPROVED=>$i18n->get('dropdown.not_approved')), - 'empty'=>array(''=>$i18n->get('dropdown.all')) - )); -} -$showTimesheetCheckbox = $user->isPluginEnabled('ts'); - -// Add user table. -$showUsers = $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient(); -$user_list = array(); -if ($showUsers) { - // Prepare user and assigned projects arrays. - if ($user->can('view_reports') || $user->can('view_all_reports')) { - $rank = $user->getMaxRankForGroup($user->getGroup()); - if ($user->can('view_all_reports')) $max_rank = MAX_RANK; - if ($user->can('view_own_reports')) { - $options_active = array('max_rank'=>$max_rank,'include_self'=>true,'status'=>ACTIVE); - $options_inactive = array('max_rank'=>$max_rank,'include_self'=>true,'status'=>INACTIVE); - } else { - $options_active = array('max_rank'=>$max_rank,'status'=>ACTIVE); - $options_inactive = array('max_rank'=>$max_rank,'status'=>INACTIVE); - } - $active_users = $user->getUsers($options_active); - $inactive_users = $user->getUsers($options_inactive); - } - elseif ($user->isClient()) { - $options_active = array('status'=>ACTIVE); - $options_inactive = array('status'=>INACTIVE); - $active_users = ttGroupHelper::getUsersForClient($options_active); - $inactive_users = ttGroupHelper::getUsersForClient($options_inactive); - } - - foreach ($active_users as $single_user) { - $user_list_active[$single_user['id']] = $single_user['name']; - $projects = ttProjectHelper::getAssignedProjects($single_user['id']); - if ($projects) { - foreach ($projects as $single_project) { - $assigned_projects[$single_user['id']][] = $single_project['id']; - } - } - } - $row_count = is_array($user_list_active) ? ceil(count($user_list_active)/3) : 1; - $form->addInput(array('type'=>'checkboxgroup', - 'name'=>'users_active', - 'data'=>$user_list_active, - 'layout'=>'V', - 'groupin'=>$row_count)); - - $user_list_inactive = array(); - foreach ($inactive_users as $single_user) { - $user_list_inactive[$single_user['id']] = $single_user['name']; - $projects = ttProjectHelper::getAssignedProjects($single_user['id']); - if ($projects) { - foreach ($projects as $single_project) { - $assigned_projects[$single_user['id']][] = $single_project['id']; - } - } - } - $row_count = ceil(count($user_list_inactive)/3); - $form->addInput(array('type'=>'checkboxgroup', - 'name'=>'users_inactive', - 'data'=>$user_list_inactive, - 'layout'=>'V', - 'groupin'=>$row_count)); -} - -// Add control for time period. -$form->addInput(array('type'=>'combobox', - 'name'=>'period', - 'data'=>array(INTERVAL_THIS_MONTH=>$i18n->get('dropdown.current_month'), - INTERVAL_LAST_MONTH=>$i18n->get('dropdown.previous_month'), - INTERVAL_THIS_WEEK=>$i18n->get('dropdown.current_week'), - INTERVAL_LAST_WEEK=>$i18n->get('dropdown.previous_week'), - INTERVAL_THIS_DAY=>$i18n->get('dropdown.current_day'), - INTERVAL_LAST_DAY=>$i18n->get('dropdown.previous_day')), - 'empty'=>array(''=>$i18n->get('dropdown.select')))); -// Add controls for start and end dates. -$form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start_date')); -$form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date')); - -// Add checkboxes for "Show fields" block. -if ($showClient) - $form->addInput(array('type'=>'checkbox','name'=>'chclient')); -if ($showProject) - $form->addInput(array('type'=>'checkbox','name'=>'chproject')); -if ($showTask) - $form->addInput(array('type'=>'checkbox','name'=>'chtask')); -if ($showInvoiceCheckbox) - $form->addInput(array('type'=>'checkbox','name'=>'chinvoice')); -if ($showPaidStatus) - $form->addInput(array('type'=>'checkbox','name'=>'chpaid')); -$showIP = $user->can('view_reports') || $user->can('view_all_reports'); -if ($showIP) - $form->addInput(array('type'=>'checkbox','name'=>'chip')); -$recordType = $user->getRecordType(); -$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; -$showFinish = $showStart; -if ($showStart) - $form->addInput(array('type'=>'checkbox','name'=>'chstart')); -if ($showFinish) - $form->addInput(array('type'=>'checkbox','name'=>'chfinish')); -$form->addInput(array('type'=>'checkbox','name'=>'chduration')); -$form->addInput(array('type'=>'checkbox','name'=>'chnote')); -$form->addInput(array('type'=>'checkbox','name'=>'chcost')); -$showWorkUnits = $user->isPluginEnabled('wu'); -if ($showWorkUnits) - $form->addInput(array('type'=>'checkbox','name'=>'chunits')); -if ($showTimesheetCheckbox) - $form->addInput(array('type'=>'checkbox','name'=>'chtimesheet')); -if ($showApproved) - $form->addInput(array('type'=>'checkbox','name'=>'chapproved')); -$showFiles = $user->isPluginEnabled('at'); -if ($showFiles) - $form->addInput(array('type'=>'checkbox','name'=>'chfiles')); - -// Add a hidden control for timesheet_user_id (who to generate a timesheet for). -if ($showTimesheetCheckbox) - $form->addInput(array('type'=>'hidden','name'=>'timesheet_user_id')); - -// If we have time custom fields - add controls for them. -if (isset($custom_fields) && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - $checkbox_field_name = 'show_'.$field_name; - if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name)); - } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'data'=>CustomFields::getOptions($timeField['id']), - 'empty'=>array(''=>$i18n->get('dropdown.all')))); - } - // Also add a checkbox (to print the field or not). - $form->addInput(array('type'=>'checkbox','name'=>$checkbox_field_name)); - } -} - -// If we have user custom fields - add controls for them. -if (isset($custom_fields) && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $field_name = 'user_field_'.$userField['id']; - $checkbox_field_name = 'show_'.$field_name; - if ($userField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,)); - } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { - $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'data'=>CustomFields::getOptions($userField['id']), - 'empty'=>array(''=>$i18n->get('dropdown.all')))); - } - // Also add a checkbox (to print the field or not). - $form->addInput(array('type'=>'checkbox','name'=>$checkbox_field_name)); - } -} - -// Add group by control. -$group_by_options['no_grouping'] = $i18n->get('form.reports.group_by_no'); -$group_by_options['date'] = $i18n->get('form.reports.group_by_date'); -if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) - $group_by_options['user'] = $i18n->get('form.reports.group_by_user'); -if ($user->isPluginEnabled('cl') && !($user->isClient() && $user->client_id)) - $group_by_options['client'] = $i18n->get('form.reports.group_by_client'); -if (MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode) - $group_by_options['project'] = $i18n->get('form.reports.group_by_project'); -if (MODE_PROJECTS_AND_TASKS == $trackingMode) - $group_by_options['task'] = $i18n->get('form.reports.group_by_task'); -// If we have time custom fields - add group by options for them. -if (isset($custom_fields) && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $field_name = 'time_field_'.$timeField['id']; - $group_by_options[$field_name] = $timeField['label']; - } -} -// If we have user custom fields - add group by options for them. -if (isset($custom_fields) && $custom_fields->userFields) { - foreach ($custom_fields->userFields as $userField) { - $field_name = 'user_field_'.$userField['id']; - $group_by_options[$field_name] = $userField['label']; - } -} -$group_by_options_size = sizeof($group_by_options); -$form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by1','data'=>$group_by_options)); -if ($group_by_options_size > 2) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by2','data'=>$group_by_options)); -if ($group_by_options_size > 3) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by3','data'=>$group_by_options)); -$form->addInput(array('type'=>'checkbox','name'=>'chtotalsonly')); - -// Add text field for a new favorite report name. -$form->addInput(array('type'=>'text','name'=>'new_fav_report','maxlength'=>'30')); -// Save button. -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); - -$form->addInput(array('type'=>'submit','name'=>'btn_generate','value'=>$i18n->get('button.generate'))); - -// Create a bean (which is a mechanism to remember form values in session). -$bean = new ActionForm('reportBean', $form, $request); -// At this point form values are obtained from session if they are there. - -if ($request->isGet() && !$bean->isSaved()) { - // No previous form data were found in session. Use the following default values. - $form->setValueByElement('users_active', array_keys((array)$user_list_active)); - $period = new Period(INTERVAL_THIS_MONTH, new DateAndTime($user->getDateFormat())); - $form->setValueByElement('start_date', $period->getStartDate()); - $form->setValueByElement('end_date', $period->getEndDate()); - - $form->setValueByElement('chclient', '1'); - $form->setValueByElement('chstart', '1'); - $form->setValueByElement('chfinish', '1'); - $form->setValueByElement('chduration', '1'); - - $form->setValueByElement('chproject', '1'); - $form->setValueByElement('chtask', '1'); - $form->setValueByElement('chnote', '1'); - $form->setValueByElement('chcost', '0'); - - $form->setValueByElement('chtimesheet', '0'); - $form->setValueByElement('chip', '0'); - $form->setValueByElement('chapproved', '0'); - $form->setValueByElement('chpaid', '0'); - - $form->setValueByElement('chunits', '0'); - $form->setValueByElement('chinvoice', '0'); - $form->setValueByElement('chfiles', '1'); - - $form->setValueByElement('chtotalsonly', '0'); -} - -$form->setValueByElement('fav_report_changed',''); - -// Disable the Delete button when no favorite report is selected. -if (!$bean->getAttribute('favorite_report') || ($bean->getAttribute('favorite_report') == -1)) - $form->getElement('btn_delete')->setEnabled(false); - -if ($request->isPost()) { - if((!$bean->getAttribute('btn_generate') && ($request->getParameter('fav_report_changed')))) { - // User changed favorite report. We need to load new values into the form. - if ($bean->getAttribute('favorite_report')) { - // This loads new favorite report options into the bean (into our form). - ttFavReportHelper::loadReport($bean); - - // If user selected no favorite report - mark all user checkboxes (most probable scenario). - if ($bean->getAttribute('favorite_report') == -1) { - $form->setValueByElement('users_active', array_keys($user_list_active)); - $form->setValueByElement('users_inactive', false); - } - - // Save form data in session for future use. - $bean->saveBean(); - header('Location: reports.php'); - exit(); - } - } elseif ($bean->getAttribute('btn_save')) { - // User clicked the Save button. We need to save form options as new favorite report. - if (!ttValidString($bean->getAttribute('new_fav_report'))) $err->add($i18n->get('error.field'), $i18n->get('form.reports.save_as_favorite')); - - if ($err->no()) { - $id = ttFavReportHelper::saveReport($bean); - if (!$id) - $err->add($i18n->get('error.db')); - if ($err->no()) { - $bean->setAttribute('favorite_report', $id); - $bean->saveBean(); - header('Location: reports.php'); - exit(); - } - } - } elseif($bean->getAttribute('btn_delete')) { - // Delete button pressed. User wants to delete a favorite report. - if ($bean->getAttribute('favorite_report')) { - ttFavReportHelper::deleteReport($bean->getAttribute('favorite_report')); - // Load default report. - $bean->setAttribute('favorite_report',''); - $bean->setAttribute('new_fav_report', $report_list[0]['name']); - ttFavReportHelper::loadReport($bean); - $form->setValueByElement('users', array_keys($user_list)); - $bean->saveBean(); - header('Location: reports.php'); - exit(); - } - } else { - // Generate button pressed. Check some values. - if (!$bean->getAttribute('period')) { - $start_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('start_date')); - - if ($start_date->isError() || !$bean->getAttribute('start_date')) - $err->add($i18n->get('error.field'), $i18n->get('label.start_date')); - - $end_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('end_date')); - if ($end_date->isError() || !$bean->getAttribute('end_date')) - $err->add($i18n->get('error.field'), $i18n->get('label.end_date')); - - if ($start_date->compare($end_date) > 0) - $err->add($i18n->get('error.interval'), $i18n->get('label.end_date'), $i18n->get('label.start_date')); - } - $group_by1 = $bean->getAttribute('group_by1'); - $group_by2 = $bean->getAttribute('group_by2'); - $group_by3 = $bean->getAttribute('group_by3'); - if (($group_by3 != null && $group_by3 != 'no_grouping') && ($group_by3 == $group_by1 || $group_by3 == $group_by2)) - $err->add($i18n->get('error.field'), $i18n->get('form.reports.group_by')); - if (($group_by2 != null && $group_by2 != 'no_grouping') && ($group_by2 == $group_by1 || $group_by3 == $group_by2)) - $err->add($i18n->get('error.field'), $i18n->get('form.reports.group_by')); - // Check remaining values. - if (!ttReportHelper::verifyBean($bean)) $err->add($i18n->get('error.sys')); - - if ($err->no()) { - $bean->saveBean(); - // Now we can go ahead and create a report. - header('Location: report.php'); - exit(); - } - } -} // isPost - -$smarty->assign('client_list', $client_list); -$smarty->assign('show_client', $showClient); -$smarty->assign('show_project', $showProject); -$smarty->assign('show_task', $showTask); -$smarty->assign('show_billable', $showBillable); -$smarty->assign('show_approved', $showApproved); -$smarty->assign('show_invoice_dropdown', $showInvoiceDropdown); -$smarty->assign('show_invoice_checkbox', $showInvoiceCheckbox); -$smarty->assign('show_paid_status', $showPaidStatus); -$smarty->assign('show_timesheet_dropdown', $showTimesheetDropdown); -$smarty->assign('show_timesheet_checkbox', $showTimesheetCheckbox); -$smarty->assign('show_active_users', $showUsers && $active_users); -$smarty->assign('show_inactive_users', $showUsers && $inactive_users); -$smarty->assign('show_start', $showStart); -$smarty->assign('show_finish', $showFinish); -$smarty->assign('show_work_units', $showWorkUnits); -$smarty->assign('show_ip', $showIP); -$smarty->assign('show_files', $showFiles); -$smarty->assign('project_list', $project_list); -$smarty->assign('task_list', $task_list); -$smarty->assign('assigned_projects', $assigned_projects); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="handleCheckboxes();fillDropdowns()"'); -$smarty->assign('title', $i18n->get('title.reports')); -$smarty->assign('content_page_name', 'reports2.tpl'); -$smarty->display('index2.tpl'); From df20820df4a743916596ce8e3d3f1b04182e4adf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 6 May 2021 13:50:04 +0000 Subject: [PATCH 2203/2515] Starting work on mobile friendly report2.php. --- WEB-INF/templates/report2.tpl | 360 ++++++++++++++++++++++++++++++++++ initialize.php | 2 +- report2.php | 313 +++++++++++++++++++++++++++++ 3 files changed, 674 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/templates/report2.tpl create mode 100644 report2.php diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report2.tpl new file mode 100644 index 000000000..1e0fd466b --- /dev/null +++ b/WEB-INF/templates/report2.tpl @@ -0,0 +1,360 @@ + + +
{$i18n.form.report.export} {if file_exists('WEB-INF/lib/tcpdf')}PDF,{/if} XML {$i18n.label.or} CSV
+{$forms.reportViewForm.open} + +{if $bean->getAttribute('chtotalsonly')} + + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + + {foreach $subtotals as $subtotal} + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + + {/foreach} + + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + +
{$group_by_header|escape}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.cost}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}{$subtotal['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
{$i18n.label.total}:{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
+{/if} +{$forms.reportViewForm.close} + + + + +{$forms.reportViewForm.open} + + + + +
+ + +{if $bean->getAttribute('chtotalsonly')} + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + + {foreach $subtotals as $subtotal} + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + + {/foreach} + + + + + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chcost')}{/if} + +{else} + + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + + {foreach $report_items as $item} + + {$cur_date = $item.date} + {if $print_subtotals} + {$cur_grouped_by = $item.grouped_by} + {if $cur_grouped_by != $prev_grouped_by && !$first_pass} + + {/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} + + + {/if} + {$first_pass = false} + {/if} + + {if $cur_date != $prev_date} + {if $report_row_class == 'rowReportItem'} {$report_row_class = 'rowReportItemAlt'} {else} {$report_row_class = 'rowReportItem'} {/if} + {/if} + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="control_name" value='user_field_'|cat:$userField['id']} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + {if $use_checkboxes} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + {if $item.approved || $item.timesheet_id || $item.invoice_id} + + {else} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + + {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} + + + + + {/if} + {$prev_date = $item.date} + {if $print_subtotals} {$prev_grouped_by = $item.grouped_by} {/if} + {/foreach} + + {if $print_subtotals} + + {/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} + + {/if} + + + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} + +{/if} +
{$group_by_header|escape}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.cost}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}{$subtotal['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
{$i18n.label.date}{$i18n.label.user}{{$userField['label']|escape}}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{{$timeField['label']|escape}}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.note}{$i18n.label.cost}{$i18n.label.approved}{$i18n.label.paid}{$i18n.label.ip}{$i18n.label.invoice}{$i18n.label.timesheet}
{$i18n.label.subtotal} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
 
{$item.date}{$item.user|escape}{$item.$control_name|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.$control_name|escape}{$item.start}{$item.finish}{$item.duration}{$item.units}{$item.note|escape}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.approved == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{$item.invoice|escape}{$item.timesheet_name|escape}{if $item.has_files}{$i18n.label.files}{/if}{if $item.has_files}{$i18n.label.files}{/if} {$i18n.label.edit}{$i18n.label.edit}
{$i18n.label.note}:{$item.note|escape}
{$i18n.label.subtotal} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$cur_grouped_by]['user']|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}{$subtotals[$cur_grouped_by]['time']}{$subtotals[$cur_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
+
+{if $report_items && ($use_mark_approved || $use_mark_paid || $use_assign_to_invoice || $use_assign_to_timesheet)} + + {if $use_mark_approved} + + + + {/if} + {if $use_mark_paid} + + + + {/if} + {if $use_assign_to_invoice} + + + + {/if} + {if $use_assign_to_timesheet} + + + + {/if} +
+ + +
{$i18n.label.mark_approved}: {$forms.reportViewForm.mark_approved_select_options.control} {$forms.reportViewForm.mark_approved_action_options.control} {$forms.reportViewForm.btn_mark_approved.control}
+
+ + +
{$i18n.label.mark_paid}: {$forms.reportViewForm.mark_paid_select_options.control} {$forms.reportViewForm.mark_paid_action_options.control} {$forms.reportViewForm.btn_mark_paid.control}
+
+ + +
{$i18n.form.report.assign_to_invoice}: {$forms.reportViewForm.assign_invoice_select_options.control} {$forms.reportViewForm.recent_invoice.control} {$forms.reportViewForm.btn_assign_invoice.control}
+
+ + +
{$i18n.form.report.assign_to_timesheet}: {$forms.reportViewForm.assign_timesheet_select_options.control} {$forms.reportViewForm.timesheet.control} {$forms.reportViewForm.btn_assign_timesheet.control}
+
+{/if} +{$forms.reportViewForm.close} + + + + + +
+ + + + +
+
diff --git a/initialize.php b/initialize.php index 6494e97e1..4ace7d553 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5521"); +define("APP_VERSION", "1.19.28.5522"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/report2.php b/report2.php new file mode 100644 index 000000000..d5fd4e165 --- /dev/null +++ b/report2.php @@ -0,0 +1,313 @@ +getConfig()); + +if ($user->isPluginEnabled('ap')) { + $cl_mark_approved_select_option = $request->getParameter('mark_approved_select_options', ($request->isPost() ? null : @$_SESSION['mark_approved_select_option'])); + $_SESSION['mark_approved_select_option'] = $cl_mark_approved_select_option; + $cl_mark_approved_action_option = $request->getParameter('mark_approved_action_options', ($request->isPost() ? null : @$_SESSION['mark_approved_action_option'])); + $_SESSION['mark_aproved_action_option'] = $cl_mark_approved_action_option; +} +if ($user->isPluginEnabled('ps')) { + $cl_mark_paid_select_option = $request->getParameter('mark_paid_select_options', ($request->isPost() ? null : @$_SESSION['mark_paid_select_option'])); + $_SESSION['mark_paid_select_option'] = $cl_mark_paid_select_option; + $cl_mark_paid_action_option = $request->getParameter('mark_paid_action_options', ($request->isPost() ? null : @$_SESSION['mark_paid_action_option'])); + $_SESSION['mark_paid_action_option'] = $cl_mark_paid_action_option; +} +if ($user->isPluginEnabled('iv')) { + $cl_assign_invoice_select_option = $request->getParameter('assign_invoice_select_options', ($request->isPost() ? null : @$_SESSION['assign_invoice_select_option'])); + $_SESSION['assign_invoice_select_option'] = $cl_assign_invoice_select_option; + $cl_recent_invoice_option = $request->getParameter('recent_invoice', ($request->isPost() ? null : @$_SESSION['recent_invoice_option'])); + $_SESSION['recent_invoice_option'] = $cl_recent_invoice_option; +} +if ($user->isPluginEnabled('ts')) { + $cl_assign_timesheet_select_option = $request->getParameter('assign_timesheet_select_options', ($request->isPost() ? null : @$_SESSION['assign_timesheet_select_option'])); + $_SESSION['assign_timesheet_select_option'] = $cl_assign_timesheet_select_option; + $cl_timesheet_option = $request->getParameter('timesheet', ($request->isPost() ? null : @$_SESSION['timesheet_option'])); + $_SESSION['timesheet_option'] = $cl_timesheet_option; +} + +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + +$form = new Form('reportViewForm'); + +// Report settings are stored in session bean before we get here from reports.php. +$bean = new ActionForm('reportBean', new Form('reportForm'), $request); +// If we are in post, load the bean from session, as the constructor does it only in get. +if ($request->isPost()) $bean->loadBean(); + +$client_id = $bean->getAttribute('client'); +$options = ttReportHelper::getReportOptions($bean); + +// Do we need to show checkboxes? We show them in the following 4 situations: +// - We can approve items. +// - We can mark items as paid. +// - We can assign items to invoices. +// - We can assign items to a timesheet. +// Determine these conditions separately. +$useMarkApproved = $useMarkPaid = $useAssignToInvoice = $useAssignToTimesheet = false; +if ($bean->getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) + $useMarkApproved = true; +if ($bean->getAttribute('chpaid') && $user->can('manage_invoices')) + $useMarkPaid = true; +if ($bean->getAttribute('chinvoice') && $client_id && 'no_grouping' == $bean->getAttribute('group_by1') && !$user->isClient() && $user->can('manage_invoices')) + $useAssignToInvoice = true; +if ($bean->getAttribute('chtimesheet')) { + $timesheets = ttTimesheetHelper::getMatchingTimesheets($options); + if ($timesheets) $useAssignToTimesheet = true; +} + +$use_checkboxes = $useMarkApproved || $useMarkPaid || $useAssignToInvoice || $useAssignToTimesheet; +$smarty->assign('use_checkboxes', $use_checkboxes); + +// Controls for "Mark approved" block. +$smarty->assign('use_mark_approved', false); +if ($useMarkApproved) { + $mark_approved_select_options = array('1'=>$i18n->get('dropdown.all'),'2'=>$i18n->get('dropdown.select')); + $form->addInput(array('type'=>'combobox', + 'name'=>'mark_approved_select_options', + 'data'=>$mark_approved_select_options, + 'value'=>$cl_mark_approved_select_option)); + $mark_approved_action_options = array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')); + $form->addInput(array('type'=>'combobox', + 'name'=>'mark_approved_action_options', + 'data'=>$mark_approved_action_options, + 'value'=>$cl_mark_approved_action_option)); + $form->addInput(array('type'=>'submit','name'=>'btn_mark_approved','value'=>$i18n->get('button.submit'))); + $smarty->assign('use_mark_approved', true); +} + +// Controls for "Mark paid" block. +$smarty->assign('use_mark_paid', false); +if ($useMarkPaid) { + $mark_paid_select_options = array('1'=>$i18n->get('dropdown.all'),'2'=>$i18n->get('dropdown.select')); + $form->addInput(array('type'=>'combobox', + 'name'=>'mark_paid_select_options', + 'data'=>$mark_paid_select_options, + 'value'=>$cl_mark_paid_select_option)); + $mark_paid_action_options = array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')); + $form->addInput(array('type'=>'combobox', + 'name'=>'mark_paid_action_options', + 'data'=>$mark_paid_action_options, + 'value'=>$cl_mark_paid_action_option)); + $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->get('button.submit'))); + $smarty->assign('use_mark_paid', true); +} + +// Controls for "Assign to invoice" block. +$smarty->assign('use_assign_to_invoice', false); +if ($useAssignToInvoice) { + // Client is selected and we are displaying the invoice column. + $recent_invoices = ttGroupHelper::getRecentInvoices($client_id); + if ($recent_invoices) { + $assign_invoice_select_options = array('1'=>$i18n->get('dropdown.all'),'2'=>$i18n->get('dropdown.select')); + $form->addInput(array('type'=>'combobox', + 'name'=>'assign_invoice_select_options', + 'data'=>$assign_invoice_select_options, + 'value'=>$cl_assign_invoice_select_option)); + $form->addInput(array('type'=>'combobox', + 'name'=>'recent_invoice', + 'data'=>$recent_invoices, + 'datakeys'=>array('id','name'), + 'value'=>$cl_recent_invoice_option, + 'empty'=>array(''=>$i18n->get('dropdown.select_invoice')))); + $form->addInput(array('type'=>'submit','name'=>'btn_assign_invoice','value'=>$i18n->get('button.submit'))); + $smarty->assign('use_assign_to_invoice', true); + } +} + +// Controls for "Assign to timesheet" block. +$smarty->assign('use_assign_to_timesheet', false); +if ($useAssignToTimesheet) { + $assign_timesheet_select_options = array('1'=>$i18n->get('dropdown.all'),'2'=>$i18n->get('dropdown.select')); + $form->addInput(array('type'=>'combobox', + 'name'=>'assign_timesheet_select_options', + 'data'=>$assign_timesheet_select_options, + 'value'=>$cl_assign_timesheet_select_option)); + $form->addInput(array('type'=>'combobox', + 'name'=>'timesheet', + 'data'=>$timesheets, + 'datakeys'=>array('id','name'), + 'value'=>$cl_timesheet_option, + 'empty'=>array(''=>$i18n->get('dropdown.select_timesheet')))); + $form->addInput(array('type'=>'submit','name'=>'btn_assign_timesheet','value'=>$i18n->get('button.submit'))); + $smarty->assign('use_assign_to_timesheet', true); +} + +if ($request->isPost()) { + + // Validate parameters and at the same time build arrays of record ids. + if (($request->getParameter('btn_mark_approved') && 2 == $request->getParameter('mark_approved_select_options')) + || ($request->getParameter('btn_mark_paid') && 2 == $request->getParameter('mark_paid_select_options')) + || ($request->getParameter('btn_assign_invoice') && 2 == $request->getParameter('assign_invoice_select_options')) + || ($request->getParameter('btn_assign_timesheet') && 2 == $request->getParameter('assign_timesheet_select_options'))) { + // We act on selected records. Are there any? + foreach($_POST as $key => $val) { + if ('log_id_' == substr($key, 0, 7)) + $time_log_ids[] = substr($key, 7); + if ('item_id_' == substr($key, 0, 8)) + $expense_item_ids[] = substr($key, 8); + } + if (!$time_log_ids && !$expense_item_ids) $err->Add($i18n->get('error.record')); // There are no selected records. + // Validation of parameteres ended here. + } else { + // We are assigning all report items. Get the arrays from session. + // Note: getting from session assures we act only on previously displayed records. + // Rebuilding from $bean may get us a different set. + $item_ids = ttReportHelper::getFromSession(); + $time_log_ids = @$item_ids['report_item_ids']; + $expense_item_ids = @$item_ids['report_item_expense_ids']; + // The above code is here because the arrays are used in both "Mark paid" and "Assign to invoice" handlers below. + } + + if ($err->no()) { + if ($request->getParameter('btn_mark_approved')) { + // User clicked the "Mark approved" button to mark some or all items either approved or not approved. + + // Determine user action. + $mark_approved = $request->getParameter('mark_approved_action_options') == 1 ? true : false; + + // Mark as requested. + if ($time_log_ids || $expense_item_ids) { + ttReportHelper::markApproved($time_log_ids, $expense_item_ids, $mark_approved); + } + + // Re-display this form. + header('Location: report.php'); + exit(); + } + + if ($request->getParameter('btn_mark_paid')) { + // User clicked the "Mark paid" button to mark some or all items either paid or not paid. + + // Determine user action. + $mark_paid = $request->getParameter('mark_paid_action_options') == 1 ? true : false; + + // Mark as requested. + if ($time_log_ids || $expense_item_ids) { + ttReportHelper::markPaid($time_log_ids, $expense_item_ids, $mark_paid); + } + + // Re-display this form. + header('Location: report.php'); + exit(); + } + + if ($request->getParameter('btn_assign_invoice')) { + // User clicked the Submit button to assign all or some items to a recent invoice. + + // Determine invoice id. + $invoice_id = $request->getParameter('recent_invoice'); + + // Assign as requested. + if ($time_log_ids || $expense_item_ids) { + ttReportHelper::assignToInvoice($invoice_id, $time_log_ids, $expense_item_ids); + } + // Re-display this form. + header('Location: report.php'); + exit(); + } + + if ($request->getParameter('btn_assign_timesheet')) { + // User clicked the Submit button to assign all or some items to a timesheet. + + // Determine invoice id. + $timesheet_id = $request->getParameter('timesheet'); + + // Assign as requested. + if ($time_log_ids) { + ttReportHelper::assignToTimesheet($timesheet_id, $time_log_ids); + } + // Re-display this form. + header('Location: report.php'); + exit(); + } + } +} // isPost + +$report_items = ttReportHelper::getItems($options); +// Store record ids in session in case user wants to act on records such as marking them all paid. +if ($request->isGet() && $use_checkboxes) + ttReportHelper::putInSession($report_items); + +$subtotals = array(); +$smarty->assign('print_subtotals', false); +if (ttReportHelper::grouping($options)) { + $subtotals = ttReportHelper::getSubtotals($options); + $smarty->assign('group_by_header', ttReportHelper::makeGroupByHeader($options)); + if ($report_items) { + // Assign variables that are used to print subtotals. + $smarty->assign('print_subtotals', true); + $smarty->assign('first_pass', true); + $smarty->assign('prev_grouped_by', ''); + $smarty->assign('cur_grouped_by', ''); + } +} +$totals = ttReportHelper::getTotals($options); + +// Determine column span for note field. +$colspan = 0; +if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $colspan++; +if (isset($custom_fields) && $custom_fields->userFields) { + foreach ($custom_fields->userFields as $userField) { + $checkbox_control_name = 'show_user_field_'.$userField['id']; + if ($bean->getAttribute($checkbox_control_name)) $colspan++; + } +} +if ($bean->getAttribute('chclient')) $colspan++; +if ($bean->getAttribute('chproject')) $colspan++; +if ($bean->getAttribute('chtask')) $colspan++; +if (isset($custom_fields) && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $checkbox_control_name = 'show_time_field_'.$timeField['id']; + if ($bean->getAttribute($checkbox_control_name)) $colspan++; + } +} +if ($bean->getAttribute('chstart')) $colspan++; +if ($bean->getAttribute('chfinish')) $colspan++; +if ($bean->getAttribute('chduration')) $colspan++; +if ($bean->getAttribute('chunits')) $colspan++; +if ($bean->getAttribute('chcost')) $colspan++; +if ($bean->getAttribute('chapproved')) $colspan++; +if ($bean->getAttribute('chpaid')) $colspan++; +if ($bean->getAttribute('chip')) $colspan++; +if ($bean->getAttribute('chinvoice')) $colspan++; +if ($bean->getAttribute('chtimesheet')) $colspan++; +if ($bean->getAttribute('chfiles')) $colspan++; + +// Assign variables that are used to alternate color of rows for different dates. +$smarty->assign('prev_date', ''); +$smarty->assign('cur_date', ''); +$smarty->assign('report_row_class', 'rowReportItem'); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('report_items', $report_items); +$smarty->assign('subtotals', $subtotals); +$smarty->assign('totals', $totals); +$smarty->assign('note_on_separate_row', $user->getConfigOption('report_note_on_separate_row')); +$smarty->assign('colspan', $colspan); +$smarty->assign('bean', $bean); +$smarty->assign('title', $i18n->get('title.report').": ".$totals['start_date']." - ".$totals['end_date']); +$smarty->assign('content_page_name', 'report2.tpl'); +$smarty->display('index2.tpl'); From beca535c23720c04501f1100cff9751517625fb2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 6 May 2021 14:18:45 +0000 Subject: [PATCH 2204/2515] Fixed a bug on totals only reports with visibility of use_mark_approved and similar controls. --- initialize.php | 2 +- report.php | 8 ++++---- report2.php | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/initialize.php b/initialize.php index 4ace7d553..d2838d03e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5522"); +define("APP_VERSION", "1.19.28.5523"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/report.php b/report.php index e53374138..19f6b8c22 100644 --- a/report.php +++ b/report.php @@ -68,13 +68,13 @@ // - We can assign items to a timesheet. // Determine these conditions separately. $useMarkApproved = $useMarkPaid = $useAssignToInvoice = $useAssignToTimesheet = false; -if ($bean->getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) $useMarkApproved = true; -if ($bean->getAttribute('chpaid') && $user->can('manage_invoices')) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chpaid') && $user->can('manage_invoices')) $useMarkPaid = true; -if ($bean->getAttribute('chinvoice') && $client_id && 'no_grouping' == $bean->getAttribute('group_by1') && !$user->isClient() && $user->can('manage_invoices')) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chinvoice') && $client_id && 'no_grouping' == $bean->getAttribute('group_by1') && !$user->isClient() && $user->can('manage_invoices')) $useAssignToInvoice = true; -if ($bean->getAttribute('chtimesheet')) { +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chtimesheet')) { $timesheets = ttTimesheetHelper::getMatchingTimesheets($options); if ($timesheets) $useAssignToTimesheet = true; } diff --git a/report2.php b/report2.php index d5fd4e165..3776ecb3d 100644 --- a/report2.php +++ b/report2.php @@ -68,13 +68,13 @@ // - We can assign items to a timesheet. // Determine these conditions separately. $useMarkApproved = $useMarkPaid = $useAssignToInvoice = $useAssignToTimesheet = false; -if ($bean->getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chapproved') && ($user->can('approve_reports') || $user->can('approve_all_reports'))) $useMarkApproved = true; -if ($bean->getAttribute('chpaid') && $user->can('manage_invoices')) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chpaid') && $user->can('manage_invoices')) $useMarkPaid = true; -if ($bean->getAttribute('chinvoice') && $client_id && 'no_grouping' == $bean->getAttribute('group_by1') && !$user->isClient() && $user->can('manage_invoices')) +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chinvoice') && $client_id && 'no_grouping' == $bean->getAttribute('group_by1') && !$user->isClient() && $user->can('manage_invoices')) $useAssignToInvoice = true; -if ($bean->getAttribute('chtimesheet')) { +if (!$bean->getAttribute('chtotalsonly') && $bean->getAttribute('chtimesheet')) { $timesheets = ttTimesheetHelper::getMatchingTimesheets($options); if ($timesheets) $useAssignToTimesheet = true; } From caf11264e9ae62724213cb159d745274047fb0ac Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 6 May 2021 14:33:04 +0000 Subject: [PATCH 2205/2515] Recovered show note option on reports.php. --- WEB-INF/templates/reports2.tpl | 6 ++++++ initialize.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index a4c926ad1..3f272e112 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -405,6 +405,12 @@ License: See license.txt *}
{$forms.reportForm.chduration.control}
{$forms.reportForm.chnote.control}
{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
+{else} + + + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + + {foreach $report_items as $item} + + {$cur_date = $item.date} + {if $print_subtotals} + {$cur_grouped_by = $item.grouped_by} + {if $cur_grouped_by != $prev_grouped_by && !$first_pass} + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} + + + {/if} + {$first_pass = false} + {/if} + {/foreach} +
{$i18n.label.date}{$i18n.label.user}{{$userField['label']|escape}}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{{$timeField['label']|escape}}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.note}{$i18n.label.cost}{$i18n.label.approved}{$i18n.label.paid}{$i18n.label.ip}{$i18n.label.invoice}{$i18n.label.timesheet}
{$i18n.label.subtotal}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
 
{/if} {$forms.reportViewForm.close} -{$forms.reportViewForm.open} + +{$forms.reportViewForm.open}
{if $bean->getAttribute('chtotalsonly')} - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - - {foreach $subtotals as $subtotal} - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - - {/foreach} - - - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - {else} diff --git a/initialize.php b/initialize.php index c6cdd3b6e..40135a55a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5524"); +define("APP_VERSION", "1.19.28.5525"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c121f9cb5b9b88cc72d005e23fec1f3376fc7ecd Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 7 May 2021 15:13:15 +0000 Subject: [PATCH 2207/2515] More progress on making mobile friendly report. --- WEB-INF/templates/report2.tpl | 168 ++++++++++++++++++++++++++++++---- default.css | 5 + initialize.php | 2 +- 3 files changed, 155 insertions(+), 20 deletions(-) diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report2.tpl index 21eaa4ed0..db065ac94 100644 --- a/WEB-INF/templates/report2.tpl +++ b/WEB-INF/templates/report2.tpl @@ -4,7 +4,7 @@
{$i18n.form.report.export} {if file_exists('WEB-INF/lib/tcpdf')}PDF,{/if} XML {$i18n.label.or} CSV
{$forms.reportViewForm.open} - +{* totals only report *} {if $bean->getAttribute('chtotalsonly')}
{$group_by_header|escape}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.cost}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}{$subtotal['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
@@ -21,7 +21,7 @@ {if $bean->getAttribute('chcost')}{/if} {/foreach} - + {* print totals *} {if $bean->getAttribute('chduration')}{/if} @@ -30,7 +30,7 @@
{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
{$i18n.label.total}:{$totals['time']}
{else} - +{* normal report *} @@ -66,15 +66,14 @@ {if $bean->getAttribute('chfiles')}{/if} {foreach $report_items as $item} - + {* print subtotal for a block of grouped values *} {$cur_date = $item.date} {if $print_subtotals} {$cur_grouped_by = $item.grouped_by} {if $cur_grouped_by != $prev_grouped_by && !$first_pass} - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} {* user custom fileds *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} @@ -82,10 +81,9 @@ {if $bean->getAttribute($checkbox_control_name)}{/if} {/foreach} {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} {* time custom fileds *} {if isset($custom_fields) && $custom_fields->timeFields} @@ -94,13 +92,12 @@ {if $bean->getAttribute($checkbox_control_name)}{/if} {/foreach} {/if} - {if $bean->getAttribute('chstart')}{/if} {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')}{/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} @@ -108,13 +105,146 @@ {if $bean->getAttribute('chtimesheet')}{/if} {if $bean->getAttribute('chfiles')}{/if} {if $use_checkboxes}{/if} - {* column for edit icons *} - - + {* column for edit icons *} + + {/if} {$first_pass = false} {/if} + {* print regular row *} + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="control_name" value='user_field_'|cat:$userField['id']} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + {if $use_checkboxes} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + {if $item.approved || $item.timesheet_id || $item.invoice_id} + + {else} + {if 1 == $item.type}{/if} + {if 2 == $item.type}{/if} + {/if} + + {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} + + + + {/if} + {$prev_date = $item.date} + {if $print_subtotals} {$prev_grouped_by = $item.grouped_by} {/if} {/foreach} + {* print a terminating subtotal *} + {if $print_subtotals} + + + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} + + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} + + {/if} + {* print totals *} + + + {/if} + {* user custom fileds *} + {if isset($custom_fields) && $custom_fields->userFields} + {foreach $custom_fields->userFields as $userField} + {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chclient')}{/if} + {if $bean->getAttribute('chproject')}{/if} + {if $bean->getAttribute('chtask')}{/if} + {* time custom fileds *} + {if isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} + {if $bean->getAttribute('chstart')}{/if} + {if $bean->getAttribute('chfinish')}{/if} + {if $bean->getAttribute('chduration')}{/if} + {if $bean->getAttribute('chunits')}{/if} + {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} + {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chapproved')}{/if} + {if $bean->getAttribute('chpaid')}{/if} + {if $bean->getAttribute('chip')}{/if} + {if $bean->getAttribute('chinvoice')}{/if} + {if $bean->getAttribute('chtimesheet')}{/if} + {if $bean->getAttribute('chfiles')}{/if} + {if $use_checkboxes}{/if} + {* column for edit icons *} +
{$i18n.label.date}
{$i18n.label.subtotal}{$subtotals[$prev_grouped_by]['user']|escape}
{$i18n.label.subtotal}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
 
 
{$item.date}{$item.user|escape}{$item.$control_name|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.$control_name|escape}{$item.start}{$item.finish}{$item.duration}{$item.units}{$item.note|escape}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.approved == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{$item.invoice|escape}{$item.timesheet_name|escape}{if $item.has_files}{$i18n.label.files}{/if}{if $item.has_files}{$i18n.label.files}{/if} {$i18n.label.edit}{$i18n.label.edit}
{$i18n.label.note} + {$item.note|escape}
{$i18n.label.subtotal}{$subtotals[$cur_grouped_by]['user']|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}{$subtotals[$cur_grouped_by]['time']}{$subtotals[$cur_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
 
{$i18n.label.total} + {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
{/if} {$forms.reportViewForm.close} diff --git a/default.css b/default.css index 48a3fb58a..533b3ff78 100644 --- a/default.css +++ b/default.css @@ -200,6 +200,11 @@ div.page-hint { text-align: right; } +/* cell containign a subtotal */ +.subtotal-cell { + font-weight: bold; +} + /* control labels for large screens */ .large-screen-label { text-align: right; diff --git a/initialize.php b/initialize.php index 40135a55a..44c2a02cd 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5525"); +define("APP_VERSION", "1.19.28.5526"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 05612acdd7987d0e3d15098ce197ea14284d0d46 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 7 May 2021 19:25:30 +0000 Subject: [PATCH 2208/2515] Made report.php mobile friendly. --- WEB-INF/templates/report.tpl | 331 ------------------------ WEB-INF/templates/report2.tpl | 306 ++-------------------- WEB-INF/templates/reports.tpl | 459 --------------------------------- WEB-INF/templates/reports2.tpl | 3 + default.css | 1 + initialize.php | 2 +- report.php | 14 +- report2.php | 313 ---------------------- 8 files changed, 35 insertions(+), 1394 deletions(-) delete mode 100644 WEB-INF/templates/report.tpl delete mode 100644 WEB-INF/templates/reports.tpl delete mode 100644 report2.php diff --git a/WEB-INF/templates/report.tpl b/WEB-INF/templates/report.tpl deleted file mode 100644 index 02b59e9ef..000000000 --- a/WEB-INF/templates/report.tpl +++ /dev/null @@ -1,331 +0,0 @@ - - -{$forms.reportViewForm.open} - - - -
- - - - -
{$i18n.form.report.export} {if file_exists('WEB-INF/lib/tcpdf')}PDF,{/if} XML {$i18n.label.or} CSV
- - -{if $bean->getAttribute('chtotalsonly')} - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - - {foreach $subtotals as $subtotal} - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - - {/foreach} - - - - - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chcost')}{/if} - -{else} - - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - - {foreach $report_items as $item} - - {$cur_date = $item.date} - {if $print_subtotals} - {$cur_grouped_by = $item.grouped_by} - {if $cur_grouped_by != $prev_grouped_by && !$first_pass} - - {/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - - - {/if} - {$first_pass = false} - {/if} - - {if $cur_date != $prev_date} - {if $report_row_class == 'rowReportItem'} {$report_row_class = 'rowReportItemAlt'} {else} {$report_row_class = 'rowReportItem'} {/if} - {/if} - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="control_name" value='user_field_'|cat:$userField['id']} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - {if $use_checkboxes} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - {if $item.approved || $item.timesheet_id || $item.invoice_id} - - {else} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - - {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} - - - - - {/if} - {$prev_date = $item.date} - {if $print_subtotals} {$prev_grouped_by = $item.grouped_by} {/if} - {/foreach} - - {if $print_subtotals} - - {/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - - {/if} - - - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - -{/if} -
{$group_by_header|escape}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.cost}
{if $subtotal['name']}{$subtotal['name']|escape}{else} {/if}{$subtotal['time']}{$subtotal['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotal['cost']}{else}{$subtotal['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
{$i18n.label.date}{$i18n.label.user}{{$userField['label']|escape}}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{{$timeField['label']|escape}}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.note}{$i18n.label.cost}{$i18n.label.approved}{$i18n.label.paid}{$i18n.label.ip}{$i18n.label.invoice}{$i18n.label.timesheet}
{$i18n.label.subtotal} - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
 
{$item.date}{$item.user|escape}{$item.$control_name|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.$control_name|escape}{$item.start}{$item.finish}{$item.duration}{$item.units}{$item.note|escape}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.approved == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{$item.invoice|escape}{$item.timesheet_name|escape}{if $item.has_files}{$i18n.label.files}{/if}{if $item.has_files}{$i18n.label.files}{/if} {$i18n.label.edit}{$i18n.label.edit}
{$i18n.label.note}:{$item.note|escape}
{$i18n.label.subtotal} - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$cur_grouped_by]['user']|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}{$subtotals[$cur_grouped_by]['time']}{$subtotals[$cur_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
-
-{if $report_items && ($use_mark_approved || $use_mark_paid || $use_assign_to_invoice || $use_assign_to_timesheet)} - - {if $use_mark_approved} - - - - {/if} - {if $use_mark_paid} - - - - {/if} - {if $use_assign_to_invoice} - - - - {/if} - {if $use_assign_to_timesheet} - - - - {/if} -
- - -
{$i18n.label.mark_approved}: {$forms.reportViewForm.mark_approved_select_options.control} {$forms.reportViewForm.mark_approved_action_options.control} {$forms.reportViewForm.btn_mark_approved.control}
-
- - -
{$i18n.label.mark_paid}: {$forms.reportViewForm.mark_paid_select_options.control} {$forms.reportViewForm.mark_paid_action_options.control} {$forms.reportViewForm.btn_mark_paid.control}
-
- - -
{$i18n.form.report.assign_to_invoice}: {$forms.reportViewForm.assign_invoice_select_options.control} {$forms.reportViewForm.recent_invoice.control} {$forms.reportViewForm.btn_assign_invoice.control}
-
- - -
{$i18n.form.report.assign_to_timesheet}: {$forms.reportViewForm.assign_timesheet_select_options.control} {$forms.reportViewForm.timesheet.control} {$forms.reportViewForm.btn_assign_timesheet.control}
-
-{/if} -{$forms.reportViewForm.close} - - - - - -
- - - - -
-
diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report2.tpl index db065ac94..b66d86c05 100644 --- a/WEB-INF/templates/report2.tpl +++ b/WEB-INF/templates/report2.tpl @@ -247,310 +247,42 @@
{/if} -{$forms.reportViewForm.close} - - - - - - -{$forms.reportViewForm.open} - - - -
- - -{if $bean->getAttribute('chtotalsonly')} -{else} - - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - - {foreach $report_items as $item} - - {$cur_date = $item.date} - {if $print_subtotals} - {$cur_grouped_by = $item.grouped_by} - {if $cur_grouped_by != $prev_grouped_by && !$first_pass} - - {/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - - - {/if} - {$first_pass = false} - {/if} - - {if $cur_date != $prev_date} - {if $report_row_class == 'rowReportItem'} {$report_row_class = 'rowReportItemAlt'} {else} {$report_row_class = 'rowReportItem'} {/if} - {/if} - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="control_name" value='user_field_'|cat:$userField['id']} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - {if $use_checkboxes} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - {if $item.approved || $item.timesheet_id || $item.invoice_id} - - {else} - {if 1 == $item.type}{/if} - {if 2 == $item.type}{/if} - {/if} - - {if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note} - - - - - {/if} - {$prev_date = $item.date} - {if $print_subtotals} {$prev_grouped_by = $item.grouped_by} {/if} - {/foreach} - - {if $print_subtotals} - - {/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - - {/if} - - - - - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - - {* user custom fileds *} - {if isset($custom_fields) && $custom_fields->userFields} - {foreach $custom_fields->userFields as $userField} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chclient')}{/if} - {if $bean->getAttribute('chproject')}{/if} - {if $bean->getAttribute('chtask')}{/if} - - {* time custom fileds *} - {if isset($custom_fields) && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - {if $bean->getAttribute($checkbox_control_name)}{/if} - {/foreach} - {/if} - - {if $bean->getAttribute('chstart')}{/if} - {if $bean->getAttribute('chfinish')}{/if} - {if $bean->getAttribute('chduration')}{/if} - {if $bean->getAttribute('chunits')}{/if} - {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} - {if $bean->getAttribute('chapproved')}{/if} - {if $bean->getAttribute('chpaid')}{/if} - {if $bean->getAttribute('chip')}{/if} - {if $bean->getAttribute('chinvoice')}{/if} - {if $bean->getAttribute('chtimesheet')}{/if} - {if $bean->getAttribute('chfiles')}{/if} - {if $use_checkboxes}{/if} - {* column for edit icons *} - -{/if} -
{$i18n.label.date}{$i18n.label.user}{{$userField['label']|escape}}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{{$timeField['label']|escape}}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.note}{$i18n.label.cost}{$i18n.label.approved}{$i18n.label.paid}{$i18n.label.ip}{$i18n.label.invoice}{$i18n.label.timesheet}
{$i18n.label.subtotal} - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
 
{$item.date}{$item.user|escape}{$item.$control_name|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.$control_name|escape}{$item.start}{$item.finish}{$item.duration}{$item.units}{$item.note|escape}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.approved == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{$item.invoice|escape}{$item.timesheet_name|escape}{if $item.has_files}{$i18n.label.files}{/if}{if $item.has_files}{$i18n.label.files}{/if} {$i18n.label.edit}{$i18n.label.edit}
{$i18n.label.note}:{$item.note|escape}
{$i18n.label.subtotal} - {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{$subtotals[$cur_grouped_by]['user']|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}{$subtotals[$cur_grouped_by]['time']}{$subtotals[$cur_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
 
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}
-
{if $report_items && ($use_mark_approved || $use_mark_paid || $use_assign_to_invoice || $use_assign_to_timesheet)} - +
+
{if $use_mark_approved} + - + + + {/if} {if $use_mark_paid} + - + + + {/if} {if $use_assign_to_invoice} + - + + + {/if} {if $use_assign_to_timesheet} + - + + + {/if}
{$forms.reportViewForm.mark_approved_select_options.control}
- - -
{$i18n.label.mark_approved}: {$forms.reportViewForm.mark_approved_select_options.control} {$forms.reportViewForm.mark_approved_action_options.control} {$forms.reportViewForm.btn_mark_approved.control}
-
{$forms.reportViewForm.mark_approved_action_options.control} {$forms.reportViewForm.btn_mark_approved.control}
{$forms.reportViewForm.mark_paid_select_options.control}
- - -
{$i18n.label.mark_paid}: {$forms.reportViewForm.mark_paid_select_options.control} {$forms.reportViewForm.mark_paid_action_options.control} {$forms.reportViewForm.btn_mark_paid.control}
-
{$forms.reportViewForm.mark_paid_action_options.control} {$forms.reportViewForm.btn_mark_paid.control}
{$forms.reportViewForm.assign_invoice_select_options.control}
- - -
{$i18n.form.report.assign_to_invoice}: {$forms.reportViewForm.assign_invoice_select_options.control} {$forms.reportViewForm.recent_invoice.control} {$forms.reportViewForm.btn_assign_invoice.control}
-
{$forms.reportViewForm.recent_invoice.control} {$forms.reportViewForm.btn_assign_invoice.control}
{$forms.reportViewForm.assign_timesheet_select_options.control}
- - -
{$i18n.form.report.assign_to_timesheet}: {$forms.reportViewForm.assign_timesheet_select_options.control} {$forms.reportViewForm.timesheet.control} {$forms.reportViewForm.btn_assign_timesheet.control}
-
{$forms.reportViewForm.timesheet.control} {$forms.reportViewForm.btn_assign_timesheet.control}
{/if} {$forms.reportViewForm.close} - - - - - -
- - - - -
-
+
diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl deleted file mode 100644 index 248584f5b..000000000 --- a/WEB-INF/templates/reports.tpl +++ /dev/null @@ -1,459 +0,0 @@ - - -{$forms.reportForm.open} -
- - - - -
- - - - - -
{$i18n.label.fav_report}:{$forms.reportForm.favorite_report.control}{$forms.reportForm.btn_generate.control} {$forms.reportForm.btn_delete.control}
-
-
- - - - - -
- - - - - - -{if $show_active_users} - - - - - - -{/if} -{if $show_inactive_users} - - - - - - -{/if} - - - - - - - - - - - - - - - - - - - -{if isset($custom_fields) && $custom_fields->timeFields} - - {foreach $custom_fields->timeFields as $timeField} - - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} - - - - {/foreach} -{/if} -{if isset($custom_fields) && $custom_fields->userFields} - - {foreach $custom_fields->userFields as $userField} - - - {assign var="control_name" value='user_field_'|cat:$userField['id']} - {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} - - - - {/foreach} -{/if} - - - - - - - - - -
- -{if $show_client} - - -{/if} -{if $show_project} - - -{/if} -{if $show_billable} - - -{/if} -{if $show_paid_status} - - -{/if} -
{$i18n.label.client}
{$forms.reportForm.client.control}
{$i18n.label.project}
{$forms.reportForm.project.control}
{$i18n.form.time.billable}
{$forms.reportForm.include_records.control}
{$i18n.label.paid_status}
{$forms.reportForm.paid_status.control}
-
- -{if $show_task} - - -{/if} -{if $show_approved} - - -{/if} -{if $show_invoice_dropdown} - - -{/if} -{if $show_timesheet_dropdown} - - -{/if} -
{$i18n.label.task}
{$forms.reportForm.task.control}
{$i18n.label.approved}
{$forms.reportForm.approved.control}
{$i18n.label.invoice}
{$forms.reportForm.invoice.control}
{$i18n.label.timesheet}
{$forms.reportForm.timesheet.control}
-
{if $show_inactive_users}{$i18n.label.active_users}{else}{$i18n.label.users}{/if}
{$forms.reportForm.users_active.control}
{$i18n.label.inactive_users}
{$forms.reportForm.users_inactive.control}
{$i18n.form.reports.select_period} {$i18n.form.reports.set_period}
{$forms.reportForm.period.control}{$i18n.label.start_date}:{$forms.reportForm.start_date.control}
{$i18n.label.end_date}:{$forms.reportForm.end_date.control}
{$i18n.form.reports.show_fields}
- - - - - - - -
- -{if $show_client} - -{/if} -{if $show_project} - -{/if} -{if $show_timesheet_checkbox} - -{/if} -
-
- -{if $show_start} - -{/if} -{if $show_task} - -{/if} -{if $show_ip} - -{/if} -{if $show_work_units} - -{/if} -
-
- -{if $show_finish} - -{/if} - -{if $show_approved} - -{/if} -{if $show_invoice_checkbox} - -{/if} -
-
- - - -{if $show_paid_status} - -{/if} -{if $show_files} - -{/if} -
-
-
{$i18n.form.reports.time_fields}
{$timeField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.user_fields}
{$userField['label']|escape}:{$forms.reportForm.$control_name.control}{$forms.reportForm.$checkbox_control_name.control}
{$i18n.form.reports.group_by}
{$forms.reportForm.group_by1.control}{$forms.reportForm.group_by2.control}{$forms.reportForm.group_by3.control}
- -
- - - - -
- - - - - -
{$i18n.form.reports.save_as_favorite}:{$forms.reportForm.new_fav_report.control}{$forms.reportForm.btn_save.control}
-
-
- - - -
{$forms.reportForm.btn_generate.control}
-
-{$forms.reportForm.close} diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports2.tpl index 3f272e112..294d5ea7c 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports2.tpl @@ -1,3 +1,6 @@ +{* Copyright (c) Anuko International Ltd. https://www.anuko.com +License: See license.txt *} + @@ -64,6 +67,8 @@ {if $bean->getAttribute('chinvoice')}
{$i18n.label.invoice}{$i18n.label.timesheet}
 
 
  {$i18n.label.edit}{$i18n.label.edit}
 
 
{$i18n.label.total} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}
{$i18n.label.note} + {$i18n.label.note} {$item.note|escape}
 
{$i18n.label.total} + {$i18n.label.total}
+ +{if $user_dropdown} + + + + + + +{/if} +{if $show_client} + + + + + + +{/if} +
{$forms.weekTimeForm.date.control}
{$forms.weekTimeForm.user.control}
{$forms.weekTimeForm.client.control}
+{$forms.weekTimeForm.close} + + + + +{$forms.weekTimeForm.open} + +{if $show_navigation} + + + +{/if} + + + + +
+ {$i18n.label.day_view} / {$i18n.label.week_view} +
+ +{if $user_dropdown} + + + + +{/if} +{if $show_client} + + + + +{/if} +{if $show_billable} + + + + +{/if} +{if $custom_fields && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + + + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + + {/foreach} +{/if} +{if $show_project} + + + + +{/if} +{if $show_task} + + + + +{/if} +{if $show_week_note} + + + + +{/if} +
{$i18n.label.user}:{$forms.weekTimeForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.weekTimeForm.client.control}
 
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.weekTimeForm.$control_name.control}
{$i18n.label.project} (*):{$forms.weekTimeForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:{$forms.weekTimeForm.task.control}
{$i18n.label.week_note}:{$forms.weekTimeForm.note.control}
+
+ + +
{$forms.weekTimeForm.date.control}
+
+ + + + +
{$forms.weekTimeForm.week_durations.control}
+ + + + + + +
{$forms.weekTimeForm.btn_submit.control}
 
+ +{if $show_week_list} + + + + +
+{if $time_records} + + + + {if $show_client} + + {/if} + {if $show_project} + + {/if} + {if $show_task} + + {/if} + {if $show_start} + + + {/if} + + + {if $show_files} + + {/if} + + + + {foreach $time_records as $record} + + + {if $show_client} + + {/if} + {if $show_project} + + {/if} + {if $show_task} + + {/if} + {if $show_start} + + + {/if} + + + {if $show_files} + {if $record.has_files} + + {else} + + {/if} + {/if} + + + + {/foreach} +
{$i18n.label.date}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.note}
{$record.date}{$record.client|escape}{$record.project|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files} + {if $record.approved || $record.timesheet_id || $record.invoice_id} +   + {else} + {$i18n.label.edit} + {/if} + + {if $record.approved || $record.timesheet_id || $record.invoice_id} +   + {else} + {$i18n.label.delete} + {/if} +
+{/if} +
+{/if} + +{if $time_records} + + {if $show_week_list} + + + + + {/if} + {if $user->isPluginEnabled('mq')} + + + {if $over_quota} + + {else} + + {/if} + + {/if} +
{$i18n.label.week_total}: {$week_total}
{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}
+{/if} +{$forms.weekTimeForm.close} diff --git a/initialize.php b/initialize.php index e7773d3d7..14c04798b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5530"); +define("APP_VERSION", "1.19.28.5531"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week2.php b/week2.php new file mode 100644 index 000000000..f97a515dc --- /dev/null +++ b/week2.php @@ -0,0 +1,559 @@ +isPluginEnabled('wv')) { + header('Location: feature_disabled.php'); + exit(); +} +if ($user->behalf_id && (!$user->can('track_time') || !$user->checkBehalfId())) { + header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. + exit(); +} +if (!$user->behalf_id && !$user->can('track_own_time') && !$user->adjustBehalfId()) { + header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to work on behalf. + exit(); +} +if ($request->isPost()) { + $userChanged = (bool)$request->getParameter('user_changed'); // Reused in multiple places below. + if ($userChanged && !($user->can('track_time') && $user->isUserValid((int)$request->getParameter('user')))) { + header('Location: access_denied.php'); // User changed, but no right or wrong user id. + exit(); + } +} +// End of access checks. + +// Determine user for whom we display this page. +if ($request->isPost() && $userChanged) { + $user_id = (int)$request->getParameter('user'); + $user->setOnBehalfUser($user_id); +} else { + $user_id = $user->getUser(); +} + +$group_id = $user->getGroup(); + +$showClient = $user->isPluginEnabled('cl'); +$showBillable = $user->isPluginEnabled('iv'); +$trackingMode = $user->getTrackingMode(); +$showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; +$showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +if ($showTask) $taskRequired = $user->getConfigOption('task_required'); +$showWeekNote = $user->isOptionEnabled('week_note'); +$showWeekNotes = $user->isOptionEnabled('week_notes'); +$recordType = $user->getRecordType(); +$showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; +$showFiles = $user->isPluginEnabled('at'); + +// Initialize and store date in session. +$cl_date = $request->getParameter('date', @$_SESSION['date']); +$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); +if($selected_date->isError()) + $selected_date = new DateAndTime(DB_DATEFORMAT); +if(!$cl_date) + $cl_date = $selected_date->toString(DB_DATEFORMAT); +$_SESSION['date'] = $cl_date; + +// Determine selected week start and end dates. +$weekStartDay = $user->getWeekStart(); +$t_arr = localtime($selected_date->getTimestamp()); +$t_arr[5] = $t_arr[5] + 1900; +if ($t_arr[6] < $weekStartDay) + $startWeekBias = $weekStartDay - 7; +else + $startWeekBias = $weekStartDay; +$startDate = new DateAndTime(); +$startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); +$endDate = new DateAndTime(); +$endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); +// The above is needed to set date range (timestring) in page title. + +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + +// Use Monthly Quotas plugin, if applicable. +if ($user->isPluginEnabled('mq')){ + require_once('plugins/MonthlyQuota.class.php'); + $quota = new MonthlyQuota(); + $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth); + $month_total = ttTimeHelper::getTimeForMonth($selected_date); + $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total); + + $smarty->assign('month_total', $month_total); + $smarty->assign('over_quota', $minutes_left < 0); + $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); +} + +// Initialize variables. +$cl_billable = 1; +if ($showBillable) { + if ($request->isPost()) { + $cl_billable = $request->getParameter('billable'); + $_SESSION['billable'] = (int) $cl_billable; + } else + if (isset($_SESSION['billable'])) + $cl_billable = $_SESSION['billable']; +} +$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client'])); +$_SESSION['client'] = $cl_client; +$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project'])); +$_SESSION['project'] = $cl_project; +$cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); +$_SESSION['task'] = $cl_task; +$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); +$_SESSION['note'] = $cl_note; + +$timeCustomFields = array(); +// If we have time custom fields - collect input. +if ($request->isPost()) { + if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $control_name = 'time_field_'.$timeField['id']; + $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], + 'control_name' => $control_name, + 'label' => $timeField['label'], + 'type' => $timeField['type'], + 'required' => $timeField['required'], + 'value' => trim($request->getParameter($control_name))); + } + } +} + +// Get the data we need to display week view. +// Get column headers, which are day numbers in month. +$dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT)); +$lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT)); +// Get already existing records. +$records = ttWeekViewHelper::getRecordsForInterval($startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $showFiles); +// Build data array for the table. Format is described in ttWeekViewHelper::getDataForWeekView function. +if ($records) + $dataArray = ttWeekViewHelper::getDataForWeekView($records, $dayHeaders); +else + $dataArray = ttWeekViewHelper::prePopulateFromPastWeeks($startDate->toString(DB_DATEFORMAT), $dayHeaders); + +// Build day totals (total durations for each day in week). +$dayTotals = ttWeekViewHelper::getDayTotals($dataArray, $dayHeaders); + +// Define rendering class for a label field to the left of durations. +class LabelCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + global $user; + $showNotes = $user->isOptionEnabled('week_notes'); + + $this->setOptions(array('width'=>200,'valign'=>'middle')); + + // Special handling for a new week entry (row 0, or 0 and 1 if we show notes). + if (0 == $row) { + $this->setOptions(array('style'=>'text-align: center; font-weight: bold; vertical-align: top;')); + } else if ($showNotes && (1 == $row)) { + $this->setOptions(array('style'=>'text-align: right; vertical-align: top;')); + } else if ($showNotes && (0 != $row % 2)) { + $this->setOptions(array('style'=>'text-align: right;')); + } + // Special handling for not billable entries. + $ignoreRow = $showNotes ? 1 : 0; + if ($row > $ignoreRow) { + $row_id = $table->getValueAtName($row,'row_id'); + $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl'); + if (!$billable) { + if (($showNotes && (0 == $row % 2)) || !$showNotes) { + $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. + } + } + } + $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. + return $this->toString(); + } +} + +// Define rendering class for a single cell for a time or a comment entry in week view table. +class WeekViewCellRenderer extends DefaultCellRenderer { + function render(&$table, $value, $row, $column, $selected = false) { + global $user; + $showNotes = $user->isOptionEnabled('week_notes'); + + $field_name = $table->getValueAt($row,$column)['control_id']; // Our text field names (and ids) are like x_y (row_column). + $field = new TextField($field_name); + // Disable control if the date is locked. + global $lockedDays; + if ($lockedDays[$column-1]) + $field->setEnabled(false); + $field->setFormName($table->getFormName()); + $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. + // Provide visual separation for new entry row. + $rowToSeparate = $showNotes ? 1 : 0; + if ($rowToSeparate == $row) { + $field->setStyle('width: 60px; margin-bottom: 40px'); + } + if ($showNotes) { + if (0 == $row % 2) { + $field->setValue($table->getValueAt($row,$column)['duration']); // Duration for even rows. + } else { + $field->setValue($table->getValueAt($row,$column)['note']); // Comment for odd rows. + $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to help view the entire comment. + } + } else { + $field->setValue($table->getValueAt($row,$column)['duration']); + // $field->setTitle($table->getValueAt($row,$column)['note']); // Tooltip to see comment. TODO - value not available. + } + // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control + // because we can't supply start and finish times in week view - there are no fields for them. + if (!$field->getValue() && TYPE_START_FINISH == $user->getRecordType()) { + $field->setEnabled(false); + } + $this->setValue($field->getHtml()); + return $this->toString(); + } +} + +// Elements of weekTimeForm. +$form = new Form('weekTimeForm'); +$largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. + +if ($user->can('track_time')) { + $rank = $user->getMaxRankForGroup($group_id); + if ($user->can('track_own_time')) + $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true); + else + $options = array('status'=>ACTIVE,'max_rank'=>$rank); + $user_list = $user->getUsers($options); + if (count($user_list) >= 1) { + $form->addInput(array('type'=>'combobox', + 'onchange'=>'document.weekTimeForm.user_changed.value=1;document.weekTimeForm.submit();', + 'name'=>'user', + 'style'=>'width: 250px;', + 'value'=>$user_id, + 'data'=>$user_list, + 'datakeys'=>array('id','name'))); + $form->addInput(array('type'=>'hidden','name'=>'user_changed')); + $largeScreenCalendarRowSpan += 2; + $smarty->assign('user_dropdown', 1); + } +} + +// Create week_durations table. +$table = new Table('week_durations'); +// $table->setCssClass('week_view_table'); // Currently not used. Fix this. +$table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0')); +$table->setRowOptions(array('class'=>'tableHeaderCentered')); +$table->setData($dataArray); +// Add columns to table. +$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); +for ($i = 0; $i < 7; $i++) { + $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); +} +$table->setInteractive(false); +$form->addInputElement($table); + +// Dropdown for clients in MODE_TIME. Use all active clients. +if (MODE_TIME == $trackingMode && $showClient) { + $active_clients = ttGroupHelper::getActiveClients(true); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'style'=>'width: 250px;', + 'value'=>$cl_client, + 'data'=>$active_clients, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; + // Note: in other modes the client list is filtered to relevant clients only. See below. +} + +// Billable checkbox. +if ($user->isPluginEnabled('iv')) + $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); + +// If we have time custom fields - add controls for them. +if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + if ($timeField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); + } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', + 'data'=>CustomFields::getOptions($timeField['id']), + 'value'=>$timeCustomFields[$timeField['id']]['value'], + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } +} + +// If we show project dropdown, add controls for project and client. +if ($showProject) { + // Dropdown for projects assigned to user. + $project_list = $user->getAssignedProjects(); + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillTaskDropdown(this.value);', + 'name'=>'project', + 'style'=>'width: 250px;', + 'value'=>$cl_project, + 'data'=>$project_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + + // Dropdown for clients if the clients plugin is enabled. + if ($showClient) { + $active_clients = ttGroupHelper::getActiveClients(true); + // We need an array of assigned project ids to do some trimming. + foreach($project_list as $project) + $projects_assigned_to_user[] = $project['id']; + + // Build a client list out of active clients. Use only clients that are relevant to user. + // Also trim their associated project list to only assigned projects (to user). + foreach($active_clients as $client) { + $projects_assigned_to_client = explode(',', $client['projects']); + if (is_array($projects_assigned_to_client) && is_array($projects_assigned_to_user)) + $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user); + if ($intersection) { + $client['projects'] = implode(',', $intersection); + $client_list[] = $client; + } + } + $form->addInput(array('type'=>'combobox', + 'onchange'=>'fillProjectDropdown(this.value);', + 'name'=>'client', + 'style'=>'width: 250px;', + 'value'=>$cl_client, + 'data'=>$client_list, + 'datakeys'=>array('id', 'name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } +} + +// Task dropdown. +if ($showTask) { + $task_list = ttGroupHelper::getActiveTasks(); + $form->addInput(array('type'=>'combobox', + 'name'=>'task', + 'style'=>'width: 250px;', + 'value'=>$cl_task, + 'data'=>$task_list, + 'datakeys'=>array('id','name'), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); +} + +// Week note control. +if ($showWeekNote) { + if (!defined('NOTE_INPUT_HEIGHT')) + define('NOTE_INPUT_HEIGHT', 40); + $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); +} + +// Calendar. +$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); + +// A hidden control for today's date from user's browser. +$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'get_date()')); // User current date, which gets filled in on btn_submit click. + +// Submit button. +$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.submit'))); + +// Submit. +if ($request->isPost()) { + if ($request->getParameter('btn_submit')) { + // Validate user input for row 0. + // Determine if a new entry was posted. + $newEntryPosted = false; + foreach($dayHeaders as $dayHeader) { + $control_id = '0_'.$dayHeader; + if ($request->getParameter($control_id)) { + $newEntryPosted = true; + break; + } + } + if ($newEntryPosted) { + if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) + $err->add($i18n->get('error.client')); + // Validate input in time custom fields. + if ($custom_fields && $custom_fields->timeFields) { + foreach ($timeCustomFields as $timeField) { + // Validation is the same for text and dropdown fields. + if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); + } + } + if ($showProject) { + if (!$cl_project) $err->add($i18n->get('error.project')); + } + if ($showTask && $taskRequired) { + if (!$cl_task) $err->add($i18n->get('error.task')); + } + } + // Finished validating user input for row 0. + + // Process the table of values. + if ($err->no()) { + + // Obtain values. Iterate through posted parameters one by one, + // see if value changed, apply one change at a time until we see an error. + $result = true; + $rowNumber = 0; + // Iterate through existing rows. + foreach ($dataArray as $row) { + // Iterate through days. + foreach ($dayHeaders as $key => $dayHeader) { + // Do not process locked days. + if ($lockedDays[$key]) continue; + // Make control id for the cell. + $control_id = $rowNumber.'_'.$dayHeader; + + // Handle durations and comments in separate blocks of code. + if (!$showWeekNotes || (0 == $rowNumber % 2)) { + // Handle durations row here. + + // Obtain existing and posted durations. + $postedDuration = $request->getParameter($control_id); + $existingDuration = $dataArray[$rowNumber][$dayHeader]['duration']; + // If posted value is not null, check and normalize it. + if ($postedDuration) { + if (false === ttTimeHelper::postedDurationToMinutes($postedDuration)) { + $err->add($i18n->get('error.field'), $i18n->get('label.duration')); + $result = false; break; // Break out. Stop any further processing. + } else { + $minutes = ttTimeHelper::postedDurationToMinutes($postedDuration); + $postedDuration = ttTimeHelper::minutesToDuration($minutes); + } + } + // Do not process if value has not changed. + if ($postedDuration == $existingDuration) + continue; + // Posted value is different. + if ($existingDuration == null) { + // Skip inserting 0 duration values. + if (0 == ttTimeHelper::toMinutes($postedDuration)) + continue; + // Insert a new record. + $fields = array(); + $fields['row_id'] = $dataArray[$rowNumber]['row_id']; + if (!$fields['row_id']) { + // Special handling for row 0, a new entry. Need to construct new row_id. + $record = array(); + $record['client_id'] = $cl_client; + $record['billable'] = $cl_billable ? '1' : '0'; + $record['project_id'] = $cl_project; + $record['task_id'] = $cl_task; + if ($custom_fields && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $field_name = 'time_field_'.$timeField['id']; + if ($timeField['type'] == CustomFields::TYPE_TEXT) + $record[$field_name] = $timeCustomFields[$timeField['id']]['value']; + else if ($timeField['type'] == CustomFields::TYPE_DROPDOWN) + $record[$field_name.'_option_id'] = $timeCustomFields[$timeField['id']]['value']; + } + } + $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; + // Note: no need to check for a possible conflict with an already existing row + // because we are doing an insert that does not affect already existing data. + + if ($showWeekNote) { + $fields['note'] = $request->getParameter('note'); + } + } + $fields['day_header'] = $dayHeader; + $fields['start_date'] = $startDate->toString(DB_DATEFORMAT); // To be able to determine date for the entry using $dayHeader. + $fields['duration'] = $postedDuration; + $fields['browser_today'] = $request->getParameter('browser_today', null); + if ($showWeekNotes) { + // Take note value from the control below duration. + $noteRowNumber = $rowNumber + 1; + $note_control_id = $noteRowNumber.'_'.$dayHeader; + $fields['note'] = $request->getParameter($note_control_id); + } + $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); + } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { + // Delete an already existing record here. + $result = ttTimeHelper::delete($dataArray[$rowNumber][$dayHeader]['tt_log_id']); + } else { + $fields = array(); + $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; + $fields['duration'] = $postedDuration; + $result = ttWeekViewHelper::modifyDurationFromWeekView($fields, $err); + } + if (!$result) break; // Break out of the loop in case of first error. + + } else if ($showWeekNotes) { + // Handle commments row here. + + // Obtain existing and posted comments. + $postedComment = $request->getParameter($control_id); + $existingComment = $dataArray[$rowNumber][$dayHeader]['note']; + // If posted value is not null, check it. + if ($postedComment && !ttValidString($postedComment, true)) { + $err->add($i18n->get('error.field'), $i18n->get('label.note')); + $result = false; break; // Break out. Stop any further processing. + } + // Do not process if value has not changed. + if ($postedComment == $existingComment) + continue; + + // Posted value is different. + // TODO: handle new entries separately in the durations block above. + + // Here, only update the comment on an already existing record. + $fields = array(); + $fields['tt_log_id'] = $dataArray[$rowNumber][$dayHeader]['tt_log_id']; + if ($fields['tt_log_id']) { + $fields['comment'] = $postedComment; + $result = ttWeekViewHelper::modifyCommentFromWeekView($fields); + } + if (!$result) break; // Break out of the loop on first error. + } + } + if (!$result) break; // Break out of the loop on first error. + $rowNumber++; + } + if ($result) { + header('Location: week.php'); // Normal exit. + exit(); + } + } + } +} // isPost + +$week_total = ttTimeHelper::getTimeForWeek($selected_date); + +$smarty->assign('large_screen_calendar_row_span', $largeScreenCalendarRowSpan); +$smarty->assign('selected_date', $selected_date); +$smarty->assign('week_total', $week_total); +$smarty->assign('client_list', $client_list); +$smarty->assign('project_list', $project_list); +$smarty->assign('task_list', $task_list); +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('onload', 'onLoad="fillDropdowns()"'); +$smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); +$smarty->assign('time_records', $records); +$smarty->assign('show_navigation', !$user->isOptionEnabled('week_menu')); +$smarty->assign('show_client', $showClient); +$smarty->assign('show_billable', $showBillable); +$smarty->assign('show_project', $showProject); +$smarty->assign('show_task', $showTask); +$smarty->assign('task_required', $taskRequired); +$smarty->assign('show_week_note', $showWeekNote); +$smarty->assign('show_week_list', $user->isOptionEnabled('week_list')); +$smarty->assign('show_start', $showStart); +$smarty->assign('show_files', $showFiles); +$smarty->assign('title', $i18n->get('menu.week')); +$smarty->assign('content_page_name', 'week2.tpl'); +$smarty->display('index2.tpl'); From e7ec5231bd04c2d5cc430746cac8572c06bc1653 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 13:43:14 +0000 Subject: [PATCH 2213/2515] A bit more progress towards making week view mobile friendly. --- WEB-INF/templates/week2.tpl | 42 +++++++++++++++++++++++++++++++++++++ default.css | 4 ++-- initialize.php | 2 +- time.php | 4 +++- week2.php | 27 ++++++++++++------------ 5 files changed, 61 insertions(+), 18 deletions(-) diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week2.tpl index b46e9804f..b09a11988 100644 --- a/WEB-INF/templates/week2.tpl +++ b/WEB-INF/templates/week2.tpl @@ -51,6 +51,48 @@ function fillDropdowns() {
 
{$forms.weekTimeForm.$control_name.control}
{$forms.weekTimeForm.project.control}
{$forms.weekTimeForm.task.control}
{$forms.weekTimeForm.week_note.control}
{$forms.weekTimeForm.close} diff --git a/default.css b/default.css index e04cab3d5..48cd2c4e8 100644 --- a/default.css +++ b/default.css @@ -363,7 +363,7 @@ input[type="text"].short-text-field { } /* textareas for fields */ -#description, #address, #item_name, #comment, #custom_css, #content { +#description, #address, #item_name, #comment, #custom_css, #content, #week_note { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; @@ -371,7 +371,7 @@ input[type="text"].short-text-field { } /* textareas with focus */ -#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus { +#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus, #week_note:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index 14c04798b..09214a387 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5531"); +define("APP_VERSION", "1.19.28.5532"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index d96c497e3..9b366b543 100644 --- a/time.php +++ b/time.php @@ -192,8 +192,10 @@ } // Billable checkbox. -if ($showBillable) +if ($showBillable) { $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); + $largeScreenCalendarRowSpan += 2; +} // If we have time custom fields - add controls for them. if (isset($custom_fields) && $custom_fields->timeFields) { diff --git a/week2.php b/week2.php index f97a515dc..6fccba9cd 100644 --- a/week2.php +++ b/week2.php @@ -121,8 +121,8 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); -$_SESSION['note'] = $cl_note; +$cl_note = $request->getParameter('week_note', ($request->isPost() ? null : @$_SESSION['week_note'])); +$_SESSION['week_note'] = $cl_note; $timeCustomFields = array(); // If we have time custom fields - collect input. @@ -242,7 +242,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'document.weekTimeForm.user_changed.value=1;document.weekTimeForm.submit();', 'name'=>'user', - 'style'=>'width: 250px;', 'value'=>$user_id, 'data'=>$user_list, 'datakeys'=>array('id','name'))); @@ -272,7 +271,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$active_clients, 'datakeys'=>array('id', 'name'), @@ -282,22 +280,24 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Billable checkbox. -if ($user->isPluginEnabled('iv')) +if ($showBillable) { $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); + $largeScreenCalendarRowSpan += 2; +} // If we have time custom fields - add controls for them. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); + $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$timeCustomFields[$timeField['id']]['value'])); } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($timeField['id']), 'value'=>$timeCustomFields[$timeField['id']]['value'], 'empty'=>array(''=>$i18n->get('dropdown.select')))); } + $largeScreenCalendarRowSpan += 2; } } @@ -308,11 +308,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillTaskDropdown(this.value);', 'name'=>'project', - 'style'=>'width: 250px;', 'value'=>$cl_project, 'data'=>$project_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; // Dropdown for clients if the clients plugin is enabled. if ($showClient) { @@ -335,11 +335,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$client_list, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; } } @@ -348,18 +348,17 @@ function render(&$table, $value, $row, $column, $selected = false) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', 'name'=>'task', - 'style'=>'width: 250px;', 'value'=>$cl_task, 'data'=>$task_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; } // Week note control. if ($showWeekNote) { - if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); - $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); + $form->addInput(array('type'=>'textarea','name'=>'week_note','value'=>$cl_note)); + $largeScreenCalendarRowSpan += 2; } // Calendar. @@ -468,7 +467,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // because we are doing an insert that does not affect already existing data. if ($showWeekNote) { - $fields['note'] = $request->getParameter('note'); + $fields['note'] = $request->getParameter('week_note'); } } $fields['day_header'] = $dayHeader; From d09c4858e797b620335255e38c84c9e423dc8e4c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 15:57:52 +0000 Subject: [PATCH 2214/2515] Made week view mobile friendly. --- WEB-INF/templates/week2.tpl | 183 ++++++++++-------------------------- default.css | 4 +- initialize.php | 2 +- week.php | 39 ++++---- week2.php => week_old.php | 35 ++++--- 5 files changed, 90 insertions(+), 173 deletions(-) rename week2.php => week_old.php (96%) diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week2.tpl index b09a11988..7f77b0ad9 100644 --- a/WEB-INF/templates/week2.tpl +++ b/WEB-INF/templates/week2.tpl @@ -86,193 +86,108 @@ function fillDropdowns() {
{$forms.weekTimeForm.week_note.control}{$forms.weekTimeForm.comment.control}
-{$forms.weekTimeForm.close} - - - - -{$forms.weekTimeForm.open} - -{if $show_navigation} - - - -{/if} +
+
- {$i18n.label.day_view} / {$i18n.label.week_view} -
- - - -
- -{if $user_dropdown} - - - - -{/if} -{if $show_client} - - - - -{/if} -{if $show_billable} - - - - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - - {/foreach} -{/if} -{if $show_project} - - - - -{/if} -{if $show_task} - - - - -{/if} -{if $show_week_note} - - - - -{/if} -
{$i18n.label.user}:{$forms.weekTimeForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.weekTimeForm.client.control}
 
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.weekTimeForm.$control_name.control}
{$i18n.label.project} (*):{$forms.weekTimeForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:{$forms.weekTimeForm.task.control}
{$i18n.label.week_note}:{$forms.weekTimeForm.note.control}
-
- - -
{$forms.weekTimeForm.date.control}
-
- -
{$forms.weekTimeForm.week_durations.control}
- - - - - - -
{$forms.weekTimeForm.btn_submit.control}
 
+
{$forms.weekTimeForm.btn_submit.control}
+{$forms.weekTimeForm.close} {if $show_week_list} - - - -
-{if $time_records} - - - +
+
{$i18n.label.date}
+ + {if $show_client} - + {/if} {if $show_project} - + {/if} {if $show_task} - + {/if} {if $show_start} - - + + {/if} - - + + {if $show_files} - + {/if} - - - + + + {foreach $time_records as $record} - - + + {if $show_client} - + {/if} {if $show_project} - + {/if} {if $show_task} - + {/if} {if $show_start} - - + + {/if} - - + + {if $show_files} {if $record.has_files} - + {else} - + {/if} {/if} - - + - + + {/foreach} -
{$i18n.label.date}{$i18n.label.client}{$i18n.label.client}{$i18n.label.project}{$i18n.label.project}{$i18n.label.task}{$i18n.label.task}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.note}{$i18n.label.duration}{$i18n.label.note}
{$record.date}
{$record.date}{$record.client|escape}{$record.client|escape}{$record.project|escape}{$record.project|escape}{$record.task|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files}{$i18n.label.files} + {if $record.approved || $record.timesheet_id || $record.invoice_id} -   +   {else} - {$i18n.label.edit} + {$i18n.label.edit} {/if} - + {if $record.approved || $record.timesheet_id || $record.invoice_id} -   +   {else} - {$i18n.label.delete} + {$i18n.label.delete} {/if} -
-{/if} -
{/if} - {if $time_records} - - {if $show_week_list} +
+
- - + + - {/if} {if $user->isPluginEnabled('mq')} - + {if $over_quota} - + {else} - + {/if} {/if}
{$i18n.label.week_total}: {$week_total}{$i18n.label.week_total}: {$week_total}
{$i18n.label.month_total}: {$month_total}{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}
{/if} -{$forms.weekTimeForm.close} diff --git a/default.css b/default.css index 48cd2c4e8..e04cab3d5 100644 --- a/default.css +++ b/default.css @@ -363,7 +363,7 @@ input[type="text"].short-text-field { } /* textareas for fields */ -#description, #address, #item_name, #comment, #custom_css, #content, #week_note { +#description, #address, #item_name, #comment, #custom_css, #content { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; @@ -371,7 +371,7 @@ input[type="text"].short-text-field { } /* textareas with focus */ -#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus, #week_note:focus { +#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/initialize.php b/initialize.php index 09214a387..dc0c35452 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5532"); +define("APP_VERSION", "1.19.28.5533"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index 01597704d..dbb61529a 100644 --- a/week.php +++ b/week.php @@ -121,8 +121,8 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); -$_SESSION['note'] = $cl_note; +$cl_note = $request->getParameter('comment', ($request->isPost() ? null : @$_SESSION['comment'])); +$_SESSION['comment'] = $cl_note; $timeCustomFields = array(); // If we have time custom fields - collect input. @@ -229,6 +229,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // Elements of weekTimeForm. $form = new Form('weekTimeForm'); +$largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. if ($user->can('track_time')) { $rank = $user->getMaxRankForGroup($group_id); @@ -241,11 +242,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'document.weekTimeForm.user_changed.value=1;document.weekTimeForm.submit();', 'name'=>'user', - 'style'=>'width: 250px;', 'value'=>$user_id, 'data'=>$user_list, 'datakeys'=>array('id','name'))); $form->addInput(array('type'=>'hidden','name'=>'user_changed')); + $largeScreenCalendarRowSpan += 2; $smarty->assign('user_dropdown', 1); } } @@ -270,31 +271,33 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$active_clients, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; // Note: in other modes the client list is filtered to relevant clients only. See below. } // Billable checkbox. -if ($user->isPluginEnabled('iv')) +if ($showBillable) { $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); + $largeScreenCalendarRowSpan += 2; +} // If we have time custom fields - add controls for them. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); + $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$timeCustomFields[$timeField['id']]['value'])); } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, - 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($timeField['id']), 'value'=>$timeCustomFields[$timeField['id']]['value'], 'empty'=>array(''=>$i18n->get('dropdown.select')))); } + $largeScreenCalendarRowSpan += 2; } } @@ -305,11 +308,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillTaskDropdown(this.value);', 'name'=>'project', - 'style'=>'width: 250px;', 'value'=>$cl_project, 'data'=>$project_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; // Dropdown for clients if the clients plugin is enabled. if ($showClient) { @@ -332,11 +335,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', - 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$client_list, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; } } @@ -345,18 +348,17 @@ function render(&$table, $value, $row, $column, $selected = false) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', 'name'=>'task', - 'style'=>'width: 250px;', 'value'=>$cl_task, 'data'=>$task_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); + $largeScreenCalendarRowSpan += 2; } // Week note control. if ($showWeekNote) { - if (!defined('NOTE_INPUT_HEIGHT')) - define('NOTE_INPUT_HEIGHT', 40); - $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); + $form->addInput(array('type'=>'textarea','name'=>'comment','value'=>$cl_note)); + $largeScreenCalendarRowSpan += 2; } // Calendar. @@ -465,7 +467,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // because we are doing an insert that does not affect already existing data. if ($showWeekNote) { - $fields['note'] = $request->getParameter('note'); + $fields['note'] = $request->getParameter('comment'); } } $fields['day_header'] = $dayHeader; @@ -476,7 +478,9 @@ function render(&$table, $value, $row, $column, $selected = false) { // Take note value from the control below duration. $noteRowNumber = $rowNumber + 1; $note_control_id = $noteRowNumber.'_'.$dayHeader; - $fields['note'] = $request->getParameter($note_control_id); + if ($request->getParameter($note_control_id)) { + $fields['note'] = $request->getParameter($note_control_id); // This overwrites week note. + } } $result = ttWeekViewHelper::insertDurationFromWeekView($fields, $custom_fields, $err); } elseif ($postedDuration == null || 0 == ttTimeHelper::toMinutes($postedDuration)) { @@ -531,6 +535,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $week_total = ttTimeHelper::getTimeForWeek($selected_date); +$smarty->assign('large_screen_calendar_row_span', $largeScreenCalendarRowSpan); $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('client_list', $client_list); @@ -551,5 +556,5 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_start', $showStart); $smarty->assign('show_files', $showFiles); $smarty->assign('title', $i18n->get('menu.week')); -$smarty->assign('content_page_name', 'week.tpl'); -$smarty->display('index.tpl'); +$smarty->assign('content_page_name', 'week2.tpl'); +$smarty->display('index2.tpl'); diff --git a/week2.php b/week_old.php similarity index 96% rename from week2.php rename to week_old.php index 6fccba9cd..01597704d 100644 --- a/week2.php +++ b/week_old.php @@ -121,8 +121,8 @@ $_SESSION['project'] = $cl_project; $cl_task = $request->getParameter('task', ($request->isPost() ? null : @$_SESSION['task'])); $_SESSION['task'] = $cl_task; -$cl_note = $request->getParameter('week_note', ($request->isPost() ? null : @$_SESSION['week_note'])); -$_SESSION['week_note'] = $cl_note; +$cl_note = $request->getParameter('note', ($request->isPost() ? null : @$_SESSION['note'])); +$_SESSION['note'] = $cl_note; $timeCustomFields = array(); // If we have time custom fields - collect input. @@ -229,7 +229,6 @@ function render(&$table, $value, $row, $column, $selected = false) { // Elements of weekTimeForm. $form = new Form('weekTimeForm'); -$largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. if ($user->can('track_time')) { $rank = $user->getMaxRankForGroup($group_id); @@ -242,11 +241,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'document.weekTimeForm.user_changed.value=1;document.weekTimeForm.submit();', 'name'=>'user', + 'style'=>'width: 250px;', 'value'=>$user_id, 'data'=>$user_list, 'datakeys'=>array('id','name'))); $form->addInput(array('type'=>'hidden','name'=>'user_changed')); - $largeScreenCalendarRowSpan += 2; $smarty->assign('user_dropdown', 1); } } @@ -271,33 +270,31 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', + 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$active_clients, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $largeScreenCalendarRowSpan += 2; // Note: in other modes the client list is filtered to relevant clients only. See below. } // Billable checkbox. -if ($showBillable) { +if ($user->isPluginEnabled('iv')) $form->addInput(array('type'=>'checkbox','name'=>'billable','value'=>$cl_billable)); - $largeScreenCalendarRowSpan += 2; -} // If we have time custom fields - add controls for them. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { - $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$timeCustomFields[$timeField['id']]['value'])); + $form->addInput(array('type'=>'text','name'=>$field_name,'style'=>'width: 250px;','value'=>$timeCustomFields[$timeField['id']]['value'])); } elseif ($timeField['type'] == CustomFields::TYPE_DROPDOWN) { $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', 'data'=>CustomFields::getOptions($timeField['id']), 'value'=>$timeCustomFields[$timeField['id']]['value'], 'empty'=>array(''=>$i18n->get('dropdown.select')))); } - $largeScreenCalendarRowSpan += 2; } } @@ -308,11 +305,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillTaskDropdown(this.value);', 'name'=>'project', + 'style'=>'width: 250px;', 'value'=>$cl_project, 'data'=>$project_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $largeScreenCalendarRowSpan += 2; // Dropdown for clients if the clients plugin is enabled. if ($showClient) { @@ -335,11 +332,11 @@ function render(&$table, $value, $row, $column, $selected = false) { $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', + 'style'=>'width: 250px;', 'value'=>$cl_client, 'data'=>$client_list, 'datakeys'=>array('id', 'name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $largeScreenCalendarRowSpan += 2; } } @@ -348,17 +345,18 @@ function render(&$table, $value, $row, $column, $selected = false) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', 'name'=>'task', + 'style'=>'width: 250px;', 'value'=>$cl_task, 'data'=>$task_list, 'datakeys'=>array('id','name'), 'empty'=>array(''=>$i18n->get('dropdown.select')))); - $largeScreenCalendarRowSpan += 2; } // Week note control. if ($showWeekNote) { - $form->addInput(array('type'=>'textarea','name'=>'week_note','value'=>$cl_note)); - $largeScreenCalendarRowSpan += 2; + if (!defined('NOTE_INPUT_HEIGHT')) + define('NOTE_INPUT_HEIGHT', 40); + $form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 250px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note)); } // Calendar. @@ -467,7 +465,7 @@ function render(&$table, $value, $row, $column, $selected = false) { // because we are doing an insert that does not affect already existing data. if ($showWeekNote) { - $fields['note'] = $request->getParameter('week_note'); + $fields['note'] = $request->getParameter('note'); } } $fields['day_header'] = $dayHeader; @@ -533,7 +531,6 @@ function render(&$table, $value, $row, $column, $selected = false) { $week_total = ttTimeHelper::getTimeForWeek($selected_date); -$smarty->assign('large_screen_calendar_row_span', $largeScreenCalendarRowSpan); $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('client_list', $client_list); @@ -554,5 +551,5 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_start', $showStart); $smarty->assign('show_files', $showFiles); $smarty->assign('title', $i18n->get('menu.week')); -$smarty->assign('content_page_name', 'week2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'week.tpl'); +$smarty->display('index.tpl'); From 494d48957f43fc4ab1bb87e7e5b6371901ceb79d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 8 May 2021 17:43:22 +0000 Subject: [PATCH 2215/2515] It is hard to believe but the entire app is now mobile friendly. --- WEB-INF/templates/week.tpl | 200 ------------- WEB-INF/templates/week2.tpl | 9 +- initialize.php | 2 +- week_old.php | 555 ------------------------------------ 4 files changed, 2 insertions(+), 764 deletions(-) delete mode 100644 WEB-INF/templates/week.tpl delete mode 100644 week_old.php diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl deleted file mode 100644 index 92ce31d92..000000000 --- a/WEB-INF/templates/week.tpl +++ /dev/null @@ -1,200 +0,0 @@ -{include file="time_script.tpl"} - - - - - -{$forms.weekTimeForm.open} - -{if $show_navigation} - - - -{/if} - - - - -
- {$i18n.label.day_view} / {$i18n.label.week_view} -
- -{if $user_dropdown} - - - - -{/if} -{if $show_client} - - - - -{/if} -{if $show_billable} - - - - -{/if} -{if $custom_fields && $custom_fields->timeFields} - {foreach $custom_fields->timeFields as $timeField} - - - {assign var="control_name" value='time_field_'|cat:$timeField['id']} - - - {/foreach} -{/if} -{if $show_project} - - - - -{/if} -{if $show_task} - - - - -{/if} -{if $show_week_note} - - - - -{/if} -
{$i18n.label.user}:{$forms.weekTimeForm.user.control}
{$i18n.label.client}{if $user->isOptionEnabled('client_required')} (*){/if}:{$forms.weekTimeForm.client.control}
 
{$timeField['label']|escape}{if $timeField['required']} (*){/if}:{$forms.weekTimeForm.$control_name.control}
{$i18n.label.project} (*):{$forms.weekTimeForm.project.control}
{$i18n.label.task}{if $task_required} (*){/if}:{$forms.weekTimeForm.task.control}
{$i18n.label.week_note}:{$forms.weekTimeForm.note.control}
-
- - -
{$forms.weekTimeForm.date.control}
-
- - - - -
{$forms.weekTimeForm.week_durations.control}
- - - - - - -
{$forms.weekTimeForm.btn_submit.control}
 
- -{if $show_week_list} - - - - -
-{if $time_records} - - - - {if $show_client} - - {/if} - {if $show_project} - - {/if} - {if $show_task} - - {/if} - {if $show_start} - - - {/if} - - - {if $show_files} - - {/if} - - - - {foreach $time_records as $record} - - - {if $show_client} - - {/if} - {if $show_project} - - {/if} - {if $show_task} - - {/if} - {if $show_start} - - - {/if} - - - {if $show_files} - {if $record.has_files} - - {else} - - {/if} - {/if} - - - - {/foreach} -
{$i18n.label.date}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start}{$i18n.label.finish}{$i18n.label.duration}{$i18n.label.note}
{$record.date}{$record.client|escape}{$record.project|escape}{$record.task|escape}{if $record.start}{$record.start}{else} {/if}{if $record.finish}{$record.finish}{else} {/if}{if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if}{if $record.comment}{$record.comment|escape}{else} {/if}{$i18n.label.files}{$i18n.label.files} - {if $record.approved || $record.timesheet_id || $record.invoice_id} -   - {else} - {$i18n.label.edit} - {/if} - - {if $record.approved || $record.timesheet_id || $record.invoice_id} -   - {else} - {$i18n.label.delete} - {/if} -
-{/if} -
-{/if} - -{if $time_records} - - {if $show_week_list} - - - - - {/if} - {if $user->isPluginEnabled('mq')} - - - {if $over_quota} - - {else} - - {/if} - - {/if} -
{$i18n.label.week_total}: {$week_total}
{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$quota_remaining}
-{/if} -{$forms.weekTimeForm.close} diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week2.tpl index 7f77b0ad9..7dbf5d1f9 100644 --- a/WEB-INF/templates/week2.tpl +++ b/WEB-INF/templates/week2.tpl @@ -18,13 +18,6 @@ function fillDropdowns() { } - - - {if $show_navigation}
{$i18n.label.day_view} / {$i18n.label.week_view} @@ -130,7 +123,7 @@ function fillDropdowns() {
{$record.date}{$record.client|escape} - {if $record.approved || $record.timesheet_id || $record.invoice_id} + {if (isset($record.approved) && $record.approved) || (isset($record.timesheet_id) && $record.timesheet_id) || (isset($record.invoice_id) && $record.invoice_id)}   {else} {$i18n.label.edit} {/if} - {if $record.approved || $record.timesheet_id || $record.invoice_id} + {if (isset($record.approved) && $record.approved) || (isset($record.timesheet_id) && $record.timesheet_id) || (isset($record.invoice_id) && $record.invoice_id)}   {else} {$i18n.label.delete} diff --git a/initialize.php b/initialize.php index 7d469b378..69580f622 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5535"); +define("APP_VERSION", "1.19.28.5536"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index dbb61529a..63bd38235 100644 --- a/week.php +++ b/week.php @@ -55,6 +55,7 @@ $trackingMode = $user->getTrackingMode(); $showProject = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; $showTask = MODE_PROJECTS_AND_TASKS == $trackingMode; +$taskRequired = false; if ($showTask) $taskRequired = $user->getConfigOption('task_required'); $showWeekNote = $user->isOptionEnabled('week_note'); $showWeekNotes = $user->isOptionEnabled('week_notes'); @@ -127,7 +128,7 @@ $timeCustomFields = array(); // If we have time custom fields - collect input. if ($request->isPost()) { - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $control_name = 'time_field_'.$timeField['id']; $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], @@ -286,7 +287,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } // If we have time custom fields - add controls for them. -if ($custom_fields && $custom_fields->timeFields) { +if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) { @@ -302,6 +303,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } // If we show project dropdown, add controls for project and client. +$project_list = $client_list = array(); if ($showProject) { // Dropdown for projects assigned to user. $project_list = $user->getAssignedProjects(); @@ -344,6 +346,7 @@ function render(&$table, $value, $row, $column, $selected = false) { } // Task dropdown. +$task_list = array(); if ($showTask) { $task_list = ttGroupHelper::getActiveTasks(); $form->addInput(array('type'=>'combobox', @@ -387,7 +390,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); // Validate input in time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($timeCustomFields as $timeField) { // Validation is the same for text and dropdown fields. if (!ttValidString($timeField['value'], !$timeField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($timeField['label'])); @@ -453,7 +456,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $record['billable'] = $cl_billable ? '1' : '0'; $record['project_id'] = $cl_project; $record['task_id'] = $cl_task; - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) From c7d7520f3e7ac8de81432256d8ed1c77b776d448 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 9 May 2021 17:19:06 +0000 Subject: [PATCH 2218/2515] Addressed a couple more of php8 issues. --- WEB-INF/lib/form/Table.class.php | 38 +++++++++++++++++--------------- initialize.php | 2 +- user_edit.php | 1 + 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index c83d90bd8..d617f8b39 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -36,7 +36,7 @@ class Table extends FormElement { var $mHeaders = array(); // column headers var $mFooters = array(); // column footers var $mInteractive = true; // adds a clickable checkbox column to table - var $mIAScript = null; // sctipt to execute when a checkbox is clicked + var $mIAScript = null; // script to execute when a checkbox is clicked var $mKeyField = ''; // identifies a column used as key to access row data var $mColumnFields = array(); // field names (from mData) for data in each column var $mBgColor = '#ffffff'; @@ -156,28 +156,30 @@ function getHtml() { } // Print rows. - for ($row = 0; $row < count($this->mData); $row++) { - $html .= "\n
- -
- - - - -{if $user->custom_logo} - - -
-{else} - -{/if} - - - - -
- - - -{if $user->custom_logo} - -{else} - -{/if} - - -
-
- - -{if $authenticated} - {if $user->can('administer_site')} - - - - - -
  - {$i18n.menu.logout} - {$i18n.menu.forum} - {$i18n.menu.help} -
- - - - - - - - - - {else} - - - - - -
  - {$i18n.menu.logout} - {if $user->exists() && $user->can('manage_own_settings')} - {$i18n.menu.profile} - {/if} - {if $user->can('manage_basic_settings')} - {$i18n.menu.group} - {/if} - {if $user->can('manage_features')} - {$i18n.menu.plugins} - {/if} - {$i18n.menu.forum} - {$i18n.menu.help} -
- - - - - - - - - - {/if} -{else} - - - - - -
  - {$i18n.menu.login} - {if isTrue('MULTIORG_MODE') && constant('AUTH_MODULE') == 'db'} - {$i18n.menu.register} - {/if} - {$i18n.menu.forum} - {$i18n.menu.help} -
-{/if} -
- - -{if $title} - - - {* No need to escape as it is done in the class. *} -
{$title}{if (isset($timestring) && $timestring)}: {$timestring}{/if}
{$user->getUserPartForHeader()}
-{/if} - - - -{if $err->yes()} - - - - -
- {foreach $err->getErrors() as $error} - {$error.message}
{* No need to escape as they are not coming from user and may contain a link. *} - {/foreach} -
-{/if} - - - -{if $msg->yes()} - - - - -
- {foreach $msg->getErrors() as $message} - {$message.message}
{* No need to escape. *} - {/foreach} -
-{/if} - diff --git a/WEB-INF/templates/index.tpl b/WEB-INF/templates/index.tpl deleted file mode 100644 index 75a751e08..000000000 --- a/WEB-INF/templates/index.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{include file="header.tpl"} - -{if $content_page_name}{include file="$content_page_name"}{/if} - -{include file="footer.tpl"} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/work/footer.tpl similarity index 99% rename from WEB-INF/templates/footer.tpl rename to WEB-INF/templates/work/footer.tpl index a5ae56f90..611067550 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/work/footer.tpl @@ -26,3 +26,4 @@
+ diff --git a/WEB-INF/templates/work/index.tpl b/WEB-INF/templates/work/index.tpl index 6817f3963..3c6500821 100644 --- a/WEB-INF/templates/work/index.tpl +++ b/WEB-INF/templates/work/index.tpl @@ -2,4 +2,4 @@ {if $content_page_name}{include file="$content_page_name"}{/if} -{include file="footer.tpl"} +{include file="work/footer.tpl"} diff --git a/initialize.php b/initialize.php index 7f27932dd..6260eb076 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5538"); +define("APP_VERSION", "1.19.28.5539"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ee3dae2396dc3051e9f79825759e57d51beb7985 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 14:00:32 +0000 Subject: [PATCH 2221/2515] Work in progress renaming template files. --- WEB-INF/templates/{access_denied2.tpl => access_denied.tpl} | 0 WEB-INF/templates/{admin_group_add2.tpl => admin_group_add.tpl} | 0 .../{admin_group_delete2.tpl => admin_group_delete.tpl} | 0 .../templates/{admin_group_edit2.tpl => admin_group_edit.tpl} | 0 WEB-INF/templates/{admin_groups2.tpl => admin_groups.tpl} | 0 WEB-INF/templates/{admin_options2.tpl => admin_options.tpl} | 0 access_denied.php | 2 +- admin_group_add.php | 2 +- admin_group_delete.php | 2 +- admin_group_edit.php | 2 +- admin_groups.php | 2 +- admin_options.php | 2 +- feature_disabled.php | 2 +- initialize.php | 2 +- 14 files changed, 8 insertions(+), 8 deletions(-) rename WEB-INF/templates/{access_denied2.tpl => access_denied.tpl} (100%) rename WEB-INF/templates/{admin_group_add2.tpl => admin_group_add.tpl} (100%) rename WEB-INF/templates/{admin_group_delete2.tpl => admin_group_delete.tpl} (100%) rename WEB-INF/templates/{admin_group_edit2.tpl => admin_group_edit.tpl} (100%) rename WEB-INF/templates/{admin_groups2.tpl => admin_groups.tpl} (100%) rename WEB-INF/templates/{admin_options2.tpl => admin_options.tpl} (100%) diff --git a/WEB-INF/templates/access_denied2.tpl b/WEB-INF/templates/access_denied.tpl similarity index 100% rename from WEB-INF/templates/access_denied2.tpl rename to WEB-INF/templates/access_denied.tpl diff --git a/WEB-INF/templates/admin_group_add2.tpl b/WEB-INF/templates/admin_group_add.tpl similarity index 100% rename from WEB-INF/templates/admin_group_add2.tpl rename to WEB-INF/templates/admin_group_add.tpl diff --git a/WEB-INF/templates/admin_group_delete2.tpl b/WEB-INF/templates/admin_group_delete.tpl similarity index 100% rename from WEB-INF/templates/admin_group_delete2.tpl rename to WEB-INF/templates/admin_group_delete.tpl diff --git a/WEB-INF/templates/admin_group_edit2.tpl b/WEB-INF/templates/admin_group_edit.tpl similarity index 100% rename from WEB-INF/templates/admin_group_edit2.tpl rename to WEB-INF/templates/admin_group_edit.tpl diff --git a/WEB-INF/templates/admin_groups2.tpl b/WEB-INF/templates/admin_groups.tpl similarity index 100% rename from WEB-INF/templates/admin_groups2.tpl rename to WEB-INF/templates/admin_groups.tpl diff --git a/WEB-INF/templates/admin_options2.tpl b/WEB-INF/templates/admin_options.tpl similarity index 100% rename from WEB-INF/templates/admin_options2.tpl rename to WEB-INF/templates/admin_options.tpl diff --git a/access_denied.php b/access_denied.php index 2aa3c5d77..7025d8739 100644 --- a/access_denied.php +++ b/access_denied.php @@ -8,5 +8,5 @@ if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'access_denied2.tpl'); +$smarty->assign('content_page_name', 'access_denied.tpl'); $smarty->display('index2.tpl'); diff --git a/admin_group_add.php b/admin_group_add.php index 976b5c6db..178b2d1b2 100644 --- a/admin_group_add.php +++ b/admin_group_add.php @@ -101,6 +101,6 @@ $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); -$smarty->assign('content_page_name', 'admin_group_add2.tpl'); +$smarty->assign('content_page_name', 'admin_group_add.tpl'); $smarty->assign('title', $i18n->get('title.add_group')); $smarty->display('index2.tpl'); diff --git a/admin_group_delete.php b/admin_group_delete.php index 83999da5d..1707d5956 100644 --- a/admin_group_delete.php +++ b/admin_group_delete.php @@ -42,5 +42,5 @@ $smarty->assign('group_to_delete', $group_name); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_group')); -$smarty->assign('content_page_name', 'admin_group_delete2.tpl'); +$smarty->assign('content_page_name', 'admin_group_delete.tpl'); $smarty->display('index2.tpl'); diff --git a/admin_group_edit.php b/admin_group_edit.php index 5474ca2c3..35b0a531e 100644 --- a/admin_group_edit.php +++ b/admin_group_edit.php @@ -110,5 +110,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.groupForm.manager_name.focus()"'); $smarty->assign('title', $i18n->get('title.edit_group')); -$smarty->assign('content_page_name', 'admin_group_edit2.tpl'); +$smarty->assign('content_page_name', 'admin_group_edit.tpl'); $smarty->display('index2.tpl'); diff --git a/admin_groups.php b/admin_groups.php index 915f7d778..e3a5559c3 100644 --- a/admin_groups.php +++ b/admin_groups.php @@ -14,5 +14,5 @@ $smarty->assign('groups', ttOrgHelper::getOrgs()); $smarty->assign('title', $i18n->get('title.groups')); -$smarty->assign('content_page_name', 'admin_groups2.tpl'); +$smarty->assign('content_page_name', 'admin_groups.tpl'); $smarty->display('index2.tpl'); diff --git a/admin_options.php b/admin_options.php index bc1269336..00d292b97 100644 --- a/admin_options.php +++ b/admin_options.php @@ -72,5 +72,5 @@ $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.options')); -$smarty->assign('content_page_name', 'admin_options2.tpl'); +$smarty->assign('content_page_name', 'admin_options.tpl'); $smarty->display('index2.tpl'); diff --git a/feature_disabled.php b/feature_disabled.php index c04afe734..42f3e47ae 100644 --- a/feature_disabled.php +++ b/feature_disabled.php @@ -8,5 +8,5 @@ if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('label.error')); -$smarty->assign('content_page_name', 'access_denied2.tpl'); +$smarty->assign('content_page_name', 'access_denied.tpl'); $smarty->display('index2.tpl'); diff --git a/initialize.php b/initialize.php index 6260eb076..87083f8ed 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5539"); +define("APP_VERSION", "1.19.28.5540"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 7e6f9a6e72593d24989acad71929f4187ce6c1e2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 14:48:36 +0000 Subject: [PATCH 2222/2515] A bit more of template file renaming. --- .../{cf_custom_field_add2.tpl => cf_custom_field_add.tpl} | 0 ...f_custom_field_delete2.tpl => cf_custom_field_delete.tpl} | 0 .../{cf_custom_field_edit2.tpl => cf_custom_field_edit.tpl} | 0 .../{cf_custom_fields2.tpl => cf_custom_fields.tpl} | 0 ...f_dropdown_option_add2.tpl => cf_dropdown_option_add.tpl} | 0 ...down_option_delete2.tpl => cf_dropdown_option_delete.tpl} | 0 ...dropdown_option_edit2.tpl => cf_dropdown_option_edit.tpl} | 0 .../{cf_dropdown_options2.tpl => cf_dropdown_options.tpl} | 0 WEB-INF/templates/{charts2.tpl => charts.tpl} | 0 WEB-INF/templates/index.tpl | 5 +++++ access_denied.php | 2 +- admin_group_add.php | 2 +- admin_group_delete.php | 2 +- admin_group_edit.php | 2 +- admin_groups.php | 2 +- admin_options.php | 2 +- cf_custom_field_add.php | 4 ++-- cf_custom_field_delete.php | 4 ++-- cf_custom_field_edit.php | 4 ++-- cf_custom_fields.php | 4 ++-- cf_dropdown_option_add.php | 4 ++-- cf_dropdown_option_delete.php | 4 ++-- cf_dropdown_option_edit.php | 4 ++-- cf_dropdown_options.php | 4 ++-- charts.php | 4 ++-- feature_disabled.php | 2 +- initialize.php | 2 +- 27 files changed, 31 insertions(+), 26 deletions(-) rename WEB-INF/templates/{cf_custom_field_add2.tpl => cf_custom_field_add.tpl} (100%) rename WEB-INF/templates/{cf_custom_field_delete2.tpl => cf_custom_field_delete.tpl} (100%) rename WEB-INF/templates/{cf_custom_field_edit2.tpl => cf_custom_field_edit.tpl} (100%) rename WEB-INF/templates/{cf_custom_fields2.tpl => cf_custom_fields.tpl} (100%) rename WEB-INF/templates/{cf_dropdown_option_add2.tpl => cf_dropdown_option_add.tpl} (100%) rename WEB-INF/templates/{cf_dropdown_option_delete2.tpl => cf_dropdown_option_delete.tpl} (100%) rename WEB-INF/templates/{cf_dropdown_option_edit2.tpl => cf_dropdown_option_edit.tpl} (100%) rename WEB-INF/templates/{cf_dropdown_options2.tpl => cf_dropdown_options.tpl} (100%) rename WEB-INF/templates/{charts2.tpl => charts.tpl} (100%) create mode 100644 WEB-INF/templates/index.tpl diff --git a/WEB-INF/templates/cf_custom_field_add2.tpl b/WEB-INF/templates/cf_custom_field_add.tpl similarity index 100% rename from WEB-INF/templates/cf_custom_field_add2.tpl rename to WEB-INF/templates/cf_custom_field_add.tpl diff --git a/WEB-INF/templates/cf_custom_field_delete2.tpl b/WEB-INF/templates/cf_custom_field_delete.tpl similarity index 100% rename from WEB-INF/templates/cf_custom_field_delete2.tpl rename to WEB-INF/templates/cf_custom_field_delete.tpl diff --git a/WEB-INF/templates/cf_custom_field_edit2.tpl b/WEB-INF/templates/cf_custom_field_edit.tpl similarity index 100% rename from WEB-INF/templates/cf_custom_field_edit2.tpl rename to WEB-INF/templates/cf_custom_field_edit.tpl diff --git a/WEB-INF/templates/cf_custom_fields2.tpl b/WEB-INF/templates/cf_custom_fields.tpl similarity index 100% rename from WEB-INF/templates/cf_custom_fields2.tpl rename to WEB-INF/templates/cf_custom_fields.tpl diff --git a/WEB-INF/templates/cf_dropdown_option_add2.tpl b/WEB-INF/templates/cf_dropdown_option_add.tpl similarity index 100% rename from WEB-INF/templates/cf_dropdown_option_add2.tpl rename to WEB-INF/templates/cf_dropdown_option_add.tpl diff --git a/WEB-INF/templates/cf_dropdown_option_delete2.tpl b/WEB-INF/templates/cf_dropdown_option_delete.tpl similarity index 100% rename from WEB-INF/templates/cf_dropdown_option_delete2.tpl rename to WEB-INF/templates/cf_dropdown_option_delete.tpl diff --git a/WEB-INF/templates/cf_dropdown_option_edit2.tpl b/WEB-INF/templates/cf_dropdown_option_edit.tpl similarity index 100% rename from WEB-INF/templates/cf_dropdown_option_edit2.tpl rename to WEB-INF/templates/cf_dropdown_option_edit.tpl diff --git a/WEB-INF/templates/cf_dropdown_options2.tpl b/WEB-INF/templates/cf_dropdown_options.tpl similarity index 100% rename from WEB-INF/templates/cf_dropdown_options2.tpl rename to WEB-INF/templates/cf_dropdown_options.tpl diff --git a/WEB-INF/templates/charts2.tpl b/WEB-INF/templates/charts.tpl similarity index 100% rename from WEB-INF/templates/charts2.tpl rename to WEB-INF/templates/charts.tpl diff --git a/WEB-INF/templates/index.tpl b/WEB-INF/templates/index.tpl new file mode 100644 index 000000000..410a7616a --- /dev/null +++ b/WEB-INF/templates/index.tpl @@ -0,0 +1,5 @@ +{include file="header2.tpl"} + +{if $content_page_name}{include file="$content_page_name"}{/if} + +{include file="footer2.tpl"} diff --git a/access_denied.php b/access_denied.php index 7025d8739..80900d570 100644 --- a/access_denied.php +++ b/access_denied.php @@ -9,4 +9,4 @@ $smarty->assign('title', $i18n->get('label.error')); $smarty->assign('content_page_name', 'access_denied.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/admin_group_add.php b/admin_group_add.php index 178b2d1b2..52850b608 100644 --- a/admin_group_add.php +++ b/admin_group_add.php @@ -103,4 +103,4 @@ $smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); $smarty->assign('content_page_name', 'admin_group_add.tpl'); $smarty->assign('title', $i18n->get('title.add_group')); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/admin_group_delete.php b/admin_group_delete.php index 1707d5956..0cea02b32 100644 --- a/admin_group_delete.php +++ b/admin_group_delete.php @@ -43,4 +43,4 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_group')); $smarty->assign('content_page_name', 'admin_group_delete.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/admin_group_edit.php b/admin_group_edit.php index 35b0a531e..81588ebec 100644 --- a/admin_group_edit.php +++ b/admin_group_edit.php @@ -111,4 +111,4 @@ $smarty->assign('onload', 'onLoad="document.groupForm.manager_name.focus()"'); $smarty->assign('title', $i18n->get('title.edit_group')); $smarty->assign('content_page_name', 'admin_group_edit.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/admin_groups.php b/admin_groups.php index e3a5559c3..8dffd3931 100644 --- a/admin_groups.php +++ b/admin_groups.php @@ -15,4 +15,4 @@ $smarty->assign('groups', ttOrgHelper::getOrgs()); $smarty->assign('title', $i18n->get('title.groups')); $smarty->assign('content_page_name', 'admin_groups.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/admin_options.php b/admin_options.php index 00d292b97..84a0ed3a5 100644 --- a/admin_options.php +++ b/admin_options.php @@ -73,4 +73,4 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.options')); $smarty->assign('content_page_name', 'admin_options.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index 14b233a52..6cfd87256 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_add_custom_field')); -$smarty->assign('content_page_name', 'cf_custom_field_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_custom_field_add.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index 7cfd72035..ba222c657 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -50,5 +50,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.cf_delete_custom_field')); -$smarty->assign('content_page_name', 'cf_custom_field_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_custom_field_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_custom_field_edit.php b/cf_custom_field_edit.php index 36e76d4bf..3f959ee22 100644 --- a/cf_custom_field_edit.php +++ b/cf_custom_field_edit.php @@ -68,5 +68,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_edit_custom_field')); -$smarty->assign('content_page_name', 'cf_custom_field_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_custom_field_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_custom_fields.php b/cf_custom_fields.php index 7d670636e..6552bb7f6 100644 --- a/cf_custom_fields.php +++ b/cf_custom_fields.php @@ -34,5 +34,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('custom_fields', $fields); $smarty->assign('title', $i18n->get('title.cf_custom_fields')); -$smarty->assign('content_page_name', 'cf_custom_fields2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_custom_fields.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index f1bf00908..582794ae5 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -49,5 +49,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionAddForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_add_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_add.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index e23288bd5..e6eeeeb75 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -53,5 +53,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.cf_delete_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index c73200ffc..eee02f63c 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.optionEditForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.cf_edit_dropdown_option')); -$smarty->assign('content_page_name', 'cf_dropdown_option_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_option_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/cf_dropdown_options.php b/cf_dropdown_options.php index 2570f0ee0..06f53a7d8 100644 --- a/cf_dropdown_options.php +++ b/cf_dropdown_options.php @@ -28,5 +28,5 @@ $smarty->assign('field_id', $field_id); $smarty->assign('options', $options); $smarty->assign('title', $i18n->get('title.cf_dropdown_options')); -$smarty->assign('content_page_name', 'cf_dropdown_options2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'cf_dropdown_options.tpl'); +$smarty->display('index.tpl'); diff --git a/charts.php b/charts.php index 25e6695d4..1bf6d34fa 100644 --- a/charts.php +++ b/charts.php @@ -205,5 +205,5 @@ $smarty->assign('onload', 'onLoad="adjustTodayLinks()"'); $smarty->assign('forms', array($chart_form->getName() => $chart_form->toArray())); $smarty->assign('title', $i18n->get('title.charts')); -$smarty->assign('content_page_name', 'charts2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'charts.tpl'); +$smarty->display('index.tpl'); diff --git a/feature_disabled.php b/feature_disabled.php index 42f3e47ae..d15413541 100644 --- a/feature_disabled.php +++ b/feature_disabled.php @@ -9,4 +9,4 @@ $smarty->assign('title', $i18n->get('label.error')); $smarty->assign('content_page_name', 'access_denied.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); diff --git a/initialize.php b/initialize.php index 87083f8ed..378edcba6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5540"); +define("APP_VERSION", "1.19.28.5541"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From edc7f366e8e45096e54bf15c46ea205fbf2867c3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 16:05:40 +0000 Subject: [PATCH 2223/2515] More template files renamed. --- WEB-INF/templates/{client_add2.tpl => client_add.tpl} | 0 WEB-INF/templates/{client_delete2.tpl => client_delete.tpl} | 0 WEB-INF/templates/{client_edit2.tpl => client_edit.tpl} | 0 WEB-INF/templates/{clients2.tpl => clients.tpl} | 0 .../templates/{display_options2.tpl => display_options.tpl} | 0 WEB-INF/templates/{entity_files2.tpl => entity_files.tpl} | 0 WEB-INF/templates/{expense_delete2.tpl => expense_delete.tpl} | 0 WEB-INF/templates/{expense_edit2.tpl => expense_edit.tpl} | 0 WEB-INF/templates/{expenses2.tpl => expenses.tpl} | 0 WEB-INF/templates/{export2.tpl => export.tpl} | 0 WEB-INF/templates/{file_delete2.tpl => file_delete.tpl} | 0 WEB-INF/templates/{file_download2.tpl => file_download.tpl} | 0 WEB-INF/templates/{file_edit2.tpl => file_edit.tpl} | 0 client_add.php | 4 ++-- client_delete.php | 4 ++-- client_edit.php | 4 ++-- clients.php | 4 ++-- display_options.php | 4 ++-- expense_delete.php | 4 ++-- expense_edit.php | 4 ++-- expense_files.php | 4 ++-- expenses.php | 4 ++-- export.php | 4 ++-- file_delete.php | 4 ++-- file_download.php | 4 ++-- file_edit.php | 4 ++-- initialize.php | 2 +- project_files.php | 4 ++-- time_files.php | 4 ++-- timesheet_files.php | 4 ++-- 30 files changed, 33 insertions(+), 33 deletions(-) rename WEB-INF/templates/{client_add2.tpl => client_add.tpl} (100%) rename WEB-INF/templates/{client_delete2.tpl => client_delete.tpl} (100%) rename WEB-INF/templates/{client_edit2.tpl => client_edit.tpl} (100%) rename WEB-INF/templates/{clients2.tpl => clients.tpl} (100%) rename WEB-INF/templates/{display_options2.tpl => display_options.tpl} (100%) rename WEB-INF/templates/{entity_files2.tpl => entity_files.tpl} (100%) rename WEB-INF/templates/{expense_delete2.tpl => expense_delete.tpl} (100%) rename WEB-INF/templates/{expense_edit2.tpl => expense_edit.tpl} (100%) rename WEB-INF/templates/{expenses2.tpl => expenses.tpl} (100%) rename WEB-INF/templates/{export2.tpl => export.tpl} (100%) rename WEB-INF/templates/{file_delete2.tpl => file_delete.tpl} (100%) rename WEB-INF/templates/{file_download2.tpl => file_download.tpl} (100%) rename WEB-INF/templates/{file_edit2.tpl => file_edit.tpl} (100%) diff --git a/WEB-INF/templates/client_add2.tpl b/WEB-INF/templates/client_add.tpl similarity index 100% rename from WEB-INF/templates/client_add2.tpl rename to WEB-INF/templates/client_add.tpl diff --git a/WEB-INF/templates/client_delete2.tpl b/WEB-INF/templates/client_delete.tpl similarity index 100% rename from WEB-INF/templates/client_delete2.tpl rename to WEB-INF/templates/client_delete.tpl diff --git a/WEB-INF/templates/client_edit2.tpl b/WEB-INF/templates/client_edit.tpl similarity index 100% rename from WEB-INF/templates/client_edit2.tpl rename to WEB-INF/templates/client_edit.tpl diff --git a/WEB-INF/templates/clients2.tpl b/WEB-INF/templates/clients.tpl similarity index 100% rename from WEB-INF/templates/clients2.tpl rename to WEB-INF/templates/clients.tpl diff --git a/WEB-INF/templates/display_options2.tpl b/WEB-INF/templates/display_options.tpl similarity index 100% rename from WEB-INF/templates/display_options2.tpl rename to WEB-INF/templates/display_options.tpl diff --git a/WEB-INF/templates/entity_files2.tpl b/WEB-INF/templates/entity_files.tpl similarity index 100% rename from WEB-INF/templates/entity_files2.tpl rename to WEB-INF/templates/entity_files.tpl diff --git a/WEB-INF/templates/expense_delete2.tpl b/WEB-INF/templates/expense_delete.tpl similarity index 100% rename from WEB-INF/templates/expense_delete2.tpl rename to WEB-INF/templates/expense_delete.tpl diff --git a/WEB-INF/templates/expense_edit2.tpl b/WEB-INF/templates/expense_edit.tpl similarity index 100% rename from WEB-INF/templates/expense_edit2.tpl rename to WEB-INF/templates/expense_edit.tpl diff --git a/WEB-INF/templates/expenses2.tpl b/WEB-INF/templates/expenses.tpl similarity index 100% rename from WEB-INF/templates/expenses2.tpl rename to WEB-INF/templates/expenses.tpl diff --git a/WEB-INF/templates/export2.tpl b/WEB-INF/templates/export.tpl similarity index 100% rename from WEB-INF/templates/export2.tpl rename to WEB-INF/templates/export.tpl diff --git a/WEB-INF/templates/file_delete2.tpl b/WEB-INF/templates/file_delete.tpl similarity index 100% rename from WEB-INF/templates/file_delete2.tpl rename to WEB-INF/templates/file_delete.tpl diff --git a/WEB-INF/templates/file_download2.tpl b/WEB-INF/templates/file_download.tpl similarity index 100% rename from WEB-INF/templates/file_download2.tpl rename to WEB-INF/templates/file_download.tpl diff --git a/WEB-INF/templates/file_edit2.tpl b/WEB-INF/templates/file_edit.tpl similarity index 100% rename from WEB-INF/templates/file_edit2.tpl rename to WEB-INF/templates/file_edit.tpl diff --git a/client_add.php b/client_add.php index 1b91a4080..f1f45333e 100644 --- a/client_add.php +++ b/client_add.php @@ -68,5 +68,5 @@ $smarty->assign('onload', 'onLoad="document.clientForm.name.focus()"'); $smarty->assign('show_projects', $show_projects); $smarty->assign('title', $i18n->get('title.add_client')); -$smarty->assign('content_page_name', 'client_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'client_add.tpl'); +$smarty->display('index.tpl'); diff --git a/client_delete.php b/client_delete.php index 147f2db54..e832c6bcb 100644 --- a/client_delete.php +++ b/client_delete.php @@ -50,5 +50,5 @@ $smarty->assign('client_to_delete', $client_to_delete); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_client')); -$smarty->assign('content_page_name', 'client_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'client_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/client_edit.php b/client_edit.php index c7e0a92e3..349834181 100644 --- a/client_edit.php +++ b/client_edit.php @@ -104,5 +104,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', $show_projects); $smarty->assign('title', $i18n->get('title.edit_client')); -$smarty->assign('content_page_name', 'client_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'client_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/clients.php b/clients.php index 77ade9c7b..309eb155a 100644 --- a/clients.php +++ b/clients.php @@ -27,5 +27,5 @@ $smarty->assign('active_clients', $active_clients); $smarty->assign('inactive_clients', $inactive_clients); $smarty->assign('title', $i18n->get('title.clients')); -$smarty->assign('content_page_name', 'clients2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'clients.tpl'); +$smarty->display('index.tpl'); diff --git a/display_options.php b/display_options.php index 53a86ca9e..21b488c64 100644 --- a/display_options.php +++ b/display_options.php @@ -74,5 +74,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.display_options')); -$smarty->assign('content_page_name', 'display_options2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'display_options.tpl'); +$smarty->display('index.tpl'); diff --git a/expense_delete.php b/expense_delete.php index 7ecd2c6d3..6c5cb791f 100644 --- a/expense_delete.php +++ b/expense_delete.php @@ -60,5 +60,5 @@ $smarty->assign('expense_item', $expense_item); $smarty->assign('show_project', $show_project); $smarty->assign('title', $i18n->get('title.delete_expense')); -$smarty->assign('content_page_name', 'expense_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'expense_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/expense_edit.php b/expense_edit.php index f4d3c2216..271a588ac 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -211,5 +211,5 @@ $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('title', $i18n->get('title.edit_expense')); -$smarty->assign('content_page_name', 'expense_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'expense_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/expense_files.php b/expense_files.php index 5642cb383..7fe2a5d1a 100644 --- a/expense_files.php +++ b/expense_files.php @@ -61,5 +61,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.expense_files')); -$smarty->assign('content_page_name', 'entity_files2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'entity_files.tpl'); +$smarty->display('index.tpl'); diff --git a/expenses.php b/expenses.php index d5978228e..1914a253e 100644 --- a/expenses.php +++ b/expenses.php @@ -230,5 +230,5 @@ $smarty->assign('project_list', $project_list); $smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); $smarty->assign('title', $i18n->get('title.expenses')); -$smarty->assign('content_page_name', 'expenses2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'expenses.tpl'); +$smarty->display('index.tpl'); diff --git a/export.php b/export.php index b5e1206dd..2bcba2dce 100644 --- a/export.php +++ b/export.php @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.export')); -$smarty->assign('content_page_name', 'export2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'export.tpl'); +$smarty->display('index.tpl'); diff --git a/file_delete.php b/file_delete.php index 1b415c19b..e6cb53378 100644 --- a/file_delete.php +++ b/file_delete.php @@ -98,5 +98,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fileDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_file')); -$smarty->assign('content_page_name', 'file_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'file_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/file_download.php b/file_download.php index ff7e1633a..2fb52f79b 100644 --- a/file_download.php +++ b/file_download.php @@ -59,5 +59,5 @@ } $smarty->assign('title', $i18n->get('title.download_file')); -$smarty->assign('content_page_name', 'file_download2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'file_download.tpl'); +$smarty->display('index.tpl'); diff --git a/file_edit.php b/file_edit.php index 745293c2e..aeb8f70c7 100644 --- a/file_edit.php +++ b/file_edit.php @@ -96,5 +96,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.fileForm.description.focus()"'); $smarty->assign('title', $i18n->get('title.edit_file')); -$smarty->assign('content_page_name', 'file_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'file_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/initialize.php b/initialize.php index 378edcba6..658b5fb64 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5541"); +define("APP_VERSION", "1.19.28.5542"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/project_files.php b/project_files.php index 60fc4d9e3..8b38a8ce6 100644 --- a/project_files.php +++ b/project_files.php @@ -62,5 +62,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.project_files').': '.$project['name']); -$smarty->assign('content_page_name', 'entity_files2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'entity_files.tpl'); +$smarty->display('index.tpl'); diff --git a/time_files.php b/time_files.php index 210bd534c..c5dce5baa 100644 --- a/time_files.php +++ b/time_files.php @@ -62,5 +62,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.time_files')); -$smarty->assign('content_page_name', 'entity_files2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'entity_files.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheet_files.php b/timesheet_files.php index d09ecd57d..bca00f28d 100644 --- a/timesheet_files.php +++ b/timesheet_files.php @@ -61,5 +61,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('files', $files); $smarty->assign('title', $i18n->get('title.timesheet_files').': '.$timesheet['name']); -$smarty->assign('content_page_name', 'entity_files2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'entity_files.tpl'); +$smarty->display('index.tpl'); From 9f25423fdd777837465ef62d0d8ba97853e725ed Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 16:39:30 +0000 Subject: [PATCH 2224/2515] More templates renamed. --- WEB-INF/templates/{footer2.tpl => footer.tpl} | 0 WEB-INF/templates/{group_add2.tpl => group_add.tpl} | 0 .../{group_advanced_edit2.tpl => group_advanced_edit.tpl} | 0 WEB-INF/templates/{group_delete2.tpl => group_delete.tpl} | 0 WEB-INF/templates/{group_edit2.tpl => group_edit.tpl} | 0 WEB-INF/templates/{groups2.tpl => groups.tpl} | 0 WEB-INF/templates/{header2.tpl => header.tpl} | 0 WEB-INF/templates/{import2.tpl => import.tpl} | 0 WEB-INF/templates/index.tpl | 4 ++-- WEB-INF/templates/index2.tpl | 4 ++-- WEB-INF/templates/{user_add2.tpl => user_add.tpl} | 0 WEB-INF/templates/{user_delete2.tpl => user_delete.tpl} | 0 WEB-INF/templates/{user_edit2.tpl => user_edit.tpl} | 0 WEB-INF/templates/{users2.tpl => users.tpl} | 0 WEB-INF/templates/{week2.tpl => week.tpl} | 0 WEB-INF/templates/{week_view2.tpl => week_view.tpl} | 0 WEB-INF/templates/{work_units2.tpl => work_units.tpl} | 0 group_add.php | 4 ++-- group_advanced_edit.php | 4 ++-- group_delete.php | 4 ++-- group_edit.php | 4 ++-- groups.php | 4 ++-- import.php | 4 ++-- initialize.php | 2 +- user_add.php | 4 ++-- user_delete.php | 4 ++-- user_edit.php | 4 ++-- users.php | 4 ++-- week.php | 4 ++-- week_view.php | 4 ++-- work_units.php | 4 ++-- 31 files changed, 31 insertions(+), 31 deletions(-) rename WEB-INF/templates/{footer2.tpl => footer.tpl} (100%) rename WEB-INF/templates/{group_add2.tpl => group_add.tpl} (100%) rename WEB-INF/templates/{group_advanced_edit2.tpl => group_advanced_edit.tpl} (100%) rename WEB-INF/templates/{group_delete2.tpl => group_delete.tpl} (100%) rename WEB-INF/templates/{group_edit2.tpl => group_edit.tpl} (100%) rename WEB-INF/templates/{groups2.tpl => groups.tpl} (100%) rename WEB-INF/templates/{header2.tpl => header.tpl} (100%) rename WEB-INF/templates/{import2.tpl => import.tpl} (100%) rename WEB-INF/templates/{user_add2.tpl => user_add.tpl} (100%) rename WEB-INF/templates/{user_delete2.tpl => user_delete.tpl} (100%) rename WEB-INF/templates/{user_edit2.tpl => user_edit.tpl} (100%) rename WEB-INF/templates/{users2.tpl => users.tpl} (100%) rename WEB-INF/templates/{week2.tpl => week.tpl} (100%) rename WEB-INF/templates/{week_view2.tpl => week_view.tpl} (100%) rename WEB-INF/templates/{work_units2.tpl => work_units.tpl} (100%) diff --git a/WEB-INF/templates/footer2.tpl b/WEB-INF/templates/footer.tpl similarity index 100% rename from WEB-INF/templates/footer2.tpl rename to WEB-INF/templates/footer.tpl diff --git a/WEB-INF/templates/group_add2.tpl b/WEB-INF/templates/group_add.tpl similarity index 100% rename from WEB-INF/templates/group_add2.tpl rename to WEB-INF/templates/group_add.tpl diff --git a/WEB-INF/templates/group_advanced_edit2.tpl b/WEB-INF/templates/group_advanced_edit.tpl similarity index 100% rename from WEB-INF/templates/group_advanced_edit2.tpl rename to WEB-INF/templates/group_advanced_edit.tpl diff --git a/WEB-INF/templates/group_delete2.tpl b/WEB-INF/templates/group_delete.tpl similarity index 100% rename from WEB-INF/templates/group_delete2.tpl rename to WEB-INF/templates/group_delete.tpl diff --git a/WEB-INF/templates/group_edit2.tpl b/WEB-INF/templates/group_edit.tpl similarity index 100% rename from WEB-INF/templates/group_edit2.tpl rename to WEB-INF/templates/group_edit.tpl diff --git a/WEB-INF/templates/groups2.tpl b/WEB-INF/templates/groups.tpl similarity index 100% rename from WEB-INF/templates/groups2.tpl rename to WEB-INF/templates/groups.tpl diff --git a/WEB-INF/templates/header2.tpl b/WEB-INF/templates/header.tpl similarity index 100% rename from WEB-INF/templates/header2.tpl rename to WEB-INF/templates/header.tpl diff --git a/WEB-INF/templates/import2.tpl b/WEB-INF/templates/import.tpl similarity index 100% rename from WEB-INF/templates/import2.tpl rename to WEB-INF/templates/import.tpl diff --git a/WEB-INF/templates/index.tpl b/WEB-INF/templates/index.tpl index 410a7616a..75a751e08 100644 --- a/WEB-INF/templates/index.tpl +++ b/WEB-INF/templates/index.tpl @@ -1,5 +1,5 @@ -{include file="header2.tpl"} +{include file="header.tpl"} {if $content_page_name}{include file="$content_page_name"}{/if} -{include file="footer2.tpl"} +{include file="footer.tpl"} diff --git a/WEB-INF/templates/index2.tpl b/WEB-INF/templates/index2.tpl index 410a7616a..75a751e08 100644 --- a/WEB-INF/templates/index2.tpl +++ b/WEB-INF/templates/index2.tpl @@ -1,5 +1,5 @@ -{include file="header2.tpl"} +{include file="header.tpl"} {if $content_page_name}{include file="$content_page_name"}{/if} -{include file="footer2.tpl"} +{include file="footer.tpl"} diff --git a/WEB-INF/templates/user_add2.tpl b/WEB-INF/templates/user_add.tpl similarity index 100% rename from WEB-INF/templates/user_add2.tpl rename to WEB-INF/templates/user_add.tpl diff --git a/WEB-INF/templates/user_delete2.tpl b/WEB-INF/templates/user_delete.tpl similarity index 100% rename from WEB-INF/templates/user_delete2.tpl rename to WEB-INF/templates/user_delete.tpl diff --git a/WEB-INF/templates/user_edit2.tpl b/WEB-INF/templates/user_edit.tpl similarity index 100% rename from WEB-INF/templates/user_edit2.tpl rename to WEB-INF/templates/user_edit.tpl diff --git a/WEB-INF/templates/users2.tpl b/WEB-INF/templates/users.tpl similarity index 100% rename from WEB-INF/templates/users2.tpl rename to WEB-INF/templates/users.tpl diff --git a/WEB-INF/templates/week2.tpl b/WEB-INF/templates/week.tpl similarity index 100% rename from WEB-INF/templates/week2.tpl rename to WEB-INF/templates/week.tpl diff --git a/WEB-INF/templates/week_view2.tpl b/WEB-INF/templates/week_view.tpl similarity index 100% rename from WEB-INF/templates/week_view2.tpl rename to WEB-INF/templates/week_view.tpl diff --git a/WEB-INF/templates/work_units2.tpl b/WEB-INF/templates/work_units.tpl similarity index 100% rename from WEB-INF/templates/work_units2.tpl rename to WEB-INF/templates/work_units.tpl diff --git a/group_add.php b/group_add.php index 8436acd80..6f88af205 100644 --- a/group_add.php +++ b/group_add.php @@ -46,5 +46,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); $smarty->assign('title', $i18n->get('title.add_group')); -$smarty->assign('content_page_name', 'group_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'group_add.tpl'); +$smarty->display('index.tpl'); diff --git a/group_advanced_edit.php b/group_advanced_edit.php index efb7a49e7..d08017576 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -62,5 +62,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_group')); -$smarty->assign('content_page_name', 'group_advanced_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'group_advanced_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/group_delete.php b/group_delete.php index c1e47d02c..377bb80e9 100644 --- a/group_delete.php +++ b/group_delete.php @@ -64,5 +64,5 @@ $smarty->assign('group_to_delete', $group_name); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_group')); -$smarty->assign('content_page_name', 'group_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'group_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/group_edit.php b/group_edit.php index 097c34054..ab3065d52 100644 --- a/group_edit.php +++ b/group_edit.php @@ -231,5 +231,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="handlePluginCheckboxes();"'); $smarty->assign('title', $i18n->get('title.edit_group')); -$smarty->assign('content_page_name', 'group_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'group_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/groups.php b/groups.php index 5773220a2..a7bf2dfe6 100644 --- a/groups.php +++ b/groups.php @@ -39,5 +39,5 @@ $smarty->assign('subgroups', $user->getSubgroups($group_id)); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('label.subgroups')); -$smarty->assign('content_page_name', 'groups2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'groups.tpl'); +$smarty->display('index.tpl'); diff --git a/import.php b/import.php index c4b59c240..b743b3f5a 100644 --- a/import.php +++ b/import.php @@ -25,5 +25,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray()) ); $smarty->assign('title', $i18n->get('title.import')); -$smarty->assign('content_page_name', 'import2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'import.tpl'); +$smarty->display('index.tpl'); diff --git a/initialize.php b/initialize.php index 658b5fb64..f69c77a18 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5542"); +define("APP_VERSION", "1.19.28.5543"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/user_add.php b/user_add.php index 7325682e5..8d584afb7 100644 --- a/user_add.php +++ b/user_add.php @@ -217,5 +217,5 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_quota', $show_quota); $smarty->assign('show_projects', $show_projects); $smarty->assign('title', $i18n->get('title.add_user')); -$smarty->assign('content_page_name', 'user_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'user_add.tpl'); +$smarty->display('index.tpl'); diff --git a/user_delete.php b/user_delete.php index 99378fda4..e6ec7365e 100644 --- a/user_delete.php +++ b/user_delete.php @@ -59,5 +59,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.delete_user')); -$smarty->assign('content_page_name', 'user_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'user_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/user_edit.php b/user_edit.php index bae837c43..10aaebbb0 100644 --- a/user_edit.php +++ b/user_edit.php @@ -279,5 +279,5 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_projects', $show_projects); $smarty->assign('user_id', $user_id); $smarty->assign('title', $i18n->get('title.edit_user')); -$smarty->assign('content_page_name', 'user_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'user_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/users.php b/users.php index a0ccdc3c1..16a422390 100644 --- a/users.php +++ b/users.php @@ -41,5 +41,5 @@ $smarty->assign('inactive_users', $inactive_users); $smarty->assign('show_quota', $user->isPluginEnabled('mq')); $smarty->assign('title', $i18n->get('title.users')); -$smarty->assign('content_page_name', 'users2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'users.tpl'); +$smarty->display('index.tpl'); diff --git a/week.php b/week.php index 63bd38235..6a2a25e26 100644 --- a/week.php +++ b/week.php @@ -559,5 +559,5 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('show_start', $showStart); $smarty->assign('show_files', $showFiles); $smarty->assign('title', $i18n->get('menu.week')); -$smarty->assign('content_page_name', 'week2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'week.tpl'); +$smarty->display('index.tpl'); diff --git a/week_view.php b/week_view.php index d612239b0..1718afd4b 100644 --- a/week_view.php +++ b/week_view.php @@ -45,5 +45,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.week_view')); -$smarty->assign('content_page_name', 'week_view2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'week_view.tpl'); +$smarty->display('index.tpl'); diff --git a/work_units.php b/work_units.php index ab2ac81af..b8a4a747e 100644 --- a/work_units.php +++ b/work_units.php @@ -53,5 +53,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.work_units')); -$smarty->assign('content_page_name', 'work_units2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'work_units.tpl'); +$smarty->display('index.tpl'); From 9358c20bf5a5ff35c17633c093fca9f8a0d84118 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 17:05:44 +0000 Subject: [PATCH 2225/2515] Some more templates renamed. --- WEB-INF/templates/{template_add2.tpl => template_add.tpl} | 0 .../templates/{template_delete2.tpl => template_delete.tpl} | 0 WEB-INF/templates/{template_edit2.tpl => template_edit.tpl} | 0 WEB-INF/templates/{templates2.tpl => templates.tpl} | 0 WEB-INF/templates/{time2.tpl => time.tpl} | 0 WEB-INF/templates/{time_delete2.tpl => time_delete.tpl} | 0 WEB-INF/templates/{time_edit2.tpl => time_edit.tpl} | 0 WEB-INF/templates/{timer2.tpl => timer.tpl} | 0 WEB-INF/templates/{timesheet_add2.tpl => timesheet_add.tpl} | 0 .../templates/{timesheet_delete2.tpl => timesheet_delete.tpl} | 0 WEB-INF/templates/{timesheet_edit2.tpl => timesheet_edit.tpl} | 0 WEB-INF/templates/{timesheet_view2.tpl => timesheet_view.tpl} | 0 WEB-INF/templates/{timesheets2.tpl => timesheets.tpl} | 0 initialize.php | 2 +- template_add.php | 4 ++-- template_delete.php | 4 ++-- template_edit.php | 4 ++-- templates.php | 4 ++-- time.php | 4 ++-- time_delete.php | 4 ++-- time_edit.php | 4 ++-- timer.php | 4 ++-- timesheet_add.php | 4 ++-- timesheet_delete.php | 4 ++-- timesheet_edit.php | 4 ++-- timesheet_view.php | 4 ++-- timesheets.php | 4 ++-- 27 files changed, 27 insertions(+), 27 deletions(-) rename WEB-INF/templates/{template_add2.tpl => template_add.tpl} (100%) rename WEB-INF/templates/{template_delete2.tpl => template_delete.tpl} (100%) rename WEB-INF/templates/{template_edit2.tpl => template_edit.tpl} (100%) rename WEB-INF/templates/{templates2.tpl => templates.tpl} (100%) rename WEB-INF/templates/{time2.tpl => time.tpl} (100%) rename WEB-INF/templates/{time_delete2.tpl => time_delete.tpl} (100%) rename WEB-INF/templates/{time_edit2.tpl => time_edit.tpl} (100%) rename WEB-INF/templates/{timer2.tpl => timer.tpl} (100%) rename WEB-INF/templates/{timesheet_add2.tpl => timesheet_add.tpl} (100%) rename WEB-INF/templates/{timesheet_delete2.tpl => timesheet_delete.tpl} (100%) rename WEB-INF/templates/{timesheet_edit2.tpl => timesheet_edit.tpl} (100%) rename WEB-INF/templates/{timesheet_view2.tpl => timesheet_view.tpl} (100%) rename WEB-INF/templates/{timesheets2.tpl => timesheets.tpl} (100%) diff --git a/WEB-INF/templates/template_add2.tpl b/WEB-INF/templates/template_add.tpl similarity index 100% rename from WEB-INF/templates/template_add2.tpl rename to WEB-INF/templates/template_add.tpl diff --git a/WEB-INF/templates/template_delete2.tpl b/WEB-INF/templates/template_delete.tpl similarity index 100% rename from WEB-INF/templates/template_delete2.tpl rename to WEB-INF/templates/template_delete.tpl diff --git a/WEB-INF/templates/template_edit2.tpl b/WEB-INF/templates/template_edit.tpl similarity index 100% rename from WEB-INF/templates/template_edit2.tpl rename to WEB-INF/templates/template_edit.tpl diff --git a/WEB-INF/templates/templates2.tpl b/WEB-INF/templates/templates.tpl similarity index 100% rename from WEB-INF/templates/templates2.tpl rename to WEB-INF/templates/templates.tpl diff --git a/WEB-INF/templates/time2.tpl b/WEB-INF/templates/time.tpl similarity index 100% rename from WEB-INF/templates/time2.tpl rename to WEB-INF/templates/time.tpl diff --git a/WEB-INF/templates/time_delete2.tpl b/WEB-INF/templates/time_delete.tpl similarity index 100% rename from WEB-INF/templates/time_delete2.tpl rename to WEB-INF/templates/time_delete.tpl diff --git a/WEB-INF/templates/time_edit2.tpl b/WEB-INF/templates/time_edit.tpl similarity index 100% rename from WEB-INF/templates/time_edit2.tpl rename to WEB-INF/templates/time_edit.tpl diff --git a/WEB-INF/templates/timer2.tpl b/WEB-INF/templates/timer.tpl similarity index 100% rename from WEB-INF/templates/timer2.tpl rename to WEB-INF/templates/timer.tpl diff --git a/WEB-INF/templates/timesheet_add2.tpl b/WEB-INF/templates/timesheet_add.tpl similarity index 100% rename from WEB-INF/templates/timesheet_add2.tpl rename to WEB-INF/templates/timesheet_add.tpl diff --git a/WEB-INF/templates/timesheet_delete2.tpl b/WEB-INF/templates/timesheet_delete.tpl similarity index 100% rename from WEB-INF/templates/timesheet_delete2.tpl rename to WEB-INF/templates/timesheet_delete.tpl diff --git a/WEB-INF/templates/timesheet_edit2.tpl b/WEB-INF/templates/timesheet_edit.tpl similarity index 100% rename from WEB-INF/templates/timesheet_edit2.tpl rename to WEB-INF/templates/timesheet_edit.tpl diff --git a/WEB-INF/templates/timesheet_view2.tpl b/WEB-INF/templates/timesheet_view.tpl similarity index 100% rename from WEB-INF/templates/timesheet_view2.tpl rename to WEB-INF/templates/timesheet_view.tpl diff --git a/WEB-INF/templates/timesheets2.tpl b/WEB-INF/templates/timesheets.tpl similarity index 100% rename from WEB-INF/templates/timesheets2.tpl rename to WEB-INF/templates/timesheets.tpl diff --git a/initialize.php b/initialize.php index f69c77a18..c57314c26 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5543"); +define("APP_VERSION", "1.19.28.5544"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/template_add.php b/template_add.php index 6347d22e3..cb84fb33b 100644 --- a/template_add.php +++ b/template_add.php @@ -65,5 +65,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', $bindTemplatesWithProjects && count($projects) > 0); $smarty->assign('title', $i18n->get('title.add_template')); -$smarty->assign('content_page_name', 'template_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'template_add.tpl'); +$smarty->display('index.tpl'); diff --git a/template_delete.php b/template_delete.php index 792cadbd0..a4996e05b 100644 --- a/template_delete.php +++ b/template_delete.php @@ -47,5 +47,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.templateDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_template')); -$smarty->assign('content_page_name', 'template_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'template_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/template_edit.php b/template_edit.php index 3451ff646..814eff591 100644 --- a/template_edit.php +++ b/template_edit.php @@ -83,5 +83,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', $bindTemplatesWithProjects && count($projects) > 0); $smarty->assign('title', $i18n->get('title.edit_template')); -$smarty->assign('content_page_name', 'template_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'template_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/templates.php b/templates.php index 53d57b86f..636d4bc10 100644 --- a/templates.php +++ b/templates.php @@ -59,5 +59,5 @@ $smarty->assign('inactive_templates', $inactiveTemplates); $smarty->assign('show_bind_with_projects_checkbox', $showBindWithProjectsCheckbox); $smarty->assign('title', $i18n->get('title.templates')); -$smarty->assign('content_page_name', 'templates2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'templates.tpl'); +$smarty->display('index.tpl'); diff --git a/time.php b/time.php index 9b366b543..9bd31127f 100644 --- a/time.php +++ b/time.php @@ -488,5 +488,5 @@ $smarty->assign('onload', 'onLoad="fillDropdowns();prepopulateNote();adjustTodayLinks()"'); $smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); $smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'time2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'time.tpl'); +$smarty->display('index.tpl'); diff --git a/time_delete.php b/time_delete.php index 5b3849525..9c028dabb 100644 --- a/time_delete.php +++ b/time_delete.php @@ -69,5 +69,5 @@ $smarty->assign('show_duration', $showDuration); $smarty->assign('forms', array($form->getName() => $form->toArray())); $smarty->assign('title', $i18n->get('title.delete_time_record')); -$smarty->assign('content_page_name', 'time_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'time_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/time_edit.php b/time_edit.php index 8e9f31e56..d34ae1ca6 100644 --- a/time_edit.php +++ b/time_edit.php @@ -467,5 +467,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('title', $i18n->get('title.edit_time_record')); -$smarty->assign('content_page_name', 'time_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'time_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/timer.php b/timer.php index aa51a4dc4..cd0081f3d 100644 --- a/timer.php +++ b/timer.php @@ -307,5 +307,5 @@ $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $selected_date->toString($user->date_format)); $smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'timer2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timer.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheet_add.php b/timesheet_add.php index 5fb15df6e..7361c4f28 100644 --- a/timesheet_add.php +++ b/timesheet_add.php @@ -80,5 +80,5 @@ $smarty->assign('show_client', $showClient); $smarty->assign('show_project', $showProject); $smarty->assign('title', $i18n->get('title.add_timesheet')); -$smarty->assign('content_page_name', 'timesheet_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timesheet_add.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheet_delete.php b/timesheet_delete.php index b0b847973..ff1e4e180 100644 --- a/timesheet_delete.php +++ b/timesheet_delete.php @@ -47,5 +47,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_timesheet')); -$smarty->assign('content_page_name', 'timesheet_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timesheet_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheet_edit.php b/timesheet_edit.php index c9676ed5a..164cc61bb 100644 --- a/timesheet_edit.php +++ b/timesheet_edit.php @@ -81,5 +81,5 @@ $smarty->assign('onload', 'onLoad="document.timesheetForm.timesheet_name.focus()"'); $smarty->assign('can_delete', $canDelete); $smarty->assign('title', $i18n->get('title.edit_timesheet')); -$smarty->assign('content_page_name', 'timesheet_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timesheet_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheet_view.php b/timesheet_view.php index a74424a6b..905371768 100644 --- a/timesheet_view.php +++ b/timesheet_view.php @@ -126,5 +126,5 @@ $smarty->assign('show_approve', $showApprove); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheet').": ".$timesheet['start_date']." - ".$timesheet['end_date']); -$smarty->assign('content_page_name', 'timesheet_view2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timesheet_view.tpl'); +$smarty->display('index.tpl'); diff --git a/timesheets.php b/timesheets.php index 54bbc3396..7dbbb78df 100644 --- a/timesheets.php +++ b/timesheets.php @@ -78,5 +78,5 @@ $smarty->assign('show_files', $showFiles); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheets')); -$smarty->assign('content_page_name', 'timesheets2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'timesheets.tpl'); +$smarty->display('index.tpl'); From eea705e1dcf06723cd7f1f334e4f716f8cfaae1a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 17:20:08 +0000 Subject: [PATCH 2226/2515] More work in progress on template renaming. --- WEB-INF/templates/{quotas2.tpl => quotas.tpl} | 0 WEB-INF/templates/{register2.tpl => register.tpl} | 0 WEB-INF/templates/{report2.tpl => report.tpl} | 0 WEB-INF/templates/{reports2.tpl => reports.tpl} | 2 +- WEB-INF/templates/{role_add2.tpl => role_add.tpl} | 0 WEB-INF/templates/{role_delete2.tpl => role_delete.tpl} | 0 WEB-INF/templates/{role_edit2.tpl => role_edit.tpl} | 0 WEB-INF/templates/{roles2.tpl => roles.tpl} | 0 WEB-INF/templates/{success2.tpl => success.tpl} | 0 WEB-INF/templates/{swap_roles2.tpl => swap_roles.tpl} | 0 WEB-INF/templates/{task_add2.tpl => task_add.tpl} | 0 WEB-INF/templates/{task_delete2.tpl => task_delete.tpl} | 0 WEB-INF/templates/{task_edit2.tpl => task_edit.tpl} | 0 WEB-INF/templates/{tasks2.tpl => tasks.tpl} | 0 initialize.php | 2 +- quotas.php | 4 ++-- register.php | 4 ++-- report.php | 4 ++-- reports.php | 4 ++-- role_add.php | 4 ++-- role_delete.php | 4 ++-- role_edit.php | 4 ++-- roles.php | 4 ++-- success.php | 4 ++-- swap_roles.php | 4 ++-- task_add.php | 4 ++-- task_delete.php | 4 ++-- task_edit.php | 4 ++-- tasks.php | 4 ++-- 29 files changed, 30 insertions(+), 30 deletions(-) rename WEB-INF/templates/{quotas2.tpl => quotas.tpl} (100%) rename WEB-INF/templates/{register2.tpl => register.tpl} (100%) rename WEB-INF/templates/{report2.tpl => report.tpl} (100%) rename WEB-INF/templates/{reports2.tpl => reports.tpl} (99%) rename WEB-INF/templates/{role_add2.tpl => role_add.tpl} (100%) rename WEB-INF/templates/{role_delete2.tpl => role_delete.tpl} (100%) rename WEB-INF/templates/{role_edit2.tpl => role_edit.tpl} (100%) rename WEB-INF/templates/{roles2.tpl => roles.tpl} (100%) rename WEB-INF/templates/{success2.tpl => success.tpl} (100%) rename WEB-INF/templates/{swap_roles2.tpl => swap_roles.tpl} (100%) rename WEB-INF/templates/{task_add2.tpl => task_add.tpl} (100%) rename WEB-INF/templates/{task_delete2.tpl => task_delete.tpl} (100%) rename WEB-INF/templates/{task_edit2.tpl => task_edit.tpl} (100%) rename WEB-INF/templates/{tasks2.tpl => tasks.tpl} (100%) diff --git a/WEB-INF/templates/quotas2.tpl b/WEB-INF/templates/quotas.tpl similarity index 100% rename from WEB-INF/templates/quotas2.tpl rename to WEB-INF/templates/quotas.tpl diff --git a/WEB-INF/templates/register2.tpl b/WEB-INF/templates/register.tpl similarity index 100% rename from WEB-INF/templates/register2.tpl rename to WEB-INF/templates/register.tpl diff --git a/WEB-INF/templates/report2.tpl b/WEB-INF/templates/report.tpl similarity index 100% rename from WEB-INF/templates/report2.tpl rename to WEB-INF/templates/report.tpl diff --git a/WEB-INF/templates/reports2.tpl b/WEB-INF/templates/reports.tpl similarity index 99% rename from WEB-INF/templates/reports2.tpl rename to WEB-INF/templates/reports.tpl index 294d5ea7c..aa8e9d633 100644 --- a/WEB-INF/templates/reports2.tpl +++ b/WEB-INF/templates/reports.tpl @@ -121,7 +121,7 @@ function fillProjectDropdown(id) { function fillTaskDropdown(project_id) { var str_task_ids; // Get a string of comma-separated task ids. - if (project_id) { + if (project_id) { var property = "p" + project_id; str_task_ids = obj_tasks[property]; } diff --git a/WEB-INF/templates/role_add2.tpl b/WEB-INF/templates/role_add.tpl similarity index 100% rename from WEB-INF/templates/role_add2.tpl rename to WEB-INF/templates/role_add.tpl diff --git a/WEB-INF/templates/role_delete2.tpl b/WEB-INF/templates/role_delete.tpl similarity index 100% rename from WEB-INF/templates/role_delete2.tpl rename to WEB-INF/templates/role_delete.tpl diff --git a/WEB-INF/templates/role_edit2.tpl b/WEB-INF/templates/role_edit.tpl similarity index 100% rename from WEB-INF/templates/role_edit2.tpl rename to WEB-INF/templates/role_edit.tpl diff --git a/WEB-INF/templates/roles2.tpl b/WEB-INF/templates/roles.tpl similarity index 100% rename from WEB-INF/templates/roles2.tpl rename to WEB-INF/templates/roles.tpl diff --git a/WEB-INF/templates/success2.tpl b/WEB-INF/templates/success.tpl similarity index 100% rename from WEB-INF/templates/success2.tpl rename to WEB-INF/templates/success.tpl diff --git a/WEB-INF/templates/swap_roles2.tpl b/WEB-INF/templates/swap_roles.tpl similarity index 100% rename from WEB-INF/templates/swap_roles2.tpl rename to WEB-INF/templates/swap_roles.tpl diff --git a/WEB-INF/templates/task_add2.tpl b/WEB-INF/templates/task_add.tpl similarity index 100% rename from WEB-INF/templates/task_add2.tpl rename to WEB-INF/templates/task_add.tpl diff --git a/WEB-INF/templates/task_delete2.tpl b/WEB-INF/templates/task_delete.tpl similarity index 100% rename from WEB-INF/templates/task_delete2.tpl rename to WEB-INF/templates/task_delete.tpl diff --git a/WEB-INF/templates/task_edit2.tpl b/WEB-INF/templates/task_edit.tpl similarity index 100% rename from WEB-INF/templates/task_edit2.tpl rename to WEB-INF/templates/task_edit.tpl diff --git a/WEB-INF/templates/tasks2.tpl b/WEB-INF/templates/tasks.tpl similarity index 100% rename from WEB-INF/templates/tasks2.tpl rename to WEB-INF/templates/tasks.tpl diff --git a/initialize.php b/initialize.php index c57314c26..b2857f6ed 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5544"); +define("APP_VERSION", "1.19.28.5545"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/quotas.php b/quotas.php index c49fbf1f7..55214093f 100644 --- a/quotas.php +++ b/quotas.php @@ -107,5 +107,5 @@ $smarty->assign('months', $months); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.monthly_quotas')); -$smarty->assign('content_page_name', 'quotas2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'quotas.tpl'); +$smarty->display('index.tpl'); diff --git a/register.php b/register.php index 220376138..35fbee9cc 100644 --- a/register.php +++ b/register.php @@ -96,5 +96,5 @@ $smarty->assign('title', $i18n->get('title.add_group')); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.groupForm.group_name.focus()"'); -$smarty->assign('content_page_name', 'register2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'register.tpl'); +$smarty->display('index.tpl'); diff --git a/report.php b/report.php index cb959d488..bd2576f14 100644 --- a/report.php +++ b/report.php @@ -320,5 +320,5 @@ $smarty->assign('colspan', $colspan); $smarty->assign('bean', $bean); $smarty->assign('title', $i18n->get('title.report').": ".$totals['start_date']." - ".$totals['end_date']); -$smarty->assign('content_page_name', 'report2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'report.tpl'); +$smarty->display('index.tpl'); diff --git a/reports.php b/reports.php index 71f455bea..059c7d903 100644 --- a/reports.php +++ b/reports.php @@ -492,5 +492,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="handleCheckboxes();fillDropdowns()"'); $smarty->assign('title', $i18n->get('title.reports')); -$smarty->assign('content_page_name', 'reports2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'reports.tpl'); +$smarty->display('index.tpl'); diff --git a/role_add.php b/role_add.php index 54fd9bdb5..b2879dd8f 100644 --- a/role_add.php +++ b/role_add.php @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_role')); -$smarty->assign('content_page_name', 'role_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'role_add.tpl'); +$smarty->display('index.tpl'); diff --git a/role_delete.php b/role_delete.php index 805c89dba..e2f0805eb 100644 --- a/role_delete.php +++ b/role_delete.php @@ -46,5 +46,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.taskDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_role')); -$smarty->assign('content_page_name', 'role_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'role_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/role_edit.php b/role_edit.php index 03e1d2473..5192ee62d 100644 --- a/role_edit.php +++ b/role_edit.php @@ -115,5 +115,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_role')); -$smarty->assign('content_page_name', 'role_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'role_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/roles.php b/roles.php index f2795fb0f..569f2649a 100644 --- a/roles.php +++ b/roles.php @@ -17,5 +17,5 @@ $smarty->assign('active_roles', ttTeamHelper::getActiveRolesForUser()); $smarty->assign('inactive_roles', ttTeamHelper::getInactiveRolesForUser()); $smarty->assign('title', $i18n->get('title.roles')); -$smarty->assign('content_page_name', 'roles2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'roles.tpl'); +$smarty->display('index.tpl'); diff --git a/success.php b/success.php index eea4687a2..6fbf8ad2a 100644 --- a/success.php +++ b/success.php @@ -8,5 +8,5 @@ if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display. $smarty->assign('title', $i18n->get('title.success')); -$smarty->assign('content_page_name', 'success2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'success.tpl'); +$smarty->display('index.tpl'); diff --git a/swap_roles.php b/swap_roles.php index e49bed75b..7a036a777 100644 --- a/swap_roles.php +++ b/swap_roles.php @@ -49,5 +49,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.swapForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.swap_roles')); -$smarty->assign('content_page_name', 'swap_roles2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'swap_roles.tpl'); +$smarty->display('index.tpl'); diff --git a/task_add.php b/task_add.php index 4888677f1..3d8dcc1c7 100644 --- a/task_add.php +++ b/task_add.php @@ -62,5 +62,5 @@ $smarty->assign('show_projects', count($projects) > 0); $smarty->assign('onload', 'onLoad="document.taskForm.name.focus()"'); $smarty->assign('title', $i18n->get('title.add_task')); -$smarty->assign('content_page_name', 'task_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'task_add.tpl'); +$smarty->display('index.tpl'); diff --git a/task_delete.php b/task_delete.php index 61f5e23ff..04008010f 100644 --- a/task_delete.php +++ b/task_delete.php @@ -50,5 +50,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.taskDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_task')); -$smarty->assign('content_page_name', 'task_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'task_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/task_edit.php b/task_edit.php index 4b9a72aef..b2b61b80b 100644 --- a/task_edit.php +++ b/task_edit.php @@ -96,5 +96,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_projects', count($projects) > 0); $smarty->assign('title', $i18n->get('title.edit_task')); -$smarty->assign('content_page_name', 'task_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'task_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/tasks.php b/tasks.php index 464af6159..13787a8ab 100644 --- a/tasks.php +++ b/tasks.php @@ -49,5 +49,5 @@ $smarty->assign('active_tasks', $active_tasks); $smarty->assign('inactive_tasks', $inactive_tasks); $smarty->assign('title', $i18n->get('title.tasks')); -$smarty->assign('content_page_name', 'tasks2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'tasks.tpl'); +$smarty->display('index.tpl'); From 01dfa61fb9f34b4559d6be25e6efee210a2f046d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 18:00:57 +0000 Subject: [PATCH 2227/2515] More templates renamed. --- .../templates/{password_change2.tpl => password_change.tpl} | 0 WEB-INF/templates/{password_reset2.tpl => password_reset.tpl} | 0 WEB-INF/templates/{plugins2.tpl => plugins.tpl} | 0 ...predefined_expense_add2.tpl => predefined_expense_add.tpl} | 0 ...ined_expense_delete2.tpl => predefined_expense_delete.tpl} | 0 ...edefined_expense_edit2.tpl => predefined_expense_edit.tpl} | 0 .../{predefined_expenses2.tpl => predefined_expenses.tpl} | 0 WEB-INF/templates/{profile_edit2.tpl => profile_edit.tpl} | 0 WEB-INF/templates/{project_add2.tpl => project_add.tpl} | 0 WEB-INF/templates/{project_delete2.tpl => project_delete.tpl} | 0 WEB-INF/templates/{project_edit2.tpl => project_edit.tpl} | 0 WEB-INF/templates/{projects2.tpl => projects.tpl} | 0 initialize.php | 2 +- password_change.php | 4 ++-- password_reset.php | 4 ++-- plugins.php | 4 ++-- predefined_expense_add.php | 4 ++-- predefined_expense_delete.php | 4 ++-- predefined_expense_edit.php | 4 ++-- predefined_expenses.php | 4 ++-- profile_edit.php | 4 ++-- project_add.php | 4 ++-- project_delete.php | 4 ++-- project_edit.php | 4 ++-- projects.php | 4 ++-- 25 files changed, 25 insertions(+), 25 deletions(-) rename WEB-INF/templates/{password_change2.tpl => password_change.tpl} (100%) rename WEB-INF/templates/{password_reset2.tpl => password_reset.tpl} (100%) rename WEB-INF/templates/{plugins2.tpl => plugins.tpl} (100%) rename WEB-INF/templates/{predefined_expense_add2.tpl => predefined_expense_add.tpl} (100%) rename WEB-INF/templates/{predefined_expense_delete2.tpl => predefined_expense_delete.tpl} (100%) rename WEB-INF/templates/{predefined_expense_edit2.tpl => predefined_expense_edit.tpl} (100%) rename WEB-INF/templates/{predefined_expenses2.tpl => predefined_expenses.tpl} (100%) rename WEB-INF/templates/{profile_edit2.tpl => profile_edit.tpl} (100%) rename WEB-INF/templates/{project_add2.tpl => project_add.tpl} (100%) rename WEB-INF/templates/{project_delete2.tpl => project_delete.tpl} (100%) rename WEB-INF/templates/{project_edit2.tpl => project_edit.tpl} (100%) rename WEB-INF/templates/{projects2.tpl => projects.tpl} (100%) diff --git a/WEB-INF/templates/password_change2.tpl b/WEB-INF/templates/password_change.tpl similarity index 100% rename from WEB-INF/templates/password_change2.tpl rename to WEB-INF/templates/password_change.tpl diff --git a/WEB-INF/templates/password_reset2.tpl b/WEB-INF/templates/password_reset.tpl similarity index 100% rename from WEB-INF/templates/password_reset2.tpl rename to WEB-INF/templates/password_reset.tpl diff --git a/WEB-INF/templates/plugins2.tpl b/WEB-INF/templates/plugins.tpl similarity index 100% rename from WEB-INF/templates/plugins2.tpl rename to WEB-INF/templates/plugins.tpl diff --git a/WEB-INF/templates/predefined_expense_add2.tpl b/WEB-INF/templates/predefined_expense_add.tpl similarity index 100% rename from WEB-INF/templates/predefined_expense_add2.tpl rename to WEB-INF/templates/predefined_expense_add.tpl diff --git a/WEB-INF/templates/predefined_expense_delete2.tpl b/WEB-INF/templates/predefined_expense_delete.tpl similarity index 100% rename from WEB-INF/templates/predefined_expense_delete2.tpl rename to WEB-INF/templates/predefined_expense_delete.tpl diff --git a/WEB-INF/templates/predefined_expense_edit2.tpl b/WEB-INF/templates/predefined_expense_edit.tpl similarity index 100% rename from WEB-INF/templates/predefined_expense_edit2.tpl rename to WEB-INF/templates/predefined_expense_edit.tpl diff --git a/WEB-INF/templates/predefined_expenses2.tpl b/WEB-INF/templates/predefined_expenses.tpl similarity index 100% rename from WEB-INF/templates/predefined_expenses2.tpl rename to WEB-INF/templates/predefined_expenses.tpl diff --git a/WEB-INF/templates/profile_edit2.tpl b/WEB-INF/templates/profile_edit.tpl similarity index 100% rename from WEB-INF/templates/profile_edit2.tpl rename to WEB-INF/templates/profile_edit.tpl diff --git a/WEB-INF/templates/project_add2.tpl b/WEB-INF/templates/project_add.tpl similarity index 100% rename from WEB-INF/templates/project_add2.tpl rename to WEB-INF/templates/project_add.tpl diff --git a/WEB-INF/templates/project_delete2.tpl b/WEB-INF/templates/project_delete.tpl similarity index 100% rename from WEB-INF/templates/project_delete2.tpl rename to WEB-INF/templates/project_delete.tpl diff --git a/WEB-INF/templates/project_edit2.tpl b/WEB-INF/templates/project_edit.tpl similarity index 100% rename from WEB-INF/templates/project_edit2.tpl rename to WEB-INF/templates/project_edit.tpl diff --git a/WEB-INF/templates/projects2.tpl b/WEB-INF/templates/projects.tpl similarity index 100% rename from WEB-INF/templates/projects2.tpl rename to WEB-INF/templates/projects.tpl diff --git a/initialize.php b/initialize.php index b2857f6ed..691f66ed2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5545"); +define("APP_VERSION", "1.19.28.5546"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/password_change.php b/password_change.php index f501a78e5..992bdd87b 100644 --- a/password_change.php +++ b/password_change.php @@ -77,5 +77,5 @@ $smarty->assign('forms', array($form->getName() => $form->toArray())); $smarty->assign('title', $i18n->get('title.change_password')); -$smarty->assign('content_page_name', 'password_change2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'password_change.tpl'); +$smarty->display('index.tpl'); diff --git a/password_reset.php b/password_reset.php index a9dfd1f0a..9645139e4 100644 --- a/password_reset.php +++ b/password_reset.php @@ -106,5 +106,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.resetPasswordForm.login.focus()"'); $smarty->assign('title', $i18n->get('title.reset_password')); -$smarty->assign('content_page_name', 'password_reset2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'password_reset.tpl'); +$smarty->display('index.tpl'); diff --git a/plugins.php b/plugins.php index 730889bc0..9b3bc1a27 100644 --- a/plugins.php +++ b/plugins.php @@ -141,5 +141,5 @@ $smarty->assign('onload', 'onLoad="handlePluginCheckboxes();"'); $smarty->assign('user_exists', $user->exists()); $smarty->assign('title', $i18n->get('title.plugins')); -$smarty->assign('content_page_name', 'plugins2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'plugins.tpl'); +$smarty->display('index.tpl'); diff --git a/predefined_expense_add.php b/predefined_expense_add.php index 8cac318f1..08e395ce2 100644 --- a/predefined_expense_add.php +++ b/predefined_expense_add.php @@ -45,5 +45,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_add.tpl'); +$smarty->display('index.tpl'); diff --git a/predefined_expense_delete.php b/predefined_expense_delete.php index 26b726fc1..e965b0be2 100644 --- a/predefined_expense_delete.php +++ b/predefined_expense_delete.php @@ -48,5 +48,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.predefinedExpenseDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/predefined_expense_edit.php b/predefined_expense_edit.php index d1b557553..8f4750245 100644 --- a/predefined_expense_edit.php +++ b/predefined_expense_edit.php @@ -55,5 +55,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_predefined_expense')); -$smarty->assign('content_page_name', 'predefined_expense_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'predefined_expense_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/predefined_expenses.php b/predefined_expenses.php index c44aee27b..9f94bd1cc 100644 --- a/predefined_expenses.php +++ b/predefined_expenses.php @@ -33,5 +33,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('predefined_expenses', $predefinedExpenses); $smarty->assign('title', $i18n->get('title.predefined_expenses')); -$smarty->assign('content_page_name', 'predefined_expenses2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'predefined_expenses.tpl'); +$smarty->display('index.tpl'); diff --git a/profile_edit.php b/profile_edit.php index f85473fe4..a9f11fc2d 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -87,5 +87,5 @@ $smarty->assign('auth_external', $auth->isPasswordExternal()); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.profile')); -$smarty->assign('content_page_name', 'profile_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'profile_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/project_add.php b/project_add.php index 16af7a8d1..35b45c97a 100644 --- a/project_add.php +++ b/project_add.php @@ -91,5 +91,5 @@ $smarty->assign('show_users', count($users) > 0); $smarty->assign('show_tasks', $show_tasks); $smarty->assign('title', $i18n->get('title.add_project')); -$smarty->assign('content_page_name', 'project_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'project_add.tpl'); +$smarty->display('index.tpl'); diff --git a/project_delete.php b/project_delete.php index 2d6ca2895..4f4353b87 100644 --- a/project_delete.php +++ b/project_delete.php @@ -47,5 +47,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.projectDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_project')); -$smarty->assign('content_page_name', 'project_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'project_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/project_edit.php b/project_edit.php index cbb2c1f9b..917b2e974 100644 --- a/project_edit.php +++ b/project_edit.php @@ -108,5 +108,5 @@ $smarty->assign('show_users', count($users) > 0); $smarty->assign('show_tasks', $show_tasks); $smarty->assign('title', $i18n->get('title.edit_project')); -$smarty->assign('content_page_name', 'project_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'project_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/projects.php b/projects.php index e9a0b5dcf..ed4d371df 100644 --- a/projects.php +++ b/projects.php @@ -30,5 +30,5 @@ $smarty->assign('inactive_projects', $inactive_projects); $smarty->assign('show_files', $showFiles); $smarty->assign('title', $i18n->get('title.projects')); -$smarty->assign('content_page_name', 'projects2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'projects.tpl'); +$smarty->display('index.tpl'); From 339fea0fc8c13ba9ad30064f9d255b10761184b3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 18:20:47 +0000 Subject: [PATCH 2228/2515] Finished renaming template files. --- WEB-INF/templates/index2.tpl | 5 ----- WEB-INF/templates/{invoice_add2.tpl => invoice_add.tpl} | 0 .../templates/{invoice_delete2.tpl => invoice_delete.tpl} | 0 WEB-INF/templates/{invoice_view2.tpl => invoice_view.tpl} | 0 WEB-INF/templates/{invoices2.tpl => invoices.tpl} | 0 WEB-INF/templates/{locking2.tpl => locking.tpl} | 0 WEB-INF/templates/{login.db2.tpl => login.db.tpl} | 0 WEB-INF/templates/{login.ldap2.tpl => login.ldap.tpl} | 0 WEB-INF/templates/{login2.tpl => login.tpl} | 2 +- WEB-INF/templates/{mail2.tpl => mail.tpl} | 0 .../{notification_add2.tpl => notification_add.tpl} | 0 .../{notification_delete2.tpl => notification_delete.tpl} | 0 .../{notification_edit2.tpl => notification_edit.tpl} | 0 WEB-INF/templates/{notifications2.tpl => notifications.tpl} | 0 initialize.php | 2 +- invoice_add.php | 4 ++-- invoice_delete.php | 4 ++-- invoice_send.php | 4 ++-- invoice_view.php | 4 ++-- invoices.php | 4 ++-- locking.php | 4 ++-- login.php | 6 +++--- notification_add.php | 4 ++-- notification_delete.php | 4 ++-- notification_edit.php | 4 ++-- notifications.php | 4 ++-- report_send.php | 4 ++-- site_map.php | 2 +- 28 files changed, 28 insertions(+), 33 deletions(-) delete mode 100644 WEB-INF/templates/index2.tpl rename WEB-INF/templates/{invoice_add2.tpl => invoice_add.tpl} (100%) rename WEB-INF/templates/{invoice_delete2.tpl => invoice_delete.tpl} (100%) rename WEB-INF/templates/{invoice_view2.tpl => invoice_view.tpl} (100%) rename WEB-INF/templates/{invoices2.tpl => invoices.tpl} (100%) rename WEB-INF/templates/{locking2.tpl => locking.tpl} (100%) rename WEB-INF/templates/{login.db2.tpl => login.db.tpl} (100%) rename WEB-INF/templates/{login.ldap2.tpl => login.ldap.tpl} (100%) rename WEB-INF/templates/{login2.tpl => login.tpl} (85%) rename WEB-INF/templates/{mail2.tpl => mail.tpl} (100%) rename WEB-INF/templates/{notification_add2.tpl => notification_add.tpl} (100%) rename WEB-INF/templates/{notification_delete2.tpl => notification_delete.tpl} (100%) rename WEB-INF/templates/{notification_edit2.tpl => notification_edit.tpl} (100%) rename WEB-INF/templates/{notifications2.tpl => notifications.tpl} (100%) diff --git a/WEB-INF/templates/index2.tpl b/WEB-INF/templates/index2.tpl deleted file mode 100644 index 75a751e08..000000000 --- a/WEB-INF/templates/index2.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{include file="header.tpl"} - -{if $content_page_name}{include file="$content_page_name"}{/if} - -{include file="footer.tpl"} diff --git a/WEB-INF/templates/invoice_add2.tpl b/WEB-INF/templates/invoice_add.tpl similarity index 100% rename from WEB-INF/templates/invoice_add2.tpl rename to WEB-INF/templates/invoice_add.tpl diff --git a/WEB-INF/templates/invoice_delete2.tpl b/WEB-INF/templates/invoice_delete.tpl similarity index 100% rename from WEB-INF/templates/invoice_delete2.tpl rename to WEB-INF/templates/invoice_delete.tpl diff --git a/WEB-INF/templates/invoice_view2.tpl b/WEB-INF/templates/invoice_view.tpl similarity index 100% rename from WEB-INF/templates/invoice_view2.tpl rename to WEB-INF/templates/invoice_view.tpl diff --git a/WEB-INF/templates/invoices2.tpl b/WEB-INF/templates/invoices.tpl similarity index 100% rename from WEB-INF/templates/invoices2.tpl rename to WEB-INF/templates/invoices.tpl diff --git a/WEB-INF/templates/locking2.tpl b/WEB-INF/templates/locking.tpl similarity index 100% rename from WEB-INF/templates/locking2.tpl rename to WEB-INF/templates/locking.tpl diff --git a/WEB-INF/templates/login.db2.tpl b/WEB-INF/templates/login.db.tpl similarity index 100% rename from WEB-INF/templates/login.db2.tpl rename to WEB-INF/templates/login.db.tpl diff --git a/WEB-INF/templates/login.ldap2.tpl b/WEB-INF/templates/login.ldap.tpl similarity index 100% rename from WEB-INF/templates/login.ldap2.tpl rename to WEB-INF/templates/login.ldap.tpl diff --git a/WEB-INF/templates/login2.tpl b/WEB-INF/templates/login.tpl similarity index 85% rename from WEB-INF/templates/login2.tpl rename to WEB-INF/templates/login.tpl index 755763c35..e6a8a4ed3 100644 --- a/WEB-INF/templates/login2.tpl +++ b/WEB-INF/templates/login.tpl @@ -9,7 +9,7 @@ function get_date() { {$forms.loginForm.open} -{include file="login.`$smarty.const.AUTH_MODULE`2.tpl"} +{include file="login.`$smarty.const.AUTH_MODULE`.tpl"} {$forms.loginForm.close} {if !empty($about_text)} diff --git a/WEB-INF/templates/mail2.tpl b/WEB-INF/templates/mail.tpl similarity index 100% rename from WEB-INF/templates/mail2.tpl rename to WEB-INF/templates/mail.tpl diff --git a/WEB-INF/templates/notification_add2.tpl b/WEB-INF/templates/notification_add.tpl similarity index 100% rename from WEB-INF/templates/notification_add2.tpl rename to WEB-INF/templates/notification_add.tpl diff --git a/WEB-INF/templates/notification_delete2.tpl b/WEB-INF/templates/notification_delete.tpl similarity index 100% rename from WEB-INF/templates/notification_delete2.tpl rename to WEB-INF/templates/notification_delete.tpl diff --git a/WEB-INF/templates/notification_edit2.tpl b/WEB-INF/templates/notification_edit.tpl similarity index 100% rename from WEB-INF/templates/notification_edit2.tpl rename to WEB-INF/templates/notification_edit.tpl diff --git a/WEB-INF/templates/notifications2.tpl b/WEB-INF/templates/notifications.tpl similarity index 100% rename from WEB-INF/templates/notifications2.tpl rename to WEB-INF/templates/notifications.tpl diff --git a/initialize.php b/initialize.php index 691f66ed2..0df7d7ecf 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5546"); +define("APP_VERSION", "1.19.28.5547"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_add.php b/invoice_add.php index bc337a000..e7018f009 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -80,5 +80,5 @@ $smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"'); $smarty->assign('show_project', $show_project); $smarty->assign('title', $i18n->get('title.add_invoice')); -$smarty->assign('content_page_name', 'invoice_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'invoice_add.tpl'); +$smarty->display('index.tpl'); diff --git a/invoice_delete.php b/invoice_delete.php index 7e80b1265..5b473dfa0 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_invoice')); -$smarty->assign('content_page_name', 'invoice_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'invoice_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/invoice_send.php b/invoice_send.php index c3126eb9c..5483a09b1 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -80,5 +80,5 @@ $smarty->assign('title', $i18n->get('title.send_invoice')); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"'); -$smarty->assign('content_page_name', 'mail2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'mail.tpl'); +$smarty->display('index.tpl'); diff --git a/invoice_view.php b/invoice_view.php index 621ae4a0c..b03b719e4 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -107,5 +107,5 @@ $smarty->assign('invoice_items', $invoice_items); $smarty->assign('colspan', $colspan); $smarty->assign('title', $i18n->get('title.view_invoice')); -$smarty->assign('content_page_name', 'invoice_view2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'invoice_view.tpl'); +$smarty->display('index.tpl'); diff --git a/invoices.php b/invoices.php index bbca99cc7..3f6438b96 100644 --- a/invoices.php +++ b/invoices.php @@ -90,5 +90,5 @@ $smarty->assign('show_sorting_options', count($invoices) > 1); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.invoices')); -$smarty->assign('content_page_name', 'invoices2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'invoices.tpl'); +$smarty->display('index.tpl'); diff --git a/locking.php b/locking.php index 5277ec90d..04c8d9419 100644 --- a/locking.php +++ b/locking.php @@ -37,5 +37,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.locking')); -$smarty->assign('content_page_name', 'locking2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'locking.tpl'); +$smarty->display('index.tpl'); diff --git a/login.php b/login.php index 31d7f6d19..09c7af141 100644 --- a/login.php +++ b/login.php @@ -60,7 +60,7 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_hint', $show_hint); $smarty->assign('onload', 'onLoad="document.loginForm.'.(!$cl_login?'login':'password').'.focus()"'); -$smarty->assign('title', $i18n->get('title.login')); -$smarty->assign('content_page_name', 'login2.tpl'); $smarty->assign('about_text', $i18n->get('form.login.about')); -$smarty->display('index2.tpl'); +$smarty->assign('title', $i18n->get('title.login')); +$smarty->assign('content_page_name', 'login.tpl'); +$smarty->display('index.tpl'); diff --git a/notification_add.php b/notification_add.php index 1290bfa23..99602fe5d 100644 --- a/notification_add.php +++ b/notification_add.php @@ -95,5 +95,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.add_notification')); -$smarty->assign('content_page_name', 'notification_add2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'notification_add.tpl'); +$smarty->display('index.tpl'); diff --git a/notification_delete.php b/notification_delete.php index 741826c03..93820427c 100644 --- a/notification_delete.php +++ b/notification_delete.php @@ -51,5 +51,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.notificationDeleteForm.btn_cancel.focus()"'); $smarty->assign('title', $i18n->get('title.delete_notification')); -$smarty->assign('content_page_name', 'notification_delete2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'notification_delete.tpl'); +$smarty->display('index.tpl'); diff --git a/notification_edit.php b/notification_edit.php index 43dbabcff..164127e93 100644 --- a/notification_edit.php +++ b/notification_edit.php @@ -106,5 +106,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.edit_notification')); -$smarty->assign('content_page_name', 'notification_edit2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'notification_edit.tpl'); +$smarty->display('index.tpl'); diff --git a/notifications.php b/notifications.php index 23d1feb16..5945320ef 100644 --- a/notifications.php +++ b/notifications.php @@ -40,5 +40,5 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('notifications', $notifications); $smarty->assign('title', $i18n->get('title.notifications')); -$smarty->assign('content_page_name', 'notifications2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'notifications.tpl'); +$smarty->display('index.tpl'); diff --git a/report_send.php b/report_send.php index 67e7136c6..b20dd6dfe 100644 --- a/report_send.php +++ b/report_send.php @@ -74,5 +74,5 @@ $smarty->assign('title', $i18n->get('title.send_report')); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"'); -$smarty->assign('content_page_name', 'mail2.tpl'); -$smarty->display('index2.tpl'); +$smarty->assign('content_page_name', 'mail.tpl'); +$smarty->display('index.tpl'); diff --git a/site_map.php b/site_map.php index 56a79511b..11695f781 100644 --- a/site_map.php +++ b/site_map.php @@ -14,4 +14,4 @@ // $smarty->assign('title', $i18n->get('form.label.menu')); $smarty->assign('content_page_name', 'site_map.tpl'); -$smarty->display('index2.tpl'); +$smarty->display('index.tpl'); From dc81e09a376196a503bc9ce0c6a0540b3721985f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 10 May 2021 18:31:47 +0000 Subject: [PATCH 2229/2515] Addressed a php warning. --- initialize.php | 2 +- reports.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index 0df7d7ecf..daa1667ab 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5547"); +define("APP_VERSION", "1.19.28.5548"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 059c7d903..b71706220 100644 --- a/reports.php +++ b/reports.php @@ -167,7 +167,7 @@ // Add user table. $showUsers = $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient(); -$user_list = array(); +$user_list = $user_list_active = $user_list_inactive = array(); if ($showUsers) { // Prepare user and assigned projects arrays. if ($user->can('view_reports') || $user->can('view_all_reports')) { @@ -206,7 +206,6 @@ 'layout'=>'V', 'groupin'=>$row_count)); - $user_list_inactive = array(); foreach ($inactive_users as $single_user) { $user_list_inactive[$single_user['id']] = $single_user['name']; $projects = ttProjectHelper::getAssignedProjects($single_user['id']); From 49e89ce143d21f13c22919bdd8a168db25ec12f8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 11 May 2021 13:02:46 +0000 Subject: [PATCH 2230/2515] Added a what is it link explaning delete invoice entries option. --- WEB-INF/templates/invoice_delete.tpl | 5 ++++- initialize.php | 2 +- site_map.php | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/invoice_delete.tpl b/WEB-INF/templates/invoice_delete.tpl index 6fb7cb6c4..951e5e816 100644 --- a/WEB-INF/templates/invoice_delete.tpl +++ b/WEB-INF/templates/invoice_delete.tpl @@ -23,7 +23,10 @@ License: See license.txt *}
{$forms.invoiceDeleteForm.delete_invoice_entries.control}{$forms.invoiceDeleteForm.delete_invoice_entries.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
diff --git a/initialize.php b/initialize.php index daa1667ab..90c7b3096 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5548"); +define("APP_VERSION", "1.19.28.5549"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/site_map.php b/site_map.php index 11695f781..f769edd76 100644 --- a/site_map.php +++ b/site_map.php @@ -12,6 +12,5 @@ global $auth; $authenticated = $auth->isAuthenticated(); // This call assigns 'authenticated' to smarty. -// $smarty->assign('title', $i18n->get('form.label.menu')); $smarty->assign('content_page_name', 'site_map.tpl'); $smarty->display('index.tpl'); From b141c562ab1802dc2a3c20a68d2d7254f4bc5def Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 14 May 2021 14:12:52 +0000 Subject: [PATCH 2231/2515] Fixed presentation issue on the login page. --- default.css | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/default.css b/default.css index e04cab3d5..956c35ed5 100644 --- a/default.css +++ b/default.css @@ -799,8 +799,6 @@ input[type=checkbox], label { div.table-divider { height: 30px; } -div#LoginAboutText { width: 400px; } - .uncompleted-entry { display: inline-block; height: 8px; diff --git a/initialize.php b/initialize.php index 90c7b3096..9c2bae6f8 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5549"); +define("APP_VERSION", "1.19.28.5550"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3a89ce9194bd0a38a4a9a854844455367390a72f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 14 May 2021 23:45:36 +0000 Subject: [PATCH 2232/2515] Removed no longer needed NOTE_INPUT_HEIGHT from config.php.dist. --- WEB-INF/config.php.dist | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index bbf647cec..9d9d90dfd 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -176,8 +176,6 @@ define('AUTH_MODULE', 'db'); // define('MONTHLY_QUOTA_YEAR_START', 2010); // If nothing is specified, it falls back to 2015. // define('MONTHLY_QUOTA_YEAR_END', 2025); // If nothing is specified, it falls back to 2030. -// Height in pixels for the note input field in time.php. Defaults to 40. -// define('NOTE_INPUT_HEIGHT', 100); // A comma-separated list of default plugins for new group registrations. // Example below enables charts and attachments. diff --git a/initialize.php b/initialize.php index 9c2bae6f8..2942020c1 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5550"); +define("APP_VERSION", "1.19.28.5551"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bc04705f7a876c73a68c49a4513acbf161e8741f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 15 May 2021 13:27:55 +0000 Subject: [PATCH 2233/2515] Introduced a what is it link explaining custom CSS in display options. --- WEB-INF/templates/display_options.tpl | 1 + initialize.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index e4da2cfac..8c9db8ea7 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -45,6 +45,7 @@ License: See license.txt *}
{$i18n.form.display_options.custom_css}
{$forms.displayOptionsForm.custom_css.control}
{$i18n.label.what_is_it}
{$forms.displayOptionsForm.btn_save.control}
diff --git a/initialize.php b/initialize.php index 2942020c1..dca1b42e7 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5551"); +define("APP_VERSION", "1.19.28.5552"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From beec12ef1f35549ab44b3f19a3ed5cf4785e0446 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 15 May 2021 14:54:33 +0000 Subject: [PATCH 2234/2515] Addressed a couple of php8 warnings. --- WEB-INF/lib/ttWeekViewHelper.class.php | 10 ++++++---- initialize.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 55e40dc18..421676312 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -406,8 +406,9 @@ static function getLockedDaysForWeek($start_date) { static function makeRowIdentifier($record) { global $user; // Start with client. + $row_identifier = ''; if ($user->isPluginEnabled('cl')) - $row_identifier = $record['client_id'] ? 'cl:'.$record['client_id'] : ''; + $row_identifier .= $record['client_id'] ? 'cl:'.$record['client_id'] : ''; // Add billable flag. if (!empty($row_identifier)) $row_identifier .= ','; $row_identifier .= 'bl:'.$record['billable']; @@ -417,7 +418,7 @@ static function makeRowIdentifier($record) { $row_identifier .= $record['task_id'] ? ',ts:'.$record['task_id'] : ''; // Add custom field parts. global $custom_fields; - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; if ($timeField['type'] == CustomFields::TYPE_TEXT) @@ -438,8 +439,9 @@ static function makeRowIdentifier($record) { static function makeRowLabel($record) { global $user; // Start with client. + $label = ''; if ($user->isPluginEnabled('cl')) - $label = $record['client']; + $label .= $record['client']; // Add project. if (!empty($label) && !empty($record['project'])) $label .= ' - '; @@ -451,7 +453,7 @@ static function makeRowLabel($record) { // Add custom field parts. global $custom_fields; - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $field_value = $record[$field_name]; diff --git a/initialize.php b/initialize.php index dca1b42e7..d3b1ff263 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5552"); +define("APP_VERSION", "1.19.28.5553"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ecb2c17d8d2f482f0112915c82ed7fbd69460479 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 15 May 2021 17:16:41 +0000 Subject: [PATCH 2235/2515] Improved week view by remembering custom fields and also printing them when configured to do so. --- WEB-INF/templates/week.tpl | 12 ++++++++++++ initialize.php | 2 +- week.php | 24 +++++++++++++----------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 99da5ef47..42fa0b34e 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -101,6 +101,11 @@ function fillDropdowns() { + {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + + {/foreach} + {/if} {if $show_client} {/if} @@ -125,6 +130,13 @@ function fillDropdowns() { {foreach $time_records as $record} + {* record custom fileds *} + {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} + {foreach $custom_fields->timeFields as $timeField} + {assign var="control_name" value='time_field_'|cat:$timeField['id']} + + {/foreach} + {/if} {if $show_client} {/if} diff --git a/initialize.php b/initialize.php index d3b1ff263..f1c0f038c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5553"); +define("APP_VERSION", "1.19.28.5554"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index 6a2a25e26..7687f9598 100644 --- a/week.php +++ b/week.php @@ -62,6 +62,7 @@ $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showFiles = $user->isPluginEnabled('at'); +$showRecordCustomFields = $user->isOptionEnabled('record_custom_fields'); // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); @@ -127,17 +128,17 @@ $timeCustomFields = array(); // If we have time custom fields - collect input. -if ($request->isPost()) { - if (isset($custom_fields) && $custom_fields->timeFields) { - foreach ($custom_fields->timeFields as $timeField) { - $control_name = 'time_field_'.$timeField['id']; - $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], - 'control_name' => $control_name, - 'label' => $timeField['label'], - 'type' => $timeField['type'], - 'required' => $timeField['required'], - 'value' => trim($request->getParameter($control_name))); - } +if (isset($custom_fields) && $custom_fields->timeFields) { + foreach ($custom_fields->timeFields as $timeField) { + $control_name = 'time_field_'.$timeField['id']; + $cl_control_name = $request->getParameter($control_name, ($request->isPost() ? null : @$_SESSION[$control_name])); + $_SESSION[$control_name] = $cl_control_name; + $timeCustomFields[$timeField['id']] = array('field_id' => $timeField['id'], + 'control_name' => $control_name, + 'label' => $timeField['label'], + 'type' => $timeField['type'], + 'required' => $timeField['required'], + 'value' => trim($cl_control_name)); } } @@ -548,6 +549,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $startDate->toString($user->date_format).' - '.$endDate->toString($user->date_format)); $smarty->assign('time_records', $records); +$smarty->assign('show_record_custom_fields', $showRecordCustomFields); $smarty->assign('show_navigation', !$user->isOptionEnabled('week_menu')); $smarty->assign('show_client', $showClient); $smarty->assign('show_billable', $showBillable); From bddfeb53d64046ea825477adf6d5a3dcaedac9d2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 15 May 2021 18:00:48 +0000 Subject: [PATCH 2236/2515] Renamed timer.php to puncher.php to implement it as a plugin. --- WEB-INF/templates/{timer.tpl => puncher.tpl} | 0 initialize.php | 2 +- timer.php => puncher.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename WEB-INF/templates/{timer.tpl => puncher.tpl} (100%) rename timer.php => puncher.php (99%) diff --git a/WEB-INF/templates/timer.tpl b/WEB-INF/templates/puncher.tpl similarity index 100% rename from WEB-INF/templates/timer.tpl rename to WEB-INF/templates/puncher.tpl diff --git a/initialize.php b/initialize.php index f1c0f038c..2ffd096f9 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5554"); +define("APP_VERSION", "1.19.28.5555"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/timer.php b/puncher.php similarity index 99% rename from timer.php rename to puncher.php index cd0081f3d..56292a574 100644 --- a/timer.php +++ b/puncher.php @@ -307,5 +307,5 @@ $smarty->assign('onload', 'onLoad="fillDropdowns()"'); $smarty->assign('timestring', $selected_date->toString($user->date_format)); $smarty->assign('title', $i18n->get('title.time')); -$smarty->assign('content_page_name', 'timer.tpl'); +$smarty->assign('content_page_name', 'puncher.tpl'); $smarty->display('index.tpl'); From 565b05d323a8983beda56447f82fc6586cd00a69 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 16 May 2021 14:35:08 +0000 Subject: [PATCH 2237/2515] Implemented puncher page as a plugin. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/da.lang.php | 1 - WEB-INF/resources/de.lang.php | 1 - WEB-INF/resources/en.lang.php | 4 +++- WEB-INF/resources/es.lang.php | 1 - WEB-INF/resources/et.lang.php | 2 -- WEB-INF/resources/fa.lang.php | 1 - WEB-INF/resources/fi.lang.php | 1 - WEB-INF/resources/fr.lang.php | 1 - WEB-INF/resources/gr.lang.php | 2 -- WEB-INF/resources/he.lang.php | 1 - WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/it.lang.php | 2 -- WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/nl.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/pl.lang.php | 1 - WEB-INF/resources/pt-br.lang.php | 1 - WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/ru.lang.php | 1 - WEB-INF/resources/sk.lang.php | 1 - WEB-INF/resources/sl.lang.php | 1 - WEB-INF/resources/sr.lang.php | 1 - WEB-INF/resources/sv.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - WEB-INF/templates/header.tpl | 3 +++ WEB-INF/templates/plugins.tpl | 20 ++++++++++++++-- WEB-INF/templates/puncher_conf.tpl | 17 ++++++++++++++ WEB-INF/templates/time.tpl | 4 +++- WEB-INF/templates/week_view.tpl | 4 ++-- initialize.php | 2 +- plugins.php | 5 ++++ puncher.php | 6 ++--- puncher_conf.php | 37 ++++++++++++++++++++++++++++++ time.php | 4 +++- 40 files changed, 95 insertions(+), 43 deletions(-) create mode 100644 WEB-INF/templates/puncher_conf.tpl create mode 100644 puncher_conf.php diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 34421e73d..5d115f9c8 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -240,7 +240,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 199a96faf..99d24e05f 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -250,7 +250,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index efdacc370..567310f30 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -231,7 +231,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index e41d92b09..9c2a35c27 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -222,7 +222,6 @@ 'label.paid_status' => 'Bezahlstatus', 'label.paid' => 'Bezahlt', 'label.mark_paid' => 'Als bezahlt setzen', -'label.week_menu' => 'Wochenansicht im Menü', 'label.week_note' => 'Wochennotiz', 'label.week_list' => 'Wochenliste', 'label.work_units' => 'Arbeitseinheiten', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 37aae4cae..1733fe489 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -24,6 +24,7 @@ 'menu.subgroups' => 'Subgroups', 'menu.plugins' => 'Plugins', 'menu.time' => 'Time', +'menu.puncher' => 'Punch', 'menu.week' => 'Week', 'menu.expenses' => 'Expenses', 'menu.reports' => 'Reports', @@ -173,6 +174,7 @@ 'label.select_none' => 'Deselect all', 'label.day_view' => 'Day view', 'label.week_view' => 'Week view', +'label.puncher' => 'Puncher', 'label.id' => 'ID', 'label.language' => 'Language', 'label.decimal_mark' => 'Decimal mark', @@ -215,7 +217,6 @@ 'label.paid_status' => 'Paid status', 'label.paid' => 'Paid', 'label.mark_paid' => 'Mark paid', -'label.week_menu' => 'Week menu', 'label.week_note' => 'Week note', 'label.week_list' => 'Week list', 'label.work_units' => 'Work units', @@ -269,6 +270,7 @@ 'title.edit_time_record' => 'Editing Time Record', 'title.delete_time_record' => 'Deleting Time Record', 'title.time_files' => 'Time Record Files', +'title.puncher' => 'Puncher', 'title.expenses' => 'Expenses', 'title.edit_expense' => 'Editing Expense Item', 'title.delete_expense' => 'Deleting Expense Item', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 9df814845..e8757a7f1 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -243,7 +243,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7638ade63..1bd5ff234 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -238,8 +238,6 @@ 'label.paid_status' => 'Makse olek', 'label.paid' => 'Makstud', 'label.mark_paid' => 'Märgi makstuks', -// TODO: translate the following. -// 'label.week_menu' => 'Week menu', 'label.week_note' => 'Nädala märge', 'label.week_list' => 'Nädala nimekiri', 'label.work_units' => 'Töö ühikud', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 0fca34586..96c461865 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -243,7 +243,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index eaad8a293..80220a610 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -235,7 +235,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 771ed18e3..5c11e4224 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -229,7 +229,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index e9003045c..a5490a59f 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -223,8 +223,6 @@ 'label.paid_status' => 'Κατάσταση πληρωμής', 'label.paid' => 'Πληρωμένο', 'label.mark_paid' => 'Σήμανση πληρωμένα', -// TODO: translate the following. -// 'label.week_menu' => 'Week menu', 'label.week_note' => 'Σημείωση εβδομάδας', 'label.week_list' => 'Λίστα εβδομάδων', // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 032e01bf0..6112f1f06 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -250,7 +250,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1909682fb..7425cc9ac 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -247,7 +247,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 35035d3e9..3aeb88a81 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -227,8 +227,6 @@ 'label.paid_status' => 'Stato pagamento', 'label.paid' => 'Pagato', 'label.mark_paid' => 'Segna come pagato', -// TODO: translate the following. -// 'label.week_menu' => 'Week menu', 'label.week_note' => 'Nota settimanale', 'label.week_list' => 'Lista settimanale', // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 0ba848ba0..c98730d99 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -250,7 +250,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 975e42169..d7edcbf4b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -250,7 +250,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 70750349d..4580c677a 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -206,7 +206,6 @@ 'label.paid_status' => 'Status van betaling', 'label.paid' => 'Betaald', 'label.mark_paid' => 'Markeer als betaald', -'label.week_menu' => 'Week menu', 'label.week_note' => 'Week aantekening', 'label.week_list' => 'Week overzicht', 'label.work_units' => 'Werk eenheid', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index cfaf305b5..f7e0240df 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -248,7 +248,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 24664d693..e2cb857e6 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -236,7 +236,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index e41cf26c3..bf89e0c20 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -233,7 +233,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 13912a44d..1ff1bf992 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -236,7 +236,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0c531ad11..60d9b1a38 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -247,7 +247,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index db94bf685..82cbce9d4 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -206,7 +206,6 @@ 'label.paid_status' => 'Статус оплаты', 'label.paid' => 'Оплачено', 'label.mark_paid' => 'Отметить оплату', -'label.week_menu' => 'Меню недели', 'label.week_note' => 'Комментарий недели', 'label.week_list' => 'Список недели', 'label.work_units' => 'Единицы работы', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 57c14a7db..a24317b9b 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -240,7 +240,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 32e200f81..65a3d0a01 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -231,7 +231,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 38cf8565b..7be8bd4f4 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -235,7 +235,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index fe05e89a7..8bab1c086 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -231,7 +231,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 777440e88..61472bf9e 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -254,7 +254,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 01e639bdd..129e21151 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -241,7 +241,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 66dc7099f..19e8800dc 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -246,7 +246,6 @@ // 'label.paid_status' => 'Paid status', // 'label.paid' => 'Paid', // 'label.mark_paid' => 'Mark paid', -// 'label.week_menu' => 'Week menu', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', // 'label.work_units' => 'Work units', diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 1d8627a66..e7df23ea6 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -98,6 +98,9 @@ {if $user->exists() && ($user->can('track_own_time') || $user->can('track_time'))} + {if $user->isPluginEnabled('pu') && $user->isOptionEnabled('puncher_menu')} + + {/if} {if $user->isPluginEnabled('wv') && $user->isOptionEnabled('week_menu')} {/if} diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index 370c93c59..5c1e4c943 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -4,6 +4,17 @@ License: See license.txt *} +{$forms.timesheetsForm.open}
{$i18n.label.date}{$timeField['label']|escape}{$i18n.label.client}
{$record.date}{$record.$control_name|escape}{$record.client|escape}
{$i18n.menu.time}{$i18n.menu.puncher}{$i18n.menu.week}
{if $user_dropdown} - {$forms.timesheetsForm.open} - {$forms.timesheetsForm.close} {/if}
{$forms.timesheetsForm.user.control}
+{$forms.timesheetsForm.close}
{if $inactive_timesheets}
{$i18n.form.timesheets.active_timesheets}
@@ -27,8 +27,8 @@ License: See license.txt *} {if $show_client}
{$i18n.label.client}{$i18n.label.submitted} - {$i18n.label.approved} + {$i18n.label.submitted}{$i18n.label.approved}{$i18n.label.client}{$i18n.label.submitted} - {$i18n.label.approved} + {$i18n.label.submitted}{$i18n.label.approved}
+ {/if} diff --git a/WEB-INF/templates/work/footer.tpl b/WEB-INF/templates/work/footer_old.tpl similarity index 100% rename from WEB-INF/templates/work/footer.tpl rename to WEB-INF/templates/work/footer_old.tpl diff --git a/WEB-INF/templates/work/index.tpl b/WEB-INF/templates/work/index.tpl index 3c6500821..c4f193521 100644 --- a/WEB-INF/templates/work/index.tpl +++ b/WEB-INF/templates/work/index.tpl @@ -2,4 +2,4 @@ {if $content_page_name}{include file="$content_page_name"}{/if} -{include file="work/footer.tpl"} +{include file="work/footer_old.tpl"} diff --git a/initialize.php b/initialize.php index a1be5736b..666e412c0 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5570"); +define("APP_VERSION", "1.19.28.5571"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/template_add.php b/template_add.php index cb84fb33b..8eef424ef 100644 --- a/template_add.php +++ b/template_add.php @@ -19,9 +19,11 @@ $config = new ttConfigHelper($user->getConfig()); $bindTemplatesWithProjects = $config->getDefinedValue('bind_templates_with_projects'); +$projects = $cl_projects = array(); if ($bindTemplatesWithProjects) $projects = ttGroupHelper::getActiveProjects(); +$cl_name = $cl_description = $cl_content = null; if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_description = trim($request->getParameter('description')); diff --git a/template_edit.php b/template_edit.php index 814eff591..2f3c69727 100644 --- a/template_edit.php +++ b/template_edit.php @@ -25,9 +25,11 @@ $config = $user->getConfigHelper(); $bindTemplatesWithProjects = $config->getDefinedValue('bind_templates_with_projects'); +$projects = $cl_projects = array(); if ($bindTemplatesWithProjects) $projects = ttGroupHelper::getActiveProjects(); +$cl_name = $cl_description = $cl_content = $cl_status = null; if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_description = trim($request->getParameter('description')); diff --git a/timesheet_files.php b/timesheet_files.php index bca00f28d..bec4e29d8 100644 --- a/timesheet_files.php +++ b/timesheet_files.php @@ -24,6 +24,7 @@ } // End of access checks. +$cl_description = null; if ($request->isPost()) { $cl_description = trim($request->getParameter('description')); } From 8f576b10e996d468d28febf8767d0bc95b824421 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 18 May 2021 22:20:28 +0000 Subject: [PATCH 2254/2515] Addressed several more php8 warnings. --- WEB-INF/lib/ttFavReportHelper.class.php | 12 ++++----- WEB-INF/lib/ttRoleHelper.class.php | 33 ++++--------------------- initialize.php | 2 +- role_add.php | 1 + topdf.php | 21 ++++++++-------- 5 files changed, 24 insertions(+), 45 deletions(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index b4f917a4a..d1cce7240 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -399,7 +399,7 @@ static function loadReport(&$bean) { 'chtotalsonly' => null, 'new_fav_report' => null)); // Time custom fields. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $checkbox_field_name = 'show_'.$field_name; @@ -408,7 +408,7 @@ static function loadReport(&$bean) { } } // User custom fields. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $checkbox_field_name = 'show_'.$field_name; @@ -416,7 +416,7 @@ static function loadReport(&$bean) { $custom_field_attrs[$checkbox_field_name] = null; } } - if (is_array($custom_field_attrs)) + if (isset($custom_field_attrs)) $attrs = array_merge($attrs, $custom_field_attrs); $bean->setAttributes($attrs); } @@ -543,7 +543,7 @@ static function makeReportSpec($bean) { } // Add time custom field settings. - if ($custom_fields && $custom_fields->timeFields) { + if (isset($custom_fields) && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { $field_name = 'time_field_'.$timeField['id']; $field_value = str_replace(',',',',$bean->getAttribute($field_name)); @@ -555,7 +555,7 @@ static function makeReportSpec($bean) { } // Add user custom field settings. - if ($custom_fields && $custom_fields->userFields) { + if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; $field_value = str_replace(',',',',$bean->getAttribute($field_name)); @@ -567,7 +567,7 @@ static function makeReportSpec($bean) { } $reportSpec = null; - if (is_array($reportSpecArray)) + if (isset($reportSpecArray)) $reportSpec = implode(',', $reportSpecArray); return $reportSpec; } diff --git a/WEB-INF/lib/ttRoleHelper.class.php b/WEB-INF/lib/ttRoleHelper.class.php index a3753d238..683f7ebaf 100644 --- a/WEB-INF/lib/ttRoleHelper.class.php +++ b/WEB-INF/lib/ttRoleHelper.class.php @@ -1,30 +1,6 @@ fetchRow(); - if ($val['id']) + if (isset($val['id']) && $val['id']) return $val; } return false; @@ -115,7 +91,7 @@ static function getRoleByRank($rank) { if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - if ($val['id']) + if (isset($val['id']) && $val['id']) return $val['id']; } return false; @@ -130,6 +106,7 @@ static function update($fields) { $org_id = $user->org_id; $id = (int)$fields['id']; + $name_part = $rank_part = $descr_part = $status_part = $rights_part = ''; if (isset($fields['name'])) $name_part = 'name = '.$mdb2->quote($fields['name']); if (isset($fields['rank'])) $rank_part = ', `rank` = '.(int)$fields['rank']; if (isset($fields['description'])) $descr_part = ', description = '.$mdb2->quote($fields['description']); diff --git a/initialize.php b/initialize.php index 666e412c0..2493a2154 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5571"); +define("APP_VERSION", "1.19.28.5572"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/role_add.php b/role_add.php index b2879dd8f..b4e05f903 100644 --- a/role_add.php +++ b/role_add.php @@ -12,6 +12,7 @@ exit(); } +$cl_name = $cl_description = $cl_rank = null; if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); $cl_description = trim($request->getParameter('description')); diff --git a/topdf.php b/topdf.php index aa840e106..85ff8d84e 100644 --- a/topdf.php +++ b/topdf.php @@ -46,6 +46,7 @@ // Obtain items for report. $options = ttReportHelper::getReportOptions($bean); $grouping = ttReportHelper::grouping($options); +$items = null; if (!$totals_only) $items = ttReportHelper::getItems($options); // Individual entries. if ($totals_only || $grouping) @@ -128,7 +129,7 @@ $html .= '
'.$i18n->get('label.date').''.$i18n->get('label.user').''.$i18n->get('label.project').''.$i18n->get('label.task').''.$item['date'].''.htmlspecialchars($item['user']).''.htmlspecialchars($item['project']).''.htmlspecialchars($item['task']).''.$i18n->get('label.total').'
{$forms.displayOptionsForm.report_inactive_projects.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.form.display_options.custom_css}
-
Create database structure (v1.19.23) + Create database structure (v1.19.29)
(applies only to new installations, do not execute when updating)
@@ -1269,8 +1271,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.19.23)Update database structure (v1.19 to v1.19.29)
diff --git a/initialize.php b/initialize.php index d36445879..97dfbe2ac 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.28.5590"); +define("APP_VERSION", "1.19.29.5591"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index e9f4cc031..7a87b3766 100644 --- a/mysql.sql +++ b/mysql.sql @@ -45,6 +45,7 @@ CREATE TABLE `tt_groups` ( `modified` datetime default NULL, # modification timestamp `modified_ip` varchar(45) default NULL, # modifier ip `modified_by` int(11) default NULL, # modifier user_id + `entities_modified` datetime default NULL, # modification timestamp of group entities (clients, projects, etc.) `status` tinyint(4) default 1, # group status PRIMARY KEY (`id`) ); @@ -656,4 +657,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.23', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.29', now()); # TODO: change when structure changes. From 30ae56536c029705287b6a5c291624e5e4c5ed11 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 13 Aug 2021 14:21:56 +0000 Subject: [PATCH 2276/2515] Wrote ttGroupHelper::updateEntitiesModidied function and started to use it for group and project changes. --- WEB-INF/lib/ttGroupHelper.class.php | 13 +++++++++++++ WEB-INF/lib/ttProjectHelper.class.php | 21 +++++++++++++++++---- WEB-INF/lib/ttUser.class.php | 3 +++ initialize.php | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 0dd3dd412..0fa0355ea 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -761,4 +761,17 @@ static function deleteGroupFiles($group_id) { // By design, we ignore such errors. return true; } + + // updateEntitiesModified updates the entities_modided field in tt_groups table + // with a current timestamp. + static function updateEntitiesModified() { + global $user; + $org_id = $user->org_id; + $group_id = $user->getGroup(); + $mdb2 = getConnection(); + + $sql = "update tt_groups set entities_modified = now() where id = $group_id and org_id = $org_id"; + $affected = $mdb2->exec($sql); + return (!is_a($affected, 'PEAR_Error')); + } } diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index ebbd055fb..5e3321b92 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -216,9 +216,14 @@ static function delete($id) { if (is_a($affected, 'PEAR_Error')) return false; - // Finally, delete the project from the projects field in tt_clients table. - $result = ttClientHelper::deleteProject($id); - return $result; + // Delete the project from the projects field in tt_clients table. + if (!ttClientHelper::deleteProject($id)) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) return false; + + return true; } // insert function inserts a new project into database. @@ -269,6 +274,9 @@ static function insert($fields) } } + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) return false; + return $last_id; } @@ -354,7 +362,12 @@ static function update($fields) { ", tasks = ".$mdb2->quote($comma_separated).", status = ".$mdb2->quote($status). " where id = $project_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) return false; + + return true; } // getAssignedUsers - returns an array of user ids assigned to a project. diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 2086a3740..c6539db66 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -707,6 +707,9 @@ function updateGroup($fields) { $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) return false; + return true; } diff --git a/initialize.php b/initialize.php index 97dfbe2ac..5c37c7452 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5591"); +define("APP_VERSION", "1.19.29.5592"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 25c08b9eab394193cddae071ca3d6cca652ef88d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 13 Aug 2021 15:47:54 +0000 Subject: [PATCH 2277/2515] Started to update entities_modified for client add, edit, and delete operations. --- WEB-INF/lib/ttClientHelper.class.php | 22 ++++++++++++++++++++-- WEB-INF/lib/ttGroupHelper.class.php | 2 +- WEB-INF/lib/ttProjectHelper.class.php | 12 ++++++++---- WEB-INF/lib/ttUser.class.php | 6 ++++-- initialize.php | 2 +- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/ttClientHelper.class.php b/WEB-INF/lib/ttClientHelper.class.php index 3c5f0d646..ba62d0f33 100644 --- a/WEB-INF/lib/ttClientHelper.class.php +++ b/WEB-INF/lib/ttClientHelper.class.php @@ -150,7 +150,14 @@ static function delete($id, $delete_client_entries) { $sql = "update tt_clients set status = null". " where id = $id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // The insert function inserts a new client record into the clients table. @@ -190,6 +197,10 @@ static function insert($fields) return false; } + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return $last_id; } @@ -232,7 +243,14 @@ static function update($fields) ", tax = $tax, projects = ".$mdb2->quote($comma_separated).", status = $status". " where id = $id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // The fillBean function fills the ActionForm object with client data. diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 0fa0355ea..aa75a571e 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -762,7 +762,7 @@ static function deleteGroupFiles($group_id) { return true; } - // updateEntitiesModified updates the entities_modided field in tt_groups table + // updateEntitiesModified updates the entities_modified field in tt_groups table // with a current timestamp. static function updateEntitiesModified() { global $user; diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 5e3321b92..dd6e35cb8 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -221,7 +221,8 @@ static function delete($id) { return false; // Update entities_modified, too. - if (!ttGroupHelper::updateEntitiesModified()) return false; + if (!ttGroupHelper::updateEntitiesModified()) + return false; return true; } @@ -275,7 +276,8 @@ static function insert($fields) } // Update entities_modified, too. - if (!ttGroupHelper::updateEntitiesModified()) return false; + if (!ttGroupHelper::updateEntitiesModified()) + return false; return $last_id; } @@ -362,10 +364,12 @@ static function update($fields) { ", tasks = ".$mdb2->quote($comma_separated).", status = ".$mdb2->quote($status). " where id = $project_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; + if (is_a($affected, 'PEAR_Error')) + return false; // Update entities_modified, too. - if (!ttGroupHelper::updateEntitiesModified()) return false; + if (!ttGroupHelper::updateEntitiesModified()) + return false; return true; } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index c6539db66..6848a72df 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -705,10 +705,12 @@ function updateGroup($fields) { $sql = "update tt_groups set $parts where id = $group_id and org_id = $this->org_id"; $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) return false; + if (is_a($affected, 'PEAR_Error')) + return false; // Update entities_modified, too. - if (!ttGroupHelper::updateEntitiesModified()) return false; + if (!ttGroupHelper::updateEntitiesModified()) + return false; return true; } diff --git a/initialize.php b/initialize.php index 5c37c7452..d2b0a737d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5592"); +define("APP_VERSION", "1.19.29.5593"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 9a99a01e54029b20a1f1ed6dcc2ae9062e300576 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 13 Aug 2021 16:33:58 +0000 Subject: [PATCH 2278/2515] Start to update entities_modified for task and user update operations. --- WEB-INF/lib/ttTaskHelper.class.php | 19 +++++++++++- WEB-INF/lib/ttUser.class.php | 4 ++- WEB-INF/lib/ttUserHelper.class.php | 47 +++++++++++++++++++----------- initialize.php | 2 +- 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/WEB-INF/lib/ttTaskHelper.class.php b/WEB-INF/lib/ttTaskHelper.class.php index 71a520025..e93d3d669 100644 --- a/WEB-INF/lib/ttTaskHelper.class.php +++ b/WEB-INF/lib/ttTaskHelper.class.php @@ -107,7 +107,14 @@ static function delete($task_id) { // Mark the task as deleted. $sql = "update tt_tasks set status = NULL where id = $task_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // insert function inserts a new task into database. @@ -161,6 +168,11 @@ static function insert($fields) return false; } } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return $last_id; } @@ -242,6 +254,11 @@ static function update($fields) } } } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 6848a72df..320fa623d 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -760,7 +760,9 @@ function markUserDeleted($user_id) { if (is_a($affected, 'PEAR_Error')) return false; - + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; return true; } diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index 95be4fbb5..122c7889c 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -95,27 +95,31 @@ static function insert($fields, $hash = true) { $mdb2->quote($fields['name']).", ".$mdb2->quote($fields['login']). ", $password, $group_id, $org_id, ".$mdb2->quote($fields['role_id']).", ".$mdb2->quote($fields['client_id']).", $rate, $quota_percent, ".$mdb2->quote($email).", now() $created_ip_v $created_by_v)"; $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; // Now deal with project assignment. - if (!is_a($affected, 'PEAR_Error')) { - $last_id = $mdb2->lastInsertID('tt_users', 'id'); - $projects = isset($fields['projects']) ? $fields['projects'] : array(); - if (count($projects) > 0) { - // We have at least one project assigned. Insert corresponding entries in tt_user_project_binds table. - foreach($projects as $p) { - if(!isset($p['rate'])) - $p['rate'] = 0; - else - $p['rate'] = str_replace(',', '.', $p['rate']); - - $sql = "insert into tt_user_project_binds (project_id, user_id, group_id, org_id, rate, status)". - " values(".$p['id'].", $last_id, $group_id, $org_id, ".$p['rate'].", 1)"; - $affected = $mdb2->exec($sql); - } + $last_id = $mdb2->lastInsertID('tt_users', 'id'); + $projects = isset($fields['projects']) ? $fields['projects'] : array(); + if (count($projects) > 0) { + // We have at least one project assigned. Insert corresponding entries in tt_user_project_binds table. + foreach($projects as $p) { + if(!isset($p['rate'])) + $p['rate'] = 0; + else + $p['rate'] = str_replace(',', '.', $p['rate']); + + $sql = "insert into tt_user_project_binds (project_id, user_id, group_id, org_id, rate, status)". + " values(".$p['id'].", $last_id, $group_id, $org_id, ".$p['rate'].", 1)"; + $affected = $mdb2->exec($sql); } - return $last_id; } - return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return $last_id; } // update - updates a user in database. @@ -232,6 +236,11 @@ static function update($user_id, $fields) { } } } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } @@ -282,6 +291,10 @@ static function delete($user_id) { if (is_a($affected, 'PEAR_Error')) return false; + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } diff --git a/initialize.php b/initialize.php index d2b0a737d..984dc3718 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5593"); +define("APP_VERSION", "1.19.29.5594"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 974a1cf40a424eca9594bc0d0dbf08e3b72c78f2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 14 Aug 2021 16:52:54 +0000 Subject: [PATCH 2279/2515] Started to update entities_modified on custom field and predefined expenses changes. --- .../lib/ttPredefinedExpenseHelper.class.php | 17 ++++++- initialize.php | 2 +- plugins/CustomFields.class.php | 50 +++++++++++++++++-- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php index 8ec8ccfee..c6bc3f356 100644 --- a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php +++ b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php @@ -66,6 +66,10 @@ static function delete($id) { if (is_a($affected, 'PEAR_Error')) return false; + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } @@ -88,6 +92,10 @@ static function insert($fields) { if (is_a($affected, 'PEAR_Error')) return false; + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } @@ -108,6 +116,13 @@ static function update($fields) { $sql = "update tt_predefined_expenses set name = ".$mdb2->quote($name).", cost = ".$mdb2->quote($cost). " where id = $predefined_expense_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } } diff --git a/initialize.php b/initialize.php index 984dc3718..21f27ce82 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5594"); +define("APP_VERSION", "1.19.29.5595"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index a11e40a32..6350a6784 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -156,6 +156,11 @@ static function insertOption($field_id, $option_name) { if (is_a($affected, 'PEAR_Error')) return false; } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } @@ -170,7 +175,14 @@ static function updateOption($id, $option_name) { $sql = "update tt_custom_field_options set value = " . $mdb2->quote($option_name) . " where id = $id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // delete Option deletes an option and all custom field log entries that used it. @@ -196,7 +208,14 @@ static function deleteOption($id) { $sql = "update tt_custom_field_options set status = null" . " where id = $id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // getOptions returns an array of options for a custom field. @@ -314,7 +333,14 @@ static function insertField($field_name, $entity_type, $field_type, $required) { $sql = "insert into tt_custom_fields (group_id, org_id, entity_type, type, label, required, status)" . " values($group_id, $org_id, $entity_type, $field_type, " . $mdb2->quote($field_name) . ", $required, 1)"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // The updateField updates custom field for group. @@ -328,7 +354,14 @@ static function updateField($id, $name, $type, $required) { $sql = "update tt_custom_fields set label = " . $mdb2->quote($name) . ", type = $type, required = $required" . " where id = $id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // The deleteField deletes a custom field, its options and log entries for group. @@ -357,7 +390,14 @@ static function deleteField($field_id) { $sql = "update tt_custom_fields set status = null" . " where id = $field_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + + return true; } // insertTimeFields - inserts time custom fields into tt_custom_field_log. From 865dd33879409b174a4eab42beecedf426f26602 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 14 Aug 2021 17:10:06 +0000 Subject: [PATCH 2280/2515] Started to update entities_modified on template changes. --- WEB-INF/lib/ttTemplateHelper.class.php | 13 +++++++++++++ initialize.php | 2 +- plugins/MonthlyQuota.class.php | 8 +++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttTemplateHelper.class.php b/WEB-INF/lib/ttTemplateHelper.class.php index 6e6ad0a02..0b9fcf92a 100644 --- a/WEB-INF/lib/ttTemplateHelper.class.php +++ b/WEB-INF/lib/ttTemplateHelper.class.php @@ -48,6 +48,10 @@ static function delete($id) { if (is_a($affected, 'PEAR_Error')) return false; + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } @@ -87,6 +91,11 @@ static function insert($fields) { return false; } } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return $last_id; } @@ -129,6 +138,10 @@ static function update($fields) { die($affected->getMessage()); } + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } diff --git a/initialize.php b/initialize.php index 21f27ce82..b8f7a204f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5595"); +define("APP_VERSION", "1.19.29.5596"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index 0a8ee4e9b..f742fd918 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -51,8 +51,14 @@ public function update($year, $month, $minutes) { $insertSql = "insert into tt_monthly_quotas (group_id, org_id, year, month, minutes)". " values ($this->group_id, $this->org_id, $year, $month, $minutes)"; $affected = $this->db->exec($insertSql); - return (!is_a($affected, 'PEAR_Error')); + if (is_a($affected, 'PEAR_Error')) + return false; } + + // Update entities_modified, too. + if (!ttGroupHelper::updateEntitiesModified()) + return false; + return true; } From 72d595742225a383fa8b891cd19add6296b2c208 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 1 Sep 2021 14:27:58 +0000 Subject: [PATCH 2281/2515] Cosmetic fixes to typos in comments. --- WEB-INF/lib/ttTimeHelper.class.php | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 031ccfb61..75c911e04 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -119,13 +119,13 @@ static function isValidDuration($value) { } // postedDurationToMinutes - converts a value representing a duration - // (usually enetered in a form by a user) to an integer number of minutes. + // (usually entered in a form by a user) to an integer number of minutes. // // Parameters: // $duration - user entered duration string. Valid strings are: // 3 or 3h - means 3 hours. Note: h and m letters are not localized. // 0.25 or 0.25h or .25 or .25h - means a quarter of hour. - // 0,25 or 0,25h or ,25 or ,25h - same as above for users with comma ad decimal mark. + // 0,25 or 0,25h or ,25 or ,25h - same as above for users with comma as decimal mark. // 1:30 - means 1 hour 30 minutes. // 25m - means 25 minutes. // $max - maximum number of minutes that is valid. diff --git a/initialize.php b/initialize.php index b8f7a204f..934f9d4b4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5596"); +define("APP_VERSION", "1.19.29.5597"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 71796c69b7128ce6d49c6772ccfa8c0c14ff4ba0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 7 Oct 2021 17:39:30 +0000 Subject: [PATCH 2282/2515] Maintenance fixes. --- initialize.php | 2 +- plugins/CustomFields.class.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index 934f9d4b4..105507363 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5597"); +define("APP_VERSION", "1.19.29.5598"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index 6350a6784..26e4532b3 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -373,18 +373,27 @@ static function deleteField($field_id) { $org_id = $user->org_id; // Mark log entries as deleted. TODO: why are we doing this? Research impact. + // The impact is quite severe: an accidental delete of a custom field makes manual recovery problematic. + // Therefore, not doing this anymore as of Oct 7, 2021. + /* $sql = "update tt_custom_field_log set status = null" . " where field_id = $field_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; + */ // Mark field options as deleted. + // Same comment as above applies. + // An accidental delete of a custom field makes manual recovery problematic. + // Therefore, not doing this anymore as of Oct 7, 2021. + /* $sql = "update tt_custom_field_options set status = null" . " where field_id = $field_id and group_id = $group_id and org_id = $org_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; + */ // Mark custom field as deleted. $sql = "update tt_custom_fields set status = null" . From 559906731f153c9b3a632c2839ed11669b76d593 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 12 Oct 2021 20:01:36 +0000 Subject: [PATCH 2283/2515] Added a check for passed in date to time.php. --- initialize.php | 2 +- time.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index 105507363..e0b38f4d5 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.29.5598"); +define("APP_VERSION", "1.19.30.5599"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 1bee1129c..61e771f8b 100644 --- a/time.php +++ b/time.php @@ -32,6 +32,12 @@ exit(); } } +// If we are passed in a date, make sure it is in correct format. +$date = $request->getParameter('date'); +if ($date && !ttValidDate($date)) { + header('Location: access_denied.php'); + exit(); +} // End of access checks. // Determine user for whom we display this page. From d3f60bd3e3ea8ff8ec31a596baec6750af601b7c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 12 Oct 2021 20:31:02 +0000 Subject: [PATCH 2284/2515] A better fix to validate a passed-in date. --- WEB-INF/lib/common.lib.php | 20 +++++++++++++++++--- initialize.php | 2 +- time.php | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index d5b43f57f..db8d58ea3 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -226,15 +226,29 @@ function ttValidDate($val) if (strlen($val) == 0) return false; - // This should accept a string in format 'YYYY-MM-DD', 'MM/DD/YYYY', 'DD-MM-YYYY', 'DD.MM.YYYY', or 'DD.MM.YYYY whatever'. + // This should validate a string in format 'YYYY-MM-DD', 'MM/DD/YYYY', 'DD-MM-YYYY', 'DD.MM.YYYY', or 'DD.MM.YYYY whatever'. if (!preg_match('/^\d\d\d\d-\d\d-\d\d$/', $val) && !preg_match('/^\d\d\/\d\d\/\d\d\d\d$/', $val) && !preg_match('/^\d\d\-\d\d\-\d\d\d\d$/', $val) && !preg_match('/^\d\d\.\d\d\.\d\d\d\d$/', $val) && !preg_match('/^\d\d\.\d\d\.\d\d\d\d .+$/', $val)) return false; - - return true; + + return true; +} + +// ttValidDbDateFormatDate is used to check user input to validate a date in DB_DATEFORMAT. +function ttValidDbDateFormatDate($val) +{ + $val = trim($val); + if (strlen($val) == 0) + return false; + + // This should validate a string in format 'YYYY-MM-DD'. + if (!preg_match('/^\d\d\d\d-\d\d-\d\d$/', $val)) + return false; + + return true; } // ttValidInteger is used to check user input to validate an integer. diff --git a/initialize.php b/initialize.php index e0b38f4d5..3d6aeab4c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.30.5599"); +define("APP_VERSION", "1.19.30.5600"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 61e771f8b..e5e509c06 100644 --- a/time.php +++ b/time.php @@ -34,7 +34,7 @@ } // If we are passed in a date, make sure it is in correct format. $date = $request->getParameter('date'); -if ($date && !ttValidDate($date)) { +if ($date && !ttValidDbDateFormatDate($date)) { header('Location: access_denied.php'); exit(); } From 42ea5b1d1658ba5a0fa14069d8b31b9292249821 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 12 Oct 2021 21:00:47 +0000 Subject: [PATCH 2285/2515] Added validation of browser_today parameter in posts. --- expense_edit.php | 8 ++++++++ expenses.php | 8 ++++++++ initialize.php | 2 +- login.php | 11 +++++++++++ puncher.php | 8 ++++++++ time.php | 8 ++++++++ time_edit.php | 8 ++++++++ 7 files changed, 52 insertions(+), 1 deletion(-) diff --git a/expense_edit.php b/expense_edit.php index 271a588ac..258437b33 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -27,6 +27,14 @@ header('Location: access_denied.php'); exit(); } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. $item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); diff --git a/expenses.php b/expenses.php index 1914a253e..1b5d99c1d 100644 --- a/expenses.php +++ b/expenses.php @@ -38,6 +38,14 @@ exit(); } } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. // Determine user for which we display this page. diff --git a/initialize.php b/initialize.php index 3d6aeab4c..63ee048df 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.30.5600"); +define("APP_VERSION", "1.19.30.5601"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index 09c7af141..9e2436206 100644 --- a/login.php +++ b/login.php @@ -7,6 +7,17 @@ import('ttOrgHelper'); import('ttUser'); +// Access checks. +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} +// End of access checks. + $cl_login = $request->getParameter('login'); if ($cl_login == null && $request->isGet()) $cl_login = @$_COOKIE[LOGIN_COOKIE_NAME]; $cl_password = $request->getParameter('password'); diff --git a/puncher.php b/puncher.php index 5d6bca7c0..787c6f34b 100644 --- a/puncher.php +++ b/puncher.php @@ -19,6 +19,14 @@ header('Location: feature_disabled.php'); exit(); } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. $showClient = $user->isPluginEnabled('cl'); diff --git a/time.php b/time.php index e5e509c06..9202dc1d7 100644 --- a/time.php +++ b/time.php @@ -38,6 +38,14 @@ header('Location: access_denied.php'); exit(); } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. // Determine user for whom we display this page. diff --git a/time_edit.php b/time_edit.php index d34ae1ca6..e82e21b88 100644 --- a/time_edit.php +++ b/time_edit.php @@ -24,6 +24,14 @@ header('Location: access_denied.php'); exit(); } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. $user_id = $user->getUser(); From 8f78ea2bac49e937eedf5477dfcb9cf61c498069 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 12 Oct 2021 21:45:35 +0000 Subject: [PATCH 2286/2515] Forgot to check in one file. --- week.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/week.php b/week.php index 7687f9598..fbfbfee36 100644 --- a/week.php +++ b/week.php @@ -38,6 +38,14 @@ exit(); } } +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_today = $request->getParameter('browser_today'); + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. // Determine user for whom we display this page. From 94fda0cc0c9c20ab98d38ccc75ff040d13dc7f1b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 20 Oct 2021 20:51:47 +0000 Subject: [PATCH 2287/2515] Fixed an sql injection vulnerability in groups.php. --- groups.php | 13 ++++++++++--- initialize.php | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/groups.php b/groups.php index a7bf2dfe6..ca01a5f7c 100644 --- a/groups.php +++ b/groups.php @@ -11,9 +11,16 @@ header('Location: access_denied.php'); exit(); } -if ($request->isPost() && !$user->isGroupValid($request->getParameter('group'))) { - header('Location: access_denied.php'); // Wrong group id in post. - exit(); +if ($request->isPost()) { + $group_id = $request->getParameter('group'); + if (!ttValidInteger($group_id)) { + header('Location: access_denied.php'); // Protection against sql injection. + exit(); + } + if (!$user->isGroupValid($group_id)) { + header('Location: access_denied.php'); // Wrong group id in post. + exit(); + } } // End of access checks. diff --git a/initialize.php b/initialize.php index 63ee048df..92c907f30 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.30.5601"); +define("APP_VERSION", "1.19.31.5602"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0cf32f1046418aa2e5218b0b370064820c330c6a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 21 Oct 2021 12:29:00 +0000 Subject: [PATCH 2288/2515] Added additional protection against an sql injection fixed in previous commit. --- WEB-INF/lib/ttGroupHelper.class.php | 6 +++++- initialize.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index aa75a571e..81b0c7f34 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -27,9 +27,13 @@ static function getGroupName($group_id) { static function getParentGroup($group_id) { global $user; + // Checking parameters for sanity is normally done in access check blocks on pages. + // This cast below is just in case we forgot to check $group_id to be an integer. + $groupId = (int) $group_id; // Protection against sql injection. + $mdb2 = getConnection(); - $sql = "select parent_id from tt_groups where id = $group_id and org_id = $user->org_id and status = 1"; + $sql = "select parent_id from tt_groups where id = $groupId and org_id = $user->org_id and status = 1"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { diff --git a/initialize.php b/initialize.php index 92c907f30..bc05d18d9 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.31.5602"); +define("APP_VERSION", "1.19.31.5603"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 571a69ca25e0c94af905d54b84dc06b3d9df22d8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 21 Oct 2021 15:27:59 +0000 Subject: [PATCH 2289/2515] A couple more fixes to address CVE-2021-41139. --- charts.php | 5 +++++ expenses.php | 6 ++++++ initialize.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts.php b/charts.php index 1bf6d34fa..88878f6b0 100644 --- a/charts.php +++ b/charts.php @@ -40,6 +40,11 @@ exit(); } } +$date = $request->getParameter('date'); +if ($date && !ttValidDbDateFormatDate($date)) { + header('Location: access_denied.php'); + exit(); +} // End of access checks. // Determine user for which we display this page. diff --git a/expenses.php b/expenses.php index 1b5d99c1d..578e2d1c6 100644 --- a/expenses.php +++ b/expenses.php @@ -38,6 +38,12 @@ exit(); } } +// If we are passed in a date, make sure it is in correct format. +$date = $request->getParameter('date'); +if ($date && !ttValidDbDateFormatDate($date)) { + header('Location: access_denied.php'); + exit(); +} if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); diff --git a/initialize.php b/initialize.php index bc05d18d9..6caaec770 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.31.5603"); +define("APP_VERSION", "1.19.32.5604"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 098706ef27d5fbc8dda87383d64a671b9dd5aa7c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 22 Oct 2021 19:54:28 +0000 Subject: [PATCH 2290/2515] Security fix, added checking status value for sanity. --- WEB-INF/lib/common.lib.php | 13 +++++++++++++ client_edit.php | 2 ++ initialize.php | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index db8d58ea3..5840f3684 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -219,6 +219,19 @@ function ttValidFloat($val, $emptyValid = false) return true; } +// ttValidStatus is used to check user input to validate a status value. +function ttValidStatus($val) +{ + if (!ttValidInteger($val)) + return false; + + $intVal = (int) $val; // Cast to int for comparisons below to work. + if ($intVal != ACTIVE && $intVal != INACTIVE) + return false; + + return true; +} + // ttValidDate is used to check user input to validate a date. function ttValidDate($val) { diff --git a/client_edit.php b/client_edit.php index 349834181..4489e2a75 100644 --- a/client_edit.php +++ b/client_edit.php @@ -33,6 +33,7 @@ $cl_address = trim($request->getParameter('address')); $cl_tax = trim($request->getParameter('tax')); $cl_status = $request->getParameter('status'); +$cl_status = "1" ; $cl_projects = $request->getParameter('projects'); } else { $cl_name = $client['name']; @@ -64,6 +65,7 @@ if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.client_name')); if (!ttValidString($cl_address, true)) $err->add($i18n->get('error.field'), $i18n->get('label.client_address')); if (!ttValidFloat($cl_tax, true)) $err->add($i18n->get('error.field'), $i18n->get('label.tax')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if ($err->no()) { if ($request->getParameter('btn_save')) { diff --git a/initialize.php b/initialize.php index 6caaec770..4497264e5 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.32.5604"); +define("APP_VERSION", "1.19.33.5605"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 1e89145d4f841021ebe82049b58ce4e6840091d4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 22 Oct 2021 19:56:09 +0000 Subject: [PATCH 2291/2515] Proper security fix, added checking status value for sanity. --- client_edit.php | 1 - 1 file changed, 1 deletion(-) diff --git a/client_edit.php b/client_edit.php index 4489e2a75..665fda15e 100644 --- a/client_edit.php +++ b/client_edit.php @@ -33,7 +33,6 @@ $cl_address = trim($request->getParameter('address')); $cl_tax = trim($request->getParameter('tax')); $cl_status = $request->getParameter('status'); -$cl_status = "1" ; $cl_projects = $request->getParameter('projects'); } else { $cl_name = $client['name']; From c1db27ad9c9a4a1ebe0726977789bea52184f088 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 22 Oct 2021 20:15:50 +0000 Subject: [PATCH 2292/2515] Added checking status parameter for sanity in more files. --- initialize.php | 2 +- project_edit.php | 1 + role_edit.php | 1 + task_edit.php | 1 + template_edit.php | 1 + timesheet_edit.php | 1 + user_edit.php | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index 4497264e5..342d458a6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.33.5605"); +define("APP_VERSION", "1.19.33.5606"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/project_edit.php b/project_edit.php index 917b2e974..7d8e113dd 100644 --- a/project_edit.php +++ b/project_edit.php @@ -63,6 +63,7 @@ // Validate user input. if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); diff --git a/role_edit.php b/role_edit.php index 5192ee62d..f2aecadee 100644 --- a/role_edit.php +++ b/role_edit.php @@ -58,6 +58,7 @@ if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); if ($cl_rank >= $user->rank || $cl_rank < 0) $err->add($i18n->get('error.field'), $i18n->get('form.roles.rank')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if ($err->no()) { $existing_role = ttRoleHelper::getRoleByName($cl_name); diff --git a/task_edit.php b/task_edit.php index b2b61b80b..9761e31db 100644 --- a/task_edit.php +++ b/task_edit.php @@ -56,6 +56,7 @@ // Validate user input. if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if ($err->no()) { if ($request->getParameter('btn_save')) { diff --git a/template_edit.php b/template_edit.php index 2f3c69727..2ff87b721 100644 --- a/template_edit.php +++ b/template_edit.php @@ -64,6 +64,7 @@ if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); if (!ttValidString($cl_content)) $err->add($i18n->get('error.field'), $i18n->get('label.template')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_projects, 'tt_projects')) $err->add($i18n->get('error.field'), $i18n->get('label.projects')); // Finished validating user input. diff --git a/timesheet_edit.php b/timesheet_edit.php index 164cc61bb..3e46733ae 100644 --- a/timesheet_edit.php +++ b/timesheet_edit.php @@ -51,6 +51,7 @@ // Validate user input. if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_comment, true)) $err->add($i18n->get('error.field'), $i18n->get('label.comment')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if ($request->getParameter('btn_save')) { if ($err->no()) { diff --git a/user_edit.php b/user_edit.php index 10aaebbb0..57133eb39 100644 --- a/user_edit.php +++ b/user_edit.php @@ -194,6 +194,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email')); // Require selection of a client for a client role. if ($user->isPluginEnabled('cl') && ttRoleHelper::isClientRole($cl_role_id) && !$cl_client_id) $err->add($i18n->get('error.client')); + if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); // Validate input in user custom fields. if (isset($custom_fields) && $custom_fields->userFields) { From 4546333e1869a99b28981e3049a83b6ee4d4fa1f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 24 Oct 2021 14:57:44 +0000 Subject: [PATCH 2293/2515] Fixed ttValidStatus function to accept null values. --- WEB-INF/lib/common.lib.php | 3 +++ initialize.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 5840f3684..05a06808f 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -222,6 +222,9 @@ function ttValidFloat($val, $emptyValid = false) // ttValidStatus is used to check user input to validate a status value. function ttValidStatus($val) { + if (null == $val) + return true; + if (!ttValidInteger($val)) return false; diff --git a/initialize.php b/initialize.php index 342d458a6..c778bc422 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.33.5606"); +define("APP_VERSION", "1.19.33.5607"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 50c7a625e0f8e86d3ffb8ea7c5664a995718f797 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 28 Oct 2021 14:45:37 +0000 Subject: [PATCH 2294/2515] Dutch translation improvement. --- WEB-INF/resources/nl.lang.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 921d50af8..91ff4c8bc 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -594,8 +594,7 @@ // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', // Translator (Henk) comment: "kolom is the right word in Dutch." 'form.display_options.not_complete_days' => 'Niet complete dagen', -// TODO: translate the following. -// 'form.display_options.inactive_projects' => 'Inactive projects', +'form.display_options.inactive_projects' => 'Niet actieve projecten', 'form.display_options.custom_css' => 'Aangepaste CSS', // Work plugin strings. See example at https://timetracker.anuko.com/work.php diff --git a/initialize.php b/initialize.php index c778bc422..f02b0b0e3 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.33.5607"); +define("APP_VERSION", "1.19.33.5608"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ab0e714e047eac432316aca5eee38589215745d8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 22 Nov 2021 17:19:15 +0000 Subject: [PATCH 2295/2515] Fixed CustomFileds class for adding a previously deleted option. --- initialize.php | 2 +- plugins/CustomFields.class.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index f02b0b0e3..b93c09ce2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.33.5608"); +define("APP_VERSION", "1.19.34.5609"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index 26e4532b3..1a7b94e9e 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -140,8 +140,9 @@ static function insertOption($field_id, $option_name) { // Check if the option exists. $id = 0; - $sql = "select id from tt_custom_field_options" . - " where field_id = $field_id and group_id = $group_id and org_id = $org_id and value = " . $mdb2->quote($option_name); + $sql = "select id from tt_custom_field_options". + " where field_id = $field_id and group_id = $group_id and org_id = $org_id and value = ".$mdb2->quote($option_name). + " and status is not null"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) return false; From 79b16664911af80dc0703ea8d8192242e7f32748 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 21 Dec 2021 21:16:50 +0000 Subject: [PATCH 2296/2515] Addressed CVE-2021-41139 situation in week.php. --- initialize.php | 2 +- week.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index b93c09ce2..4be516486 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5609"); +define("APP_VERSION", "1.19.34.5610"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index fbfbfee36..e6f7864bb 100644 --- a/week.php +++ b/week.php @@ -38,6 +38,12 @@ exit(); } } +// If we are passed in a date, make sure it is in correct format. +$date = $request->getParameter('date'); +if ($date && !ttValidDbDateFormatDate($date)) { + header('Location: access_denied.php'); + exit(); +} if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); From 52e8604e0ac0c33497c6e0de0db459a53b6627d7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 24 Jan 2022 17:25:34 +0000 Subject: [PATCH 2297/2515] Work in progress removing remote work plugin. --- WEB-INF/templates/plugins.tpl | 6 ------ initialize.php | 2 +- plugins.php | 5 ----- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index 5c1e4c943..e4402f62d 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -210,12 +210,6 @@ function handlePluginCheckboxes() {
{$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.work.control} {$i18n.label.what_is_it}
{$forms.pluginsForm.btn_save.control}
{$forms.pluginsForm.close} diff --git a/initialize.php b/initialize.php index 4be516486..c4fccc0f4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5610"); +define("APP_VERSION", "1.19.34.5611"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins.php b/plugins.php index 95b6d4b9b..1dfe6a073 100644 --- a/plugins.php +++ b/plugins.php @@ -32,7 +32,6 @@ $cl_timesheets = (bool)$request->getParameter('timesheets'); $cl_templates = (bool)$request->getParameter('templates'); $cl_attachments = (bool)$request->getParameter('attachments'); - $cl_work = (bool)$request->getParameter('work'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? @@ -55,7 +54,6 @@ $cl_timesheets = in_array('ts', $plugins); $cl_templates = in_array('tp', $plugins); $cl_attachments = in_array('at', $plugins); - $cl_work = in_array('wk', $plugins); } $form = new Form('pluginsForm'); @@ -79,7 +77,6 @@ $form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets)); $form->addInput(array('type'=>'checkbox','name'=>'templates','value'=>$cl_templates,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'attachments','value'=>$cl_attachments,'onchange'=>'handlePluginCheckboxes()')); -$form->addInput(array('type'=>'checkbox','name'=>'work','value'=>$cl_work,'onchange'=>'handlePluginCheckboxes()')); // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -124,8 +121,6 @@ $plugins .= ',tp'; if ($cl_attachments) $plugins .= ',at'; - if ($cl_work) - $plugins .= ',wk'; $plugins = trim($plugins, ','); // Prepare a new config string. From 6ff1577e836c0f8134734f8a382be7b11c888fe1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 24 Jan 2022 17:35:24 +0000 Subject: [PATCH 2298/2515] Fixed headers to remove remote work plugin. --- WEB-INF/templates/header.tpl | 3 --- WEB-INF/templates/work/header.tpl | 3 --- initialize.php | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index e7df23ea6..372b18d46 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -134,9 +134,6 @@ {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))}
{$i18n.menu.clients}{$i18n.title.work}{$i18n.menu.export}
{$i18n.menu.groups} {$i18n.menu.options}{$i18n.label.work}
diff --git a/WEB-INF/templates/site_map.tpl b/WEB-INF/templates/site_map.tpl index 6848fc52e..54ff8818d 100644 --- a/WEB-INF/templates/site_map.tpl +++ b/WEB-INF/templates/site_map.tpl @@ -4,9 +4,6 @@
- {if isTrue('WORK_SERVER_ADMINISTRATION')} - - {/if}
{* end of sub menu for admin *} {* main menu for admin *} diff --git a/WEB-INF/templates/work/admin_offer_edit.tpl b/WEB-INF/templates/work/admin_offer_edit.tpl deleted file mode 100644 index bd9a6542b..000000000 --- a/WEB-INF/templates/work/admin_offer_edit.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{$forms.offerForm.open} - - - - -
- -{if $work_id} - - - - - - - - - -{/if} - - - - - - - - - - - - -{if $show_files} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.work}:{$work_name}
{$forms.offerForm.work_description.control}
 
{$i18n.label.offer} (*):{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.file}:{$forms.offerForm.newfile.control}
{$i18n.label.currency}:{$forms.offerForm.currency.control}
{$i18n.label.budget} (*):{$forms.offerForm.budget.control}
{$i18n.label.how_to_pay} (*):{$forms.offerForm.payment_info.control}
{$i18n.label.status}:{$forms.offerForm.status.control}
{$i18n.label.moderator_comment}:{$forms.offerForm.moderator_comment.control}
{$i18n.label.required_fields}
 
{$forms.offerForm.btn_approve.control} {$forms.offerForm.btn_save.control} {$forms.offerForm.btn_disapprove.control}
-
-{$forms.offerForm.close} diff --git a/WEB-INF/templates/work/admin_work.tpl b/WEB-INF/templates/work/admin_work.tpl deleted file mode 100644 index 13f37e911..000000000 --- a/WEB-INF/templates/work/admin_work.tpl +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -
-{if $pending_work} - - - - - - - - - - - {foreach $pending_work as $work_item} - - - - - - - - - {/foreach} -
{$i18n.title.pending_work}
{$i18n.label.work}{$i18n.label.description}{$i18n.label.client}{$i18n.label.budget}
{$work_item.subject|escape}{$work_item.description|escape}{$work_item.group_name|escape} ({$work_item.site_id}.{$work_item.group_id}){$work_item.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}
-{/if} - -
- -{if $pending_offers} - - - - - - - - - - - {foreach $pending_offers as $offer} - - - - - - - - - {/foreach} -
{$i18n.title.pending_offers}
{$i18n.label.offer}{$i18n.label.description}{$i18n.label.contractor}{$i18n.label.budget}
{$offer.subject|escape}{$offer.description|escape}{$offer.group_name|escape} ({$offer.site_id}.{$offer.group_id}){$offer.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}
-{/if} - -
- - - -{if $available_work} - - - - - - - {foreach $available_work as $work_item} - - - - - - - {/foreach} -{/if} -
{$i18n.title.available_work}
{$i18n.label.work}{$i18n.label.description}{$i18n.label.client}{$i18n.label.budget}
{$work_item.subject|escape}{$work_item.description|escape}{$work_item.group_name|escape}{$work_item.amount_with_currency}
- -
- - - -{if $available_offers} - - - - - - - {foreach $available_offers as $offer} - - - - - - - {/foreach} -{/if} -
{$i18n.title.available_offers}
{$i18n.label.offer}{$i18n.label.description}{$i18n.label.contractor}{$i18n.label.budget}
{$offer.subject|escape}{$offer.description|escape}{$offer.group_name|escape}{$offer.amount_with_currency}
- -
diff --git a/WEB-INF/templates/work/admin_work_edit.tpl b/WEB-INF/templates/work/admin_work_edit.tpl deleted file mode 100644 index 1ae59a6fe..000000000 --- a/WEB-INF/templates/work/admin_work_edit.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{$forms.workForm.open} - -{if $offer} - - - -{/if} - - - -
- - - - - -
{$i18n.label.offer}: {$offer.subject}
{$i18n.label.contractor}: {$offer.group_name}
{$i18n.label.description}: {$offer.descr_short|escape}
{$i18n.label.budget}: {$offer.amount_with_currency}
-
- - - - - - - - - - - - - -{if $show_files} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.work} (*):{$forms.workForm.work_name.control}
{$i18n.label.description}:{$forms.workForm.description.control}
{$i18n.label.details}:{$forms.workForm.details.control}
{$i18n.label.file}:{$forms.workForm.newfile.control}
{$i18n.label.currency}:{$forms.workForm.currency.control}
{$i18n.label.budget} (*):{$forms.workForm.budget.control}
{$i18n.label.status}:{$forms.workForm.status.control}
{$i18n.label.moderator_comment}:{$forms.workForm.moderator_comment.control}
{$i18n.label.required_fields}
 
{$forms.workForm.btn_save.control}
-
-{$forms.workForm.close} diff --git a/WEB-INF/templates/work/footer_old.tpl b/WEB-INF/templates/work/footer_old.tpl deleted file mode 100644 index 611067550..000000000 --- a/WEB-INF/templates/work/footer_old.tpl +++ /dev/null @@ -1,29 +0,0 @@ -
-

 

- - - - - -
{$i18n.footer.contribute_msg}
-
- - - - -
Anuko Time Tracker {constant('APP_VERSION')} | Copyright © Anuko | - {$i18n.footer.credits} | - {$i18n.footer.license} | - {$i18n.footer.improve} -
-
- -
- - - diff --git a/WEB-INF/templates/work/header.tpl b/WEB-INF/templates/work/header.tpl deleted file mode 100644 index 6b767a16a..000000000 --- a/WEB-INF/templates/work/header.tpl +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -{if $i18n.language.rtl} - -{/if} - Time Tracker{if $title} - {$title}{/if} - - - - - - - -{assign var="tab_width" value="700"} - - - - - - + +
- - - - -{if $user->custom_logo} - - -
-{else} - -{/if} - - - - -
- - - -{if $user->custom_logo} - -{else} - -{/if} - - -
-
- - -{if $authenticated} - {if $user->can('administer_site')} - - - - - -
  - {$i18n.menu.logout} - {$i18n.menu.forum} - {$i18n.menu.help} -
- - - - - - - - - - {else} - - - - - -
  - {$i18n.menu.logout} - {if $user->exists() && $user->can('manage_own_settings')} - {$i18n.menu.profile} - {/if} - {if $user->can('manage_basic_settings')} - {$i18n.menu.group} - {/if} - {if $user->can('manage_features')} - {$i18n.menu.plugins} - {/if} - {$i18n.menu.forum} - {$i18n.menu.help} -
- - - - - - - - - - {/if} -{else} - - - - - -
  - {$i18n.menu.login} - {if isTrue('MULTIORG_MODE') && constant('AUTH_MODULE') == 'db'} - {$i18n.menu.register} - {/if} - {$i18n.menu.forum} - {$i18n.menu.help} -
-{/if} -
- - -{if $title} - - - {* No need to escape as it is done in the class. *} -
{$title}{if $timestring}: {$timestring}{/if}
{$user->getUserPartForHeader()}
-{/if} - - - -{if $err->yes()} - - - - -
- {foreach $err->getErrors() as $error} - {$error.message}
{* No need to escape as they are not coming from user and may contain a link. *} - {/foreach} -
-{/if} - - - -{if $msg->yes()} - - - - -
- {foreach $msg->getErrors() as $message} - {$message.message}
{* No need to escape. *} - {/foreach} -
-{/if} - diff --git a/WEB-INF/templates/work/index.tpl b/WEB-INF/templates/work/index.tpl deleted file mode 100644 index c4f193521..000000000 --- a/WEB-INF/templates/work/index.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{include file="work/header.tpl"} - -{if $content_page_name}{include file="$content_page_name"}{/if} - -{include file="work/footer_old.tpl"} diff --git a/WEB-INF/templates/work/offer_add.tpl b/WEB-INF/templates/work/offer_add.tpl deleted file mode 100644 index 80e07d803..000000000 --- a/WEB-INF/templates/work/offer_add.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{$forms.offerForm.open} - -{if $work_item} - - - -{/if} - - - - -
- - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- -{if $work_id} - - - - - - - - - -{/if} - - - - - - - - - - - - -{if $show_files} - - - - -{/if} - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.work}:{$work_name}
{$forms.offerForm.work_description.control}
 
{$i18n.label.offer} (*):{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.file}:{$forms.offerForm.newfile.control}
{$i18n.label.currency}:{$forms.offerForm.currency.control}
{$i18n.label.budget} (*):{$forms.offerForm.budget.control} {$i18n.label.what_is_it}
{$i18n.label.how_to_pay} (*):{$forms.offerForm.payment_info.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
 
{$forms.offerForm.btn_add.control}
-
-{$forms.offerForm.close} diff --git a/WEB-INF/templates/work/offer_delete.tpl b/WEB-INF/templates/work/offer_delete.tpl deleted file mode 100644 index 7d8954cfb..000000000 --- a/WEB-INF/templates/work/offer_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.offerDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$offer_to_delete|escape}
 
{$forms.offerDeleteForm.btn_delete.control}  {$forms.offerDeleteForm.btn_cancel.control}
-
-{$forms.offerDeleteForm.close} diff --git a/WEB-INF/templates/work/offer_edit.tpl b/WEB-INF/templates/work/offer_edit.tpl deleted file mode 100644 index 5c1e89a33..000000000 --- a/WEB-INF/templates/work/offer_edit.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{$forms.offerForm.open} - -{if $work_item} - - - -{/if} - - - - -
- - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if $show_moderator_comment} - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.offer} (*):{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.currency}:{$forms.offerForm.currency.control}
{$i18n.label.budget} (*):{$forms.offerForm.budget.control} {$i18n.label.what_is_it}
{$i18n.label.how_to_pay} (*):{$forms.offerForm.payment_info.control} {$i18n.label.what_is_it}
{$i18n.label.status}:{$forms.offerForm.status.control}
{$i18n.label.moderator_comment}:{$forms.offerForm.moderator_comment.control}
{$i18n.label.required_fields}
 
{$forms.offerForm.btn_save.control}
-
-{$forms.offerForm.close} diff --git a/WEB-INF/templates/work/offer_message.tpl b/WEB-INF/templates/work/offer_message.tpl deleted file mode 100644 index c97a3db91..000000000 --- a/WEB-INF/templates/work/offer_message.tpl +++ /dev/null @@ -1,32 +0,0 @@ - - -{$forms.messageForm.open} - -{if $offer} - - - -{/if} - - - -
- - - - -
{$i18n.label.offer}: {$offer.subject}
{$i18n.label.description}: {$offer.descr_short|escape}
{$i18n.label.budget}: {$offer.amount_with_currency}
-
- - - - - - - - -
{$i18n.work.label.message}:{$forms.messageForm.message_body.control}
{$forms.messageForm.btn_send.control}
-
-{$forms.messageForm.close} diff --git a/WEB-INF/templates/work/offer_view.tpl b/WEB-INF/templates/work/offer_view.tpl deleted file mode 100644 index 3d9d7d0c5..000000000 --- a/WEB-INF/templates/work/offer_view.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - -{$forms.offerForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.contractor}:{$forms.offerForm.contractor.control}
{$i18n.label.offer}:{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.budget}:{$forms.offerForm.budget.control}
-
-{$forms.offerForm.close} - - - - - -
- - - - - -
-
diff --git a/WEB-INF/templates/work/offer_view_own.tpl b/WEB-INF/templates/work/offer_view_own.tpl deleted file mode 100644 index d00ae7ea1..000000000 --- a/WEB-INF/templates/work/offer_view_own.tpl +++ /dev/null @@ -1,42 +0,0 @@ - - -{$forms.offerForm.open} - -{if $work_item} - - - -{/if} - - - - -
- - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- - - - - - - - - - - - - - - - - -
{$i18n.label.offer}:{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.budget}:{$forms.offerForm.budget.control}
-
-{$forms.offerForm.close} diff --git a/WEB-INF/templates/work/work.tpl b/WEB-INF/templates/work/work.tpl deleted file mode 100644 index 67235b64f..000000000 --- a/WEB-INF/templates/work/work.tpl +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - -
-{if $own_work_items} - - - - - - - - - - - - {foreach $own_work_items as $work_item} - - - - - - - {if $work_item.can_edit} - - {else} - - {/if} - {if $work_item.can_delete} - - {else} - - {/if} - - {/foreach} -
{$i18n.work.label.own_work}
{$i18n.label.work}{$i18n.label.description}{$i18n.label.status}{$i18n.work.label.offers}{$i18n.label.budget}
{$work_item.subject|escape}{$work_item.description|escape}{$work_item.status_label}{if $work_item.num_offers}{$work_item.num_offers}{/if}{$work_item.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
-{/if} - - - -{if $available_work_items} - - - - - - - {foreach $available_work_items as $work_item} - - - - - - - {/foreach} -{/if} -
{$i18n.title.available_work}
{$i18n.label.work}{$i18n.label.description}{$i18n.label.client}{$i18n.label.budget}
{$work_item.subject|escape}{$work_item.description|escape}{$work_item.group_name|escape}{$work_item.amount_with_currency}
- - - - - -

-
-
- -{if $own_offers} - - - - - - - - - - - {foreach $own_offers as $offer} - - - - - - - - - {/foreach} -
{$i18n.work.label.own_offers}
{$i18n.label.offer}{$i18n.label.description}{$i18n.label.status}{$i18n.label.budget}
{$offer.subject|escape}{$offer.description|escape}{$offer.status_label}{$offer.amount_with_currency}{$i18n.label.edit}{$i18n.label.delete}
- - - - - -

-
-
-{/if} - - - -{if $available_offers} - - - - - - - {foreach $available_offers as $offer} - - - - - - - {/foreach} -{/if} -
{$i18n.title.available_offers}
{$i18n.label.offer}{$i18n.label.description}{$i18n.label.contractor}{$i18n.label.budget}
{$offer.subject|escape}{$offer.description|escape}{$offer.group_name|escape}{$offer.amount_with_currency}
- - - - - -

-
-
- -
diff --git a/WEB-INF/templates/work/work_add.tpl b/WEB-INF/templates/work/work_add.tpl deleted file mode 100644 index eca0ba799..000000000 --- a/WEB-INF/templates/work/work_add.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{$forms.workForm.open} - -{if $offer} - - - -{/if} - - - -
- - - - -
{$i18n.label.offer}: {$offer.subject}
{$i18n.label.description}: {$offer.descr_short|escape}
{$i18n.label.budget}: {$offer.amount_with_currency}
-
- - - - - - - - - - - - - - - - - -{if $show_files} - - - - -{/if} - - - - - - - - - - - - - - - - - - - -
{$i18n.label.work} (*):{$forms.workForm.work_name.control}
{$i18n.label.type}:{$forms.workForm.work_type.control}
{$i18n.label.description}:{$forms.workForm.description.control}
{$i18n.label.details}:{$forms.workForm.details.control}
{$i18n.label.file}:{$forms.workForm.newfile.control}
{$i18n.label.currency}:{$forms.workForm.currency.control}
{$i18n.label.budget} (*):{$forms.workForm.budget.control} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
 
{$forms.workForm.btn_add.control}
-
-{$forms.workForm.close} diff --git a/WEB-INF/templates/work/work_delete.tpl b/WEB-INF/templates/work/work_delete.tpl deleted file mode 100644 index 2831b0f15..000000000 --- a/WEB-INF/templates/work/work_delete.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{$forms.workDeleteForm.open} - - - - -
- - - - - - - - - - - -
{$work_to_delete|escape}
 
{$forms.workDeleteForm.btn_delete.control}  {$forms.workDeleteForm.btn_cancel.control}
-
-{$forms.workDeleteForm.close} diff --git a/WEB-INF/templates/work/work_edit.tpl b/WEB-INF/templates/work/work_edit.tpl deleted file mode 100644 index 7165d5e19..000000000 --- a/WEB-INF/templates/work/work_edit.tpl +++ /dev/null @@ -1,73 +0,0 @@ -{$forms.workForm.open} - -{if $offer} - - - -{/if} - - - -
- - - - - -
{$i18n.label.offer}: {$offer.subject}
{$i18n.label.contractor}: {$offer.group_name}
{$i18n.label.description}: {$offer.descr_short|escape}
{$i18n.label.budget}: {$offer.amount_with_currency}
-
- - - - - - - - - - - - - - - - - -{if $show_files} - - - - -{/if} - - - - - - - - - - - - -{if $show_moderator_comment} - - - - -{/if} - - - - - - - - - - - -
{$i18n.label.work} (*):{$forms.workForm.work_name.control}
{$i18n.label.type}:{$forms.workForm.work_type.control}
{$i18n.label.description}:{$forms.workForm.description.control}
{$i18n.label.details}:{$forms.workForm.details.control}
{$i18n.label.file}:{$forms.workForm.newfile.control}
{$i18n.label.currency}:{$forms.workForm.currency.control}
{$i18n.label.budget} (*):{$forms.workForm.budget.control} {$i18n.label.what_is_it}
{$i18n.label.status}:{$forms.workForm.status.control}
{$i18n.label.moderator_comment}:{$forms.workForm.moderator_comment.control}
{$i18n.label.required_fields}
 
{$forms.workForm.btn_save.control}
-
-{$forms.workForm.close} diff --git a/WEB-INF/templates/work/work_message.tpl b/WEB-INF/templates/work/work_message.tpl deleted file mode 100644 index 3f237659c..000000000 --- a/WEB-INF/templates/work/work_message.tpl +++ /dev/null @@ -1,32 +0,0 @@ - - -{$forms.messageForm.open} - -{if $work_item} - - - -{/if} - - - -
- - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- - - - - - - - -
{$i18n.work.label.message}:{$forms.messageForm.message_body.control}
{$forms.messageForm.btn_send.control}
-
-{$forms.messageForm.close} diff --git a/WEB-INF/templates/work/work_offer_view.tpl b/WEB-INF/templates/work/work_offer_view.tpl deleted file mode 100644 index e2afe0003..000000000 --- a/WEB-INF/templates/work/work_offer_view.tpl +++ /dev/null @@ -1,57 +0,0 @@ -{$forms.offerForm.open} - -{if $work_item} - - - -{/if} - - - -
- - - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.client}: {$work_item.group_name}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.contractor}:{$forms.offerForm.contractor.control}
{$i18n.label.offer}:{$forms.offerForm.offer_name.control}
{$i18n.label.description}:{$forms.offerForm.description.control}
{$i18n.label.details}:{$forms.offerForm.details.control}
{$i18n.label.budget}:{$forms.offerForm.budget.control}
{$i18n.label.status}:{$forms.offerForm.status.control}
 
{$forms.offerForm.btn_accept.control} {$forms.offerForm.btn_decline.control}
{$i18n.label.comment}:{$forms.offerForm.client_comment.control}
-
-{$forms.offerForm.close} diff --git a/WEB-INF/templates/work/work_offers.tpl b/WEB-INF/templates/work/work_offers.tpl deleted file mode 100644 index ea0d8816f..000000000 --- a/WEB-INF/templates/work/work_offers.tpl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - -
- - - - - -
{$i18n.label.work}: {$work_item.subject}
{$i18n.label.client}: {$work_item.group_name}
{$i18n.label.description}: {$work_item.descr_short|escape}
{$i18n.label.budget}: {$work_item.amount_with_currency}
-
- -{if $work_item_offers} - - - - - - - - {foreach $work_item_offers as $offer} - - - - - - - {/foreach} -
{$i18n.label.contractor}{$i18n.label.description}{$i18n.label.status}{$i18n.label.budget}
{$offer.group_name|escape}{$offer.description|escape}{$offer.status_label}{$offer.amount_with_currency}
-{/if} - -
diff --git a/WEB-INF/templates/work/work_view.tpl b/WEB-INF/templates/work/work_view.tpl deleted file mode 100644 index 468cb9ddd..000000000 --- a/WEB-INF/templates/work/work_view.tpl +++ /dev/null @@ -1,47 +0,0 @@ - - -{$forms.workForm.open} - - - - -
- - - - - - - - - - - - - - - - - - - - - -
{$i18n.label.client}:{$forms.workForm.client.control}
{$i18n.label.work}:{$forms.workForm.work_name.control}
{$i18n.label.description}:{$forms.workForm.description.control}
{$i18n.label.details}:{$forms.workForm.details.control}
{$i18n.label.budget}:{$forms.workForm.budget.control}
-
-{$forms.workForm.close} - - - - - -
- - - - - -
-
diff --git a/WEB-INF/templates/work/work_view_own.tpl b/WEB-INF/templates/work/work_view_own.tpl deleted file mode 100644 index 61e270b4b..000000000 --- a/WEB-INF/templates/work/work_view_own.tpl +++ /dev/null @@ -1,38 +0,0 @@ -{$forms.workForm.open} - -{if $offer} - - - -{/if} - - - -
- - - - - -
{$i18n.label.offer}: {$offer.subject}
{$i18n.label.contractor}: {$offer.group_name}
{$i18n.label.description}: {$offer.descr_short|escape}
{$i18n.label.budget}: {$offer.amount_with_currency}
-
- - - - - - - - - - - - - - - - - -
{$i18n.label.work}:{$forms.workForm.work_name.control}
{$i18n.label.description}:{$forms.workForm.description.control}
{$i18n.label.details}:{$forms.workForm.details.control}
{$i18n.label.budget}:{$forms.workForm.budget.control}
-
-{$forms.workForm.close} diff --git a/work/admin_offer_delete.php b/work/admin_offer_delete.php deleted file mode 100644 index a1bd5fac1..000000000 --- a/work/admin_offer_delete.php +++ /dev/null @@ -1,71 +0,0 @@ -getParameter('id'); -$adminWorkHelper = new ttAdminWorkHelper($err); -$offer = $adminWorkHelper->getOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$offer_to_delete = $offer['subject']; - -$form = new Form('offerDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_offer_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if ($adminWorkHelper->deleteOffer($cl_offer_id)) { - header('Location: admin_work.php'); - exit(); - } - } elseif ($request->getParameter('btn_cancel')) { - header('Location: admin_work.php'); - exit(); - } -} // isPost - -$smarty->assign('offer_to_delete', $offer_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.offerDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_offer')); -$smarty->assign('content_page_name', 'work/offer_delete.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/admin_offer_edit.php b/work/admin_offer_edit.php deleted file mode 100644 index ab795c136..000000000 --- a/work/admin_offer_edit.php +++ /dev/null @@ -1,171 +0,0 @@ -getParameter('id'); -$adminWorkHelper = new ttAdminWorkHelper($err); -$offer = $adminWorkHelper->getOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -// Is this offer associated with a work item? -$work_id = $offer['work_id']; -if ($work_id) { - $work_item = $adminWorkHelper->getWorkItem($work_id); - if (!$work_item) $err->add($i18n->get('work.error.work_not_available')); -} - -$existingStatus = $offer['status']; -$currencies = ttWorkHelper::getCurrencies(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('offer_name')); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - if (!$cl_currency_id && $work_item) $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - $cl_budget = $request->getParameter('budget'); - $cl_payment_info = $request->getParameter('payment_info'); - // $cl_status = $request->getParameter('status'); - $cl_moderator_comment = $request->getParameter('moderator_comment'); -} else { - $cl_name = $offer['subject']; - $cl_description = $offer['descr_short']; - $cl_details = $offer['descr_long']; - $currency = $offer['currency']; - $cl_currency_id = ttWorkHelper::getCurrencyID($offer['currency']); - $cl_budget = $offer['amount']; - $cl_payment_info = $offer['payment_info']; - $status = $offer['status']; - $status_label = $offer['status_label']; - $cl_moderator_comment = $offer['moderator_comment']; -} - -$form = new Form('offerForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_offer_id)); -if ($work_id) { - $form->addInput(array('type'=>'textarea','name'=>'work_description','style'=>'width: 400px; height: 80px;','value'=>$work_item['descr_short'])); - $form->getElement('work_description')->setEnabled(false); -} -$form->addInput(array('type'=>'text','name'=>'offer_name','style'=>'width: 400px;','value'=>$cl_name)); -if ($work_id) $form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -if ($work_id) $form->getElement('currency')->setEnabled(false); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -$form->addInput(array('type'=>'textarea','name'=>'payment_info','maxlength'=>'256','style'=>'width: 400px; height: 40px;vertical-align: middle','value'=>$cl_payment_info)); -$form->addInput(array('type'=>'text','name'=>'status','style'=>'width: 400px;','value'=>$status_label)); -$form->getElement('status')->setEnabled(false); - -// Prepare status choices. -/* -$status_options = array(); -$status_options[STATUS_PENDING_APPROVAL] = $i18n->get('dropdown.pending_approval'); -$status_options[STATUS_DISAPPROVED] = $i18n->get('dropdown.not_approved'); -$status_options[STATUS_APPROVED] = $i18n->get('dropdown.approved'); - -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status,'data'=>$status_options)); -*/ -$form->addInput(array('type'=>'textarea','name'=>'moderator_comment','style'=>'width: 400px; height: 80px;','value'=>$cl_moderator_comment)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -if ($status == STATUS_PENDING_APPROVAL) { - $form->addInput(array('type'=>'submit','name'=>'btn_approve','value'=>$i18n->get('button.approve'))); - $form->addInput(array('type'=>'submit','name'=>'btn_disapprove','value'=>$i18n->get('button.disapprove'))); -} - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.work')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - if (!ttValidString($cl_payment_info)) $err->add($i18n->get('error.field'), $i18n->get('label.how_to_pay')); - if (!ttValidString($cl_moderator_comment, true)) $err->add($i18n->get('error.field'), $i18n->get('label.moderator_comment')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - $fields = array('offer_id'=>$cl_offer_id, - 'subject'=>$cl_name, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget, - 'payment_info' => $cl_payment_info, - 'moderator_comment' => $cl_moderator_comment); - - if ($err->no()) { - if ($request->getParameter('btn_approve')) { - // Approve offer. - if ($adminWorkHelper->approveOffer($fields)) { - header('Location: admin_work.php'); - exit(); - } - } - - if ($request->getParameter('btn_save')) { - // Update offer without changing its status. - if ($adminWorkHelper->updateOffer($fields)) { - header('Location: admin_work.php'); - exit(); - } - } - - if ($request->getParameter('btn_disapprove')) { - // Dispprove offer. - if ($adminWorkHelper->disapproveOffer($fields)) { - header('Location: admin_work.php'); - exit(); - } - } - } -} // isPost - -if ($work_id) { - $smarty->assign('work_id', $work_id); - $smarty->assign('work_name', $work_item['subject']); - $smarty->assign('work_description', $work_item['descr_short']); -} -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.edit_offer')); -$smarty->assign('content_page_name', 'work/admin_offer_edit.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/admin_work.php b/work/admin_work.php deleted file mode 100644 index 86a029a4a..000000000 --- a/work/admin_work.php +++ /dev/null @@ -1,53 +0,0 @@ -getItems(); -$pending_work = $adminItems['pending_work']; -$pending_offers = $adminItems['pending_offers']; -$available_work = $adminItems['available_work']; -$available_offers = $adminItems['available_offers']; - -$smarty->assign('pending_work', $pending_work); -$smarty->assign('pending_offers', $pending_offers); -$smarty->assign('available_work', $available_work); -$smarty->assign('available_offers', $available_offers); -$smarty->assign('title', $i18n->get('title.work')); -$smarty->assign('content_page_name', 'work/admin_work.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/admin_work_delete.php b/work/admin_work_delete.php deleted file mode 100644 index 11b599430..000000000 --- a/work/admin_work_delete.php +++ /dev/null @@ -1,71 +0,0 @@ -getParameter('id'); -$adminWorkHelper = new ttAdminWorkHelper($err); -$work_item = $adminWorkHelper->getWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$work_to_delete = $work_item['subject']; - -$form = new Form('workDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if ($adminWorkHelper->deleteWorkItem($cl_work_id)) { - header('Location: admin_work.php'); - exit(); - } - } elseif ($request->getParameter('btn_cancel')) { - header('Location: admin_work.php'); - exit(); - } -} // isPost - -$smarty->assign('work_to_delete', $work_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.workDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_work')); -$smarty->assign('content_page_name', 'work/work_delete.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/admin_work_edit.php b/work/admin_work_edit.php deleted file mode 100644 index 51169325c..000000000 --- a/work/admin_work_edit.php +++ /dev/null @@ -1,168 +0,0 @@ -getParameter('id'); -$adminWorkHelper = new ttAdminWorkHelper($err); -$work_item = $adminWorkHelper->getWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// Do we have offer_id? -$offer_id = $work_item['offer_id']; -if ($offer_id) { - $offer = $adminWorkHelper->getOffer($offer_id); - if (!$offer) { - header('Location: ../access_denied.php'); - exit(); - } -} -// End of access checks. - -$existingStatus = $work_item['status']; -$currencies = ttWorkHelper::getCurrencies(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('work_name')); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - $cl_budget = $request->getParameter('budget'); - $cl_status = $request->getParameter('status'); - $cl_moderator_comment = $request->getParameter('moderator_comment'); -} else { - $cl_name = $work_item['subject']; - $cl_description = $work_item['descr_short']; - $cl_details = $work_item['descr_long']; - $currency = $work_item['currency']; - $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - $cl_budget = $work_item['amount']; - $cl_status = $work_item['status']; - $cl_moderator_comment = $work_item['moderator_comment']; -} - -$form = new Form('workForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'text','name'=>'work_name','maxlength'=>'128','style'=>'width: 400px;','value'=>$cl_name)); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -// Disable some controls for work on an available offer. -if ($offer) { - $form->getElement('work_name')->setEnabled(false); - // $form->getElement('work_type')->setEnabled(false); - $form->getElement('currency')->setEnabled(false); - $form->getElement('budget')->setEnabled(false); -} - -// Prepare status choices. -$status_options = array(); -$status_options[STATUS_PENDING_APPROVAL] = $i18n->get('dropdown.pending_approval'); -$status_options[STATUS_DISAPPROVED] = $i18n->get('dropdown.not_approved'); -$status_options[STATUS_APPROVED] = $i18n->get('dropdown.approved'); - -$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status,'data'=>$status_options)); -$form->addInput(array('type'=>'textarea','name'=>'moderator_comment','style'=>'width: 400px; height: 80px;','value'=>$cl_moderator_comment)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.work')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - if (!ttValidString($cl_moderator_comment, true)) $err->add($i18n->get('error.field'), $i18n->get('label.moderator_comment')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - $fields = array('work_id'=>$cl_work_id, - 'subject'=>$cl_name, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget, - 'moderator_comment' => $cl_moderator_comment); - - // Do things differently, depending on status control value. - if ($existingStatus == $cl_status) { - // Status not changed. Update work information. - if ($adminWorkHelper->updateWorkItem($fields)) { - header('Location: admin_work.php'); - exit(); - } - } else if ($cl_status == STATUS_DISAPPROVED) { - // Status changed to "not approved". Disapprove work. - if ($offer_id) { - if ($adminWorkHelper->disapproveWorkItemOnOffer($fields)) { - header('Location: admin_work.php'); - exit(); - } - } else { - if ($adminWorkHelper->disapproveWorkItem($fields)) { - header('Location: admin_work.php'); - exit(); - } - } - } else if ($cl_status == STATUS_APPROVED) { - // Status changed to "approved". Approve work. - if ($offer_id) { - if ($adminWorkHelper->approveWorkItemOnOffer($fields)) { - header('Location: admin_work.php'); - exit(); - } - } else { - if ($adminWorkHelper->approveWorkItem($fields)) { - header('Location: admin_work.php'); - exit(); - } - } - } - } - } -} // isPost - -$smarty->assign('offer', $offer); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.edit_work')); -$smarty->assign('content_page_name', 'work/admin_work_edit.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_add.php b/work/offer_add.php deleted file mode 100644 index bafdae216..000000000 --- a/work/offer_add.php +++ /dev/null @@ -1,120 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -// Do we have work_id? -$cl_work_id = (int)$request->getParameter('work_id'); -if ($cl_work_id) { - $workHelper = new ttWorkHelper($err); - $work_item = $workHelper->getAvailableWorkItem($cl_work_id); - if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); - } -} -// End of access checks. -if ($work_item) $cl_name = $work_item['subject']; - -if ($request->isPost()) { - if (!$work_item) - $cl_name = trim($request->getParameter('offer_name')); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - if (!$cl_currency_id && $work_item) $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - $cl_budget = $request->getParameter('budget'); - $cl_payment_info = $request->getParameter('payment_info'); -} else { - if ($work_item) { - $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - } -} - -$form = new Form('offerForm'); -if ($cl_work_id) { - $form->addInput(array('type'=>'hidden','name'=>'work_id','value'=>$cl_work_id)); - $form->addInput(array('type'=>'textarea','name'=>'work_description','style'=>'width: 400px; height: 80px;','value'=>$work_item['descr_short'])); - $form->getElement('work_description')->setEnabled(false); -} -$form->addInput(array('type'=>'text','name'=>'offer_name','maxlength'=>'128','style'=>'width: 400px;','value'=>$cl_name)); -if ($work_item) $form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -// Add a dropdown for currency. -$currencies = ttWorkHelper::getCurrencies(); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -if ($work_item) $form->getElement('currency')->setEnabled(false); // Do not allow changing currency for offers on existing work items. -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -$form->addInput(array('type'=>'textarea','name'=>'payment_info','maxlength'=>'256','style'=>'width: 400px; height: 40px;vertical-align: middle','value'=>$cl_payment_info)); -$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.offer')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - if (!ttValidString($cl_payment_info)) $err->add($i18n->get('error.field'), $i18n->get('label.how_to_pay')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - $workHelper = new ttWorkHelper($err); - $fields = array('work_id'=>$cl_work_id, - 'subject'=>$cl_name, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget, - 'payment_info' => $cl_payment_info); - if ($workHelper->putOwnOffer($fields)) { - header('Location: work.php'); - exit(); - } - } -} // isPost - -$smarty->assign('work_item', $work_item); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.offerForm.work_name.focus()"'); -$smarty->assign('title', $i18n->get('title.add_offer')); -$smarty->assign('content_page_name', 'work/offer_add.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_delete.php b/work/offer_delete.php deleted file mode 100644 index fd3d2e7d1..000000000 --- a/work/offer_delete.php +++ /dev/null @@ -1,75 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_offer_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getOwnOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$offer_to_delete = $offer['subject']; - -$form = new Form('offerDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_offer_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if ($workHelper->deleteOwnOffer($cl_offer_id)) { - header('Location: work.php'); - exit(); - } - } elseif ($request->getParameter('btn_cancel')) { - header('Location: work.php'); - exit(); - } -} // isPost - -$smarty->assign('offer_to_delete', $offer_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.offerDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_offer')); -$smarty->assign('content_page_name', 'work/offer_delete.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_edit.php b/work/offer_edit.php deleted file mode 100644 index bd2172210..000000000 --- a/work/offer_edit.php +++ /dev/null @@ -1,135 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_offer_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getOwnOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -// Is this offer associated with a work item? -$work_id = $offer['work_id']; -if ($work_id) { - $work_item = $workHelper->getAvailableWorkItem($work_id); - if (!$work_item) $err->add($i18n->get('work.error.work_not_available')); -} - -$currencies = ttWorkHelper::getCurrencies(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('offer_name')); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - if (!$cl_currency_id && $work_item) $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - $cl_budget = $request->getParameter('budget'); - $cl_payment_info = $request->getParameter('payment_info'); -} else { - $cl_name = $offer['subject']; - $cl_description = $offer['descr_short']; - $cl_details = $offer['descr_long']; - $cl_currency_id = ttWorkHelper::getCurrencyID($offer['currency']); - $cl_budget = $offer['amount']; - $cl_payment_info = $offer['payment_info']; - $cl_status = $offer['status_label']; - $cl_moderator_comment = $offer['moderator_comment']; -} - -$show_moderator_comment = $cl_moderator_comment != null; - -$form = new Form('offerForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_offer_id)); -if ($work_id) { - $form->addInput(array('type'=>'textarea','name'=>'work_description','style'=>'width: 400px; height: 80px;','value'=>$work_item['descr_short'])); - $form->getElement('work_description')->setEnabled(false); -} -$form->addInput(array('type'=>'text','name'=>'offer_name','maxlength'=>'128','style'=>'width: 400px;','value'=>$cl_name)); -if ($work_id) $form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -if ($work_id) $form->getElement('currency')->setEnabled(false); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -$form->addInput(array('type'=>'textarea','name'=>'payment_info','maxlength'=>'256','style'=>'width: 400px; height: 40px; vertical-align: middle','value'=>$cl_payment_info)); -$form->addInput(array('type'=>'text','name'=>'status','style'=>'width: 400px;','value'=>$cl_status)); -$form->getElement('status')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'moderator_comment','style'=>'width: 400px; height: 80px;','value'=>$cl_moderator_comment)); -$form->getElement('moderator_comment')->setEnabled(false); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.offer')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - if (!ttValidString($cl_payment_info)) $err->add($i18n->get('error.field'), $i18n->get('label.how_to_pay')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - // Update offer information. - $fields = array('offer_id'=>$cl_offer_id, - 'subject'=>$cl_name, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget, - 'payment_info' => $cl_payment_info); - if ($workHelper->updateOwnOffer($fields)) { - header('Location: work.php'); - exit(); - } - } - } -} // isPost - -$smarty->assign('work_item', $work_item); -$smarty->assign('show_moderator_comment', $show_moderator_comment); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.edit_offer')); -$smarty->assign('content_page_name', 'work/offer_edit.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_message.php b/work/offer_message.php deleted file mode 100644 index ff324808e..000000000 --- a/work/offer_message.php +++ /dev/null @@ -1,90 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_offer_id = (int)$request->getParameter('offer_id'); -if (!$cl_offer_id) { - header('Location: ../access_denied.php'); - exit(); -} -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getAvailableOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$cl_name = $offer['subject']; - -if ($request->isPost()) { - $cl_message_body = trim($request->getParameter('message_body')); -} - -$form = new Form('messageForm'); -$form->addInput(array('type'=>'hidden','name'=>'offer_id','value'=>$cl_offer_id)); -$form->addInput(array('type'=>'textarea','name'=>'message_body','style'=>'width: 400px; height: 80px;vertical-align: middle','value'=>$cl_message_body)); -$form->addInput(array('type'=>'submit','name'=>'btn_send','value'=>$i18n->get('work.button.send_message'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_message_body)) $err->add($i18n->get('error.field'), $i18n->get('work.label.message')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - $workHelper = new ttWorkHelper($err); - $fields = array('offer_id'=>$cl_offer_id, - 'message_body' => $cl_message_body); - if ($workHelper->sendMessageToOfferOwner($fields)) { - $msg->add($i18n->get('work.msg.message_sent')); - // header('Location: work.php'); // TODO: where to redirect? - // exit(); - } - } -} // isPost - -$smarty->assign('offer', $offer); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.offerForm.work_name.focus()"'); -$smarty->assign('title', $i18n->get('work.title.send_message')); -$smarty->assign('content_page_name', 'work/offer_message.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_view.php b/work/offer_view.php deleted file mode 100644 index 1e045bf20..000000000 --- a/work/offer_view.php +++ /dev/null @@ -1,81 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -if (!ttAccessAllowed('manage_work')) { - header('Location: ../access_denied.php'); - exit(); -} -$offer_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getAvailableOffer($offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -// Is this offer associated with a work item? -$work_id = $offer['work_id']; -if ($work_id) { - $work_item = $workHelper->getAvailableWorkItem($work_id); - if (!$work_item) $err->add($i18n->get('work.error.work_not_available')); -} - -$cl_contractor = $offer['group_name']; -$cl_name = $offer['subject']; -$cl_description = $offer['descr_short']; -$cl_details = $offer['descr_long']; -$cl_budget = $offer['amount_with_currency']; - -$form = new Form('offerForm'); -$form->addInput(array('type'=>'text','name'=>'contractor','value'=>$cl_contractor)); -$form->getElement('contractor')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'offer_name','style'=>'width: 400px;','value'=>$cl_name)); -$form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->getElement('description')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->getElement('details')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'budget','value'=>$cl_budget)); -$form->getElement('budget')->setEnabled(false); - - -$smarty->assign('offer_id', $offer_id); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.offer')); -$smarty->assign('content_page_name', 'work/offer_view.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/offer_view_own.php b/work/offer_view_own.php deleted file mode 100644 index 57b1b95b3..000000000 --- a/work/offer_view_own.php +++ /dev/null @@ -1,77 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -if (!ttAccessAllowed('manage_work')) { - header('Location: ../access_denied.php'); - exit(); -} -$offer_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getOwnOffer($offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -// Is this offer associated with a work item? -$work_id = $offer['work_id']; -if ($work_id) { - $work_item = $workHelper->getAvailableWorkItem($work_id); - if (!$work_item) $err->add($i18n->get('work.error.work_not_available')); -} - -$cl_name = $offer['subject']; -$cl_description = $offer['descr_short']; -$cl_details = $offer['descr_long']; -$cl_budget = $offer['amount_with_currency']; - -$form = new Form('offerForm'); -$form->addInput(array('type'=>'text','name'=>'offer_name','style'=>'width: 400px;','value'=>$cl_name)); -$form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->getElement('description')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->getElement('details')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'budget','value'=>$cl_budget)); -$form->getElement('budget')->setEnabled(false); - -$smarty->assign('work_item', $work_item); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.offer')); -$smarty->assign('content_page_name', 'work/offer_view_own.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work.php b/work/work.php deleted file mode 100644 index b043690b4..000000000 --- a/work/work.php +++ /dev/null @@ -1,65 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -// End of access checks. - -$workHelper = new ttWorkHelper($err); -$groupItems = $workHelper->getGroupItems(); // All group items. -if($user->can('manage_work')) { - $own_work_items = $groupItems['own_work_items']; // Own work items this group is outsourcing. - $available_offers = $groupItems['available_offers']; // Available offers from other organizations. -} -if($user->can('bid_on_work')) { - $available_work_items = $groupItems['available_work_items']; // Currently available work items from other orgs. - $own_offers = $groupItems['own_offers']; // Own offers this group makes available to other groups. -} -if($user->can('update_work')) { - // $in_progress_work = ttWorkHelper::getInProgressWork(); // Work items in progress for other groups. - // $completed_work = ttWorkHelper::getCompletedWork(); // Completed work items for other groups. -} -// TODO: review access rights for the code above. - -$smarty->assign('own_work_items', $own_work_items); -$smarty->assign('available_work_items', $available_work_items); -$smarty->assign('own_offers', $own_offers); -$smarty->assign('available_offers', $available_offers); -$smarty->assign('title', $i18n->get('title.work')); -$smarty->assign('content_page_name', 'work/work.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_add.php b/work/work_add.php deleted file mode 100644 index df12c9155..000000000 --- a/work/work_add.php +++ /dev/null @@ -1,122 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -// Do we have offer_id? -$cl_offer_id = (int)$request->getParameter('offer_id'); -if ($cl_offer_id) { - $workHelper = new ttWorkHelper($err); - $offer = $workHelper->getAvailableOffer($cl_offer_id); - if (!$offer) { - header('Location: ../access_denied.php'); - exit(); - } -} -// End of access checks. - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('work_name')); - $cl_work_type = $request->getParameter('work_type'); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - $cl_budget = $request->getParameter('budget'); -} -// Override some fields for work being created on an available offer. -if ($offer) { - $cl_name = $offer['subject']; - $cl_work_type = 0; // one-time work - $cl_currency_id = ttWorkHelper::getCurrencyID($offer['currency']); - $cl_budget = $offer['amount']; -} - -$form = new Form('workForm'); -if ($offer) - $form->addInput(array('type'=>'hidden','name'=>'offer_id','value'=>$cl_offer_id)); -$form->addInput(array('type'=>'text','name'=>'work_name','maxlength'=>'128','style'=>'width: 400px;','value'=>$cl_name)); -$WORK_TYPE_OPTIONS = array('0'=>$i18n->get('work.type.one_time'),'1'=>$i18n->get('work.type.ongoing')); -$form->addInput(array('type'=>'combobox','name'=>'work_type','data'=>$WORK_TYPE_OPTIONS,'value'=>$cl_work_type)); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -// Add a dropdown for currency. -$currencies = ttWorkHelper::getCurrencies(); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); -// Disable some controls for work being created on an available offer. -if ($offer) { - $form->getElement('work_name')->setEnabled(false); - $form->getElement('work_type')->setEnabled(false); - $form->getElement('currency')->setEnabled(false); - $form->getElement('budget')->setEnabled(false); -} - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.work')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - $workHelper = new ttWorkHelper($err); - $fields = array('offer_id' => $cl_offer_id, - 'subject' => $cl_name, - 'type' => $cl_work_type, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget); - if ($workHelper->putOwnWorkItem($fields)) { - header('Location: work.php'); - exit(); - } - } -} // isPost - -$smarty->assign('offer', $offer); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.workForm.work_name.focus()"'); -$smarty->assign('title', $i18n->get('title.add_work')); -$smarty->assign('content_page_name', 'work/work_add.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_delete.php b/work/work_delete.php deleted file mode 100644 index 1d94603ab..000000000 --- a/work/work_delete.php +++ /dev/null @@ -1,75 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_work_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getOwnWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$work_to_delete = $work_item['subject']; - -$form = new Form('workDeleteForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); -$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel'))); - -if ($request->isPost()) { - if ($request->getParameter('btn_delete')) { - if ($workHelper->deleteOwnWorkItem($cl_work_id)) { - header('Location: work.php'); - exit(); - } - } elseif ($request->getParameter('btn_cancel')) { - header('Location: work.php'); - exit(); - } -} // isPost - -$smarty->assign('work_to_delete', $work_to_delete); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.workDeleteForm.btn_cancel.focus()"'); -$smarty->assign('title', $i18n->get('title.delete_work')); -$smarty->assign('content_page_name', 'work/work_delete.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_edit.php b/work/work_edit.php deleted file mode 100644 index 7e27106b8..000000000 --- a/work/work_edit.php +++ /dev/null @@ -1,151 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_work_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getOwnWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// Do we have offer_id? -$offer_id = $work_item['offer_id']; -if ($offer_id) { - $offer = $workHelper->getAvailableOffer($offer_id); - if (!$offer) { - header('Location: ../access_denied.php'); - exit(); - } -} -// End of access checks. - -$currencies = ttWorkHelper::getCurrencies(); - -if ($request->isPost()) { - $cl_name = trim($request->getParameter('work_name')); - $cl_work_type = $request->getParameter('work_type'); - $cl_description = trim($request->getParameter('description')); - $cl_details = trim($request->getParameter('details')); - $cl_currency_id = $request->getParameter('currency'); - $cl_budget = $request->getParameter('budget'); -} else { - $cl_name = $work_item['subject']; - $cl_work_type = $work_item['type']; - $cl_description = $work_item['descr_short']; - $cl_details = $work_item['descr_long']; - $cl_currency_id = ttWorkHelper::getCurrencyID($work_item['currency']); - $cl_budget = $work_item['amount']; - $cl_status = $work_item['status_label']; - $cl_moderator_comment = $work_item['moderator_comment']; -} -// Override some fields for work on an available offer. -if ($offer) { - $cl_name = $offer['subject']; - $cl_work_type = 0; // one-time work - $cl_currency_id = ttWorkHelper::getCurrencyID($offer['currency']); - $cl_budget = $offer['amount']; -} - -$show_moderator_comment = $cl_moderator_comment != null; - -$form = new Form('workForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'text','name'=>'work_name','maxlength'=>'128','style'=>'width: 400px;','value'=>$cl_name)); -$WORK_TYPE_OPTIONS = array('0'=>$i18n->get('work.type.one_time'),'1'=>$i18n->get('work.type.ongoing')); -$form->addInput(array('type'=>'combobox','name'=>'work_type','data'=>$WORK_TYPE_OPTIONS,'value'=>$cl_work_type)); -$form->addInput(array('type'=>'textarea','name'=>'description','maxlength'=>'512','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->addInput(array('type'=>'combobox','name'=>'currency','data'=>$currencies,'datakeys'=>array('id','name'),'value'=>$cl_currency_id)); -$form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'budget','format'=>'.2','value'=>$cl_budget)); -$form->addInput(array('type'=>'text','name'=>'status','style'=>'width: 400px;','value'=>$cl_status)); -$form->getElement('status')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'moderator_comment','style'=>'width: 400px; height: 80px;','value'=>$cl_moderator_comment)); -$form->getElement('moderator_comment')->setEnabled(false); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); -// Disable some controls for work on an available offer. -if ($offer) { - $form->getElement('work_name')->setEnabled(false); - $form->getElement('work_type')->setEnabled(false); - $form->getElement('currency')->setEnabled(false); - $form->getElement('budget')->setEnabled(false); -} - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.work')); - if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); - if (!ttValidString($cl_details, true)) $err->add($i18n->get('error.field'), $i18n->get('label.details')); - if (!ttValidString($cl_budget)) $err->add($i18n->get('error.field'), $i18n->get('label.budget')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - if ($request->getParameter('btn_save')) { - // Update work information. - $fields = array('work_id'=>$cl_work_id, - 'type'=>$cl_work_type, - 'subject'=>$cl_name, - 'descr_short' => $cl_description, - 'descr_long' => $cl_details, - 'currency' => ttWorkHelper::getCurrencyName($cl_currency_id), - 'amount' => $cl_budget); - if ($offer_id > 0) { - if ($workHelper->updateOwnWorkItemOnOffer($fields)) { - header('Location: work.php'); - exit(); - } - } else { - if ($workHelper->updateOwnWorkItem($fields)) { - header('Location: work.php'); - exit(); - } - } - } - } -} // isPost - -$smarty->assign('offer', $offer); -$smarty->assign('show_moderator_comment', $show_moderator_comment); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.edit_work')); -$smarty->assign('content_page_name', 'work/work_edit.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_message.php b/work/work_message.php deleted file mode 100644 index 91d02b5cb..000000000 --- a/work/work_message.php +++ /dev/null @@ -1,90 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$cl_work_id = (int)$request->getParameter('work_id'); -if (!$cl_work_id) { - header('Location: ../access_denied.php'); - exit(); -} -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getAvailableWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$cl_name = $work_item['subject']; - -if ($request->isPost()) { - $cl_message_body = trim($request->getParameter('message_body')); -} - -$form = new Form('messageForm'); -$form->addInput(array('type'=>'hidden','name'=>'work_id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'textarea','name'=>'message_body','style'=>'width: 400px; height: 80px;vertical-align: middle','value'=>$cl_message_body)); -$form->addInput(array('type'=>'submit','name'=>'btn_send','value'=>$i18n->get('work.button.send_message'))); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_message_body)) $err->add($i18n->get('error.field'), $i18n->get('work.label.message')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - $workHelper = new ttWorkHelper($err); - $fields = array('work_id'=>$cl_work_id, - 'message_body' => $cl_message_body); - if ($workHelper->sendMessageToWorkOwner($fields)) { - $msg->add($i18n->get('work.msg.message_sent')); - // header('Location: work.php'); // TODO: where to redirect? - // exit(); - } - } -} // isPost - -$smarty->assign('work_item', $work_item); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.offerForm.work_name.focus()"'); -$smarty->assign('title', $i18n->get('work.title.send_message')); -$smarty->assign('content_page_name', 'work/work_message.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_offer_view.php b/work/work_offer_view.php deleted file mode 100644 index c0dd5ee1a..000000000 --- a/work/work_offer_view.php +++ /dev/null @@ -1,123 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -if (!ttAccessAllowed('manage_work')) { - header('Location: ../access_denied.php'); - exit(); -} -$cl_offer_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$offer = $workHelper->getOwnWorkItemOffer($cl_offer_id); -if (!$offer) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -// Get an associated work item. -$work_item = $workHelper->getOwnWorkItem($offer['work_id']); -if (!$work_item) $err->add($i18n->get('work.error.work_not_available')); - -if ($request->isPost()) { - $cl_client_comment = $request->getParameter('client_comment'); -} else { - $cl_client_comment = $offer['client_comment']; -} - -$cl_contractor = $offer['group_name']; -$cl_name = $offer['subject']; -$cl_description = $offer['descr_short']; -$cl_details = $offer['descr_long']; -$cl_budget = $offer['amount_with_currency']; -$cl_status = $offer['status_label']; - -$form = new Form('offerForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_offer_id)); -$form->addInput(array('type'=>'text','name'=>'contractor','value'=>$cl_contractor)); -$form->getElement('contractor')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'offer_name','style'=>'width: 400px;','value'=>$cl_name)); -$form->getElement('offer_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->getElement('description')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->getElement('details')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'budget','value'=>$cl_budget)); -$form->getElement('budget')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'status','style'=>'width: 400px;','value'=>$cl_status)); -$form->getElement('status')->setEnabled(false); -if ($offer['status'] == STATUS_APPROVED) { - $form->addInput(array('type'=>'submit','name'=>'btn_accept','value'=>$i18n->get('work.button.accept'))); - $form->addInput(array('type'=>'submit','name'=>'btn_decline','value'=>$i18n->get('work.button.decline'))); -} -$form->addInput(array('type'=>'textarea','name'=>'client_comment','style'=>'width: 400px; height: 80px;','value'=>$cl_client_comment)); - -if ($request->isPost()) { - // Validate user input. - if (!ttValidString($cl_client_comment, true)) $err->add($i18n->get('error.field'), $i18n->get('label.comment')); - - // Ensure user email exists (required for workflow). - if (!$user->getEmail()) $err->add($i18n->get('error.no_email')); - - if ($err->no()) { - $workHelper = new ttWorkHelper($err); - $fields = array('offer_id'=>$cl_offer_id, - 'client_comment'=>$cl_client_comment); - - if ($request->getParameter('btn_accept')) { - // Accept offer. - if ($workHelper->acceptOwnWorkItemOffer($fields)) { - header('Location: work_offer_view.php?id='.$cl_offer_id); - exit(); - } - } - - if ($request->getParameter('btn_decline')) { - // Decline offer. - if ($workHelper->declineOwnWorkItemOffer($fields)) { - header('Location: work_offer_view.php?id='.$cl_offer_id); - exit(); - } - } - } -} // isPost - -$smarty->assign('work_item', $work_item); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.offer')); -$smarty->assign('content_page_name', 'work/work_offer_view.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_offers.php b/work/work_offers.php deleted file mode 100644 index eae9841bb..000000000 --- a/work/work_offers.php +++ /dev/null @@ -1,56 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -$work_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getOwnWorkItem($work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$work_item_offers = $workHelper->getOwnWorkItemOffers($work_id); - -$smarty->assign('work_item', $work_item); -$smarty->assign('work_item_offers', $work_item_offers); -$smarty->assign('title', $i18n->get('work.label.offers')); -$smarty->assign('content_page_name', 'work/work_offers.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_view.php b/work/work_view.php deleted file mode 100644 index cb73f2eed..000000000 --- a/work/work_view.php +++ /dev/null @@ -1,74 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -if (!ttAccessAllowed('bid_on_work')) { - header('Location: ../access_denied.php'); - exit(); -} -$cl_work_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getAvailableWorkItem($cl_work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// End of access checks. - -$cl_client = $work_item['group_name']; -$cl_name = $work_item['subject']; -$cl_description = $work_item['descr_short']; -$cl_details = $work_item['descr_long']; -$cl_budget = $work_item['amount_with_currency']; - -$form = new Form('workForm'); -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_work_id)); -$form->addInput(array('type'=>'text','name'=>'client','value'=>$cl_client)); -$form->getElement('client')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'work_name','style'=>'width: 400px;','value'=>$cl_name)); -$form->getElement('work_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->getElement('description')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->getElement('details')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'budget','value'=>$cl_budget)); -$form->getElement('budget')->setEnabled(false); - -$smarty->assign('work_id', $cl_work_id); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.work')); -$smarty->assign('content_page_name', 'work/work_view.tpl'); -$smarty->display('work/index.tpl'); diff --git a/work/work_view_own.php b/work/work_view_own.php deleted file mode 100644 index c4b887e7e..000000000 --- a/work/work_view_own.php +++ /dev/null @@ -1,79 +0,0 @@ -isPluginEnabled('wk')) { - header('Location: ../feature_disabled.php'); - exit(); -} -if (!ttAccessAllowed('manage_work')) { - header('Location: ../access_denied.php'); - exit(); -} -$work_id = (int)$request->getParameter('id'); -$workHelper = new ttWorkHelper($err); -$work_item = $workHelper->getOwnWorkItem($work_id); -if (!$work_item) { - header('Location: ../access_denied.php'); - exit(); -} -// Do we have offer_id? -$offer_id = $work_item['offer_id']; -if ($offer_id) { - $offer = $workHelper->getAvailableOffer($offer_id); - if (!$offer) { - header('Location: ../access_denied.php'); - exit(); - } -} -// End of access checks. - -$cl_name = $work_item['subject']; -$cl_description = $work_item['descr_short']; -$cl_details = $work_item['descr_long']; -$cl_budget = $work_item['amount_with_currency']; - -$form = new Form('workForm'); -$form->addInput(array('type'=>'textarea','name'=>'work_name','style'=>'width: 400px;','value'=>$cl_name)); -$form->getElement('work_name')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'description','style'=>'width: 400px; height: 80px;','value'=>$cl_description)); -$form->getElement('description')->setEnabled(false); -$form->addInput(array('type'=>'textarea','name'=>'details','style'=>'width: 400px; height: 200px;','value'=>$cl_details)); -$form->getElement('details')->setEnabled(false); -$form->addInput(array('type'=>'text','name'=>'budget','value'=>$cl_budget)); -$form->getElement('budget')->setEnabled(false); - -$smarty->assign('offer', $offer); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->get('title.work')); -$smarty->assign('content_page_name', 'work/work_view_own.tpl'); -$smarty->display('work/index.tpl'); From 0db69425bcc8bbdc20091e20d2b7437f7b53071d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 15:08:53 +0000 Subject: [PATCH 2300/2515] Some cleanup in translation files. --- WEB-INF/resources/ca.lang.php | 8 -------- WEB-INF/resources/cs.lang.php | 8 -------- WEB-INF/resources/da.lang.php | 8 -------- WEB-INF/resources/de.lang.php | 9 --------- WEB-INF/resources/en.lang.php | 8 -------- WEB-INF/resources/es.lang.php | 8 -------- WEB-INF/resources/et.lang.php | 8 -------- WEB-INF/resources/fa.lang.php | 8 -------- WEB-INF/resources/fi.lang.php | 8 -------- WEB-INF/resources/fr.lang.php | 8 -------- WEB-INF/resources/gr.lang.php | 8 -------- WEB-INF/resources/he.lang.php | 8 -------- WEB-INF/resources/hu.lang.php | 8 -------- WEB-INF/resources/it.lang.php | 8 -------- WEB-INF/resources/ja.lang.php | 8 -------- WEB-INF/resources/ko.lang.php | 8 -------- WEB-INF/resources/nl.lang.php | 5 ----- WEB-INF/resources/no.lang.php | 8 -------- WEB-INF/resources/pl.lang.php | 8 -------- WEB-INF/resources/pt-br.lang.php | 5 ----- WEB-INF/resources/pt.lang.php | 8 -------- WEB-INF/resources/ro.lang.php | 8 -------- WEB-INF/resources/ru.lang.php | 5 ----- WEB-INF/resources/sk.lang.php | 8 -------- WEB-INF/resources/sl.lang.php | 8 -------- WEB-INF/resources/sr.lang.php | 8 -------- WEB-INF/resources/sv.lang.php | 8 -------- WEB-INF/resources/tr.lang.php | 8 -------- WEB-INF/resources/zh-cn.lang.php | 8 -------- WEB-INF/resources/zh-tw.lang.php | 8 -------- initialize.php | 2 +- 31 files changed, 1 insertion(+), 233 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f9d9952db..a2e130835 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -265,14 +265,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 453a51000..be62bf261 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -275,14 +275,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index a33224168..48a37886c 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -258,14 +258,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 47eb84a16..916861d1b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -253,15 +253,6 @@ // Another use is with offers with Remote Work plugin, where details hold a long, precise, and complete description of the offer. // 'label.details' => 'Details', 'label.budget' => 'Budget', -// TODO: translate the following. -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index c1c00af9d..2a78286a6 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -239,14 +239,6 @@ 'label.inactive_users' => 'Inactive Users', 'label.details' => 'Details', 'label.budget' => 'Budget', -'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 8a8902f7d..83b5a6c0b 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -268,14 +268,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 3299e8ada..727da041d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -266,14 +266,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 019c4ca31..4ec8ef170 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -269,14 +269,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 0940dc597..d01becc4d 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -262,14 +262,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 88a96690e..f690a4dc8 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -256,14 +256,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 489185a8c..3d0ac2a74 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -251,14 +251,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 918b5f7dc..bf17c6155 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -277,14 +277,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 407c22cd4..f67aadf87 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -270,14 +270,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 165afe880..ca7eec157 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -255,14 +255,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index dbac8f190..9519dd4c3 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -275,14 +275,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 896f1939f..0d190764b 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -275,14 +275,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 91ff4c8bc..fe5f4653e 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -230,11 +230,6 @@ 'label.inactive_users' => 'Inactieve medewerkers', 'label.details' => 'Details', 'label.budget' => 'Budget', -'label.work' => 'Werk', -'label.offer' => 'Aanbod', -'label.contractor' => 'Aanbieder', -'label.how_to_pay' => 'Betaalwijze', -'label.moderator_comment' => 'Commentaar', // Entity names. 'entity.time' => 'tijd', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 5cb39137d..73a640b99 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -272,14 +272,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index d77f11c3d..ea5013148 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -263,14 +263,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 15e3ef91f..a46208163 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -231,11 +231,6 @@ 'label.inactive_users' => 'Usuários inativos', 'label.details' => 'Detalhes', 'label.budget' => 'Orçamento', -'label.work' => 'Trabalho', -'label.offer' => 'Oferta', -'label.contractor' => 'Contratante', -'label.how_to_pay' => 'Como pagar', -'label.moderator_comment' => 'Comentário do moderador', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 6a1598cc7..fff0ad651 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -260,14 +260,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f93f12085..736c934e4 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -272,14 +272,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 71bc709bf..3450227db 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -230,11 +230,6 @@ 'label.inactive_users' => 'Неактивные пользователи', 'label.details' => 'Детали', 'label.budget' => 'Бюджет', -'label.work' => 'Работа', -'label.offer' => 'Предложение', -'label.contractor' => 'Подрядчик', -'label.how_to_pay' => 'Как оплатить', -'label.moderator_comment' => 'Комментарий модератора', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index da24d8caf..8c386d1a8 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -266,14 +266,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 40abaabea..44be6053d 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -255,14 +255,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 8e9fe4e8f..45dbb1004 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -261,14 +261,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index bd025f84b..cb30b5e41 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -257,14 +257,6 @@ // TODO: translate the following. // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 5ac60a72d..56c309432 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -279,14 +279,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6c6451214..6f492d491 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -265,14 +265,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index d16bf4cb7..f9496eb21 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -270,14 +270,6 @@ // 'label.inactive_users' => 'Inactive Users', // 'label.details' => 'Details', // 'label.budget' => 'Budget', -// 'label.work' => 'Work', // Table column header for work items, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.offer' => 'Offer', // Table column header for offers, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// 'label.contractor' => 'Contractor', // Table column header for offers (contractor is someone who offers to do work). - // Technically, it is either an org name or a combination of org and group names - // because both work items and offers are owned by Time Tracker groups of users. -// 'label.how_to_pay' => 'How to pay', // Label for the "How to pay" field on offers, which allows contractors to specify - // how to pay them, for example: paypal email, check by mail to a specific address, etc. -// 'label.moderator_comment' => 'Moderator comment', // Label for "Moderator comment" field that explains something. // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/initialize.php b/initialize.php index 16f3a5b1e..db645a9d5 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5612"); +define("APP_VERSION", "1.19.34.5613"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 91294bc2d33e9415d104670928b2ecd83ce68c36 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 15:26:22 +0000 Subject: [PATCH 2301/2515] A bit more cleanup in translation files. --- WEB-INF/resources/ca.lang.php | 2 -- WEB-INF/resources/cs.lang.php | 2 -- WEB-INF/resources/da.lang.php | 3 --- WEB-INF/resources/de.lang.php | 6 ------ WEB-INF/resources/en.lang.php | 2 -- WEB-INF/resources/es.lang.php | 2 -- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/fa.lang.php | 3 --- WEB-INF/resources/fi.lang.php | 3 --- WEB-INF/resources/fr.lang.php | 3 --- WEB-INF/resources/gr.lang.php | 3 --- WEB-INF/resources/he.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 2 -- WEB-INF/resources/it.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 2 -- WEB-INF/resources/ko.lang.php | 2 -- WEB-INF/resources/nl.lang.php | 2 -- WEB-INF/resources/no.lang.php | 2 -- WEB-INF/resources/pl.lang.php | 3 --- WEB-INF/resources/pt-br.lang.php | 2 -- WEB-INF/resources/pt.lang.php | 2 -- WEB-INF/resources/ro.lang.php | 2 -- WEB-INF/resources/ru.lang.php | 2 -- WEB-INF/resources/sk.lang.php | 3 --- WEB-INF/resources/sl.lang.php | 2 -- WEB-INF/resources/sr.lang.php | 3 --- WEB-INF/resources/sv.lang.php | 3 --- WEB-INF/resources/tr.lang.php | 2 -- WEB-INF/resources/zh-cn.lang.php | 2 -- WEB-INF/resources/zh-tw.lang.php | 2 -- initialize.php | 2 +- 31 files changed, 1 insertion(+), 77 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a2e130835..fefaad825 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -263,8 +263,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index be62bf261..ff237c005 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -273,8 +273,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 48a37886c..9a9c532d5 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -255,9 +255,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktive Brugere', 'label.inactive_users' => 'Inaktive Brugere', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 916861d1b..3fea57b73 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -247,12 +247,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktive Nutzer', 'label.inactive_users' => 'Inaktive Nutzer', -// TODO: translate the following or confirm that "Details" is also correct for German (exactly as the English string). -// label.details is used to identify a field for LONG DESCRIPTION of a work item used in Remote Work plugin. -// For example, a work item could be "Design a logo", and the Details hold EXACT anfd PRECISE specs of what a customer needs. -// Another use is with offers with Remote Work plugin, where details hold a long, precise, and complete description of the offer. -// 'label.details' => 'Details', -'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 2a78286a6..d82bb75b1 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -237,8 +237,6 @@ 'label.file' => 'File', 'label.active_users' => 'Active Users', 'label.inactive_users' => 'Inactive Users', -'label.details' => 'Details', -'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 83b5a6c0b..0f2b8a319 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -266,8 +266,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 727da041d..7137357e7 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -263,9 +263,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktiivsed kasutajad', 'label.inactive_users' => 'Mitteaktiivsed kasutajad', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 4ec8ef170..085f80ca4 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -266,9 +266,6 @@ // 'label.file' => 'File', 'label.active_users' => 'کاربران فعال', 'label.inactive_users' => 'کاربران غیرفعال', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index d01becc4d..f3237ff0c 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -259,9 +259,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktiiviset käyttäjät', 'label.inactive_users' => 'Ei-aktiiviset käyttäjät', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index f690a4dc8..5c971ea9b 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -253,9 +253,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Utilisateurs actifs', 'label.inactive_users' => 'Utilisateurs inactifs', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 3d0ac2a74..dbbd85dbb 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -248,9 +248,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Ενεργοί χρήστες', 'label.inactive_users' => 'Ανενεργοί χρήστες', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index bf17c6155..f3cee584a 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -274,9 +274,6 @@ // 'label.file' => 'File', 'label.active_users' => 'משתמשים פעילים', 'label.inactive_users' => 'משתמשים לא פעילים', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index f67aadf87..08e52d402 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -268,8 +268,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index ca7eec157..d9cca113c 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -252,9 +252,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Utenti attivi', 'label.inactive_users' => 'Utenti inattivi', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 9519dd4c3..7437648bc 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -273,8 +273,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 0d190764b..3454a362c 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -273,8 +273,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index fe5f4653e..2c1b7b71b 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -228,8 +228,6 @@ 'label.file' => 'Bestand', 'label.active_users' => 'Actieve medewerkers', 'label.inactive_users' => 'Inactieve medewerkers', -'label.details' => 'Details', -'label.budget' => 'Budget', // Entity names. 'entity.time' => 'tijd', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 73a640b99..20f50546d 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -270,8 +270,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index ea5013148..84cd8241e 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -260,9 +260,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktywni użytkownicy', 'label.inactive_users' => 'Nieaktywni użytkownicy', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index a46208163..fbdff5ace 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -229,8 +229,6 @@ 'label.file' => 'Arquivo', 'label.active_users' => 'Usuários ativos', 'label.inactive_users' => 'Usuários inativos', -'label.details' => 'Detalhes', -'label.budget' => 'Orçamento', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index fff0ad651..728c4ba62 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -258,8 +258,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 736c934e4..d89e335b3 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -270,8 +270,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 3450227db..d16bd99df 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -228,8 +228,6 @@ 'label.file' => 'Файл', 'label.active_users' => 'Активные пользователи', 'label.inactive_users' => 'Неактивные пользователи', -'label.details' => 'Детали', -'label.budget' => 'Бюджет', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 8c386d1a8..37303bdf7 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -263,9 +263,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktívny používatelia', 'label.inactive_users' => 'Neaktívny používatelia', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 44be6053d..91e6dea08 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -253,8 +253,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 45dbb1004..5eddee167 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -258,9 +258,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktivni korisnik', 'label.inactive_users' => 'Neaktivni korisnik', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index cb30b5e41..fddf70abb 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -254,9 +254,6 @@ // 'label.file' => 'File', 'label.active_users' => 'Aktiva användare', 'label.inactive_users' => 'Inaktiva användare', -// TODO: translate the following. -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 56c309432..e5c4e5c23 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -277,8 +277,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6f492d491..157a95727 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -263,8 +263,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index f9496eb21..a2c2705ec 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -268,8 +268,6 @@ // 'label.file' => 'File', // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', -// 'label.details' => 'Details', -// 'label.budget' => 'Budget', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. diff --git a/initialize.php b/initialize.php index db645a9d5..ddbfe2444 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5613"); +define("APP_VERSION", "1.19.34.5614"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From efef96ec94f019afbad9af8cf8b6b0f9e4cefbcf Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 15:38:24 +0000 Subject: [PATCH 2302/2515] More cleanup in translation files. --- WEB-INF/resources/ca.lang.php | 16 ---------------- WEB-INF/resources/cs.lang.php | 16 ---------------- WEB-INF/resources/da.lang.php | 16 ---------------- WEB-INF/resources/de.lang.php | 16 ---------------- WEB-INF/resources/en.lang.php | 16 ---------------- WEB-INF/resources/es.lang.php | 16 ---------------- WEB-INF/resources/et.lang.php | 16 ---------------- WEB-INF/resources/fa.lang.php | 16 ---------------- WEB-INF/resources/fi.lang.php | 16 ---------------- WEB-INF/resources/fr.lang.php | 16 ---------------- WEB-INF/resources/gr.lang.php | 16 ---------------- WEB-INF/resources/he.lang.php | 16 ---------------- WEB-INF/resources/hu.lang.php | 16 ---------------- WEB-INF/resources/it.lang.php | 16 ---------------- WEB-INF/resources/ja.lang.php | 16 ---------------- WEB-INF/resources/ko.lang.php | 16 ---------------- WEB-INF/resources/nl.lang.php | 15 --------------- WEB-INF/resources/no.lang.php | 16 ---------------- WEB-INF/resources/pl.lang.php | 16 ---------------- WEB-INF/resources/pt-br.lang.php | 15 --------------- WEB-INF/resources/pt.lang.php | 16 ---------------- WEB-INF/resources/ro.lang.php | 16 ---------------- WEB-INF/resources/ru.lang.php | 15 --------------- WEB-INF/resources/sk.lang.php | 16 ---------------- WEB-INF/resources/sl.lang.php | 16 ---------------- WEB-INF/resources/sr.lang.php | 16 ---------------- WEB-INF/resources/sv.lang.php | 16 ---------------- WEB-INF/resources/tr.lang.php | 16 ---------------- WEB-INF/resources/zh-cn.lang.php | 16 ---------------- WEB-INF/resources/zh-tw.lang.php | 16 ---------------- initialize.php | 2 +- 31 files changed, 1 insertion(+), 478 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index fefaad825..0f05c8d73 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -675,20 +675,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index ff237c005..d42f51935 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -688,20 +688,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 9a9c532d5..af755d4ae 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -651,20 +651,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 3fea57b73..46cdcb473 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -624,20 +624,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index d82bb75b1..897faa592 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -607,20 +607,4 @@ 'form.display_options.not_complete_days' => 'Not complete days', 'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -'work.error.work_not_available' => 'Work item is not available.', -'work.error.offer_not_available' => 'Offer is not available.', -'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -'work.label.own_work' => 'Own work', -'work.label.own_offers' => 'Own offers', -'work.label.offers' => 'Offers', -'work.label.message' => 'Message', -'work.button.send_message' => 'Send message', -'work.button.make_offer' => 'Make offer', -'work.button.accept' => 'Accept', -'work.button.decline' => 'Decline', -'work.title.send_message' => 'Sending Message', -'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 0f2b8a319..f9a300370 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -690,20 +690,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7137357e7..ad93af7d9 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -659,20 +659,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 085f80ca4..7bf3a9637 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -675,20 +675,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index f3237ff0c..71f401fb0 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -659,20 +659,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5c971ea9b..e56425f58 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -647,20 +647,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index dbbd85dbb..fe89a425d 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -639,20 +639,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index f3cee584a..9c4718bf2 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -680,20 +680,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 08e52d402..d20ff3524 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -679,20 +679,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index d9cca113c..253c08545 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -653,20 +653,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 7437648bc..06d452108 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -683,20 +683,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3454a362c..07603b634 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -681,20 +681,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 2c1b7b71b..ac41ea720 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -589,19 +589,4 @@ 'form.display_options.not_complete_days' => 'Niet complete dagen', 'form.display_options.inactive_projects' => 'Niet actieve projecten', 'form.display_options.custom_css' => 'Aangepaste CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -'work.error.work_not_available' => 'Werk onderdeel is niet beschikbaar.', -'work.error.offer_not_available' => 'Aanbod is niet beschikbaar.', -'work.type.one_time' => 'eenmalig', -'work.type.ongoing' => 'doorlopend', -'work.label.own_work' => 'Eigen werk', -'work.label.own_offers' => 'Eigen aanbod', -'work.label.offers' => 'Aanbiedingen', -'work.button.send_message' => 'Verstuur bericht', -'work.button.make_offer' => 'maak aanbieding', -'work.button.accept' => 'Accepteer', -'work.button.decline' => 'Weiger', -'work.title.send_message' => 'Bericht wordt verstuurd', -'work.msg.message_sent' => 'Bericht is verstuurd.', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 20f50546d..05b4f16c3 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -682,20 +682,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 84cd8241e..114465b50 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -660,20 +660,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index fbdff5ace..9bdede0da 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -588,20 +588,5 @@ // TODO: translate the following. // 'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.custom_css' => 'CSS customizado', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php. -'work.error.work_not_available' => 'Item de trabalho não está disponível.', -'work.error.offer_not_available' => 'Oferta não disponível', -'work.type.one_time' => 'Uma interação', -'work.type.ongoing' => 'Em progresso', -'work.label.own_work' => 'Trabalho próprio', -'work.label.own_offers' => 'Ofertas próprias', -'work.label.offers' => 'Ofertas', -'work.button.send_message' => 'Enviar mensagem', -'work.button.make_offer' => 'Fazer oferta', -'work.button.accept' => 'Aceitar', -'work.button.decline' => 'Recusar', -'work.title.send_message' => 'Enviando mensagem', -'work.msg.message_sent' => 'Mensagem enviada.', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 728c4ba62..25a65270a 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -662,20 +662,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index d89e335b3..74f898568 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -683,20 +683,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index d16bd99df..a59d7e413 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -590,19 +590,4 @@ 'form.display_options.not_complete_days' => 'Незавершенные дни', 'form.display_options.inactive_projects' => 'Неактивные проекты', 'form.display_options.custom_css' => 'Пользовательская CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -'work.error.work_not_available' => 'Работа отсутствует.', -'work.error.offer_not_available' => 'Предложение отсутствует.', -'work.type.one_time' => 'одноразовая', -'work.type.ongoing' => 'постоянная', -'work.label.own_work' => 'Своя работа', -'work.label.own_offers' => 'Свои предложения', -'work.label.offers' => 'Предложения', -'work.button.send_message' => 'Отправить сообщение', -'work.button.make_offer' => 'Сделать предложение', -'work.button.accept' => 'Принять', -'work.button.decline' => 'Отклонить', -'work.title.send_message' => 'Отсылка сообщения', -'work.msg.message_sent' => 'Сообщение отослано.', ); diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 37303bdf7..d09cd1063 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -664,20 +664,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 91e6dea08..98621f355 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -656,20 +656,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 5eddee167..1dc547f16 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -662,20 +662,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index fddf70abb..2fa40ce33 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -659,20 +659,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index e5c4e5c23..10b582dc2 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -696,20 +696,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 157a95727..6722da048 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -670,20 +670,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index a2c2705ec..24bc7b817 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -673,20 +673,4 @@ // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.custom_css' => 'Custom CSS', - -// Work plugin strings. See example at https://timetracker.anuko.com/work.php -// TODO: translate the following. -// 'work.error.work_not_available' => 'Work item is not available.', -// 'work.error.offer_not_available' => 'Offer is not available.', -// 'work.type.one_time' => 'one time', // Work type is "one time job" for well defined work ("do exactly this"). -// 'work.type.ongoing' => 'ongoing', // Work type is "ongoing" for complex jobs (billed by the hour, multiple contractors, etc.) -// 'work.label.own_work' => 'Own work', -// 'work.label.own_offers' => 'Own offers', -// 'work.label.offers' => 'Offers', -// 'work.button.send_message' => 'Send message', -// 'work.button.make_offer' => 'Make offer', -// 'work.button.accept' => 'Accept', -// 'work.button.decline' => 'Decline', -// 'work.title.send_message' => 'Sending Message', -// 'work.msg.message_sent' => 'Message sent.', ); diff --git a/initialize.php b/initialize.php index ddbfe2444..0ec782c6d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5614"); +define("APP_VERSION", "1.19.34.5615"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2a6379743ea1ff38a24062c39610749e9581c9dc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 16:09:52 +0000 Subject: [PATCH 2303/2515] Removed no longer used string from translation files. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/da.lang.php | 1 - WEB-INF/resources/de.lang.php | 1 - WEB-INF/resources/en.lang.php | 5 ----- WEB-INF/resources/es.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/fa.lang.php | 1 - WEB-INF/resources/fi.lang.php | 1 - WEB-INF/resources/fr.lang.php | 1 - WEB-INF/resources/gr.lang.php | 1 - WEB-INF/resources/he.lang.php | 1 - WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/it.lang.php | 1 - WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/nl.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/pl.lang.php | 1 - WEB-INF/resources/pt-br.lang.php | 1 - WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/ru.lang.php | 1 - WEB-INF/resources/sk.lang.php | 1 - WEB-INF/resources/sl.lang.php | 1 - WEB-INF/resources/sr.lang.php | 1 - WEB-INF/resources/sv.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - initialize.php | 2 +- 31 files changed, 1 insertion(+), 35 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 0f05c8d73..0202a4be0 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -97,7 +97,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d42f51935..6ace11812 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -99,7 +99,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index af755d4ae..b76c65c24 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -94,7 +94,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 46cdcb473..6a11c4054 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -90,7 +90,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. 'warn.sure' => 'Sind Sie sicher?', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 897faa592..44a1c2a69 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -86,11 +86,6 @@ // "something went wrong" when trying to do some operation with attachments. // For example, File Storage server could be offline, or Time Tracker config option is wrong, etc. 'error.file_storage' => 'File storage server error.', -// Meaning of error.remote_work: an (unspecified) error occurred when trying to communicate with -// "Remote Work" server, the one that supports the "Work" plugin, see https://www.anuko.com/time_tracker/what_is/work_plugin.htm -// It is a generic message telling us that "something went wrong" when trying to do some operation with Work plugin. -// For example, Remote Work server could be offline, among other things. -'error.remote_work' => 'Remote work server error.', // Warning messages. 'warn.sure' => 'Are you sure?', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index f9a300370..09fe1d9e6 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -95,7 +95,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index ad93af7d9..9cbcf13b5 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -107,7 +107,6 @@ 'error.expired' => 'Kehtivusaeg on lõppenud.', // TODO: translate the following. // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. 'warn.sure' => 'Oled kindel?', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 7bf3a9637..16fb3e5ad 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -102,7 +102,6 @@ // 'error.expired' => 'Expiration date reached.', // TODO: translate the following. // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 71f401fb0..9c76d646b 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -96,7 +96,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index e56425f58..5a3017365 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -94,7 +94,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index fe89a425d..e2bd54181 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -89,7 +89,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 9c4718bf2..5fd42b36c 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -110,7 +110,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index d20ff3524..e03a684cb 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -98,7 +98,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 253c08545..2e3fd91f5 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -93,7 +93,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 06d452108..c2b509f3e 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -101,7 +101,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 07603b634..dc2172408 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -100,7 +100,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ac41ea720..247a3652c 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -81,7 +81,6 @@ 'error.user_count' => 'Limiet op aantal gebruikers.', 'error.expired' => 'Verloop datum is bereikt.', 'error.file_storage' => 'Bestand server probleem.', -'error.remote_work' => 'Werk op afstand server probleem.', // Warning messages. 'warn.sure' => 'Ben je er zeker van?', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 05b4f16c3..094d6b0a2 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -101,7 +101,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 114465b50..0cb9f69f5 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -98,7 +98,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 9bdede0da..ae860cf1c 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -81,7 +81,6 @@ 'error.user_count' => 'Limite na contagem de usuários.', 'error.expired' => 'Data de expiração atingida.', 'error.file_storage' => 'Erro relacionado ao servidor de armazenamento de arquivos.', -'error.remote_work' => 'Erro relacionado ao servidor responsável pelo plugin work.', // Warning messages. 'warn.sure' => 'Tem certeza?', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 25a65270a..538dd52f0 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -94,7 +94,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 74f898568..cde5a27d7 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -101,7 +101,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index a59d7e413..c62142727 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -81,7 +81,6 @@ 'error.user_count' => 'Ограничение на количество пользователей.', 'error.expired' => 'Достигнута дата экспирации.', 'error.file_storage' => 'Ошибка сервера для хранения файлов.', -'error.remote_work' => 'Ошибка сервера удаленной работы.', // Warning messages. 'warn.sure' => 'Вы уверены?', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d09cd1063..d74bb3183 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -99,7 +99,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 98621f355..f615e431f 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -91,7 +91,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 1dc547f16..7bb9edbe8 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -95,7 +95,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 2fa40ce33..dce2488b3 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -93,7 +93,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 10b582dc2..c154a3a41 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -104,7 +104,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 6722da048..a2e6bf285 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -94,7 +94,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 24bc7b817..69121475b 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -98,7 +98,6 @@ // 'error.user_count' => 'Limit on user count.', // 'error.expired' => 'Expiration date reached.', // 'error.file_storage' => 'File storage server error.', // See comment in English file. -// 'error.remote_work' => 'Remote work server error.', // See comment in English file. // Warning messages. // TODO: translate the following. diff --git a/initialize.php b/initialize.php index 0ec782c6d..7825bbe59 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5615"); +define("APP_VERSION", "1.19.34.5616"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 46fa236d1a379935b89bd218af2190a1691d3e10 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 16:45:01 +0000 Subject: [PATCH 2304/2515] Removed no longer used titles from translation files. --- WEB-INF/resources/ca.lang.php | 16 ---------------- WEB-INF/resources/cs.lang.php | 16 ---------------- WEB-INF/resources/da.lang.php | 16 ---------------- WEB-INF/resources/de.lang.php | 16 ---------------- WEB-INF/resources/en.lang.php | 16 ---------------- WEB-INF/resources/es.lang.php | 16 ---------------- WEB-INF/resources/et.lang.php | 16 ---------------- WEB-INF/resources/fa.lang.php | 16 ---------------- WEB-INF/resources/fi.lang.php | 16 ---------------- WEB-INF/resources/fr.lang.php | 16 ---------------- WEB-INF/resources/gr.lang.php | 16 ---------------- WEB-INF/resources/he.lang.php | 16 ---------------- WEB-INF/resources/hu.lang.php | 16 ---------------- WEB-INF/resources/it.lang.php | 16 ---------------- WEB-INF/resources/ja.lang.php | 16 ---------------- WEB-INF/resources/ko.lang.php | 16 ---------------- WEB-INF/resources/nl.lang.php | 16 ---------------- WEB-INF/resources/no.lang.php | 16 ---------------- WEB-INF/resources/pl.lang.php | 16 ---------------- WEB-INF/resources/pt-br.lang.php | 16 ---------------- WEB-INF/resources/pt.lang.php | 16 ---------------- WEB-INF/resources/ro.lang.php | 16 ---------------- WEB-INF/resources/ru.lang.php | 16 ---------------- WEB-INF/resources/sk.lang.php | 16 ---------------- WEB-INF/resources/sl.lang.php | 16 ---------------- WEB-INF/resources/sr.lang.php | 16 ---------------- WEB-INF/resources/sv.lang.php | 16 ---------------- WEB-INF/resources/tr.lang.php | 16 ---------------- WEB-INF/resources/zh-cn.lang.php | 16 ---------------- WEB-INF/resources/zh-tw.lang.php | 16 ---------------- initialize.php | 2 +- 31 files changed, 1 insertion(+), 481 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 0202a4be0..6a9290041 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -378,22 +378,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 6ace11812..15da342d5 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -388,22 +388,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index b76c65c24..d357a3b3e 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -362,22 +362,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 6a11c4054..259f6c55c 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -345,22 +345,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 44a1c2a69..8867e8c29 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -331,22 +331,6 @@ 'title.edit_file' => 'Editing File', 'title.delete_file' => 'Deleting File', 'title.download_file' => 'Downloading File', -'title.work' => 'Work', -'title.add_work' => 'Adding Work', -'title.edit_work' => 'Editing Work', -'title.delete_work' => 'Deleting Work', -'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -'title.available_work' => 'Available Work', // Available work items from other organizations. -'title.inactive_work' => 'Inactive Work', // Inactive work items for group. -'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -'title.offer' => 'Offer', -'title.add_offer' => 'Adding Offer', -'title.edit_offer' => 'Editing Offer', -'title.delete_offer' => 'Deleting Offer', -'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -'title.available_offers' => 'Available Offers', // Available offers from other organizations. -'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 09fe1d9e6..25c94b896 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -377,22 +377,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 9cbcf13b5..0f0d1448c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -371,22 +371,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 16fb3e5ad..831e9228b 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -371,22 +371,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 9c76d646b..bbb33f37b 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -362,22 +362,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 5a3017365..443ace913 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -356,22 +356,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index e2bd54181..229d94eb2 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -354,22 +354,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5fd42b36c..5431e0513 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -378,22 +378,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index e03a684cb..d1a093baa 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -377,22 +377,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 2e3fd91f5..1afc09eb6 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -364,22 +364,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index c2b509f3e..93ab30e43 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -384,22 +384,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index dc2172408..6ca74cf65 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -385,22 +385,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 247a3652c..ae1df70d6 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -323,22 +323,6 @@ 'title.edit_file' => 'Bestand bewerken', 'title.delete_file' => 'Bestand verwijderen', 'title.download_file' => ' Bestand downloaden', -'title.work' => 'Werk', -'title.add_work' => 'Werk toevoegen', -'title.edit_work' => 'Werk bewerken', -'title.delete_work' => 'Werk verwijderen', -'title.active_work' => 'Actief werk', -'title.available_work' => 'Beschikbaar werk', -'title.inactive_work' => 'Inactief werk', -'title.pending_work' => 'Werk in afwachting van goedkeuring', -'title.offer' => 'Aanbod', -'title.add_offer' => 'Aanbieding toevoegen', -'title.edit_offer' => 'Aanbieding bewerken', -'title.delete_offer' => 'Aanbieding verwijderen', -'title.active_offers' => 'Actieve aanbiedingen', -'title.available_offers' => 'Beschikbare aanbiedingen', -'title.inactive_offers' => 'Inactieve aanbiedingen', -'title.pending_offers' => 'Aangeboden werk in afwachting van goedkeuring', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 094d6b0a2..5b6780779 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -381,22 +381,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 0cb9f69f5..970acaf1e 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -365,22 +365,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index ae860cf1c..b46a54a89 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -321,22 +321,6 @@ 'title.edit_file' => 'Editando arquivo', 'title.delete_file' => 'Apagando arquivo', 'title.download_file' => 'Baixando arquivo', -'title.work' => 'Trabalho', -'title.add_work' => 'Adicionando trabalho', -'title.edit_work' => 'Editando trabalho', -'title.delete_work' => 'Apagando trabalho', -'title.active_work' => 'Trabalho ativo', -'title.available_work' => 'Trabalho disponível', -'title.inactive_work' => 'Trabalho inativo', -'title.pending_work' => 'Trabalho pendente', -'title.offer' => 'Oferta', -'title.add_offer' => 'Adicionando oferta', -'title.edit_offer' => 'Editando oferta', -'title.delete_offer' => 'Apagando oferta', -'title.active_offers' => 'Ofertas ativas', -'title.available_offers' => 'Ofertas disponíveis', -'title.inactive_offers' => 'Ofertas inativas', -'title.pending_offers' => 'Ofertas pendentes', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 538dd52f0..1fb18ea17 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -365,22 +365,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index cde5a27d7..f5bdba763 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -383,22 +383,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.add_offer' => 'Adding Offer', -// 'title.offer' => 'Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index c62142727..8171ba517 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -324,22 +324,6 @@ 'title.edit_file' => 'Редактирование файла', 'title.delete_file' => 'Удаление файла', 'title.download_file' => 'Скачивание файла', -'title.work' => 'Работа', -'title.add_work' => 'Добавление работы', -'title.edit_work' => 'Редактирование работы', -'title.delete_work' => 'Удаление работы', -'title.active_work' => 'Активная работа', -'title.available_work' => 'Имеющаяся работа', -'title.inactive_work' => 'Неактивная работа', -'title.pending_work' => 'Работа в ожидании', -'title.offer' => 'Предложение', -'title.add_offer' => 'Добавление предложения', -'title.edit_offer' => 'Редактирование предложения', -'title.delete_offer' => 'Удаление предложения', -'title.active_offers' => 'Активные предложения', -'title.available_offers' => 'Имеющиеся предложения', -'title.inactive_offers' => 'Неактивные предложения', -'title.pending_offers' => 'Предложения в ожидании', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index d74bb3183..ab601e945 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -367,22 +367,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index f615e431f..b8f7e9407 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -358,22 +358,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 7bb9edbe8..bc98a1d33 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -363,22 +363,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index dce2488b3..d977a9a2e 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -363,22 +363,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c154a3a41..dc8bd0736 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -392,22 +392,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index a2e6bf285..50cff7bcc 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -374,22 +374,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 69121475b..8bc481b9e 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -378,22 +378,6 @@ // 'title.edit_file' => 'Editing File', // 'title.delete_file' => 'Deleting File', // 'title.download_file' => 'Downloading File', -// 'title.work' => 'Work', -// 'title.add_work' => 'Adding Work', -// 'title.edit_work' => 'Editing Work', -// 'title.delete_work' => 'Deleting Work', -// 'title.active_work' => 'Active Work', // Active work items this group outsources to other groups. -// 'title.available_work' => 'Available Work', // Available work items from other organizations. -// 'title.inactive_work' => 'Inactive Work', // Inactive work items this group was outsourcing to other groups. -// 'title.pending_work' => 'Pending Work', // Work items pending moderator approval. -// 'title.offer' => 'Offer', -// 'title.add_offer' => 'Adding Offer', -// 'title.edit_offer' => 'Editing Offer', -// 'title.delete_offer' => 'Deleting Offer', -// 'title.active_offers' => 'Active Offers', // Active offers this group makes available to other groups. -// 'title.available_offers' => 'Available Offers', // Available offers from other organizations. -// 'title.inactive_offers' => 'Inactive Offers', // Inactive offers for group. -// 'title.pending_offers' => 'Pending Offers', // Offers pending moderator approval. // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. diff --git a/initialize.php b/initialize.php index 7825bbe59..07344a419 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5616"); +define("APP_VERSION", "1.19.34.5617"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From cb7c7934259f96399c6fc14c25311c9430fd75a7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 17:59:14 +0000 Subject: [PATCH 2305/2515] Removed 3 unused strings from translation files. --- WEB-INF/resources/ca.lang.php | 3 --- WEB-INF/resources/cs.lang.php | 4 ---- WEB-INF/resources/da.lang.php | 3 --- WEB-INF/resources/de.lang.php | 3 --- WEB-INF/resources/en.lang.php | 3 --- WEB-INF/resources/es.lang.php | 3 --- WEB-INF/resources/et.lang.php | 3 --- WEB-INF/resources/fa.lang.php | 3 --- WEB-INF/resources/fi.lang.php | 3 --- WEB-INF/resources/fr.lang.php | 3 --- WEB-INF/resources/gr.lang.php | 3 --- WEB-INF/resources/he.lang.php | 3 --- WEB-INF/resources/hu.lang.php | 3 --- WEB-INF/resources/it.lang.php | 3 --- WEB-INF/resources/ja.lang.php | 5 ----- WEB-INF/resources/ko.lang.php | 5 ----- WEB-INF/resources/nl.lang.php | 3 --- WEB-INF/resources/no.lang.php | 3 --- WEB-INF/resources/pl.lang.php | 3 --- WEB-INF/resources/pt-br.lang.php | 3 --- WEB-INF/resources/pt.lang.php | 4 ---- WEB-INF/resources/ro.lang.php | 3 --- WEB-INF/resources/ru.lang.php | 3 --- WEB-INF/resources/sk.lang.php | 3 --- WEB-INF/resources/sl.lang.php | 3 --- WEB-INF/resources/sr.lang.php | 3 --- WEB-INF/resources/sv.lang.php | 3 --- WEB-INF/resources/tr.lang.php | 3 --- WEB-INF/resources/zh-cn.lang.php | 3 --- WEB-INF/resources/zh-tw.lang.php | 3 --- initialize.php | 2 +- 31 files changed, 1 insertion(+), 97 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 6a9290041..196a4441d 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -214,9 +214,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* camps requerits', 'label.on_behalf' => 'a nom de', -'label.role_manager' => '(manejador)', -'label.role_comanager' => '(auxiliar del manejador)', -'label.role_admin' => '(administrador)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 15da342d5..a30d83c89 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -224,10 +224,6 @@ 'label.required_fields' => '* nutno vyplnit', // TODO: translate the following. // 'label.on_behalf' => 'on behalf of', -'label.role_manager' => '(manažer)', -'label.role_comanager' => '(spolumanažer)', -'label.role_admin' => '(administrator)', -// TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', // 'label.yes' => 'yes', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index d357a3b3e..369c965f4 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -207,9 +207,6 @@ 'label.ldap_hint' => 'Skriv dit Windows brugernavn eller adgangskode i felterne her under.', 'label.required_fields' => '* - obligatorisk felt', 'label.on_behalf' => 'på vegne af', -'label.role_manager' => '(Manager)', -'label.role_comanager' => '(Co-Manager)', -'label.role_admin' => '(Administrator)', 'label.page' => 'Side', 'label.condition' => 'Betingelse', // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 259f6c55c..87f40c849 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -201,9 +201,6 @@ 'label.ldap_hint' => 'Geben Sie unten Ihren Windows Benutzernamen und Ihr Passwort ein.', 'label.required_fields' => '* - Pflichtfelder', 'label.on_behalf' => 'für', -'label.role_manager' => '(Manager)', -'label.role_comanager' => '(Co-Manager)', -'label.role_admin' => '(Administrator)', 'label.page' => 'Seite', 'label.condition' => 'Bedingung', 'label.yes' => 'Ja', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 8867e8c29..0d82650c8 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -189,9 +189,6 @@ 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* - required fields', 'label.on_behalf' => 'on behalf of', -'label.role_manager' => '(manager)', -'label.role_comanager' => '(co-manager)', -'label.role_admin' => '(administrator)', 'label.page' => 'Page', 'label.condition' => 'Condition', 'label.yes' => 'yes', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 25c94b896..68dcc8c31 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -218,9 +218,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* - campos requeridos', 'label.on_behalf' => 'a nombre de', -'label.role_manager' => '(manejador)', -'label.role_comanager' => '(auxiliar del manejador)', -'label.role_admin' => '(administrador)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 0f0d1448c..431f29563 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -216,9 +216,6 @@ 'label.required_fields' => '* nõutud väljad', // TODO: Translate label.on_behalf, perhaps trying as "instead of". // 'label.on_behalf' => 'on behalf of', -'label.role_manager' => '(haldur)', -'label.role_comanager' => '(kaashaldur)', -'label.role_admin' => '(administraator)', 'label.page' => 'Lehekülg', 'label.condition' => 'Tingimus', 'label.yes' => 'jah', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 831e9228b..9ae24d016 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -218,9 +218,6 @@ 'label.ldap_hint' => 'نام کاربری ویندوزو رمزعبورخود را در فیلدهای زیر وارد کنید', 'label.required_fields' => '* - فیلد های اجباری', 'label.on_behalf' => 'از دیدگاه', -'label.role_manager' => '(مدیر)', -'label.role_comanager' => '(دستیار مدیر)', -'label.role_admin' => '(مدیر ارشد)', // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index bbb33f37b..a9396eba9 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -210,9 +210,6 @@ 'label.ldap_hint' => 'Syötä Windows-käyttäjätunnuksesi ja salasanasi ao. kenttiin.', 'label.required_fields' => '* - pakolliset kentät', 'label.on_behalf' => 'puolesta', -'label.role_manager' => '(esimies)', -'label.role_comanager' => '(apu-esimies)', -'label.role_admin' => '(ylläpitäjä)', 'label.page' => 'Sivu', // TODO: translate the following. // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 443ace913..91e04d793 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -206,9 +206,6 @@ 'label.ldap_hint' => 'Entrer votre Identifiant Windows et votre mot de passe dans les champs suivants.', 'label.required_fields' => '* - champs obligatoires', 'label.on_behalf' => 'de la part de', -'label.role_manager' => '(responsable)', -'label.role_comanager' => '(coresponsable)', -'label.role_admin' => '(administrateur)', 'label.page' => 'Page', 'label.condition' => 'Condition', // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 229d94eb2..1fd83890f 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -200,9 +200,6 @@ 'label.ldap_hint' => 'Εισάγετε το όνομα σύνδεσης των Windows και κωδικό πρόσβασης στα παρακάτω πεδία.', 'label.required_fields' => '* - υποχρεωτικά πεδία', 'label.on_behalf' => 'εκ μέρους του', -'label.role_manager' => '(Διευθυντής)', -'label.role_comanager' => '(Υποδιευθυντής)', -'label.role_admin' => '(Διαχειριστής)', 'label.page' => 'Σελίδα', 'label.condition' => 'Κατάσταση', 'label.yes' => 'ναι', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5431e0513..ef7597cd3 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -226,9 +226,6 @@ 'label.ldap_hint' => 'הכנס את שם המשתמש ואת הסיסמה של ווינדוז בשדות.', 'label.required_fields' => '* - שדות חובה', 'label.on_behalf' => 'מטעם', -'label.role_manager' => '(מנהל)', -'label.role_comanager' => '(מנהל משנה)', -'label.role_admin' => '(מנהל המערכת)', // Translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index d1a093baa..1c446ac53 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -221,9 +221,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* kötelezően kitöltendő mezők', 'label.on_behalf' => 'helyett', -'label.role_manager' => '(vezető)', -'label.role_comanager' => '(helyettes)', -'label.role_admin' => '(adminisztrátor)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 1afc09eb6..e3d19aa5f 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -204,9 +204,6 @@ 'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', 'label.required_fields' => '* campi obbligatori', 'label.on_behalf' => 'a favore di', -'label.role_manager' => '(manager)', -'label.role_comanager' => '(co-manager)', -'label.role_admin' => '(amministratore)', 'label.page' => 'Pagina', 'label.condition' => 'Condizione', 'label.yes' => 'si', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 93ab30e43..aa2389788 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -223,11 +223,6 @@ 'label.ldap_hint' => '下記のフィールドにあなたのWindowsのログインIDパスワードを入力してください。', 'label.required_fields' => '* 必須のフィールド', 'label.on_behalf' => 'を代表して', -// TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm -// This may require different terms for role_manager and role_comanager. -'label.role_manager' => '(管理者)', -'label.role_comanager' => '(共同管理者)', -// 'label.role_admin' => '(administrator)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 6ca74cf65..cc52c1108 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -222,11 +222,6 @@ 'label.ldap_hint' => '아래의 필드들에서 Windows 로그인암호 를 입력하십시오.', 'label.required_fields' => '* 필수 필드', 'label.on_behalf' => '을 대표하여', -// TODO: translate all 3 roles properly, see https://www.anuko.com/time_tracker/user_guide/user_accounts.htm -// This may require different terms for role_manager and role_comanager. -'label.role_manager' => '(관리자)', -'label.role_comanager' => '(공동관리자)', -// 'label.role_admin' => '(administrator)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index ae1df70d6..360ddd802 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -184,9 +184,6 @@ 'label.ldap_hint' => 'Type uw Windows login en wachtwoord in de onderstaande velden.', 'label.required_fields' => '* - verplichte velden', 'label.on_behalf' => 'namens', -'label.role_manager' => '(manager)', -'label.role_comanager' => '(co-manager)', -'label.role_admin' => '(beheerder)', 'label.page' => 'Pagina', 'label.condition' => 'Voorwaarde', 'label.yes' => 'ja', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 5b6780779..8202b4e9f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -224,9 +224,6 @@ 'label.required_fields' => '* obligatoriske felt', 'label.on_behalf' => 'på vegne av', // TODO: translate the following. -// 'label.role_manager' => '(manager)', -// 'label.role_comanager' => '(co-manager)', -// 'label.role_admin' => '(administrator)', // 'label.page' => 'Page', // 'label.condition' => 'Condition', // 'label.yes' => 'yes', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 970acaf1e..ad4ec2c3d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -212,9 +212,6 @@ 'label.ldap_hint' => 'Wpisz swoją nazwę użytkownika Windows i hasło w polach poniżej.', 'label.required_fields' => '* - pola wymagane', 'label.on_behalf' => 'w imieniu', -'label.role_manager' => '(Manager)', -'label.role_comanager' => '(Co-manager)', -'label.role_admin' => '(Administrator)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index b46a54a89..3b8ceccf3 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -185,9 +185,6 @@ 'label.ldap_hint' => 'Entre com o seu login do Windows e senha nos campos abaixo.', 'label.required_fields' => '* - campos obrigatórios', 'label.on_behalf' => 'em nome de', -'label.role_manager' => '(gerente)', -'label.role_comanager' => '(coordenador)', -'label.role_admin' => '(administrador)', 'label.page' => 'Página', 'label.condition' => 'Condição', 'label.yes' => 'sim', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 1fb18ea17..4b6db659e 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -212,10 +212,6 @@ 'label.required_fields' => '* campos obrigatórios', // TODO: translate the following. // 'label.on_behalf' => 'on behalf of', -'label.role_manager' => '(gerente)', -// TODO: translate the following. -// 'label.role_comanager' => '(co-manager)', -// 'label.role_admin' => '(administrator)', // 'label.page' => 'Page', // 'label.condition' => 'Condition', // 'label.yes' => 'yes', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f5bdba763..fc8c9a8f8 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -222,9 +222,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* date obligatorii', 'label.on_behalf' => 'in numele', -'label.role_manager' => '(manager)', -'label.role_comanager' => '(co-manager)', -'label.role_admin' => '(administrator)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 8171ba517..e052ba818 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -184,9 +184,6 @@ 'label.ldap_hint' => 'Введите свои Windows логин и пароль в поля ниже.', 'label.required_fields' => '* - обязательные для заполнения поля', 'label.on_behalf' => 'от имени', -'label.role_manager' => '(менеджер)', -'label.role_comanager' => '(ассистент менеджера)', -'label.role_admin' => '(администратор)', 'label.page' => 'Стр', 'label.condition' => 'Условие', 'label.yes' => 'да', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index ab601e945..6eb804d20 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -214,9 +214,6 @@ 'label.ldap_hint' => 'Zadajte prihlasovacie meno do Windowsu a heslo do polí nižšie.', 'label.required_fields' => '* - povinné polia', 'label.on_behalf' => 'v zastúpení', -'label.role_manager' => '(manažér)', -'label.role_comanager' => '(spolu-manažér)', -'label.role_admin' => '(administrátor)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index b8f7e9407..1703ba75d 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -208,9 +208,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', // 'label.required_fields' => '* - required fields', // 'label.on_behalf' => 'on behalf of', -// 'label.role_manager' => '(manager)', -// 'label.role_comanager' => '(co-manager)', -// 'label.role_admin' => '(administrator)', // 'label.page' => 'Page', // 'label.condition' => 'Condition', // 'label.yes' => 'yes', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index bc98a1d33..fac94f100 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -209,9 +209,6 @@ 'label.ldap_hint' => 'Unesi tvoju Windows prijavu i lozinku u polje ispod.', 'label.required_fields' => '* - obavezna polja', 'label.on_behalf' => 'ispred', -'label.role_manager' => '(menadžer)', -'label.role_comanager' => '(saradnik)', -'label.role_admin' => '(administrator)', 'label.page' => 'Strana', // TODO: translate the following. // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index d977a9a2e..64311d4ad 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -205,9 +205,6 @@ 'label.ldap_hint' => 'Fyll i ditt användarnamn och lösenord för Windows i fälten nedan.', 'label.required_fields' => '* - Obligatoriska fält', 'label.on_behalf' => 'agerar som', -'label.role_manager' => '(Ansvarig)', -'label.role_comanager' => '(Delansvarig)', -'label.role_admin' => '(Administratör)', 'label.page' => 'Sida', 'label.condition' => 'Villkor', // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index dc8bd0736..a41fda46c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -229,9 +229,6 @@ // 'label.ldap_hint' => 'Type your Windows login and password in the fields below.', 'label.required_fields' => '* zorunlu bilgi', 'label.on_behalf' => 'adına', -'label.role_manager' => '(yönetici)', -'label.role_comanager' => '(yardımcı yönetici)', -'label.role_admin' => '(sistem yönetici)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 50cff7bcc..e6df6346f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -216,9 +216,6 @@ 'label.ldap_hint' => '在下面的栏目输入您的Windows用户名密码。', 'label.required_fields' => '* 必填栏目', 'label.on_behalf' => '代表', -'label.role_manager' => '(经理)', -'label.role_comanager' => '(合作经理人)', -'label.role_admin' => '(管理员)', 'label.page' => '页码', // TODO: translate the following. // 'label.condition' => 'Condition', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 8bc481b9e..353ca1fdf 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -221,9 +221,6 @@ 'label.ldap_hint' => '在下麵的欄目輸入您的Windows用戶名密碼。', 'label.required_fields' => '* 必填欄目', 'label.on_behalf' => '代表', -'label.role_manager' => '(經理)', -'label.role_comanager' => '(合作經理人)', -'label.role_admin' => '(管理員)', // TODO: translate the following. // 'label.page' => 'Page', // 'label.condition' => 'Condition', diff --git a/initialize.php b/initialize.php index 07344a419..d2596211c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5617"); +define("APP_VERSION", "1.19.34.5618"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 63fbf04bc85853a1c8a43edfb710009b6531bcce Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Jan 2022 18:08:42 +0000 Subject: [PATCH 2306/2515] Removed no longer used string from translation files. --- WEB-INF/resources/ca.lang.php | 1 - WEB-INF/resources/cs.lang.php | 1 - WEB-INF/resources/da.lang.php | 1 - WEB-INF/resources/de.lang.php | 1 - WEB-INF/resources/en.lang.php | 1 - WEB-INF/resources/es.lang.php | 1 - WEB-INF/resources/et.lang.php | 1 - WEB-INF/resources/fa.lang.php | 1 - WEB-INF/resources/fi.lang.php | 1 - WEB-INF/resources/fr.lang.php | 1 - WEB-INF/resources/gr.lang.php | 1 - WEB-INF/resources/he.lang.php | 1 - WEB-INF/resources/hu.lang.php | 1 - WEB-INF/resources/it.lang.php | 1 - WEB-INF/resources/ja.lang.php | 1 - WEB-INF/resources/ko.lang.php | 1 - WEB-INF/resources/nl.lang.php | 1 - WEB-INF/resources/no.lang.php | 1 - WEB-INF/resources/pl.lang.php | 1 - WEB-INF/resources/pt-br.lang.php | 1 - WEB-INF/resources/pt.lang.php | 1 - WEB-INF/resources/ro.lang.php | 1 - WEB-INF/resources/ru.lang.php | 1 - WEB-INF/resources/sk.lang.php | 1 - WEB-INF/resources/sl.lang.php | 1 - WEB-INF/resources/sr.lang.php | 1 - WEB-INF/resources/sv.lang.php | 1 - WEB-INF/resources/tr.lang.php | 1 - WEB-INF/resources/zh-cn.lang.php | 1 - WEB-INF/resources/zh-tw.lang.php | 1 - initialize.php | 2 +- 31 files changed, 1 insertion(+), 31 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 196a4441d..6b74dced4 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -407,7 +407,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index a30d83c89..836ef4f28 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -414,7 +414,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 369c965f4..bc042b6e5 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -391,7 +391,6 @@ 'dropdown.delete' => 'Slet', 'dropdown.do_not_delete' => 'Slet ikke', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 87f40c849..dae614fbc 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -372,7 +372,6 @@ 'dropdown.delete' => 'löschen', 'dropdown.do_not_delete' => 'nicht löschen', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', 'dropdown.paid' => 'bezahlt', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 0d82650c8..652c3e484 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -356,7 +356,6 @@ 'dropdown.status_inactive' => 'inactive', 'dropdown.delete' => 'delete', 'dropdown.do_not_delete' => 'do not delete', -'dropdown.pending_approval' => 'pending approval', 'dropdown.approved' => 'approved', 'dropdown.not_approved' => 'not approved', 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 68dcc8c31..f2bb893ba 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -406,7 +406,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 431f29563..67210ee66 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -398,7 +398,6 @@ 'dropdown.delete' => 'kustuta', 'dropdown.do_not_delete' => 'ära kustuta', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', 'dropdown.paid' => 'makstud', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 9ae24d016..31c1506fe 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -403,7 +403,6 @@ // TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index a9396eba9..c0d712667 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -391,7 +391,6 @@ 'dropdown.delete' => 'poista', 'dropdown.do_not_delete' => 'älä poista', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 91e04d793..61570ee8c 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -383,7 +383,6 @@ 'dropdown.delete' => 'supprimer', 'dropdown.do_not_delete' => 'ne pas supprimer', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 1fd83890f..c795c5073 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -381,7 +381,6 @@ 'dropdown.delete' => 'διαγραφή', 'dropdown.do_not_delete' => 'μη το διαγράψετε', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', 'dropdown.paid' => 'εξοφλημένο', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index ef7597cd3..72a48ba5d 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -408,7 +408,6 @@ // TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1c446ac53..8b1e0b348 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -408,7 +408,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index e3d19aa5f..90167eb26 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -391,7 +391,6 @@ 'dropdown.delete' => 'elimina', 'dropdown.do_not_delete' => 'non eliminare', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', 'dropdown.paid' => 'pagato', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index aa2389788..d0bad574e 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -408,7 +408,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index cc52c1108..3e62d9d2d 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -412,7 +412,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 360ddd802..dc86183ac 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -348,7 +348,6 @@ 'dropdown.status_inactive' => 'inactief', 'dropdown.delete' => 'verwijderen', 'dropdown.do_not_delete' => 'niet verwijderen', -'dropdown.pending_approval' => 'in afwachting van goedkeuring', 'dropdown.approved' => 'goedgekeurd', 'dropdown.not_approved' => 'afgekeurd', 'dropdown.paid' => 'betaald', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8202b4e9f..598950581 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -410,7 +410,6 @@ // TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index ad4ec2c3d..c826441f3 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -394,7 +394,6 @@ 'dropdown.delete' => 'usuń', 'dropdown.do_not_delete' => 'nie usuwaj', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3b8ceccf3..ba2ed1d73 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -346,7 +346,6 @@ 'dropdown.status_inactive' => 'inativo', 'dropdown.delete' => 'apagar', 'dropdown.do_not_delete' => 'não apagar', -'dropdown.pending_approval' => 'aprovação pendente', 'dropdown.approved' => 'aprovado', 'dropdown.not_approved' => 'não aprovado', 'dropdown.paid' => 'pago', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 4b6db659e..cac4c68e8 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -392,7 +392,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index fc8c9a8f8..1d97b1fed 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -413,7 +413,6 @@ // TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index e052ba818..20d7d7e60 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -349,7 +349,6 @@ 'dropdown.status_inactive' => 'неактивный', 'dropdown.delete' => 'удалить', 'dropdown.do_not_delete' => 'не удалять', -'dropdown.pending_approval' => 'в ожидании одобрения', 'dropdown.approved' => 'одобрено', 'dropdown.not_approved' => 'не одобрено', 'dropdown.paid' => 'оплачено', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 6eb804d20..89f26abde 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -397,7 +397,6 @@ // TODO: translate the following. // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 1703ba75d..56eeb2050 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -385,7 +385,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index fac94f100..c88e9d07c 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -392,7 +392,6 @@ 'dropdown.delete' => 'obriši', 'dropdown.do_not_delete' => 'nemoj obrisati', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 64311d4ad..36c0a325c 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -390,7 +390,6 @@ 'dropdown.delete' => 'Ta bort', 'dropdown.do_not_delete' => 'Ta inte bort', // TODO: translate the following. -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index a41fda46c..2e5bed2bb 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -421,7 +421,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index e6df6346f..b1c0667b3 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -402,7 +402,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 353ca1fdf..5212a3f80 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -406,7 +406,6 @@ // 'dropdown.status_inactive' => 'inactive', // 'dropdown.delete' => 'delete', // 'dropdown.do_not_delete' => 'do not delete', -// 'dropdown.pending_approval' => 'pending approval', // 'dropdown.approved' => 'approved', // 'dropdown.not_approved' => 'not approved', // 'dropdown.paid' => 'paid', diff --git a/initialize.php b/initialize.php index d2596211c..8b24ed417 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5618"); +define("APP_VERSION", "1.19.34.5619"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e0201c7924628b3727cb63b7e4b43d5f284f4326 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 26 Jan 2022 14:33:39 +0000 Subject: [PATCH 2307/2515] Updated database structure after removing remote work plugin. --- WEB-INF/lib/ttRoleHelper.class.php | 4 +-- dbinstall.php | 13 +++++++--- initialize.php | 2 +- mysql.sql | 40 ++---------------------------- 4 files changed, 14 insertions(+), 45 deletions(-) diff --git a/WEB-INF/lib/ttRoleHelper.class.php b/WEB-INF/lib/ttRoleHelper.class.php index 683f7ebaf..1ddc839cc 100644 --- a/WEB-INF/lib/ttRoleHelper.class.php +++ b/WEB-INF/lib/ttRoleHelper.class.php @@ -168,8 +168,8 @@ static function createPredefinedRoles($group_id, $lang) $rights_client = 'view_client_reports,view_client_invoices,manage_own_settings'; $rights_user = 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users'; - $rights_supervisor = $rights_user.',track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_date_lock,override_own_date_lock,swap_roles,update_work'; - $rights_comanager = $rights_supervisor.',manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports,manage_work,bid_on_work'; + $rights_supervisor = $rights_user.',track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_date_lock,override_own_date_lock,swap_roles'; + $rights_comanager = $rights_supervisor.',manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports'; $rights_manager = $rights_comanager.',manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups'; // Active roles. diff --git a/dbinstall.php b/dbinstall.php index 2dfe30d66..c966bdbaa 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1137,7 +1137,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to11929"]) { + if ($_POST["convert11900to12000"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1172,6 +1172,11 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.23', modified = now() where param_name = 'version_db' and param_value = '1.19.22'"); ttExecute("ALTER TABLE `tt_groups` ADD `entities_modified` datetime default NULL AFTER `modified_by`"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.29', modified = now() where param_name = 'version_db' and param_value = '1.19.23'"); + ttExecute("DROP TABLE `tt_work_currencies`"); + ttExecute("DROP TABLE `tt_work_categories`"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.19.29') set rights = replace(rights, 'swap_roles,update_work', 'swap_roles') where `rank` >= 12"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.19.29') set rights = replace(rights, 'view_all_reports,manage_work,bid_on_work', 'view_all_reports') where `rank` >= 68"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.20.0', modified = now() where param_name = 'version_db' and param_value = '1.19.29'"); } if ($_POST["cleanup"]) { @@ -1222,7 +1227,7 @@ function ttGenerateKeys() {

DB Install

-
Create database structure (v1.19.29) + Create database structure (v1.20.0)
(applies only to new installations, do not execute when updating)
@@ -1271,8 +1276,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.19.29)Update database structure (v1.19 to v1.20)
diff --git a/initialize.php b/initialize.php index 8b24ed417..e0a6999eb 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.19.34.5619"); +define("APP_VERSION", "1.20.0.5620"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index 7a87b3766..55d8e8b5c 100644 --- a/mysql.sql +++ b/mysql.sql @@ -78,7 +78,7 @@ create unique index role_idx on tt_roles(group_id, `rank`, status); # Insert site-wide roles - site administrator and top manager. INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Site administrator', 1024, 'administer_site'); -INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,update_work,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports,manage_work,bid_on_work,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,delete_group'); +INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,delete_group'); # @@ -608,42 +608,6 @@ CREATE TABLE `tt_files` ( ); -# -# Structure for table tt_work_currencies. -# This table keeps currencies supported by remote work plugin. -# -CREATE TABLE `tt_work_currencies` ( - `id` int(10) unsigned NOT NULL, # currency id - `name` varchar(10) NOT NULL, # currency name (USD, CAD, etc.) - PRIMARY KEY (`id`) -); - -# Create an index that guarantees unique work currencies. -create unique index currency_idx on tt_work_currencies(`name`); - -INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD'); - - -# -# Structure for table tt_work_categories. -# This table keeps work categories supported by remote work plugin. -# -CREATE TABLE `tt_work_categories` ( - `id` int(10) unsigned NOT NULL, # Category id. - `parents` text default NULL, # Comma-separated list of parent ids associated with this category. - `name` varchar(64) NOT NULL, # English category name. - `name_localized` text default NULL, # Comma-separated list of localized category names in other languages. - # Example: es:Codificación,ru:Кодирование. - PRIMARY KEY (`id`) -); - -# Insert some default categories. Table content to be updated at run time, though. -INSERT INTO `tt_work_categories` (`id`, `parents`, `name`, `name_localized`) VALUES ('1', NULL, 'Coding', 'es:Codificación,ru:Кодирование'); -INSERT INTO `tt_work_categories` (`id`, `parents`, `name`, `name_localized`) VALUES ('2', NULL, 'Other', 'es:Otra,ru:Другое'); -INSERT INTO `tt_work_categories` (`id`, `parents`, `name`, `name_localized`) VALUES ('3', '1', 'PHP', NULL); -INSERT INTO `tt_work_categories` (`id`, `parents`, `name`, `name_localized`) VALUES ('4', '1', 'C/C++', NULL); - - # # Structure for table tt_site_config. This table stores configuration data # for Time Tracker site as a whole. @@ -657,4 +621,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.19.29', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.20.0', now()); # TODO: change when structure changes. From beb0be399e413bc1ade1d5da86f259154c9782e1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 4 Feb 2022 22:54:34 +0000 Subject: [PATCH 2308/2515] Remove no longer needed file. --- initialize.php | 3 ++- plugins/work_constants.php | 36 ------------------------------------ 2 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 plugins/work_constants.php diff --git a/initialize.php b/initialize.php index e0a6999eb..73f4e7581 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,8 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5620"); +define("APP_VERSION", "1.20.0.5621" + . ""); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/work_constants.php b/plugins/work_constants.php deleted file mode 100644 index 207ca5d35..000000000 --- a/plugins/work_constants.php +++ /dev/null @@ -1,36 +0,0 @@ - Date: Fri, 4 Feb 2022 23:13:49 +0000 Subject: [PATCH 2309/2515] Fixed a typo problem in previous commit. --- initialize.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/initialize.php b/initialize.php index 73f4e7581..c417c1c4e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,8 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5621" - . ""); +define("APP_VERSION", "1.20.0.5621"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From fb8b436cabe05c119156de56c24f0b74a042a218 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 7 Feb 2022 19:28:04 +0000 Subject: [PATCH 2310/2515] Cosmetic maintenance. --- expenses.php | 5 ++++- initialize.php | 2 +- time.php | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/expenses.php b/expenses.php index 578e2d1c6..897d64d91 100644 --- a/expenses.php +++ b/expenses.php @@ -189,6 +189,10 @@ // Submit. if ($request->isPost()) { if ($request->getParameter('btn_submit')) { + // Use the "limit" plugin if we have one. Ignore include errors. + // The "limit" plugin is not required for normal operation of Time Tracker. + @include('plugins/limit/access_check.php'); + // Validate user input. if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); @@ -203,7 +207,6 @@ if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); // Finished validating input data. // Prohibit creating entries in locked range. diff --git a/initialize.php b/initialize.php index c417c1c4e..ac607dd98 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5621"); +define("APP_VERSION", "1.20.0.5622"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 9202dc1d7..6bc95e930 100644 --- a/time.php +++ b/time.php @@ -342,6 +342,11 @@ if ($request->isPost()) { if ($request->getParameter('btn_submit')) { // Submit button clicked. + + // Use the "limit" plugin if we have one. Ignore include errors. + // The "limit" plugin is not required for normal operation of Time Tracker. + @include('plugins/limit/access_check.php'); + // Validate user input. if ($showClient && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); @@ -384,7 +389,6 @@ if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { $err->add($i18n->get('error.field'), $i18n->get('label.note')); } - if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); // Finished validating user input. // Prohibit creating entries in future. From 58fb0f456312711d175495e8ea6f6116d131a068 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Feb 2022 16:25:10 +0000 Subject: [PATCH 2311/2515] Addressed several php8 warnings. --- WEB-INF/lib/ttReportHelper.class.php | 8 +++++--- initialize.php | 2 +- login.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 68fc85b2d..ffef6e773 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -109,7 +109,7 @@ static function getWhere($options) { } // Prepare sql query part for user list. - $userlist = $options['users'] ? $options['users'] : '-1'; + $userlist = isset($options['users']) ? $options['users'] : '-1'; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $user_list_part = " and l.user_id in ($userlist)"; else @@ -191,7 +191,7 @@ static function getExpenseWhere($options) { } // Prepare sql query part for user list. - $userlist = $options['users'] ? $options['users'] : '-1'; + $userlist = isset($options['users']) ? $options['users'] : '-1'; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) $user_list_part = " and ei.user_id in ($userlist)"; else @@ -571,7 +571,7 @@ static function getItems($options) { } else { $sort_part .= 'date'; } - if (($canViewReports || $isClient) && $options['users'] && !$grouping_by_user) + if (($canViewReports || $isClient) && isset($options['users']) && !$grouping_by_user) $sort_part .= ', user, type'; if ($options['show_start']) $sort_part .= ', unformatted_start'; @@ -584,6 +584,7 @@ static function getItems($options) { $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) die($res->getMessage()); + $report_items = array(); while ($val = $res->fetchRow()) { if ($convertTo12Hour) { if($val['start'] != '') @@ -1526,6 +1527,7 @@ static function getReportOptions($bean) { $options['timesheet'] = $bean->getAttribute('timesheet'); $active_users_in_bean = $bean->getAttribute('users_active'); + $users = ''; if ($active_users_in_bean && is_array($active_users_in_bean)) { $users = join(',', $active_users_in_bean); } diff --git a/initialize.php b/initialize.php index ac607dd98..6e3baf991 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5622"); +define("APP_VERSION", "1.20.0.5623"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index 9e2436206..93b1cd084 100644 --- a/login.php +++ b/login.php @@ -66,7 +66,7 @@ $err->add($i18n->get('error.no_groups')); // Determine whether to show login hint. It is currently used only for Windows LDAP authentication. -$show_hint = ('ad' == $GLOBALS['AUTH_MODULE_PARAMS']['type']); +$show_hint = ('ad' == isset($GLOBALS['AUTH_MODULE_PARAMS']['type']) ? $GLOBALS['AUTH_MODULE_PARAMS']['type'] : null); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('show_hint', $show_hint); From 8f06d7527e7e7311b3ac289177ecc1fc77aeebd9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Feb 2022 17:15:05 +0000 Subject: [PATCH 2312/2515] Updated dbinstall.php for php8.1 breaking change. --- dbinstall.php | 30 ++++++++++++++++++++---------- initialize.php | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index c966bdbaa..12a1e6232 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -94,10 +94,16 @@ function ttGenerateKeys() { // $required_version = '5.2.1'; // Something in TCPDF library does not work below this one. $required_version = '5.4.0'; // Week view (week.php) requires 5.4 because of []-way of referencing arrays. // This needs further investigation as we use [] elsewhere without obvious problems. - if (version_compare(phpversion(), $required_version, '>=')) { - echo('PHP version: '.phpversion().', good enough.
'); + // Print a warning about php >= 8.1 because of a breaking change + // with mysqli default error mode, see https://php.watch/versions/8.1/mysqli-error-mode + if (version_compare(phpversion(), '8.1', '>=')) { + echo('Error: This app was not tested with PHP version: '.phpversion().'
'); } else { - echo('Error: PHP version is not high enough: '.phpversion().'. Required: '.$required_version.'.
'); + if (version_compare(phpversion(), $required_version, '>=')) { + echo('PHP version: '.phpversion().', good enough.
'); + } else { + echo('Error: PHP version is not high enough: '.phpversion().'. Required: '.$required_version.'.
'); + } } // Depending on DSN, require either mysqli or mysql extensions. @@ -171,13 +177,17 @@ function ttGenerateKeys() { echo('There are no tables in database. Execute step 1 - Create database structure.
'); } - $sql = "select param_value from tt_site_config where param_name = 'version_db'"; - $res = $conn->query($sql); - if (is_a($res, 'MDB2_Error')) { - echo('Error: database schema version query failed. '.$res->getMessage().'
'); - } else { - $val = $res->fetchRow(); - echo('Database version is: '.$val['param_value'].'.'); + try { + $sql = "select param_value from tt_site_config where param_name = 'version_db'"; + $res = $conn->query($sql); + if (is_a($res, 'MDB2_Error')) { + echo('Error: database schema version query failed. '.$res->getMessage().'
'); + } else { + $val = $res->fetchRow(); + echo('Database version is: '.$val['param_value'].'.'); + } + } catch (Exception $e) { + echo('Caught exception: '.$e->getMessage().'
'); } $conn->disconnect(); diff --git a/initialize.php b/initialize.php index 6e3baf991..27f6705fe 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5623"); +define("APP_VERSION", "1.20.0.5624"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d04650cf53ea378f9bd8c7b81104f63c34713936 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Feb 2022 19:28:48 +0000 Subject: [PATCH 2313/2515] Starting to address numerous php8.1 issues. --- WEB-INF/lib/ttConfigHelper.class.php | 33 +++++----------------------- initialize.php | 2 +- time.php | 10 ++++----- 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/WEB-INF/lib/ttConfigHelper.class.php b/WEB-INF/lib/ttConfigHelper.class.php index 33e94e513..95bc1e0f1 100644 --- a/WEB-INF/lib/ttConfigHelper.class.php +++ b/WEB-INF/lib/ttConfigHelper.class.php @@ -1,30 +1,6 @@ config = trim($config, ' ,'); + if (!is_null($config)) + $this->config = trim($config, ' ,'); if ($this->config) $this->config_array = explode(',', $this->config); } @@ -120,6 +97,6 @@ function setIntValue($name, $value) { // The getConfig returns the config string. function getConfig() { - return trim($this->config, ' ,'); + return (is_null($this->config) ? null : trim($this->config, ' ,')); } } diff --git a/initialize.php b/initialize.php index 27f6705fe..7a7f06efe 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5624"); +define("APP_VERSION", "1.20.0.5625"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 6bc95e930..f5f84deb3 100644 --- a/time.php +++ b/time.php @@ -129,10 +129,10 @@ } // Initialize variables. -$cl_start = trim($request->getParameter('start')); -$cl_finish = trim($request->getParameter('finish')); -$cl_duration = trim($request->getParameter('duration')); -$cl_note = trim($request->getParameter('note')); +$cl_start = is_null($request->getParameter('start')) ? null : trim($request->getParameter('start')); +$cl_finish = is_null($request->getParameter('finish')) ? null : trim($request->getParameter('finish')); +$cl_duration = is_null($request->getParameter('duration')) ? null : trim($request->getParameter('duration')); +$cl_note = is_null($request->getParameter('note')) ? null : trim($request->getParameter('note')); $cl_billable = 1; if ($showBillable) { if ($request->isPost()) { @@ -161,7 +161,7 @@ 'label' => $timeField['label'], 'type' => $timeField['type'], 'required' => $timeField['required'], - 'value' => trim($cl_control_name)); + 'value' => is_null($cl_control_name) ? null : trim($cl_control_name)); } } From 15c3ecc308bb027469926644af84e4cd49bb8904 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Feb 2022 15:49:30 +0000 Subject: [PATCH 2314/2515] Started making a replacement for DateAndTime class for php8.1 support. --- WEB-INF/lib/ttDate.class.php | 75 ++++++++++++++++++++++++++++++++++++ initialize.php | 2 +- time.php | 11 ++++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 WEB-INF/lib/ttDate.class.php diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php new file mode 100644 index 000000000..519a76623 --- /dev/null +++ b/WEB-INF/lib/ttDate.class.php @@ -0,0 +1,75 @@ +$dateInDbDateFormat = $dateString; + $this->isValid = true; + } else { + $today = date_create(); + $this->dateInDbDateFormat = date_format($today, 'Y-m-d'); + $this->isValid = true; + } + + $this->unixTimestamp = strtotime($this->dateInDbDateFormat); + $this->year = date('Y', $this->unixTimestamp); + $this->month = date('m', $this->unixTimestamp); + $this->day = date('d', $this->unixTimestamp); + $this->dayOfWeek = date('w', $this->unixTimestamp); + } + + + // isValid determines if we have a properly initialized ttDate object. + function isValid() { + return $this->isValid; + } + + + // toString returns a date in specified format. + function toString($format = null) { + if (!$this->isValid) return null; + + if ($format == null || $format == DB_DATEFORMAT) + return $this->dateInDbDateFormat; + else { + return $this->formatDate($format); + } + } + + + // formatDate returns a date string in specified format. + function formatDate($format) { + global $i18n; + + $formattedDate = $format; // Start with unmodified format string. + + // Replace all found elements with data. + $formattedDate = str_replace('%Y', $this->year, $formattedDate); + $formattedDate = str_replace('%m', $this->month, $formattedDate); + $formattedDate = str_replace('%d', $this->day, $formattedDate); + // Replace locale-dependent days of week. + $formattedDate = str_replace('%a', mb_substr($i18n->getWeekDayName($this->dayOfWeek), 0, 3, 'utf-8'), $formattedDate); + return $formattedDate; + } +} diff --git a/initialize.php b/initialize.php index 7a7f06efe..28d4a8d1d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5625"); +define("APP_VERSION", "1.20.0.5626"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index f5f84deb3..9ee63d91c 100644 --- a/time.php +++ b/time.php @@ -11,6 +11,7 @@ import('ttTimeHelper'); import('ttFileHelper'); import('DateAndTime'); +import('ttDate'); // Access checks. if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) { @@ -81,6 +82,16 @@ $cl_date = $selected_date->toString(DB_DATEFORMAT); $_SESSION['date'] = $cl_date; +// Refactoring in progress for php8.1. +// TODO: remove the above block when done. +$selected_date2 = new ttDate(); +if (!$selected_date2->isValid()) + $selected_date2 = new ttDate(); +if(!$cl_date) + $cl_date = $selected_date2->toString(DB_DATEFORMAT); +$_SESSION['date'] = $cl_date; +// End of TODO. + // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); From 496e3ed494343bbd328af0f7a5f288d47a584778 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Feb 2022 16:09:55 +0000 Subject: [PATCH 2315/2515] Some more refactoring for php8.1. --- initialize.php | 2 +- plugins/MonthlyQuota.class.php | 8 ++++---- time.php | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/initialize.php b/initialize.php index 28d4a8d1d..237566d18 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5626"); +define("APP_VERSION", "1.20.0.5627"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index f742fd918..76a7c5100 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -104,13 +104,13 @@ public function getUserQuota($year, $month) { // from 1st of the month up to and inclusive of $selected_date. public function getUserQuotaFrom1st($selected_date) { // TODO: we may need a better algorithm here. Review. - $monthQuotaMinutes = $this->getUserQuota($selected_date->mYear, $selected_date->mMonth); - $workdaysInMonth = $this->getNumWorkdays($selected_date->mMonth, $selected_date->mYear); + $monthQuotaMinutes = $this->getUserQuota($selected_date->year, $selected_date->month); + $workdaysInMonth = $this->getNumWorkdays($selected_date->month, $selected_date->year); // Iterate from 1st up to selected date. $workdaysFrom1st = 0; - for ($i = 1; $i <= $selected_date->mDate; $i++) { - $date = ttTimeHelper::dateInDatabaseFormat($selected_date->mYear, $selected_date->mMonth, $i); + for ($i = 1; $i <= $selected_date->day; $i++) { + $date = ttTimeHelper::dateInDatabaseFormat($selected_date->year, $selected_date->month, $i); if (!ttTimeHelper::isWeekend($date) && !ttTimeHelper::isHoliday($date)) { $workdaysFrom1st++; } diff --git a/time.php b/time.php index 9ee63d91c..6e9dd610d 100644 --- a/time.php +++ b/time.php @@ -84,6 +84,7 @@ // Refactoring in progress for php8.1. // TODO: remove the above block when done. +// Also replace all occurrences of $selected_date2 with $selected_date. $selected_date2 = new ttDate(); if (!$selected_date2->isValid()) $selected_date2 = new ttDate(); @@ -124,8 +125,9 @@ if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); - $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth); - $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date); + $month_quota_minutes = $quota->getUserQuota($selected_date2->year, $selected_date2->month); + $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date2); + // TODO: refactor ttTimeHelper::getTimeForMonth to use a new ttPeriod class. $month_total = ttTimeHelper::getTimeForMonth($selected_date); $month_total_minutes = ttTimeHelper::toMinutes($month_total); $balance_left = $quota_minutes_from_1st - $month_total_minutes; From 6dd18388f02edf24238aea848cd651380ccbe02a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Feb 2022 12:15:20 +0000 Subject: [PATCH 2316/2515] Some refactoring for php8.1 support. --- WEB-INF/lib/ttDate.class.php | 34 ++++++++++++++++++++++-- WEB-INF/lib/ttPeriod.class.php | 42 ++++++++++++++++++++++++++++++ WEB-INF/lib/ttTimeHelper.class.php | 27 +++++++++++++++++++ initialize.php | 2 +- time.php | 9 +++---- 5 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 WEB-INF/lib/ttPeriod.class.php diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index 519a76623..791a1e942 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -22,9 +22,8 @@ class ttDate { // Constructor. function __construct($dateString = null) { - // TODO: redo the constructor and initialize year. month, day, and dayOfWeek properly. if (ttValidDbDateFormatDate($dateString)) { - $this->$dateInDbDateFormat = $dateString; + $this->dateInDbDateFormat = $dateString; $this->isValid = true; } else { $today = date_create(); @@ -46,6 +45,25 @@ function isValid() { } + // Returns unix timestamp. + function getTimestamp() { + return $this->unixTimestamp; + } + + + // Resets the object properties from a passed in unix timestamp. + function setFromUnixTimestamp($unixTimestamp) { + $this->unixTimestamp = $unixTimestamp; + + $this->year = date('Y', $this->unixTimestamp); + $this->month = date('m', $this->unixTimestamp); + $this->day = date('d', $this->unixTimestamp); + $this->dayOfWeek = date('w', $this->unixTimestamp); + + $this->dateInDbDateFormat = $this->year.'-'.$this->month.'-'.$this->day; + } + + // toString returns a date in specified format. function toString($format = null) { if (!$this->isValid) return null; @@ -72,4 +90,16 @@ function formatDate($format) { $formattedDate = str_replace('%a', mb_substr($i18n->getWeekDayName($this->dayOfWeek), 0, 3, 'utf-8'), $formattedDate); return $formattedDate; } + + + function before(/*ttDate*/ $obj) { + if ($this->getTimestamp() < $obj->getTimestamp()) return true; + return false; + } + + + function after(/*ttDate*/ $obj) { + if ($this->getTimestamp() > $obj->getTimestamp()) return true; + return false; + } } diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php new file mode 100644 index 000000000..a541663fe --- /dev/null +++ b/WEB-INF/lib/ttPeriod.class.php @@ -0,0 +1,42 @@ +getWeekStart(); + + $t_arr = localtime($ttDateInstance->getTimestamp()); + $t_arr[5] = $t_arr[5] + 1900; + + $this->startDate = new ttDate(); + $this->endDate = new ttDate(); + + switch ($period_type) { + case INTERVAL_THIS_MONTH: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); + break; + } + } + + + // Returns start date in specified format. + function getStartDate($format = null) { + return $this->startDate->toString($format); + } + + + // Returns end date in specified format. + function getEndDate($format = null) { + return $this->endDate->toString($format); + } +} \ No newline at end of file diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 75c911e04..917ceb571 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -605,6 +605,7 @@ static function getTimeForWeek($date) { static function getTimeForMonth($date) { global $user; import('Period'); + import('ttPeriod'); $mdb2 = getConnection(); $user_id = $user->getUser(); @@ -612,6 +613,8 @@ static function getTimeForMonth($date) { $org_id = $user->org_id; $period = new Period(INTERVAL_THIS_MONTH, $date); + // TODO: refactoring in progress... + $period2 = new ttPeriod(INTERVAL_THIS_MONTH, $date); $sql = "select sum(time_to_sec(duration)) as sm from tt_log". " where user_id = $user_id and group_id = $group_id and org_id = $org_id". " and date >= '".$period->getStartDate(DB_DATEFORMAT)."' and date <= '".$period->getEndDate(DB_DATEFORMAT)."' and status = 1"; @@ -623,6 +626,30 @@ static function getTimeForMonth($date) { return false; } + // getTimeForMonth2 - gets total time for a user for a given month. + // Refactoring - this is a replacement function for getTimeForMonth above. + // TODO: remove getTimeForMonth after refactoring week view. + static function getTimeForMonth2($date) { + global $user; + import('ttPeriod'); + $mdb2 = getConnection(); + + $user_id = $user->getUser(); + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $period = new ttPeriod(INTERVAL_THIS_MONTH, $date); + $sql = "select sum(time_to_sec(duration)) as sm from tt_log". + " where user_id = $user_id and group_id = $group_id and org_id = $org_id". + " and date >= '".$period->getStartDate()."' and date <= '".$period->getEndDate()."' and status = 1"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + $val = $res->fetchRow(); + return ttTimeHelper::minutesToDuration($val['sm'] / 60); + } + return false; + } + // getUncompleted - retrieves an uncompleted record for user, if one exists. static function getUncompleted($user_id) { $mdb2 = getConnection(); diff --git a/initialize.php b/initialize.php index 237566d18..e6223498a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5627"); +define("APP_VERSION", "1.20.0.5628"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 6e9dd610d..b20308974 100644 --- a/time.php +++ b/time.php @@ -85,7 +85,7 @@ // Refactoring in progress for php8.1. // TODO: remove the above block when done. // Also replace all occurrences of $selected_date2 with $selected_date. -$selected_date2 = new ttDate(); +$selected_date2 = new ttDate($cl_date); if (!$selected_date2->isValid()) $selected_date2 = new ttDate(); if(!$cl_date) @@ -127,8 +127,7 @@ $quota = new MonthlyQuota(); $month_quota_minutes = $quota->getUserQuota($selected_date2->year, $selected_date2->month); $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date2); - // TODO: refactor ttTimeHelper::getTimeForMonth to use a new ttPeriod class. - $month_total = ttTimeHelper::getTimeForMonth($selected_date); + $month_total = ttTimeHelper::getTimeForMonth2($selected_date2); $month_total_minutes = ttTimeHelper::toMinutes($month_total); $balance_left = $quota_minutes_from_1st - $month_total_minutes; $minutes_left = $month_quota_minutes - $month_total_minutes; @@ -406,8 +405,8 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) + $browser_today = new ttDate($request->getParameter('browser_today', null)); + if ($selected_date2->after($browser_today)) $err->add($i18n->get('error.future_date')); } From 82ff14f082c8e03098292b9c9bdf79c22227aa21 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Feb 2022 13:07:48 +0000 Subject: [PATCH 2317/2515] More refactoring for php8.1. --- WEB-INF/lib/ttPeriod.class.php | 11 +++++++++-- WEB-INF/lib/ttTimeHelper.class.php | 27 ++++++++++++++++++++++++--- WEB-INF/lib/ttUser.class.php | 2 +- initialize.php | 2 +- time.php | 29 +++++++++-------------------- 5 files changed, 44 insertions(+), 27 deletions(-) diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php index a541663fe..1d4b2c4d6 100644 --- a/WEB-INF/lib/ttPeriod.class.php +++ b/WEB-INF/lib/ttPeriod.class.php @@ -2,6 +2,7 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ +define('INTERVAL_THIS_WEEK', 2); define('INTERVAL_THIS_MONTH', 3); class ttPeriod { @@ -11,16 +12,22 @@ class ttPeriod { function __construct($period_type = INTERVAL_THIS_MONTH, $ttDateInstance) { - // global $user; - // $weekStartDay = $user->getWeekStart(); + global $user; + $weekStartDay = $user->getWeekStart(); $t_arr = localtime($ttDateInstance->getTimestamp()); $t_arr[5] = $t_arr[5] + 1900; + $startWeekBias = ($t_arr[6] < $weekStartDay) ? $weekStartDay - 7 : $weekStartDay; $this->startDate = new ttDate(); $this->endDate = new ttDate(); switch ($period_type) { + case INTERVAL_THIS_WEEK: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); + break; + case INTERVAL_THIS_MONTH: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 917ceb571..604724160 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -600,12 +600,35 @@ static function getTimeForWeek($date) { } return false; } + + // getTimeForWeek2 - gets total time for a user for a given week. + // Refactoring - this is a replacement function for getTimeForWeek above. + // TODO: remove getTimeForWeek after refactoring week view and puncher. + static function getTimeForWeek2($date) { + global $user; + import('ttPeriod'); + $mdb2 = getConnection(); + + $user_id = $user->getUser(); + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $period = new ttPeriod(INTERVAL_THIS_WEEK, $date); + $sql = "select sum(time_to_sec(duration)) as sm from tt_log". + " where user_id = $user_id and group_id = $group_id and org_id = $org_id". + " and date >= '".$period->getStartDate()."' and date <= '".$period->getEndDate()."' and status = 1"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + $val = $res->fetchRow(); + return ttTimeHelper::minutesToDuration($val['sm'] / 60); + } + return false; + } // getTimeForMonth - gets total time for a user for a given month. static function getTimeForMonth($date) { global $user; import('Period'); - import('ttPeriod'); $mdb2 = getConnection(); $user_id = $user->getUser(); @@ -613,8 +636,6 @@ static function getTimeForMonth($date) { $org_id = $user->org_id; $period = new Period(INTERVAL_THIS_MONTH, $date); - // TODO: refactoring in progress... - $period2 = new ttPeriod(INTERVAL_THIS_MONTH, $date); $sql = "select sum(time_to_sec(duration)) as sm from tt_log". " where user_id = $user_id and group_id = $group_id and org_id = $org_id". " and date >= '".$period->getStartDate(DB_DATEFORMAT)."' and date <= '".$period->getEndDate(DB_DATEFORMAT)."' and status = 1"; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 320fa623d..e6ed7ed71 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -436,7 +436,7 @@ function isDateLocked($date) // Calculate the last occurrence of a lock. $last = tdCron::getLastOccurrence($this->getLockSpec(), time()); - $lockdate = new DateAndTime(DB_DATEFORMAT, strftime('%Y-%m-%d', $last)); + $lockdate = new ttDate(strftime('%Y-%m-%d', $last)); if ($date->before($lockdate)) return true; diff --git a/initialize.php b/initialize.php index e6223498a..588dbac7c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5628"); +define("APP_VERSION", "1.20.0.5629"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index b20308974..b4dcd84e7 100644 --- a/time.php +++ b/time.php @@ -75,24 +75,13 @@ // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); +$selected_date = new ttDate($cl_date); +if (!$selected_date->isValid()) + $selected_date = new ttDate(); if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); + $cl_date = $selected_date->toString(); $_SESSION['date'] = $cl_date; -// Refactoring in progress for php8.1. -// TODO: remove the above block when done. -// Also replace all occurrences of $selected_date2 with $selected_date. -$selected_date2 = new ttDate($cl_date); -if (!$selected_date2->isValid()) - $selected_date2 = new ttDate(); -if(!$cl_date) - $cl_date = $selected_date2->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; -// End of TODO. - // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); @@ -125,9 +114,9 @@ if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); - $month_quota_minutes = $quota->getUserQuota($selected_date2->year, $selected_date2->month); - $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date2); - $month_total = ttTimeHelper::getTimeForMonth2($selected_date2); + $month_quota_minutes = $quota->getUserQuota($selected_date->year, $selected_date->month); + $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date); + $month_total = ttTimeHelper::getTimeForMonth2($selected_date); $month_total_minutes = ttTimeHelper::toMinutes($month_total); $balance_left = $quota_minutes_from_1st - $month_total_minutes; $minutes_left = $month_quota_minutes - $month_total_minutes; @@ -406,7 +395,7 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { $browser_today = new ttDate($request->getParameter('browser_today', null)); - if ($selected_date2->after($browser_today)) + if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); } @@ -491,7 +480,7 @@ } } // isPost -$week_total = ttTimeHelper::getTimeForWeek($selected_date); +$week_total = ttTimeHelper::getTimeForWeek2($selected_date); $timeRecords = ttTimeHelper::getRecords($cl_date, $showFiles); $showNavigation = ($user->isPluginEnabled('wv') && !$user->isOptionEnabled('week_menu')) || ($user->isPluginEnabled('pu') && !$user->isOptionEnabled('puncher_menu')); From 98534ea6d695fb4fe5f606d9352d0e259f7733d6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Feb 2022 14:14:33 +0000 Subject: [PATCH 2318/2515] Refactoring for php8.1. --- WEB-INF/lib/common.lib.php | 3 +-- WEB-INF/lib/ttPeriod.class.php | 6 +++--- WEB-INF/lib/ttUser.class.php | 2 +- initialize.php | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 05a06808f..fcc36ed40 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -256,8 +256,7 @@ function ttValidDate($val) // ttValidDbDateFormatDate is used to check user input to validate a date in DB_DATEFORMAT. function ttValidDbDateFormatDate($val) { - $val = trim($val); - if (strlen($val) == 0) + if (is_null($val) || strlen($val) == 0) return false; // This should validate a string in format 'YYYY-MM-DD'. diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php index 1d4b2c4d6..077aff278 100644 --- a/WEB-INF/lib/ttPeriod.class.php +++ b/WEB-INF/lib/ttPeriod.class.php @@ -24,9 +24,9 @@ function __construct($period_type = INTERVAL_THIS_MONTH, $ttDateInstance) { switch ($period_type) { case INTERVAL_THIS_WEEK: - $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); - $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); - break; + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); + break; case INTERVAL_THIS_MONTH: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index e6ed7ed71..93e71116a 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -297,7 +297,7 @@ function isClient() { // isPluginEnabled checks whether a plugin is enabled for user. function isPluginEnabled($plugin) { - return in_array($plugin, explode(',', $this->getPlugins())); + return in_array($plugin, explode(',', $this->getPlugins() ? $this->getPlugins() : '')); } // isOptionEnabled checks whether a config option is enabled for user. diff --git a/initialize.php b/initialize.php index 588dbac7c..9514cc4a1 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5629"); +define("APP_VERSION", "1.20.0.5630"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6c9cddd745b7aa9a985d596633762320a5586d8b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Feb 2022 14:54:42 +0000 Subject: [PATCH 2319/2515] Started refactoring Calendar.class.php for php8.1. --- WEB-INF/lib/form/Calendar.class.php | 10 ++++++---- WEB-INF/lib/ttDate.class.php | 7 +++++++ initialize.php | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 337737f1c..02a6d0845 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -64,20 +64,22 @@ function getHtml() { global $user; $selectedDate = $this->value; - if (!$selectedDate) $selectedDate = strftime(DB_DATEFORMAT); // Determine month and year for selected date. - $selectedDateObject = new DateAndTime(DB_DATEFORMAT, $selectedDate); + $selectedDateObject = new ttDate($selectedDate); $selectedMonth = $selectedDateObject->getMonth(); $selectedYear = $selectedDateObject->getYear(); // Determine date for the 1st of next month for calendar navigation. $firstOfNextMonth2AM = mktime(2, 0, 0, $selectedMonth + 1, 1, $selectedYear); // 2 am on the 1st of next month. - $firstOfNextMonth = strftime(DB_DATEFORMAT, $firstOfNextMonth2AM); + $ttDateObject = new ttDate(); + $ttDateObject->setFromUnixTimestamp($firstOfNextMonth2AM); + $firstOfNextMonth = $ttDateObject->toString(); // Determine date for the 1st of previous month. $firstOfPreviousMonth2AM = mktime(2, 0, 0, $selectedMonth - 1, 1, $selectedYear); // 2 am on the 1st of previous month. - $firstOfPreviousMonth = strftime(DB_DATEFORMAT, $firstOfPreviousMonth2AM); + $ttDateObject->setFromUnixTimestamp($firstOfPreviousMonth2AM); + $firstOfPreviousMonth = $ttDateObject->toString(); // Print calendar header. $html = "\n\n\n"; diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index 791a1e942..f2ae46226 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -102,4 +102,11 @@ function after(/*ttDate*/ $obj) { if ($this->getTimestamp() > $obj->getTimestamp()) return true; return false; } + + + // Geters. + function getYear() { return $this->year; } + function getMonth() { return $this->month; } + function getDay() { return $this->day; } + function getDayOfWeek() { return $this->dayOfWeek; } } diff --git a/initialize.php b/initialize.php index 9514cc4a1..f98d2cb39 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5630"); +define("APP_VERSION", "1.20.0.5631"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 22d3a95aee4e07b29f9b8bd282faa0c595c2a7c5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Feb 2022 21:44:54 +0000 Subject: [PATCH 2320/2515] More refactoring for php8.1 support. --- WEB-INF/lib/common.lib.php | 4 +++- WEB-INF/lib/form/Calendar.class.php | 8 ++++---- WEB-INF/lib/ttDate.class.php | 15 +++++++++++++++ WEB-INF/lib/ttPeriod.class.php | 2 +- WEB-INF/lib/ttTimeHelper.class.php | 4 ++-- initialize.php | 2 +- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index fcc36ed40..cabf62621 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -128,7 +128,9 @@ function isTrue($val) // ttValidString is used to check user input to validate a string. function ttValidString($val, $emptyValid = false) { - $val = trim($val); + if(!is_null($val)) + $val = trim($val); + if (strlen($val) == 0 && !$emptyValid) return false; diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 02a6d0845..af32eea1d 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -157,14 +157,14 @@ function getHtml() { } // Handle selected day. - if ($selectedDate == strftime(DB_DATEFORMAT, $cellDate0am)) + if ($selectedDate == ttDate::dateFromUnixTimestamp($cellDate0am)) $cell_style = ' class="calendarDaySelected"'; $html .= ''; // Handle days with existing entries. if ($active_dates) { // Entries exist. - if (in_array(strftime(DB_DATEFORMAT, $cellDate0am), $active_dates)) { + if (in_array(ttDate::dateFromUnixTimestamp($cellDate0am), $active_dates)) { if ($handleNotCompleteDays && $this->highlight == 'time') { $day_total_minutes = ttTimeHelper::toMinutes(ttTimeHelper::getTimeForDay($date_to_check)); if ($day_total_minutes >= $workday_minutes) @@ -176,7 +176,7 @@ function getHtml() { $link_style = ' class="calendarLinkRecordsExist"'; } } - $html .= "name."=".strftime(DB_DATEFORMAT, $cellDate0am)."\" tabindex=\"-1\">".date("d",$cellDate0am).""; + $html .= "name."=".ttDate::dateFromUnixTimestamp($cellDate0am)."\" tabindex=\"-1\">".date("d",$cellDate0am).""; $html .= "
 
name."=".strftime(DB_DATEFORMAT)."\" tabindex=\"-1\">".$i18n->get('label.today')."
name."=".ttDate::dateFromUnixTimestamp()."\" tabindex=\"-1\">".$i18n->get('label.today')."
\n"; // Add a hidden control for selected date. diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index f2ae46226..fcf58e60c 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -109,4 +109,19 @@ function getYear() { return $this->year; } function getMonth() { return $this->month; } function getDay() { return $this->day; } function getDayOfWeek() { return $this->dayOfWeek; } + + + // A static function to obtain a date in DB_DATEFORMAT from a Unix timestamp. + static function dateFromUnixTimestamp($unixTimestamp = null) { + if ($unixTimestamp == null) { + $today = date_create(); + return date_format($today, 'Y-m-d'); + } + + $year = date('Y', $unixTimestamp); + $month = date('m', $unixTimestamp); + $day = date('d', $unixTimestamp); + $dateInDbFormat = $year.'-'.$month.'-'.$day; + return $dateInDbFormat; + } } diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php index 077aff278..3eb431cc4 100644 --- a/WEB-INF/lib/ttPeriod.class.php +++ b/WEB-INF/lib/ttPeriod.class.php @@ -10,7 +10,7 @@ class ttPeriod { var $endDate; // ttDate object. - function __construct($period_type = INTERVAL_THIS_MONTH, $ttDateInstance) { + function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { global $user; $weekStartDay = $user->getWeekStart(); diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 604724160..b45c6d17f 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -613,7 +613,7 @@ static function getTimeForWeek2($date) { $group_id = $user->getGroup(); $org_id = $user->org_id; - $period = new ttPeriod(INTERVAL_THIS_WEEK, $date); + $period = new ttPeriod($date, INTERVAL_THIS_WEEK); $sql = "select sum(time_to_sec(duration)) as sm from tt_log". " where user_id = $user_id and group_id = $group_id and org_id = $org_id". " and date >= '".$period->getStartDate()."' and date <= '".$period->getEndDate()."' and status = 1"; @@ -659,7 +659,7 @@ static function getTimeForMonth2($date) { $group_id = $user->getGroup(); $org_id = $user->org_id; - $period = new ttPeriod(INTERVAL_THIS_MONTH, $date); + $period = new ttPeriod($date, INTERVAL_THIS_MONTH); $sql = "select sum(time_to_sec(duration)) as sm from tt_log". " where user_id = $user_id and group_id = $group_id and org_id = $org_id". " and date >= '".$period->getStartDate()."' and date <= '".$period->getEndDate()."' and status = 1"; diff --git a/initialize.php b/initialize.php index f98d2cb39..5874ba026 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5631"); +define("APP_VERSION", "1.20.0.5632"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From b33a06c5f0eb6ef32b0840f3219dfba1f8bcf426 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 19 Feb 2022 17:29:53 +0000 Subject: [PATCH 2321/2515] Fixed Calendar.class.php with a forgotten import. --- WEB-INF/lib/form/Calendar.class.php | 1 + WEB-INF/lib/ttDate.class.php | 2 +- initialize.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index af32eea1d..3f16ed597 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -28,6 +28,7 @@ import('form.FormElement'); import('DateAndTime'); +import('ttDate'); import('ttTimeHelper'); class Calendar extends FormElement { diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index fcf58e60c..1b5bad9c4 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -104,7 +104,7 @@ function after(/*ttDate*/ $obj) { } - // Geters. + // Getters. function getYear() { return $this->year; } function getMonth() { return $this->month; } function getDay() { return $this->day; } diff --git a/initialize.php b/initialize.php index 5874ba026..29789ed1a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5632"); +define("APP_VERSION", "1.20.0.5633"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From eb3210f9fdd97c1a220b874ab2bf73efdc280029 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 19 Feb 2022 19:51:24 +0000 Subject: [PATCH 2322/2515] Added a missing import to ttUser.class.php. --- WEB-INF/lib/ttUser.class.php | 1 + initialize.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 93e71116a..592b5d9c8 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -9,6 +9,7 @@ import('form.Form'); import('form.ActionForm'); import('ttTemplateHelper'); +import('ttDate'); class ttUser { var $login = null; // User login. diff --git a/initialize.php b/initialize.php index 29789ed1a..03294184b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5633"); +define("APP_VERSION", "1.20.0.5634"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 042398a7f8f0322eb2caa002360172b31c2d2f78 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 19 Feb 2022 21:23:00 +0000 Subject: [PATCH 2323/2515] Fixed adjusting fav report options for changed user role. --- WEB-INF/lib/ttFavReportHelper.class.php | 11 ++++++++++- initialize.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index be23f6a39..303750d63 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -473,6 +473,7 @@ static function adjustOptions($options) { } } else { $users_to_adjust = explode(',', $options['users']); // Users to adjust. + // Adjust user list for a client. if ($user->isClient()) { $users = ttGroupHelper::getUsersForClient(); // Active and inactive users for clients. foreach ($users as $single_user) { @@ -485,7 +486,15 @@ static function adjustOptions($options) { } $options['users'] = implode(',', $adjusted_user_ids); } - // TODO: add checking the existing user list for potentially changed access rights for user. + // Reset user list for a role that no longer has view_reports or view_all_reports rights. + if (!($user->can('view_reports') || $user->can('view_all_reports'))) { + $options['users'] = null; + // Also remove grouping by user if we can't do it. + if (isset($options['group_by1']) && $options['group_by1'] == 'user') unset($options['group_by1']); + if (isset($options['group_by2']) && $options['group_by2'] == 'user') unset($options['group_by2']); + if (isset($options['group_by3']) && $options['group_by3'] == 'user') unset($options['group_by3']); + } + // TODO: improve checking the existing user list for potentially changed access rights for user. } if ($user->isPluginEnabled('ap') && $user->isClient() && !$user->can('view_client_unapproved')) diff --git a/initialize.php b/initialize.php index 03294184b..09344a542 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5634"); +define("APP_VERSION", "1.20.0.5635"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 8e8321a78d7dd9c341f7253a18d324a74b039cfc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Feb 2022 12:54:19 +0000 Subject: [PATCH 2324/2515] Addressed a php warning. --- WEB-INF/lib/ttReportHelper.class.php | 5 +++-- initialize.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index ffef6e773..20e6d7a46 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -693,6 +693,8 @@ static function getSubtotals($options) { // Execute query. $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) die($res->getMessage()); + + $subtotals = array(); while ($val = $res->fetchRow()) { $time = ttTimeHelper::minutesToDuration($val['time'] / 60); $rowLabel = ttReportHelper::makeGroupByLabel($val['group_field'], $options); @@ -1014,8 +1016,7 @@ static function prepareReportBody($options, $comment = null) $items = ttReportHelper::getItems($options); $grouping = ttReportHelper::grouping($options); - if ($grouping) - $subtotals = ttReportHelper::getSubtotals($options); + $subtotals = $grouping ? ttReportHelper::getSubtotals($options) : array(); $totals = ttReportHelper::getTotals($options); // Use custom fields plugin if it is enabled. diff --git a/initialize.php b/initialize.php index 09344a542..e06256f06 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5635"); +define("APP_VERSION", "1.20.0.5636"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 4f95a311ebc6ec1092ad572a4dc2b59ad58a3a79 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Feb 2022 15:20:18 +0000 Subject: [PATCH 2325/2515] Some refactoring in Calendar class. --- WEB-INF/lib/form/Calendar.class.php | 8 ++------ initialize.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 3f16ed597..072b48281 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -27,7 +27,6 @@ // +----------------------------------------------------------------------+ import('form.FormElement'); -import('DateAndTime'); import('ttDate'); import('ttTimeHelper'); @@ -73,14 +72,11 @@ function getHtml() { // Determine date for the 1st of next month for calendar navigation. $firstOfNextMonth2AM = mktime(2, 0, 0, $selectedMonth + 1, 1, $selectedYear); // 2 am on the 1st of next month. - $ttDateObject = new ttDate(); - $ttDateObject->setFromUnixTimestamp($firstOfNextMonth2AM); - $firstOfNextMonth = $ttDateObject->toString(); + $firstOfNextMonth = ttDate::dateFromUnixTimestamp($firstOfNextMonth2AM); // Determine date for the 1st of previous month. $firstOfPreviousMonth2AM = mktime(2, 0, 0, $selectedMonth - 1, 1, $selectedYear); // 2 am on the 1st of previous month. - $ttDateObject->setFromUnixTimestamp($firstOfPreviousMonth2AM); - $firstOfPreviousMonth = $ttDateObject->toString(); + $firstOfPreviousMonth = ttDate::dateFromUnixTimestamp($firstOfPreviousMonth2AM); // Print calendar header. $html = "\n\n\n"; diff --git a/initialize.php b/initialize.php index e06256f06..aa92c01e2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5636"); +define("APP_VERSION", "1.20.0.5637"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 28c91182fc500cd9c4a77ada70a24151c6afd7b2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Feb 2022 15:46:25 +0000 Subject: [PATCH 2326/2515] Resumed refactoring for php8.1. --- WEB-INF/lib/common.lib.php | 10 ++++++---- initialize.php | 2 +- time.php | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index cabf62621..d8ed3c8d5 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -128,16 +128,18 @@ function isTrue($val) // ttValidString is used to check user input to validate a string. function ttValidString($val, $emptyValid = false) { - if(!is_null($val)) - $val = trim($val); + if (is_null($val)) { + return $emptyValid ? true : false; + } + $val = trim($val); if (strlen($val) == 0 && !$emptyValid) return false; - + // String must not be XSS evil (to insert JavaScript). if (stristr($val, ''; + return ''; } elseif ($encode === 'javascript_charcode') { $string = '' . $text . ''; - for ($x = 0, $y = strlen($string); $x < $y; $x++) { + for ($x = 0, $_length = strlen($string); $x < $_length; $x++) { $ord[] = ord($string[ $x ]); } - $_ret = "\n"; - return $_ret; + return ''; } elseif ($encode === 'hex') { preg_match('!^(.*)(\?.*)$!', $address, $match); if (!empty($match[ 2 ])) { diff --git a/WEB-INF/lib/smarty/plugins/function.math.php b/WEB-INF/lib/smarty/plugins/function.math.php index 7348d9649..fd5b3d166 100644 --- a/WEB-INF/lib/smarty/plugins/function.math.php +++ b/WEB-INF/lib/smarty/plugins/function.math.php @@ -12,7 +12,7 @@ * Name: math * Purpose: handle math computations in template * - * @link http://www.smarty.net/manual/en/language.function.math.php {math} + * @link https://www.smarty.net/manual/en/language.function.math.php {math} * (Smarty online manual) * @author Monte Ohrt * @@ -28,7 +28,12 @@ function smarty_function_math($params, $template) 'int' => true, 'abs' => true, 'ceil' => true, + 'acos' => true, + 'acosh' => true, 'cos' => true, + 'cosh' => true, + 'deg2rad' => true, + 'rad2deg' => true, 'exp' => true, 'floor' => true, 'log' => true, @@ -39,27 +44,51 @@ function smarty_function_math($params, $template) 'pow' => true, 'rand' => true, 'round' => true, + 'asin' => true, + 'asinh' => true, 'sin' => true, + 'sinh' => true, 'sqrt' => true, 'srand' => true, - 'tan' => true + 'atan' => true, + 'atanh' => true, + 'tan' => true, + 'tanh' => true ); + // be sure equation parameter is present if (empty($params[ 'equation' ])) { trigger_error("math: missing equation parameter", E_USER_WARNING); return; } $equation = $params[ 'equation' ]; + + // Remove whitespaces + $equation = preg_replace('/\s+/', '', $equation); + + // Adapted from https://www.php.net/manual/en/function.eval.php#107377 + $number = '(?:\d+(?:[,.]\d+)?|pi|π)'; // What is a number + $functionsOrVars = '((?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))'; + $operators = '[+\/*\^%-]'; // Allowed math operators + $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)+\)|\((?1)+\)))(?:'.$operators.'(?1))?)+$/'; + + if (!preg_match($regexp, $equation)) { + trigger_error("math: illegal characters", E_USER_WARNING); + return; + } + // make sure parenthesis are balanced if (substr_count($equation, '(') !== substr_count($equation, ')')) { trigger_error("math: unbalanced parenthesis", E_USER_WARNING); return; } + // disallow backticks if (strpos($equation, '`') !== false) { trigger_error("math: backtick character not allowed in equation", E_USER_WARNING); return; } + // also disallow dollar signs if (strpos($equation, '$') !== false) { trigger_error("math: dollar signs not allowed in equation", E_USER_WARNING); @@ -96,6 +125,7 @@ function smarty_function_math($params, $template) } $smarty_math_result = null; eval("\$smarty_math_result = " . $equation . ";"); + if (empty($params[ 'format' ])) { if (empty($params[ 'assign' ])) { return $smarty_math_result; diff --git a/WEB-INF/lib/smarty/plugins/modifier.date_format.php b/WEB-INF/lib/smarty/plugins/modifier.date_format.php index c8e88c5c9..8e7e0b6e1 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.date_format.php +++ b/WEB-INF/lib/smarty/plugins/modifier.date_format.php @@ -15,7 +15,7 @@ * - format: strftime format for output * - default_date: default date if $string is empty * - * @link http://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual) + * @link https://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual) * @author Monte Ohrt * * @param string $string input date string diff --git a/WEB-INF/lib/smarty/plugins/modifier.escape.php b/WEB-INF/lib/smarty/plugins/modifier.escape.php index 150901c7c..47489aa98 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.escape.php +++ b/WEB-INF/lib/smarty/plugins/modifier.escape.php @@ -11,7 +11,7 @@ * Name: escape * Purpose: escape string for output * - * @link http://www.smarty.net/docs/en/language.modifier.escape + * @link https://www.smarty.net/docs/en/language.modifier.escape * @author Monte Ohrt * * @param string $string input string @@ -23,12 +23,9 @@ */ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true) { - static $_double_encode = null; + static $_double_encode = true; static $is_loaded_1 = false; static $is_loaded_2 = false; - if ($_double_encode === null) { - $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>='); - } if (!$char_set) { $char_set = Smarty::$_CHARSET; } @@ -184,7 +181,11 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $ '"' => '\\"', "\r" => '\\r', "\n" => '\\n', - ' '<\/' + ' '<\/', + // see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements + '#ms', '', $source); // capture html elements not to be messed with $_offset = 0; diff --git a/WEB-INF/lib/smarty/plugins/shared.escape_special_chars.php b/WEB-INF/lib/smarty/plugins/shared.escape_special_chars.php index 6b18d3eec..a204b092c 100644 --- a/WEB-INF/lib/smarty/plugins/shared.escape_special_chars.php +++ b/WEB-INF/lib/smarty/plugins/shared.escape_special_chars.php @@ -20,13 +20,7 @@ function smarty_function_escape_special_chars($string) { if (!is_array($string)) { - if (version_compare(PHP_VERSION, '5.2.3', '>=')) { - $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false); - } else { - $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); - $string = htmlspecialchars($string); - $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); - } + $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false); } return $string; } diff --git a/WEB-INF/lib/smarty/plugins/shared.mb_str_replace.php b/WEB-INF/lib/smarty/plugins/shared.mb_str_replace.php index 206cf9ea6..226d9035d 100644 --- a/WEB-INF/lib/smarty/plugins/shared.mb_str_replace.php +++ b/WEB-INF/lib/smarty/plugins/shared.mb_str_replace.php @@ -44,7 +44,7 @@ function smarty_mb_str_replace($search, $replace, $subject, &$count = 0) } } } else { - $parts = mb_split(preg_quote($search), $subject); + $parts = mb_split(preg_quote($search), $subject) ?: array(); $count = count($parts) - 1; $subject = implode($replace, $parts); } diff --git a/WEB-INF/lib/smarty/readme b/WEB-INF/lib/smarty/readme new file mode 100644 index 000000000..91eff4784 --- /dev/null +++ b/WEB-INF/lib/smarty/readme @@ -0,0 +1,8 @@ +These are files from Smarty-4.1.0 with 2 modifications in: + +Smarty.class.php +sysplugins/smarty_internal_cacheresource_file.php + +Nik edited these files for php5.4 support, as they use php7.0 features. + + diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_cacheresource_file.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_cacheresource_file.php index 61618449d..f6879bc76 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_cacheresource_file.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_cacheresource_file.php @@ -196,12 +196,8 @@ public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $e */ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached) { - if (version_compare(PHP_VERSION, '5.3.0', '>=')) { - clearstatcache(true, $cached->lock_id); - } else { - clearstatcache(); - } - if (is_file($cached->lock_id)) { + clearstatcache(true, $cached->lock_id ?: ''); + if (null !== $cached->lock_id && is_file($cached->lock_id)) { $t = filemtime($cached->lock_id); return $t && (time() - $t < $smarty->locking_timeout); } else { diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_for.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_for.php index 3f113e56d..969e22c1a 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_for.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_for.php @@ -18,7 +18,7 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase { /** * Compiles code for the {for} tag - * Smarty 3 does implement two different syntax's: + * Smarty supports two different syntax's: * - {for $var in $array} * For looping over arrays or iterators * - {for $x=0; $x<$y; $x++} diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_foreach.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_foreach.php index a68da5409..edfe358be 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_foreach.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_foreach.php @@ -219,9 +219,9 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) if (isset($itemAttr[ 'index' ])) { $output .= "{$itemVar}->index = -1;\n"; } - $output .= "{$itemVar}->do_else = true;\n"; + $output .= "{$itemVar}->do_else = true;\n"; $output .= "if (\$_from !== null) foreach (\$_from as {$keyTerm}{$itemVar}->value) {\n"; - $output .= "{$itemVar}->do_else = false;\n"; + $output .= "{$itemVar}->do_else = false;\n"; if (isset($attributes[ 'key' ]) && isset($itemAttr[ 'key' ])) { $output .= "\$_smarty_tpl->tpl_vars['{$key}']->value = {$itemVar}->key;\n"; } diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php index d0f2b0f4a..84e9584d9 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_function.php @@ -157,7 +157,7 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) $output = "template->compiled->nocache_hash}%%*/smarty->ext->_tplFunction->restoreTemplateVariables(\\\$_smarty_tpl, '{$_name}');?>\n"; $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\";\n?>"; - $output .= "template->compiled->nocache_hash}', \$_smarty_tpl->compiled->nocache_hash, ob_get_clean());\n"; + $output .= "template->compiled->nocache_hash}', \$_smarty_tpl->compiled->nocache_hash ?? '', ob_get_clean());\n"; $output .= "}\n}\n"; $output .= "/*/ {$_funcName}_nocache */\n\n"; $output .= "?>\n"; diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_include_php.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_include_php.php deleted file mode 100644 index 1b0fdaad3..000000000 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_include_php.php +++ /dev/null @@ -1,110 +0,0 @@ -smarty instanceof SmartyBC)) { - throw new SmartyException("{include_php} is deprecated, use SmartyBC class to enable"); - } - // check and get attributes - $_attr = $this->getAttributes($compiler, $args); - /** - * - * - * @var Smarty_Internal_Template $_smarty_tpl - * used in evaluated code - */ - $_smarty_tpl = $compiler->template; - $_filepath = false; - $_file = null; - eval('$_file = @' . $_attr[ 'file' ] . ';'); - if (!isset($compiler->smarty->security_policy) && file_exists($_file)) { - $_filepath = $compiler->smarty->_realpath($_file, true); - } else { - if (isset($compiler->smarty->security_policy)) { - $_dir = $compiler->smarty->security_policy->trusted_dir; - } else { - $_dir = $compiler->smarty->trusted_dir; - } - if (!empty($_dir)) { - foreach ((array)$_dir as $_script_dir) { - $_path = $compiler->smarty->_realpath($_script_dir . DIRECTORY_SEPARATOR . $_file, true); - if (file_exists($_path)) { - $_filepath = $_path; - break; - } - } - } - } - if ($_filepath === false) { - $compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", null, true); - } - if (isset($compiler->smarty->security_policy)) { - $compiler->smarty->security_policy->isTrustedPHPDir($_filepath); - } - if (isset($_attr[ 'assign' ])) { - // output will be stored in a smarty variable instead of being displayed - $_assign = $_attr[ 'assign' ]; - } - $_once = '_once'; - if (isset($_attr[ 'once' ])) { - if ($_attr[ 'once' ] === 'false') { - $_once = ''; - } - } - if (isset($_assign)) { - return "assign({$_assign},ob_get_clean());\n?>"; - } else { - return "\n"; - } - } -} diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_insert.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_insert.php index 4bdc3952e..c91ff62cb 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_insert.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_insert.php @@ -89,7 +89,7 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) if (isset($compiler->smarty->security_policy)) { $_dir = $compiler->smarty->security_policy->trusted_dir; } else { - $_dir = $compiler->smarty instanceof SmartyBC ? $compiler->smarty->trusted_dir : null; + $_dir = null; } if (!empty($_dir)) { foreach ((array)$_dir as $_script_dir) { diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_php.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_php.php deleted file mode 100644 index ff48c6fbc..000000000 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_compile_private_php.php +++ /dev/null @@ -1,253 +0,0 @@ -getAttributes($compiler, $args); - $compiler->has_code = false; - if ($_attr[ 'type' ] === 'xml') { - $compiler->tag_nocache = true; - $output = addcslashes($_attr[ 'code' ], "'\\"); - $compiler->parser->current_buffer->append_subtree( - $compiler->parser, - new Smarty_Internal_ParseTree_Tag( - $compiler->parser, - $compiler->processNocacheCode( - "\n", - true - ) - ) - ); - return ''; - } - if ($_attr[ 'type' ] !== 'tag') { - if ($compiler->php_handling === Smarty::PHP_REMOVE) { - return ''; - } elseif ($compiler->php_handling === Smarty::PHP_QUOTE) { - $output = - preg_replace_callback( - '#(<\?(?:php|=)?)|(<%)|()|(\?>)|(%>)|(<\/script>)#i', - array($this, 'quote'), - $_attr[ 'code' ] - ); - $compiler->parser->current_buffer->append_subtree( - $compiler->parser, - new Smarty_Internal_ParseTree_Text($output) - ); - return ''; - } elseif ($compiler->php_handling === Smarty::PHP_PASSTHRU || $_attr[ 'type' ] === 'unmatched') { - $compiler->tag_nocache = true; - $output = addcslashes($_attr[ 'code' ], "'\\"); - $compiler->parser->current_buffer->append_subtree( - $compiler->parser, - new Smarty_Internal_ParseTree_Tag( - $compiler->parser, - $compiler->processNocacheCode( - "\n", - true - ) - ) - ); - return ''; - } elseif ($compiler->php_handling === Smarty::PHP_ALLOW) { - if (!($compiler->smarty instanceof SmartyBC)) { - $compiler->trigger_template_error( - '$smarty->php_handling PHP_ALLOW not allowed. Use SmartyBC to enable it', - null, - true - ); - } - $compiler->has_code = true; - return $_attr[ 'code' ]; - } else { - $compiler->trigger_template_error('Illegal $smarty->php_handling value', null, true); - } - } else { - $compiler->has_code = true; - if (!($compiler->smarty instanceof SmartyBC)) { - $compiler->trigger_template_error( - '{php}{/php} tags not allowed. Use SmartyBC to enable them', - null, - true - ); - } - $ldel = preg_quote($compiler->smarty->left_delimiter, '#'); - $rdel = preg_quote($compiler->smarty->right_delimiter, '#'); - preg_match("#^({$ldel}php\\s*)((.)*?)({$rdel})#", $_attr[ 'code' ], $match); - if (!empty($match[ 2 ])) { - if ('nocache' === trim($match[ 2 ])) { - $compiler->tag_nocache = true; - } else { - $compiler->trigger_template_error("illegal value of option flag '{$match[2]}'", null, true); - } - } - return preg_replace( - array("#^{$ldel}\\s*php\\s*(.)*?{$rdel}#", "#{$ldel}\\s*/\\s*php\\s*{$rdel}$#"), - array(''), - $_attr[ 'code' ] - ); - } - } - - /** - * Lexer code for PHP tags - * - * This code has been moved from lexer here fo easier debugging and maintenance - * - * @param Smarty_Internal_Templatelexer $lex - * - * @throws \SmartyCompilerException - */ - public function parsePhp(Smarty_Internal_Templatelexer $lex) - { - $lex->token = Smarty_Internal_Templateparser::TP_PHP; - $close = 0; - $lex->taglineno = $lex->line; - $closeTag = '?>'; - if (strpos($lex->value, 'is_xml = true; - $lex->phpType = 'xml'; - return; - } elseif (strpos($lex->value, 'phpType = 'php'; - } elseif (strpos($lex->value, '<%') === 0) { - $lex->phpType = 'asp'; - $closeTag = '%>'; - } elseif (strpos($lex->value, '%>') === 0) { - $lex->phpType = 'unmatched'; - } elseif (strpos($lex->value, '?>') === 0) { - if ($lex->is_xml) { - $lex->is_xml = false; - $lex->phpType = 'xml'; - return; - } - $lex->phpType = 'unmatched'; - } elseif (strpos($lex->value, 'phpType = 'script'; - $closeTag = ''; - } elseif (strpos($lex->value, $lex->smarty->left_delimiter) === 0) { - if ($lex->isAutoLiteral()) { - $lex->token = Smarty_Internal_Templateparser::TP_TEXT; - return; - } - $closeTag = "{$lex->smarty->left_delimiter}/php{$lex->smarty->right_delimiter}"; - if ($lex->value === $closeTag) { - $lex->compiler->trigger_template_error("unexpected closing tag '{$closeTag}'"); - } - $lex->phpType = 'tag'; - } - if ($lex->phpType === 'unmatched') { - return; - } - if (($lex->phpType === 'php' || $lex->phpType === 'asp') - && - ($lex->compiler->php_handling === Smarty::PHP_PASSTHRU || - $lex->compiler->php_handling === Smarty::PHP_QUOTE) - ) { - return; - } - $start = $lex->counter + strlen($lex->value); - $body = true; - if (preg_match('~' . preg_quote($closeTag, '~') . '~i', $lex->data, $match, PREG_OFFSET_CAPTURE, $start)) { - $close = $match[ 0 ][ 1 ]; - } else { - $lex->compiler->trigger_template_error("missing closing tag '{$closeTag}'"); - } - while ($body) { - if (preg_match( - '~([/][*])|([/][/][^\n]*)|(\'[^\'\\\\]*(?:\\.[^\'\\\\]*)*\')|("[^"\\\\]*(?:\\.[^"\\\\]*)*")~', - $lex->data, - $match, - PREG_OFFSET_CAPTURE, - $start - ) - ) { - $value = $match[ 0 ][ 0 ]; - $from = $pos = $match[ 0 ][ 1 ]; - if ($pos > $close) { - $body = false; - } else { - $start = $pos + strlen($value); - $phpCommentStart = $value === '/*'; - if ($phpCommentStart) { - $phpCommentEnd = preg_match('~([*][/])~', $lex->data, $match, PREG_OFFSET_CAPTURE, $start); - if ($phpCommentEnd) { - $pos2 = $match[ 0 ][ 1 ]; - $start = $pos2 + strlen($match[ 0 ][ 0 ]); - } - } - while ($close > $pos && $close < $start) { - if (preg_match( - '~' . preg_quote($closeTag, '~') . '~i', - $lex->data, - $match, - PREG_OFFSET_CAPTURE, - $from - ) - ) { - $close = $match[ 0 ][ 1 ]; - $from = $close + strlen($match[ 0 ][ 0 ]); - } else { - $lex->compiler->trigger_template_error("missing closing tag '{$closeTag}'"); - } - } - if ($phpCommentStart && (!$phpCommentEnd || $pos2 > $close)) { - $lex->taglineno = $lex->line + substr_count(substr($lex->data, $lex->counter, $start), "\n"); - $lex->compiler->trigger_template_error("missing PHP comment closing tag '*/'"); - } - } - } else { - $body = false; - } - } - $lex->value = substr($lex->data, $lex->counter, $close + strlen($closeTag) - $lex->counter); - } - - /* - * Call back function for $php_handling = PHP_QUOTE - * - */ - /** - * @param $match - * - * @return string - */ - private function quote($match) - { - return htmlspecialchars($match[ 0 ], ENT_QUOTES); - } -} diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php index 90c5dcefa..a9b940e5a 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_config_file_compiler.php @@ -158,7 +158,7 @@ public function compileTemplate(Smarty_Internal_Template $template) } // template header code $template_header = - "template->source->filepath}' */ ?>\n"; $code = 'smarty->ext->configLoad->_loadConfigVars($_smarty_tpl, ' . diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_data.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_data.php index 98e3e57b3..1b64185b8 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_data.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_data.php @@ -121,7 +121,7 @@ public function assign($tpl_var, $value = null, $nocache = false) * appends values to template variables * * @api Smarty::append() - * @link http://www.smarty.net/docs/en/api.append.tpl + * @link https://www.smarty.net/docs/en/api.append.tpl * * @param array|string $tpl_var the template variable name(s) * @param mixed $value the value to append @@ -182,7 +182,7 @@ public function assignByRef($tpl_var, &$value, $nocache = false) * Returns a single or all template variables * * @api Smarty::getTemplateVars() - * @link http://www.smarty.net/docs/en/api.get.template.vars.tpl + * @link https://www.smarty.net/docs/en/api.get.template.vars.tpl * * @param string $varName variable name or null * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object @@ -195,26 +195,6 @@ public function getTemplateVars($varName = null, Smarty_Internal_Data $_ptr = nu return $this->ext->getTemplateVars->getTemplateVars($this, $varName, $_ptr, $searchParents); } - /** - * gets the object of a Smarty variable - * - * @param string $variable the name of the Smarty variable - * @param Smarty_Internal_Data $_ptr optional pointer to data object - * @param boolean $searchParents search also in parent data - * @param bool $error_enable - * - * @return Smarty_Variable|Smarty_Undefined_Variable the object of the variable - * @deprecated since 3.1.28 please use Smarty_Internal_Data::getTemplateVars() instead. - */ - public function getVariable( - $variable = null, - Smarty_Internal_Data $_ptr = null, - $searchParents = true, - $error_enable = true - ) { - return $this->ext->getTemplateVars->_getVariable($this, $variable, $_ptr, $searchParents, $error_enable); - } - /** * Follow the parent chain an merge template and config variables * diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php index 56dca18fa..c2b653ef4 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_errorhandler.php @@ -1,61 +1,60 @@ previousErrorHandler = set_error_handler([$this, 'handleError']); + } + + /** + * Disable error handler + */ + public function deactivate() { + restore_error_handler(); + $this->previousErrorHandler = null; } /** * Error Handler to mute expected messages * - * @link http://php.net/set_error_handler + * @link https://php.net/set_error_handler * * @param integer $errno Error level * @param $errstr @@ -65,49 +64,21 @@ public static function muteExpectedErrors() * * @return bool */ - public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = array()) + public function handleError($errno, $errstr, $errfile, $errline, $errcontext = []) { - $_is_muted_directory = false; - // add the SMARTY_DIR to the list of muted directories - if (!isset(self::$mutedDirectories[ SMARTY_DIR ])) { - $smarty_dir = realpath(SMARTY_DIR); - if ($smarty_dir !== false) { - self::$mutedDirectories[ SMARTY_DIR ] = - array('file' => $smarty_dir, 'length' => strlen($smarty_dir),); - } + if ($this->allowUndefinedVars && $errstr == 'Attempt to read property "value" on null') { + return; // suppresses this error } - // walk the muted directories and test against $errfile - foreach (self::$mutedDirectories as $key => &$dir) { - if (!$dir) { - // resolve directory and length for speedy comparisons - $file = realpath($key); - if ($file === false) { - // this directory does not exist, remove and skip it - unset(self::$mutedDirectories[ $key ]); - continue; - } - $dir = array('file' => $file, 'length' => strlen($file),); - } - if (!strncmp($errfile, $dir[ 'file' ], $dir[ 'length' ])) { - $_is_muted_directory = true; - break; - } - } - // pass to next error handler if this error did not occur inside SMARTY_DIR - // or the error was within smarty but masked to be ignored - if (!$_is_muted_directory || ($errno && $errno & error_reporting())) { - if (self::$previousErrorHandler) { - return call_user_func( - self::$previousErrorHandler, - $errno, - $errstr, - $errfile, - $errline, - $errcontext - ); - } else { - return false; - } + + if ($this->allowUndefinedArrayKeys && preg_match( + '/^(Undefined array key|Trying to access array offset on value of type null)/', + $errstr + )) { + return; // suppresses this error } + + // pass all other errors through to the previous error handler or to the default PHP error handler + return $this->previousErrorHandler ? + call_user_func($this->previousErrorHandler, $errno, $errstr, $errfile, $errline, $errcontext) : false; } } diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_append.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_append.php index 881375efe..e207734e8 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_append.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_append.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_Append * appends values to template variables * * @api Smarty::append() - * @link http://www.smarty.net/docs/en/api.append.tpl + * @link https://www.smarty.net/docs/en/api.append.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param array|string $tpl_var the template variable name(s) diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_appendbyref.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_appendbyref.php index c95904460..b5be69b54 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_appendbyref.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_appendbyref.php @@ -15,7 +15,7 @@ class Smarty_Internal_Method_AppendByRef * appends values to template variables by reference * * @api Smarty::appendByRef() - * @link http://www.smarty.net/docs/en/api.append.by.ref.tpl + * @link https://www.smarty.net/docs/en/api.append.by.ref.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string $tpl_var the template variable name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallassign.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallassign.php index 29ff2ffb0..6fb0c8f3d 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallassign.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallassign.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearAllAssign * clear all the assigned template variables. * * @api Smarty::clearAllAssign() - * @link http://www.smarty.net/docs/en/api.clear.all.assign.tpl + * @link https://www.smarty.net/docs/en/api.clear.all.assign.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallcache.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallcache.php index 30d55f7d2..b74d30580 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallcache.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearallcache.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearAllCache * Empty cache folder * * @api Smarty::clearAllCache() - * @link http://www.smarty.net/docs/en/api.clear.all.cache.tpl + * @link https://www.smarty.net/docs/en/api.clear.all.cache.tpl * * @param \Smarty $smarty * @param integer $exp_time expiration time diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearassign.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearassign.php index 22bfa2d31..12b755c06 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearassign.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearassign.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearAssign * clear the given assigned template variable(s). * * @api Smarty::clearAssign() - * @link http://www.smarty.net/docs/en/api.clear.assign.tpl + * @link https://www.smarty.net/docs/en/api.clear.assign.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string|array $tpl_var the template variable(s) to clear diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcache.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcache.php index a5dd4e26e..df766eee8 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcache.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcache.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearCache * Empty cache for a specific template * * @api Smarty::clearCache() - * @link http://www.smarty.net/docs/en/api.clear.cache.tpl + * @link https://www.smarty.net/docs/en/api.clear.cache.tpl * * @param \Smarty $smarty * @param string $template_name template name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php index bf4929807..db0a49b00 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearCompiledTemplate * Delete compiled template file * * @api Smarty::clearCompiledTemplate() - * @link http://www.smarty.net/docs/en/api.clear.compiled.template.tpl + * @link https://www.smarty.net/docs/en/api.clear.compiled.template.tpl * * @param \Smarty $smarty * @param string $resource_name template name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearconfig.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearconfig.php index 15bf492a1..d1b730322 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearconfig.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_clearconfig.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ClearConfig * clear a single or all config variables * * @api Smarty::clearConfig() - * @link http://www.smarty.net/docs/en/api.clear.config.tpl + * @link https://www.smarty.net/docs/en/api.clear.config.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string|null $name variable name or null diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_configload.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_configload.php index 2e6254880..c3174d2d0 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_configload.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_configload.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_ConfigLoad * load a config file, optionally load just selected sections * * @api Smarty::configLoad() - * @link http://www.smarty.net/docs/en/api.config.load.tpl + * @link https://www.smarty.net/docs/en/api.config.load.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string $config_file filename @@ -42,7 +42,7 @@ public function configLoad(Smarty_Internal_Data $data, $config_file, $sections = * load a config file, optionally load just selected sections * * @api Smarty::configLoad() - * @link http://www.smarty.net/docs/en/api.config.load.tpl + * @link https://www.smarty.net/docs/en/api.config.load.tpl * * @param \Smarty|\Smarty_Internal_Data|\Smarty_Internal_Template $data * @param string $config_file filename diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_createdata.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_createdata.php index f95097519..c684c0870 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_createdata.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_createdata.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_CreateData * creates a data object * * @api Smarty::createData() - * @link http://www.smarty.net/docs/en/api.create.data.tpl + * @link https://www.smarty.net/docs/en/api.create.data.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param \Smarty_Internal_Template|\Smarty_Internal_Data|\Smarty_Data|\Smarty $parent next higher level of Smarty diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getconfigvars.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getconfigvars.php index 1d11e44c1..763bdf989 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getconfigvars.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getconfigvars.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_GetConfigVars * Returns a single or all config variables * * @api Smarty::getConfigVars() - * @link http://www.smarty.net/docs/en/api.get.config.vars.tpl + * @link https://www.smarty.net/docs/en/api.get.config.vars.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string $varname variable name or null diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getregisteredobject.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getregisteredobject.php index df6ede130..0b3a071d3 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getregisteredobject.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_getregisteredobject.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_GetRegisteredObject * return a reference to a registered object * * @api Smarty::getRegisteredObject() - * @link http://www.smarty.net/docs/en/api.get.registered.object.tpl + * @link https://www.smarty.net/docs/en/api.get.registered.object.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $object_name object name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettags.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettags.php index c07ae07ec..0d1335a8d 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettags.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettags.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_GetTags * Return array of tag/attributes of all tags used by an template * * @api Smarty::getTags() - * @link http://www.smarty.net/docs/en/api.get.tags.tpl + * @link https://www.smarty.net/docs/en/api.get.tags.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param null|string|Smarty_Internal_Template $template diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettemplatevars.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettemplatevars.php index 9ef7d46bb..0470785b1 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettemplatevars.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_gettemplatevars.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_GetTemplateVars * Returns a single or all template variables * * @api Smarty::getTemplateVars() - * @link http://www.smarty.net/docs/en/api.get.template.vars.tpl + * @link https://www.smarty.net/docs/en/api.get.template.vars.tpl * * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data * @param string $varName variable name or null diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_loadfilter.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_loadfilter.php index 66d80d474..af788a24e 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_loadfilter.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_loadfilter.php @@ -30,7 +30,7 @@ class Smarty_Internal_Method_LoadFilter * * @api Smarty::loadFilter() * - * @link http://www.smarty.net/docs/en/api.load.filter.tpl + * @link https://www.smarty.net/docs/en/api.load.filter.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type filter type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registercacheresource.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registercacheresource.php index 648365619..5608b3fd0 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registercacheresource.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registercacheresource.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_RegisterCacheResource * Registers a resource to fetch a template * * @api Smarty::registerCacheResource() - * @link http://www.smarty.net/docs/en/api.register.cacheresource.tpl + * @link https://www.smarty.net/docs/en/api.register.cacheresource.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $name name of resource type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerclass.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerclass.php index 8d18547e2..76a69c6e5 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerclass.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerclass.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_RegisterClass * Registers static classes to be used in templates * * @api Smarty::registerClass() - * @link http://www.smarty.net/docs/en/api.register.class.tpl + * @link https://www.smarty.net/docs/en/api.register.class.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $class_name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerdefaultpluginhandler.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerdefaultpluginhandler.php index a9fb78dc6..4cda5b056 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerdefaultpluginhandler.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerdefaultpluginhandler.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_RegisterDefaultPluginHandler * Registers a default plugin handler * * @api Smarty::registerDefaultPluginHandler() - * @link http://www.smarty.net/docs/en/api.register.default.plugin.handler.tpl + * @link https://www.smarty.net/docs/en/api.register.default.plugin.handler.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param callable $callback class/method name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerfilter.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerfilter.php index c0f9fff10..9719eb2b6 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerfilter.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerfilter.php @@ -30,7 +30,7 @@ class Smarty_Internal_Method_RegisterFilter * * @api Smarty::registerFilter() * - * @link http://www.smarty.net/docs/en/api.register.filter.tpl + * @link https://www.smarty.net/docs/en/api.register.filter.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type filter type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerobject.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerobject.php index 4646e4f22..8e6fe0521 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerobject.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerobject.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_RegisterObject * Registers object to be used in templates * * @api Smarty::registerObject() - * @link http://www.smarty.net/docs/en/api.register.object.tpl + * @link https://www.smarty.net/docs/en/api.register.object.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $object_name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerplugin.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerplugin.php index ed18d84bb..74c0ae908 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerplugin.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerplugin.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_RegisterPlugin * Registers plugin to be used in templates * * @api Smarty::registerPlugin() - * @link http://www.smarty.net/docs/en/api.register.plugin.tpl + * @link https://www.smarty.net/docs/en/api.register.plugin.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type plugin type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerresource.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerresource.php index 7c7d0f78a..302657ae0 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerresource.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_registerresource.php @@ -22,25 +22,18 @@ class Smarty_Internal_Method_RegisterResource * Registers a resource to fetch a template * * @api Smarty::registerResource() - * @link http://www.smarty.net/docs/en/api.register.resource.tpl + * @link https://www.smarty.net/docs/en/api.register.resource.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $name name of resource type - * @param Smarty_Resource|array $resource_handler or instance of - * Smarty_Resource, - * or array of - * callbacks to - * handle - * resource - * (deprecated) + * @param Smarty_Resource $resource_handler instance of Smarty_Resource * * @return \Smarty|\Smarty_Internal_Template */ - public function registerResource(Smarty_Internal_TemplateBase $obj, $name, $resource_handler) + public function registerResource(Smarty_Internal_TemplateBase $obj, $name, Smarty_Resource $resource_handler) { $smarty = $obj->_getSmartyObj(); - $smarty->registered_resources[ $name ] = - $resource_handler instanceof Smarty_Resource ? $resource_handler : array($resource_handler, false); + $smarty->registered_resources[ $name ] = $resource_handler; return $obj; } } diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unloadfilter.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unloadfilter.php index 55e1596be..e41e8dffc 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unloadfilter.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unloadfilter.php @@ -16,7 +16,7 @@ class Smarty_Internal_Method_UnloadFilter extends Smarty_Internal_Method_LoadFil * * @api Smarty::unloadFilter() * - * @link http://www.smarty.net/docs/en/api.unload.filter.tpl + * @link https://www.smarty.net/docs/en/api.unload.filter.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type filter type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregistercacheresource.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregistercacheresource.php index b99903867..377397e97 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregistercacheresource.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregistercacheresource.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_UnregisterCacheResource * Registers a resource to fetch a template * * @api Smarty::unregisterCacheResource() - * @link http://www.smarty.net/docs/en/api.unregister.cacheresource.tpl + * @link https://www.smarty.net/docs/en/api.unregister.cacheresource.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param $name diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterfilter.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterfilter.php index 9cb494a52..ebc9337d0 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterfilter.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterfilter.php @@ -16,7 +16,7 @@ class Smarty_Internal_Method_UnregisterFilter extends Smarty_Internal_Method_Reg * * @api Smarty::unregisterFilter() * - * @link http://www.smarty.net/docs/en/api.unregister.filter.tpl + * @link https://www.smarty.net/docs/en/api.unregister.filter.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type filter type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterobject.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterobject.php index 1e592b339..77d619637 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterobject.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterobject.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_UnregisterObject * Registers plugin to be used in templates * * @api Smarty::unregisterObject() - * @link http://www.smarty.net/docs/en/api.unregister.object.tpl + * @link https://www.smarty.net/docs/en/api.unregister.object.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $object_name name of object diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterplugin.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterplugin.php index f39e31678..2431d5c23 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterplugin.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterplugin.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_UnregisterPlugin * Registers plugin to be used in templates * * @api Smarty::unregisterPlugin() - * @link http://www.smarty.net/docs/en/api.unregister.plugin.tpl + * @link https://www.smarty.net/docs/en/api.unregister.plugin.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type plugin type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterresource.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterresource.php index a79db4299..bbb6a861d 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterresource.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_method_unregisterresource.php @@ -22,7 +22,7 @@ class Smarty_Internal_Method_UnregisterResource * Registers a resource to fetch a template * * @api Smarty::unregisterResource() - * @link http://www.smarty.net/docs/en/api.unregister.resource.tpl + * @link https://www.smarty.net/docs/en/api.unregister.resource.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj * @param string $type name of resource type diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php index ab4c3ec3b..829c420fe 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_template.php @@ -87,83 +87,83 @@ public function to_smarty_php(Smarty_Internal_Templateparser $parser) $code = ''; foreach ($this->getChunkedSubtrees() as $chunk) { - $text = ''; - switch ($chunk['mode']) { - case 'textstripped': - foreach ($chunk['subtrees'] as $subtree) { - $text .= $subtree->to_smarty_php($parser); - } - $code .= preg_replace( - '/((<%)|(%>)|(<\?php)|(<\?)|(\?>)|(<\/?script))/', - "\n", - $parser->compiler->processText($text) - ); - break; - case 'text': - foreach ($chunk['subtrees'] as $subtree) { - $text .= $subtree->to_smarty_php($parser); - } - $code .= preg_replace( - '/((<%)|(%>)|(<\?php)|(<\?)|(\?>)|(<\/?script))/', - "\n", - $text - ); - break; - case 'tag': - foreach ($chunk['subtrees'] as $subtree) { - $text = $parser->compiler->appendCode($text, $subtree->to_smarty_php($parser)); - } - $code .= $text; - break; - default: - foreach ($chunk['subtrees'] as $subtree) { - $text = $subtree->to_smarty_php($parser); - } - $code .= $text; + $text = ''; + switch ($chunk['mode']) { + case 'textstripped': + foreach ($chunk['subtrees'] as $subtree) { + $text .= $subtree->to_smarty_php($parser); + } + $code .= preg_replace( + '/((<%)|(%>)|(<\?php)|(<\?)|(\?>)|(<\/?script))/', + "\n", + $parser->compiler->processText($text) + ); + break; + case 'text': + foreach ($chunk['subtrees'] as $subtree) { + $text .= $subtree->to_smarty_php($parser); + } + $code .= preg_replace( + '/((<%)|(%>)|(<\?php)|(<\?)|(\?>)|(<\/?script))/', + "\n", + $text + ); + break; + case 'tag': + foreach ($chunk['subtrees'] as $subtree) { + $text = $parser->compiler->appendCode($text, $subtree->to_smarty_php($parser)); + } + $code .= $text; + break; + default: + foreach ($chunk['subtrees'] as $subtree) { + $text = $subtree->to_smarty_php($parser); + } + $code .= $text; - } + } } return $code; } private function getChunkedSubtrees() { - $chunks = array(); - $currentMode = null; - $currentChunk = array(); - for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) { + $chunks = array(); + $currentMode = null; + $currentChunk = array(); + for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) { - if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, array('textstripped', 'text', 'tag'))) { - continue; - } + if ($this->subtrees[ $key ]->data === '' && in_array($currentMode, array('textstripped', 'text', 'tag'))) { + continue; + } - if ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Text - && $this->subtrees[ $key ]->isToBeStripped()) { - $newMode = 'textstripped'; - } elseif ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Text) { - $newMode = 'text'; - } elseif ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Tag) { - $newMode = 'tag'; - } else { - $newMode = 'other'; - } + if ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Text + && $this->subtrees[ $key ]->isToBeStripped()) { + $newMode = 'textstripped'; + } elseif ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Text) { + $newMode = 'text'; + } elseif ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Tag) { + $newMode = 'tag'; + } else { + $newMode = 'other'; + } - if ($newMode == $currentMode) { - $currentChunk[] = $this->subtrees[ $key ]; - } else { - $chunks[] = array( - 'mode' => $currentMode, - 'subtrees' => $currentChunk - ); - $currentMode = $newMode; - $currentChunk = array($this->subtrees[ $key ]); - } - } - if ($currentMode && $currentChunk) { - $chunks[] = array( - 'mode' => $currentMode, - 'subtrees' => $currentChunk - ); - } - return $chunks; + if ($newMode == $currentMode) { + $currentChunk[] = $this->subtrees[ $key ]; + } else { + $chunks[] = array( + 'mode' => $currentMode, + 'subtrees' => $currentChunk + ); + $currentMode = $newMode; + $currentChunk = array($this->subtrees[ $key ]); + } + } + if ($currentMode && $currentChunk) { + $chunks[] = array( + 'mode' => $currentMode, + 'subtrees' => $currentChunk + ); + } + return $chunks; } } diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_text.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_text.php index 399e84941..58116c811 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_text.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_parsetree_text.php @@ -17,30 +17,30 @@ class Smarty_Internal_ParseTree_Text extends Smarty_Internal_ParseTree { - /** - * Wether this section should be stripped on output to smarty php - * @var bool - */ - private $toBeStripped = false; + /** + * Wether this section should be stripped on output to smarty php + * @var bool + */ + private $toBeStripped = false; - /** - * Create template text buffer - * - * @param string $data text - * @param bool $toBeStripped wether this section should be stripped on output to smarty php - */ + /** + * Create template text buffer + * + * @param string $data text + * @param bool $toBeStripped wether this section should be stripped on output to smarty php + */ public function __construct($data, $toBeStripped = false) { $this->data = $data; $this->toBeStripped = $toBeStripped; } - /** - * Wether this section should be stripped on output to smarty php - * @return bool - */ - public function isToBeStripped() { - return $this->toBeStripped; + /** + * Wether this section should be stripped on output to smarty php + * @return bool + */ + public function isToBeStripped() { + return $this->toBeStripped; } /** diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_registered.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_registered.php deleted file mode 100644 index df526101f..000000000 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_registered.php +++ /dev/null @@ -1,101 +0,0 @@ -filepath = $source->type . ':' . $source->name; - $source->uid = sha1($source->filepath . $source->smarty->_joined_template_dir); - $source->timestamp = $this->getTemplateTimestamp($source); - $source->exists = !!$source->timestamp; - } - - /** - * populate Source Object with timestamp and exists from Resource - * - * @param Smarty_Template_Source $source source object - * - * @return void - */ - public function populateTimestamp(Smarty_Template_Source $source) - { - $source->timestamp = $this->getTemplateTimestamp($source); - $source->exists = !!$source->timestamp; - } - - /** - * Get timestamp (epoch) the template source was modified - * - * @param Smarty_Template_Source $source source object - * - * @return integer|boolean timestamp (epoch) the template was modified, false if resources has no timestamp - */ - public function getTemplateTimestamp(Smarty_Template_Source $source) - { - // return timestamp - $time_stamp = false; - call_user_func_array( - $source->smarty->registered_resources[ $source->type ][ 0 ][ 1 ], - array($source->name, &$time_stamp, $source->smarty) - ); - return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp; - } - - /** - * Load template's source by invoking the registered callback into current template object - * - * @param Smarty_Template_Source $source source object - * - * @return string template source - * @throws SmartyException if source cannot be loaded - */ - public function getContent(Smarty_Template_Source $source) - { - // return template string - $content = null; - $t = call_user_func_array( - $source->smarty->registered_resources[ $source->type ][ 0 ][ 0 ], - array($source->name, &$content, $source->smarty) - ); - if (is_bool($t) && !$t) { - throw new SmartyException("Unable to read template {$source->type} '{$source->name}'"); - } - return $content; - } - - /** - * Determine basename for compiled filename - * - * @param Smarty_Template_Source $source source object - * - * @return string resource's basename - */ - public function getBasename(Smarty_Template_Source $source) - { - return basename($source->name); - } -} diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_stream.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_stream.php index 9956bd073..5f0203498 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_stream.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_resource_stream.php @@ -13,7 +13,7 @@ * Smarty Internal Plugin Resource Stream * Implements the streams as resource for Smarty template * - * @link http://php.net/streams + * @link https://php.net/streams * @package Smarty * @subpackage TemplateResources */ diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_runtime_codeframe.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_runtime_codeframe.php index 983ca6180..b5361c9bb 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_runtime_codeframe.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_runtime_codeframe.php @@ -45,7 +45,7 @@ public function create( $properties[ 'cache_lifetime' ] = $_template->cache_lifetime; } $output = "source->filepath) . "' */\n\n"; $output .= "/* @var Smarty_Internal_Template \$_smarty_tpl */\n"; $dec = "\$_smarty_tpl->_decodeProperties(\$_smarty_tpl, " . var_export($properties, true) . ',' . diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatebase.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatebase.php index 200c11bb5..2ffb896fa 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatebase.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatebase.php @@ -138,7 +138,7 @@ public function display($template = null, $cache_id = null, $compile_id = null, * test if cache is valid * * @api Smarty::isCached() - * @link http://www.smarty.net/docs/en/api.is.cached.tpl + * @link https://www.smarty.net/docs/en/api.is.cached.tpl * * @param null|string|\Smarty_Internal_Template $template the resource handle of the template file or template * object @@ -199,6 +199,12 @@ private function _execute($template, $cache_id, $compile_id, $parent, $function) try { $_smarty_old_error_level = isset($smarty->error_reporting) ? error_reporting($smarty->error_reporting) : null; + + if ($smarty->isMutingUndefinedOrNullWarnings()) { + $errorHandler = new Smarty_Internal_ErrorHandler(); + $errorHandler->activate(); + } + if ($this->_objType === 2) { /* @var Smarty_Internal_Template $this */ $template->tplFunctions = $this->tplFunctions; @@ -242,6 +248,11 @@ private function _execute($template, $cache_id, $compile_id, $parent, $function) } } } + + if (isset($errorHandler)) { + $errorHandler->deactivate(); + } + if (isset($_smarty_old_error_level)) { error_reporting($_smarty_old_error_level); } @@ -250,6 +261,10 @@ private function _execute($template, $cache_id, $compile_id, $parent, $function) while (ob_get_level() > $level) { ob_end_clean(); } + if (isset($errorHandler)) { + $errorHandler->deactivate(); + } + if (isset($_smarty_old_error_level)) { error_reporting($_smarty_old_error_level); } @@ -261,7 +276,7 @@ private function _execute($template, $cache_id, $compile_id, $parent, $function) * Registers plugin to be used in templates * * @api Smarty::registerPlugin() - * @link http://www.smarty.net/docs/en/api.register.plugin.tpl + * @link https://www.smarty.net/docs/en/api.register.plugin.tpl * * @param string $type plugin type * @param string $name name of template tag @@ -281,7 +296,7 @@ public function registerPlugin($type, $name, $callback, $cacheable = true, $cach * load a filter of specified type and name * * @api Smarty::loadFilter() - * @link http://www.smarty.net/docs/en/api.load.filter.tpl + * @link https://www.smarty.net/docs/en/api.load.filter.tpl * * @param string $type filter type * @param string $name filter name @@ -298,7 +313,7 @@ public function loadFilter($type, $name) * Registers a filter function * * @api Smarty::registerFilter() - * @link http://www.smarty.net/docs/en/api.register.filter.tpl + * @link https://www.smarty.net/docs/en/api.register.filter.tpl * * @param string $type filter type * @param callable $callback @@ -316,7 +331,7 @@ public function registerFilter($type, $callback, $name = null) * Registers object to be used in templates * * @api Smarty::registerObject() - * @link http://www.smarty.net/docs/en/api.register.object.tpl + * @link https://www.smarty.net/docs/en/api.register.object.tpl * * @param string $object_name * @param object $object the referenced PHP object to register diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php index 3cc957dec..272616148 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php @@ -203,13 +203,6 @@ abstract class Smarty_Internal_TemplateCompilerBase */ public $blockOrFunctionCode = ''; - /** - * php_handling setting either from Smarty or security - * - * @var int - */ - public $php_handling = 0; - /** * flags for used modifier plugins * @@ -438,11 +431,6 @@ public function compileTemplateSource( } $this->smarty->_debug->start_compile($this->template); } - if (isset($this->template->smarty->security_policy)) { - $this->php_handling = $this->template->smarty->security_policy->php_handling; - } else { - $this->php_handling = $this->template->smarty->php_handling; - } $this->parent_compiler = $parent_compiler ? $parent_compiler : $this; $nocache = isset($nocache) ? $nocache : false; if (empty($template->compiled->nocache_hash)) { @@ -627,11 +615,11 @@ public function compilePHPFunctionCall($name, $parameter) $this->trigger_template_error('Illegal number of parameter in "isset()"'); } - $pa = array(); - foreach ($parameter as $p) { - $pa[] = $this->syntaxMatchesVariable($p) ? 'isset(' . $p . ')' : '(' . $p . ' !== null )'; - } - return '(' . implode(' && ', $pa) . ')'; + $pa = array(); + foreach ($parameter as $p) { + $pa[] = $this->syntaxMatchesVariable($p) ? 'isset(' . $p . ')' : '(' . $p . ' !== null )'; + } + return '(' . implode(' && ', $pa) . ')'; } elseif (in_array( $func_name, @@ -649,12 +637,8 @@ public function compilePHPFunctionCall($name, $parameter) $this->trigger_template_error("Illegal number of parameter in '{$func_name()}'"); } if ($func_name === 'empty') { - if (!$this->syntaxMatchesVariable($parameter[0]) && version_compare(PHP_VERSION, '5.5.0', '<')) { - return '(' . $parameter[ 0 ] . ' === false )'; - } else { - return $func_name . '(' . - str_replace("')->value", "',null,true,false)->value", $parameter[ 0 ]) . ')'; - } + return $func_name . '(' . + str_replace("')->value", "',null,true,false)->value", $parameter[ 0 ]) . ')'; } else { return $func_name . '(' . $parameter[ 0 ] . ')'; } @@ -667,16 +651,16 @@ public function compilePHPFunctionCall($name, $parameter) } } - /** - * Determines whether the passed string represents a valid (PHP) variable. - * This is important, because `isset()` only works on variables and `empty()` can only be passed - * a variable prior to php5.5 - * @param $string - * @return bool - */ - private function syntaxMatchesVariable($string) { - static $regex_pattern = '/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*((->)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|\[.*]*\])*$/'; - return 1 === preg_match($regex_pattern, trim($string)); + /** + * Determines whether the passed string represents a valid (PHP) variable. + * This is important, because `isset()` only works on variables and `empty()` can only be passed + * a variable prior to php5.5 + * @param $string + * @return bool + */ + private function syntaxMatchesVariable($string) { + static $regex_pattern = '/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*((->)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|\[.*]*\])*$/'; + return 1 === preg_match($regex_pattern, trim($string)); } /** @@ -691,11 +675,11 @@ public function processText($text) { if (strpos($text, '<') === false) { - return preg_replace($this->stripRegEx, '', $text); + return preg_replace($this->stripRegEx, '', $text); } - $store = array(); - $_store = 0; + $store = array(); + $_store = 0; // capture html elements not to be messed with $_offset = 0; @@ -1151,7 +1135,7 @@ public function trigger_template_error($args = null, $line = null, $tagline = nu flush(); } $e = new SmartyCompilerException($error_text); - $e->line = $line; + $e->setLine($line); $e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[ $line - 1 ])); $e->desc = $args; $e->template = $this->template->source->filepath; diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatelexer.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatelexer.php index 867a31d26..5ca482058 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatelexer.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templatelexer.php @@ -18,12 +18,6 @@ */ class Smarty_Internal_Templatelexer { - const TEXT = 1; - const TAG = 2; - const TAGBODY = 3; - const LITERAL = 4; - const DOUBLEQUOTEDSTRING = 5; - /** * Source * @@ -80,7 +74,7 @@ class Smarty_Internal_Templatelexer */ public $phpType = ''; - /** + /** * state number * * @var int @@ -229,10 +223,6 @@ class Smarty_Internal_Templatelexer */ private $yy_global_literal = null; - private $_yy_state = 1; - - private $_yy_stack = array(); - /** * constructor * @@ -245,14 +235,14 @@ public function __construct($source, Smarty_Internal_TemplateCompilerBase $compi $this->dataLength = strlen($this->data); $this->counter = 0; if (preg_match('/^\xEF\xBB\xBF/i', $this->data, $match)) { - $this->counter += strlen($match[ 0 ]); + $this->counter += strlen($match[0]); } $this->line = 1; $this->smarty = $compiler->template->smarty; $this->compiler = $compiler; $this->compiler->initDelimiterPreg(); - $this->smarty_token_names[ 'LDEL' ] = $this->smarty->getLeftDelimiter(); - $this->smarty_token_names[ 'RDEL' ] = $this->smarty->getRightDelimiter(); + $this->smarty_token_names['LDEL'] = $this->smarty->getLeftDelimiter(); + $this->smarty_token_names['RDEL'] = $this->smarty->getRightDelimiter(); } /** @@ -265,17 +255,17 @@ public function PrintTrace() $this->yyTracePrompt = '
'; } - /** + /** * replace placeholders with runtime preg code * * @param string $preg * * @return string */ - public function replace($preg) - { + public function replace($preg) + { return $this->compiler->replaceDelimiter($preg); - } + } /** * check if current value is an autoliteral left delimiter @@ -286,7 +276,11 @@ public function isAutoLiteral() { return $this->smarty->getAutoLiteral() && isset($this->value[ $this->compiler->getLdelLength() ]) ? strpos(" \n\t\r", $this->value[ $this->compiler->getLdelLength() ]) !== false : false; - } // end function + } + + + private $_yy_state = 1; + private $_yy_stack = array(); public function yylex() { @@ -296,62 +290,60 @@ public function yylex() public function yypushstate($state) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state); } array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state); } } public function yypopstate() { - if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + if ($this->yyTraceFILE) { + fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state); } - $this->_yy_state = array_pop($this->_yy_stack); + $this->_yy_state = array_pop($this->_yy_stack); if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state); } + } public function yybegin($state) { - $this->_yy_state = $state; + $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state); } } + + public function yylex1() { if (!isset($this->yy_global_pattern1)) { - $this->yy_global_pattern1 = - $this->replace("/\G([{][}])|\G((SMARTYldel)SMARTYal[*])|\G((SMARTYldel)SMARTYalphp([ ].*?)?SMARTYrdel|(SMARTYldel)SMARTYal[\/]phpSMARTYrdel)|\G((SMARTYldel)SMARTYautoliteral\\s+SMARTYliteral)|\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal)|\G([<][?]((php\\s+|=)|\\s+)|[<][%]|[<][?]xml\\s+|[<]script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*[>]|[?][>]|[%][>])|\G([\S\s])/isS"); + $this->yy_global_pattern1 = $this->replace("/\G([{][}])|\G((SMARTYldel)SMARTYal[*])|\G((SMARTYldel)SMARTYautoliteral\\s+SMARTYliteral)|\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal)|\G([\S\s])/isS"); } if (!isset($this->dataLength)) { $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } + do { - if (preg_match($this->yy_global_pattern1, $this->data, $yymatches, 0, $this->counter)) { - if (!isset($yymatches[ 0 ][ 1 ])) { - $yymatches = preg_grep("/(.|\s)+/", $yymatches); + if (preg_match($this->yy_global_pattern1,$this->data, $yymatches, 0, $this->counter)) { + if (!isset($yymatches[ 0 ][1])) { + $yymatches = preg_grep("/(.|\s)+/", $yymatches); } else { $yymatches = array_filter($yymatches); } if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . - ' an empty string. Input "' . substr($this->data, - $this->counter, 5) . '... state TEXT'); + ' an empty string. Input "' . substr($this->data, + $this->counter, 5) . '... state TEXT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -369,110 +361,102 @@ public function yylex1() } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token continue; - } - } else { - throw new Exception('Unexpected input at line ' . $this->line . - ': ' . $this->data[ $this->counter ]); + } } else { + throw new Exception('Unexpected input at line' . $this->line . + ': ' . $this->data[$this->counter]); } break; } while (true); - } + } // end function + + + const TEXT = 1; public function yy_r1_1() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r1_2() { - $to = $this->dataLength; - preg_match("/[*]{$this->compiler->getRdelPreg()}[\n]?/", $this->data, $match, PREG_OFFSET_CAPTURE, - $this->counter); - if (isset($match[ 0 ][ 1 ])) { - $to = $match[ 0 ][ 1 ] + strlen($match[ 0 ][ 0 ]); + + $to = $this->dataLength; + preg_match("/[*]{$this->compiler->getRdelPreg()}[\n]?/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); + if (isset($match[0][1])) { + $to = $match[0][1] + strlen($match[0][0]); } else { - $this->compiler->trigger_template_error("missing or misspelled comment closing tag '{$this->smarty->getRightDelimiter()}'"); + $this->compiler->trigger_template_error ("missing or misspelled comment closing tag '{$this->smarty->getRightDelimiter()}'"); } - $this->value = substr($this->data, $this->counter, $to - $this->counter); + $this->value = substr($this->data,$this->counter,$to-$this->counter); return false; - } - + } public function yy_r1_4() { - $this->compiler->getTagCompiler('private_php')->parsePhp($this); - } - public function yy_r1_8() - { $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } - - public function yy_r1_10() + } + public function yy_r1_6() { + $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); - } - - public function yy_r1_12() + } + public function yy_r1_8() { + $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypushstate(self::LITERAL); - } // end function - - public function yy_r1_14() + } + public function yy_r1_10() { + $this->yypushstate(self::TAG); return true; - } - - public function yy_r1_16() + } + public function yy_r1_12() { - $this->compiler->getTagCompiler('private_php')->parsePhp($this); - } - public function yy_r1_19() - { - if (!isset($this->yy_global_text)) { - $this->yy_global_text = - $this->replace('/(SMARTYldel)SMARTYal|[<][?]((php\s+|=)|\s+)|[<][%]|[<][?]xml\s+|[<]script\s+language\s*=\s*["\']?\s*php\s*["\']?\s*[>]|[?][>]|[%][>]SMARTYliteral/isS'); - } - $to = $this->dataLength; - preg_match($this->yy_global_text, $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[ 0 ][ 1 ])) { - $to = $match[ 0 ][ 1 ]; - } - $this->value = substr($this->data, $this->counter, $to - $this->counter); - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + if (!isset($this->yy_global_text)) { + $this->yy_global_text = $this->replace('/(SMARTYldel)SMARTYal/isS'); + } + $to = $this->dataLength; + preg_match($this->yy_global_text, $this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); + if (isset($match[0][1])) { + $to = $match[0][1]; + } + $this->value = substr($this->data,$this->counter,$to-$this->counter); + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } + public function yylex2() { if (!isset($this->yy_global_pattern2)) { - $this->yy_global_pattern2 = - $this->replace("/\G((SMARTYldel)SMARTYal(if|elseif|else if|while)\\s+)|\G((SMARTYldel)SMARTYalfor\\s+)|\G((SMARTYldel)SMARTYalforeach(?![^\s]))|\G((SMARTYldel)SMARTYalsetfilter\\s+)|\G((SMARTYldel)SMARTYalmake_nocache\\s+)|\G((SMARTYldel)SMARTYal[0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[$]smarty\\.block\\.(child|parent)\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/][0-9]*[a-zA-Z_]\\w*\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[$][0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/])|\G((SMARTYldel)SMARTYal)/isS"); + $this->yy_global_pattern2 = $this->replace("/\G((SMARTYldel)SMARTYal(if|elseif|else if|while)\\s+)|\G((SMARTYldel)SMARTYalfor\\s+)|\G((SMARTYldel)SMARTYalforeach(?![^\s]))|\G((SMARTYldel)SMARTYalsetfilter\\s+)|\G((SMARTYldel)SMARTYalmake_nocache\\s+)|\G((SMARTYldel)SMARTYal[0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[$]smarty\\.block\\.(child|parent)\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/][0-9]*[a-zA-Z_]\\w*\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[$][0-9]*[a-zA-Z_]\\w*(\\s+nocache)?\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/])|\G((SMARTYldel)SMARTYal)/isS"); } if (!isset($this->dataLength)) { $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } + do { - if (preg_match($this->yy_global_pattern2, $this->data, $yymatches, 0, $this->counter)) { - if (!isset($yymatches[ 0 ][ 1 ])) { - $yymatches = preg_grep("/(.|\s)+/", $yymatches); + if (preg_match($this->yy_global_pattern2,$this->data, $yymatches, 0, $this->counter)) { + if (!isset($yymatches[ 0 ][1])) { + $yymatches = preg_grep("/(.|\s)+/", $yymatches); } else { $yymatches = array_filter($yymatches); } if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . - ' an empty string. Input "' . substr($this->data, - $this->counter, 5) . '... state TAG'); + ' an empty string. Input "' . substr($this->data, + $this->counter, 5) . '... state TAG'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -490,79 +474,82 @@ public function yylex2() } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token continue; - } - } else { - throw new Exception('Unexpected input at line ' . $this->line . - ': ' . $this->data[ $this->counter ]); + } } else { + throw new Exception('Unexpected input at line' . $this->line . + ': ' . $this->data[$this->counter]); } break; } while (true); - } + } // end function + + + const TAG = 2; public function yy_r2_1() { + $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_4() { + $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_6() { + $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_8() { + $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_10() { + $this->token = Smarty_Internal_Templateparser::TP_LDELMAKENOCACHE; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_12() { + $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_SIMPLETAG; $this->taglineno = $this->line; - } - + } public function yy_r2_15() { - $this->yypopstate(); - $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT; - $this->taglineno = $this->line; - } + $this->yypopstate(); + $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT; + $this->taglineno = $this->line; + } public function yy_r2_18() { + $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_CLOSETAG; $this->taglineno = $this->line; - } - + } public function yy_r2_20() { - if ($this->_yy_stack[ count($this->_yy_stack) - 1 ] === self::TEXT) { + + if ($this->_yy_stack[count($this->_yy_stack)-1] === self::TEXT) { $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_SIMPELOUTPUT; $this->taglineno = $this->line; @@ -572,45 +559,46 @@ public function yy_r2_20() $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - } // end function - + } public function yy_r2_23() { + $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r2_25() { + $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; - } + } + public function yylex3() { if (!isset($this->yy_global_pattern3)) { - $this->yy_global_pattern3 = - $this->replace("/\G(\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*([!=][=]{1,2}|[<][=>]?|[>][=]?|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor)\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even|div)\\s+by\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G([!]\\s*|not\\s+)|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G(array\\s*[(]\\s*)|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|][@]?)|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS"); + $this->yy_global_pattern3 = $this->replace("/\G(\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*([!=][=]{1,2}|[<][=>]?|[>][=]?|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor)\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even|div)\\s+by\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G([!]\\s*|not\\s+)|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G(array\\s*[(]\\s*)|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|][@]?)|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS"); } if (!isset($this->dataLength)) { $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } + do { - if (preg_match($this->yy_global_pattern3, $this->data, $yymatches, 0, $this->counter)) { - if (!isset($yymatches[ 0 ][ 1 ])) { - $yymatches = preg_grep("/(.|\s)+/", $yymatches); + if (preg_match($this->yy_global_pattern3,$this->data, $yymatches, 0, $this->counter)) { + if (!isset($yymatches[ 0 ][1])) { + $yymatches = preg_grep("/(.|\s)+/", $yymatches); } else { $yymatches = array_filter($yymatches); } if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . - ' an empty string. Input "' . substr($this->data, - $this->counter, 5) . '... state TAGBODY'); + ' an empty string. Input "' . substr($this->data, + $this->counter, 5) . '... state TAGBODY'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -628,281 +616,285 @@ public function yylex3() } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token continue; - } - } else { - throw new Exception('Unexpected input at line ' . $this->line . - ': ' . $this->data[ $this->counter ]); + } } else { + throw new Exception('Unexpected input at line' . $this->line . + ': ' . $this->data[$this->counter]); } break; } while (true); - } + } // end function + + + const TAGBODY = 3; public function yy_r3_1() { + $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); - } - + } public function yy_r3_2() { + $this->yypushstate(self::TAG); return true; - } - + } public function yy_r3_4() { + $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); $this->compiler->enterDoubleQuote(); - } - + } public function yy_r3_5() { - $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; - } + $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; + } public function yy_r3_6() { - $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; - } + $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; + } public function yy_r3_7() { - $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; - } + $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; + } public function yy_r3_8() { - $this->token = Smarty_Internal_Templateparser::TP_ISIN; - } + $this->token = Smarty_Internal_Templateparser::TP_ISIN; + } public function yy_r3_9() { - $this->token = Smarty_Internal_Templateparser::TP_AS; - } + $this->token = Smarty_Internal_Templateparser::TP_AS; + } public function yy_r3_10() { - $this->token = Smarty_Internal_Templateparser::TP_TO; - } + $this->token = Smarty_Internal_Templateparser::TP_TO; + } public function yy_r3_11() { - $this->token = Smarty_Internal_Templateparser::TP_STEP; - } + $this->token = Smarty_Internal_Templateparser::TP_STEP; + } public function yy_r3_12() { - $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; - } + $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; + } public function yy_r3_13() { - $this->token = Smarty_Internal_Templateparser::TP_LOGOP; - } + $this->token = Smarty_Internal_Templateparser::TP_LOGOP; + } public function yy_r3_15() { - $this->token = Smarty_Internal_Templateparser::TP_SLOGOP; - } + $this->token = Smarty_Internal_Templateparser::TP_SLOGOP; + } public function yy_r3_17() { - $this->token = Smarty_Internal_Templateparser::TP_TLOGOP; - } + $this->token = Smarty_Internal_Templateparser::TP_TLOGOP; + } public function yy_r3_20() { - $this->token = Smarty_Internal_Templateparser::TP_SINGLECOND; - } + $this->token = Smarty_Internal_Templateparser::TP_SINGLECOND; + } public function yy_r3_23() { - $this->token = Smarty_Internal_Templateparser::TP_NOT; - } + $this->token = Smarty_Internal_Templateparser::TP_NOT; + } public function yy_r3_24() { - $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; - } + $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; + } public function yy_r3_28() { - $this->token = Smarty_Internal_Templateparser::TP_OPENP; - } + $this->token = Smarty_Internal_Templateparser::TP_OPENP; + } public function yy_r3_29() { - $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; - } + $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; + } public function yy_r3_30() { - $this->token = Smarty_Internal_Templateparser::TP_OPENB; - } + $this->token = Smarty_Internal_Templateparser::TP_OPENB; + } public function yy_r3_31() { - $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; - } + $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; + } public function yy_r3_32() { - $this->token = Smarty_Internal_Templateparser::TP_PTR; - } + $this->token = Smarty_Internal_Templateparser::TP_PTR; + } public function yy_r3_33() { - $this->token = Smarty_Internal_Templateparser::TP_APTR; - } + $this->token = Smarty_Internal_Templateparser::TP_APTR; + } public function yy_r3_34() { - $this->token = Smarty_Internal_Templateparser::TP_EQUAL; - } + $this->token = Smarty_Internal_Templateparser::TP_EQUAL; + } public function yy_r3_35() { - $this->token = Smarty_Internal_Templateparser::TP_INCDEC; - } + $this->token = Smarty_Internal_Templateparser::TP_INCDEC; + } public function yy_r3_37() { - $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; - } + $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; + } public function yy_r3_39() { - $this->token = Smarty_Internal_Templateparser::TP_MATH; - } + $this->token = Smarty_Internal_Templateparser::TP_MATH; + } public function yy_r3_41() { - $this->token = Smarty_Internal_Templateparser::TP_AT; - } + $this->token = Smarty_Internal_Templateparser::TP_AT; + } public function yy_r3_42() { - $this->token = Smarty_Internal_Templateparser::TP_ARRAYOPEN; - } + $this->token = Smarty_Internal_Templateparser::TP_ARRAYOPEN; + } public function yy_r3_43() { - $this->token = Smarty_Internal_Templateparser::TP_HATCH; - } + $this->token = Smarty_Internal_Templateparser::TP_HATCH; + } public function yy_r3_44() { + // resolve conflicts with shorttag and right_delimiter starting with '=' - if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->compiler->getRdelLength()) === - $this->smarty->getRightDelimiter()) { - preg_match('/\s+/', $this->value, $match); - $this->value = $match[ 0 ]; + if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->compiler->getRdelLength()) === $this->smarty->getRightDelimiter()) { + preg_match('/\s+/',$this->value,$match); + $this->value = $match[0]; $this->token = Smarty_Internal_Templateparser::TP_SPACE; } else { $this->token = Smarty_Internal_Templateparser::TP_ATTR; } - } - + } public function yy_r3_45() { - $this->token = Smarty_Internal_Templateparser::TP_NAMESPACE; - } + $this->token = Smarty_Internal_Templateparser::TP_NAMESPACE; + } public function yy_r3_48() { - $this->token = Smarty_Internal_Templateparser::TP_ID; - } + $this->token = Smarty_Internal_Templateparser::TP_ID; + } public function yy_r3_49() { - $this->token = Smarty_Internal_Templateparser::TP_INTEGER; - } + $this->token = Smarty_Internal_Templateparser::TP_INTEGER; + } public function yy_r3_50() { + $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); - } - + } public function yy_r3_51() { - $this->token = Smarty_Internal_Templateparser::TP_VERT; - } + $this->token = Smarty_Internal_Templateparser::TP_VERT; + } public function yy_r3_52() { - $this->token = Smarty_Internal_Templateparser::TP_DOT; - } + $this->token = Smarty_Internal_Templateparser::TP_DOT; + } public function yy_r3_53() { - $this->token = Smarty_Internal_Templateparser::TP_COMMA; - } + $this->token = Smarty_Internal_Templateparser::TP_COMMA; + } public function yy_r3_54() { - $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; - } + $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; + } public function yy_r3_55() { - $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; - } + $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; + } public function yy_r3_56() { - $this->token = Smarty_Internal_Templateparser::TP_COLON; - } + $this->token = Smarty_Internal_Templateparser::TP_COLON; + } public function yy_r3_57() { - $this->token = Smarty_Internal_Templateparser::TP_QMARK; - } + $this->token = Smarty_Internal_Templateparser::TP_QMARK; + } public function yy_r3_58() { - $this->token = Smarty_Internal_Templateparser::TP_HEX; - } + $this->token = Smarty_Internal_Templateparser::TP_HEX; + } public function yy_r3_59() { - $this->token = Smarty_Internal_Templateparser::TP_SPACE; - } // end function + $this->token = Smarty_Internal_Templateparser::TP_SPACE; + } public function yy_r3_60() { + $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + } + + public function yylex4() { if (!isset($this->yy_global_pattern4)) { - $this->yy_global_pattern4 = - $this->replace("/\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G([\S\s])/isS"); + $this->yy_global_pattern4 = $this->replace("/\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G([\S\s])/isS"); } if (!isset($this->dataLength)) { $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } + do { - if (preg_match($this->yy_global_pattern4, $this->data, $yymatches, 0, $this->counter)) { - if (!isset($yymatches[ 0 ][ 1 ])) { - $yymatches = preg_grep("/(.|\s)+/", $yymatches); + if (preg_match($this->yy_global_pattern4,$this->data, $yymatches, 0, $this->counter)) { + if (!isset($yymatches[ 0 ][1])) { + $yymatches = preg_grep("/(.|\s)+/", $yymatches); } else { $yymatches = array_filter($yymatches); } if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . - ' an empty string. Input "' . substr($this->data, - $this->counter, 5) . '... state LITERAL'); + ' an empty string. Input "' . substr($this->data, + $this->counter, 5) . '... state LITERAL'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -920,76 +912,80 @@ public function yylex4() } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token continue; - } - } else { - throw new Exception('Unexpected input at line ' . $this->line . - ': ' . $this->data[ $this->counter ]); + } } else { + throw new Exception('Unexpected input at line' . $this->line . + ': ' . $this->data[$this->counter]); } break; } while (true); - } + } // end function + + + const LITERAL = 4; public function yy_r4_1() { + $this->literal_cnt++; $this->token = Smarty_Internal_Templateparser::TP_LITERAL; - } - + } public function yy_r4_3() { + if ($this->literal_cnt) { - $this->literal_cnt--; + $this->literal_cnt--; $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } else { $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypopstate(); } - } - + } public function yy_r4_5() { - if (!isset($this->yy_global_literal)) { - $this->yy_global_literal = $this->replace('/(SMARTYldel)SMARTYal[\/]?literalSMARTYrdel/isS'); - } - $to = $this->dataLength; - preg_match($this->yy_global_literal, $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[ 0 ][ 1 ])) { - $to = $match[ 0 ][ 1 ]; - } else { - $this->compiler->trigger_template_error("missing or misspelled literal closing tag"); - } - $this->value = substr($this->data, $this->counter, $to - $this->counter); - $this->token = Smarty_Internal_Templateparser::TP_LITERAL; - } // end function + if (!isset($this->yy_global_literal)) { + $this->yy_global_literal = $this->replace('/(SMARTYldel)SMARTYal[\/]?literalSMARTYrdel/isS'); + } + $to = $this->dataLength; + preg_match($this->yy_global_literal, $this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); + if (isset($match[0][1])) { + $to = $match[0][1]; + } else { + $this->compiler->trigger_template_error ("missing or misspelled literal closing tag"); + } + $this->value = substr($this->data,$this->counter,$to-$this->counter); + $this->token = Smarty_Internal_Templateparser::TP_LITERAL; + } + + public function yylex5() { if (!isset($this->yy_global_pattern5)) { - $this->yy_global_pattern5 = - $this->replace("/\G((SMARTYldel)SMARTYautoliteral\\s+SMARTYliteral)|\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/])|\G((SMARTYldel)SMARTYal[0-9]*[a-zA-Z_]\\w*)|\G((SMARTYldel)SMARTYal)|\G([\"])|\G([`][$])|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=((SMARTYldel)SMARTYal|\\$|`\\$|\"SMARTYliteral)))|\G([\S\s])/isS"); + $this->yy_global_pattern5 = $this->replace("/\G((SMARTYldel)SMARTYautoliteral\\s+SMARTYliteral)|\G((SMARTYldel)SMARTYalliteral\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/]literal\\s*SMARTYrdel)|\G((SMARTYldel)SMARTYal[\/])|\G((SMARTYldel)SMARTYal[0-9]*[a-zA-Z_]\\w*)|\G((SMARTYldel)SMARTYal)|\G([\"])|\G([`][$])|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=((SMARTYldel)SMARTYal|\\$|`\\$|\"SMARTYliteral)))|\G([\S\s])/isS"); } if (!isset($this->dataLength)) { $this->dataLength = strlen($this->data); } - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } + do { - if (preg_match($this->yy_global_pattern5, $this->data, $yymatches, 0, $this->counter)) { - if (!isset($yymatches[ 0 ][ 1 ])) { - $yymatches = preg_grep("/(.|\s)+/", $yymatches); + if (preg_match($this->yy_global_pattern5,$this->data, $yymatches, 0, $this->counter)) { + if (!isset($yymatches[ 0 ][1])) { + $yymatches = preg_grep("/(.|\s)+/", $yymatches); } else { $yymatches = array_filter($yymatches); } if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . - ' an empty string. Input "' . substr($this->data, - $this->counter, 5) . '... state DOUBLEQUOTEDSTRING'); + ' an empty string. Input "' . substr($this->data, + $this->counter, 5) . '... state DOUBLEQUOTEDSTRING'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -1007,89 +1003,93 @@ public function yylex5() } elseif ($r === false) { $this->counter += strlen($this->value); $this->line += substr_count($this->value, "\n"); - if ($this->counter >= $this->dataLength) { + if ($this->counter >= $this->dataLength) { return false; // end of input } // skip this token continue; - } - } else { - throw new Exception('Unexpected input at line ' . $this->line . - ': ' . $this->data[ $this->counter ]); + } } else { + throw new Exception('Unexpected input at line' . $this->line . + ': ' . $this->data[$this->counter]); } break; } while (true); - } + } // end function + + + const DOUBLEQUOTEDSTRING = 5; public function yy_r5_1() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r5_3() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r5_5() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r5_7() { + $this->yypushstate(self::TAG); return true; - } - + } public function yy_r5_9() { + $this->yypushstate(self::TAG); return true; - } - + } public function yy_r5_11() { + $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->taglineno = $this->line; $this->yypushstate(self::TAGBODY); - } - + } public function yy_r5_13() { + $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypopstate(); - } - + } public function yy_r5_14() { + $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; - $this->value = substr($this->value, 0, -1); + $this->value = substr($this->value,0,-1); $this->yypushstate(self::TAGBODY); $this->taglineno = $this->line; - } - + } public function yy_r5_15() { - $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; - } + $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; + } public function yy_r5_16() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r5_17() { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } public function yy_r5_22() { + $to = $this->dataLength; - $this->value = substr($this->data, $this->counter, $to - $this->counter); + $this->value = substr($this->data,$this->counter,$to-$this->counter); $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } -} + } - + } + + \ No newline at end of file diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templateparser.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templateparser.php index aaeae63b7..a2dd0d6fb 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_templateparser.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_templateparser.php @@ -7,1598 +7,25 @@ class TP_yyStackEntry ** number for the token at this stack level */ public $minor; /* The user-supplied minor token value. This ** is the value of the token */ -} +}; + // line 11 "../smarty/lexer/smarty_internal_templateparser.y" /** - * Smarty Template Parser Class - * - * This is the template parser. - * It is generated from the smarty_internal_templateparser.y file - * - * @author Uwe Tews - */ +* Smarty Template Parser Class +* +* This is the template parser. +* It is generated from the smarty_internal_templateparser.y file +* +* @author Uwe Tews +*/ class Smarty_Internal_Templateparser { - // line 23 "../smarty/lexer/smarty_internal_templateparser.y" - const ERR1 = 'Security error: Call to private object member not allowed'; - const ERR2 = 'Security error: Call to dynamic object member not allowed'; - const ERR3 = 'PHP in template not allowed. Use SmartyBC to enable it'; - const TP_VERT = 1; - const TP_COLON = 2; - const TP_PHP = 3; - const TP_TEXT = 4; - const TP_STRIPON = 5; - const TP_STRIPOFF = 6; - const TP_LITERALSTART = 7; - const TP_LITERALEND = 8; - const TP_LITERAL = 9; - const TP_SIMPELOUTPUT = 10; - const TP_SIMPLETAG = 11; - const TP_SMARTYBLOCKCHILDPARENT = 12; - const TP_LDEL = 13; - const TP_RDEL = 14; - const TP_DOLLARID = 15; - const TP_EQUAL = 16; - const TP_ID = 17; - const TP_PTR = 18; - const TP_LDELMAKENOCACHE = 19; - const TP_LDELIF = 20; - const TP_LDELFOR = 21; - const TP_SEMICOLON = 22; - const TP_INCDEC = 23; - const TP_TO = 24; - const TP_STEP = 25; - const TP_LDELFOREACH = 26; - const TP_SPACE = 27; - const TP_AS = 28; - const TP_APTR = 29; - const TP_LDELSETFILTER = 30; - const TP_CLOSETAG = 31; - const TP_LDELSLASH = 32; - const TP_ATTR = 33; - const TP_INTEGER = 34; - const TP_COMMA = 35; - const TP_OPENP = 36; - const TP_CLOSEP = 37; - const TP_MATH = 38; - const TP_UNIMATH = 39; - const TP_ISIN = 40; - const TP_QMARK = 41; - const TP_NOT = 42; - const TP_TYPECAST = 43; - const TP_HEX = 44; - const TP_DOT = 45; - const TP_INSTANCEOF = 46; - const TP_SINGLEQUOTESTRING = 47; - const TP_DOUBLECOLON = 48; - const TP_NAMESPACE = 49; - const TP_AT = 50; - const TP_HATCH = 51; - const TP_OPENB = 52; - const TP_CLOSEB = 53; - const TP_DOLLAR = 54; - const TP_LOGOP = 55; - const TP_SLOGOP = 56; - const TP_TLOGOP = 57; - const TP_SINGLECOND = 58; - const TP_ARRAYOPEN = 59; - const TP_QUOTE = 60; - const TP_BACKTICK = 61; - const YY_NO_ACTION = 516; - const YY_ACCEPT_ACTION = 515; - const YY_ERROR_ACTION = 514; - const YY_SZ_ACTTAB = 2071; - const YY_SHIFT_USE_DFLT = -31; - const YY_SHIFT_MAX = 230; - const YY_REDUCE_USE_DFLT = -91; - const YY_REDUCE_MAX = 178; - const YYNOCODE = 110; - const YYSTACKDEPTH = 500; - const YYNSTATE = 327; - const YYNRULE = 187; - const YYERRORSYMBOL = 62; - const YYERRSYMDT = 'yy0'; - const YYFALLBACK = 0; - - public static $yy_action = array( - 251, 234, 237, 1, 144, 127, 428, 184, 199, 212, - 10, 54, 19, 175, 282, 215, 109, 389, 428, 428, - 224, 321, 223, 303, 203, 389, 13, 389, 281, 43, - 389, 428, 41, 40, 266, 225, 389, 213, 389, 194, - 389, 52, 4, 308, 301, 383, 34, 209, 222, 3, - 50, 153, 251, 234, 237, 1, 199, 131, 383, 198, - 305, 212, 10, 54, 383, 16, 199, 428, 109, 385, - 132, 18, 224, 321, 223, 222, 221, 12, 32, 428, - 116, 43, 385, 262, 41, 40, 266, 225, 385, 233, - 95, 194, 16, 52, 4, 131, 301, 252, 18, 265, - 164, 3, 50, 324, 251, 234, 237, 1, 23, 130, - 229, 198, 150, 212, 10, 54, 326, 11, 170, 284, - 109, 42, 22, 239, 224, 321, 223, 193, 221, 261, - 13, 52, 157, 43, 301, 286, 41, 40, 266, 225, - 205, 233, 5, 194, 96, 52, 4, 263, 301, 301, - 99, 349, 96, 3, 50, 199, 251, 234, 237, 1, - 238, 130, 241, 181, 349, 212, 10, 54, 382, 240, - 349, 36, 109, 185, 104, 256, 224, 321, 223, 132, - 191, 382, 13, 49, 91, 43, 12, 382, 41, 40, - 266, 225, 257, 233, 152, 194, 457, 52, 4, 457, - 301, 301, 228, 457, 282, 3, 50, 285, 251, 234, - 237, 1, 301, 131, 441, 198, 238, 212, 10, 54, - 349, 441, 325, 175, 109, 30, 349, 273, 224, 321, - 223, 20, 221, 295, 32, 211, 457, 39, 166, 49, - 41, 40, 266, 225, 87, 233, 205, 194, 279, 52, - 4, 24, 301, 204, 200, 280, 99, 3, 50, 199, - 251, 234, 237, 1, 31, 130, 96, 198, 205, 212, - 10, 54, 350, 55, 293, 207, 109, 283, 99, 96, - 224, 321, 223, 199, 180, 350, 13, 134, 230, 43, - 222, 350, 41, 40, 266, 225, 104, 233, 316, 194, - 279, 52, 4, 24, 301, 165, 284, 280, 85, 3, - 50, 25, 251, 234, 237, 1, 131, 129, 210, 198, - 14, 212, 10, 54, 269, 270, 301, 116, 109, 295, - 216, 211, 224, 321, 223, 171, 221, 95, 13, 28, - 219, 43, 323, 9, 41, 40, 266, 225, 151, 233, - 324, 194, 52, 52, 4, 301, 301, 30, 282, 302, - 178, 3, 50, 7, 251, 234, 237, 1, 136, 130, - 304, 179, 238, 212, 10, 54, 279, 175, 282, 24, - 109, 238, 429, 280, 224, 321, 223, 177, 221, 270, - 13, 255, 281, 43, 429, 49, 41, 40, 266, 225, - 275, 233, 318, 194, 49, 52, 4, 276, 301, 163, - 26, 199, 8, 3, 50, 119, 251, 234, 237, 1, - 11, 93, 291, 51, 107, 212, 10, 54, 226, 428, - 206, 201, 109, 148, 178, 322, 224, 321, 223, 441, - 221, 428, 13, 282, 9, 43, 441, 115, 41, 40, - 266, 225, 167, 233, 227, 194, 457, 52, 4, 457, - 301, 96, 158, 457, 101, 3, 50, 271, 251, 234, - 237, 1, 282, 130, 235, 186, 135, 212, 10, 54, - 199, 37, 119, 315, 109, 165, 284, 176, 224, 321, - 223, 104, 221, 149, 13, 281, 146, 43, 281, 300, - 41, 40, 266, 225, 30, 233, 289, 194, 21, 52, - 4, 272, 301, 211, 18, 301, 161, 3, 50, 110, - 251, 234, 237, 1, 137, 128, 282, 198, 268, 212, - 10, 54, 222, 169, 515, 92, 109, 172, 284, 31, - 224, 321, 223, 29, 221, 238, 6, 260, 53, 43, - 232, 139, 41, 40, 266, 225, 154, 233, 178, 194, - 168, 52, 4, 214, 301, 145, 99, 33, 49, 3, - 50, 245, 208, 211, 320, 282, 90, 111, 311, 183, - 98, 70, 309, 297, 236, 178, 95, 319, 142, 258, - 247, 267, 249, 264, 250, 195, 231, 199, 246, 324, - 317, 253, 254, 259, 126, 137, 133, 251, 234, 237, - 1, 326, 290, 105, 143, 156, 212, 10, 54, 88, - 84, 83, 484, 109, 322, 282, 37, 224, 321, 223, - 245, 208, 211, 320, 281, 90, 111, 298, 182, 98, - 56, 245, 298, 211, 178, 95, 103, 147, 258, 197, - 102, 75, 141, 250, 195, 231, 95, 246, 324, 258, - 279, 242, 89, 24, 250, 195, 231, 280, 246, 324, - 298, 298, 298, 298, 298, 298, 298, 16, 298, 192, - 277, 298, 298, 18, 294, 44, 45, 38, 298, 298, - 251, 234, 237, 2, 298, 296, 298, 298, 298, 212, - 10, 54, 310, 312, 313, 314, 109, 162, 298, 298, - 224, 321, 223, 298, 298, 298, 294, 282, 298, 42, - 22, 239, 251, 234, 237, 2, 298, 296, 298, 298, - 298, 212, 10, 54, 298, 159, 298, 298, 109, 298, - 298, 17, 224, 321, 223, 282, 298, 42, 22, 239, - 298, 298, 245, 298, 211, 278, 298, 103, 111, 298, - 183, 98, 70, 298, 298, 298, 298, 95, 298, 298, - 258, 298, 292, 17, 298, 250, 195, 231, 279, 246, - 324, 24, 298, 395, 245, 280, 211, 298, 298, 103, - 298, 298, 197, 102, 75, 16, 298, 140, 298, 95, - 298, 18, 258, 298, 298, 298, 298, 250, 195, 231, - 298, 246, 324, 298, 298, 298, 298, 428, 298, 395, - 395, 395, 202, 277, 298, 245, 298, 211, 298, 428, - 103, 298, 298, 197, 120, 69, 395, 395, 395, 395, - 95, 298, 298, 258, 298, 298, 298, 160, 250, 195, - 231, 86, 246, 324, 245, 16, 211, 282, 298, 103, - 196, 18, 197, 120, 69, 298, 44, 45, 38, 95, - 298, 298, 258, 298, 298, 298, 178, 250, 195, 231, - 298, 246, 324, 310, 312, 313, 314, 298, 298, 190, - 245, 298, 211, 298, 298, 103, 298, 298, 197, 102, - 75, 298, 298, 298, 298, 95, 298, 298, 258, 298, - 298, 298, 298, 250, 195, 231, 298, 246, 324, 298, - 298, 298, 245, 298, 211, 298, 199, 100, 298, 288, - 197, 120, 47, 298, 106, 298, 298, 95, 298, 353, - 258, 155, 298, 218, 298, 250, 195, 231, 298, 246, - 324, 282, 16, 42, 22, 239, 298, 245, 18, 211, - 298, 428, 103, 298, 298, 197, 120, 69, 298, 298, - 298, 298, 95, 428, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 100, 189, 298, 197, 120, 59, 245, 207, 211, - 298, 95, 103, 298, 258, 197, 120, 81, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 80, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 67, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 57, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 58, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 82, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 97, 76, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 71, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 187, 120, 61, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 63, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 94, 79, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 59, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 77, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 188, 108, 64, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 65, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 97, 66, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 68, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 62, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 60, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 74, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 72, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 48, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 120, 46, 298, 298, - 298, 298, 95, 298, 298, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 120, 78, 245, 298, 211, - 298, 95, 103, 298, 258, 197, 120, 73, 298, 250, - 195, 231, 95, 246, 324, 258, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 125, 298, 298, 298, - 298, 298, 95, 298, 298, 298, 298, 298, 298, 244, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 114, 298, 245, 298, 211, - 298, 95, 103, 298, 298, 197, 122, 298, 243, 250, - 195, 231, 95, 246, 324, 298, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 117, 298, 298, 298, - 298, 298, 95, 298, 298, 298, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 121, 298, 245, 298, 211, - 298, 95, 103, 298, 298, 197, 124, 298, 298, 250, - 195, 231, 95, 246, 324, 298, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 298, 245, 298, 211, - 298, 298, 103, 298, 298, 197, 118, 298, 298, 298, - 298, 298, 95, 298, 298, 298, 298, 298, 298, 298, - 250, 195, 231, 298, 246, 324, 245, 298, 211, 298, - 298, 103, 298, 298, 197, 123, 298, 245, 298, 211, - 298, 95, 103, 298, 298, 197, 113, 298, 298, 250, - 195, 231, 95, 246, 324, 298, 298, 298, 298, 298, - 250, 195, 231, 220, 246, 324, 298, 27, 298, 16, - 298, 457, 298, 298, 457, 18, 298, 26, 457, 441, - 44, 45, 38, 217, 44, 45, 38, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 310, 312, 313, - 314, 310, 312, 313, 314, 298, 441, 298, 298, 441, - 298, 457, 220, 441, 457, 298, 298, 457, 298, 298, - 457, 457, 441, 457, 298, 298, 220, 457, 441, 298, - 298, 298, 298, 298, 457, 298, 298, 457, 298, 298, - 5, 457, 441, 298, 298, 298, 298, 298, 298, 441, - 298, 298, 441, 298, 457, 441, 441, 298, 441, 298, - 457, 298, 441, 306, 298, 298, 298, 298, 298, 441, - 298, 298, 441, 298, 457, 220, 441, 298, 298, 298, - 298, 298, 298, 457, 298, 298, 457, 298, 298, 15, - 457, 441, 35, 274, 44, 45, 38, 457, 298, 298, - 457, 298, 298, 298, 457, 441, 298, 298, 298, 298, - 298, 310, 312, 313, 314, 298, 298, 298, 441, 298, - 298, 441, 298, 457, 298, 441, 287, 298, 44, 45, - 38, 298, 441, 298, 298, 441, 298, 457, 298, 441, - 248, 298, 298, 298, 298, 310, 312, 313, 314, 298, - 44, 45, 38, 298, 298, 112, 298, 44, 45, 38, - 298, 173, 298, 298, 44, 45, 38, 310, 312, 313, - 314, 44, 45, 38, 310, 312, 313, 314, 298, 298, - 299, 310, 312, 313, 314, 44, 45, 38, 310, 312, - 313, 314, 174, 298, 298, 298, 138, 298, 298, 298, - 298, 298, 310, 312, 313, 314, 44, 45, 38, 298, - 298, 298, 44, 45, 38, 298, 44, 45, 38, 298, - 44, 45, 38, 310, 312, 313, 314, 307, 298, 310, - 312, 313, 314, 310, 312, 313, 314, 310, 312, 313, - 314, - ); - - public static $yy_lookahead = array( - 10, 11, 12, 13, 74, 15, 36, 17, 1, 19, - 20, 21, 29, 103, 84, 45, 26, 14, 48, 36, - 30, 31, 32, 53, 34, 22, 36, 24, 98, 39, - 27, 48, 42, 43, 44, 45, 33, 47, 35, 49, - 37, 51, 52, 53, 54, 14, 16, 16, 45, 59, - 60, 96, 10, 11, 12, 13, 1, 15, 27, 17, - 53, 19, 20, 21, 33, 27, 1, 36, 26, 14, - 45, 33, 30, 31, 32, 45, 34, 52, 36, 48, - 72, 39, 27, 75, 42, 43, 44, 45, 33, 47, - 82, 49, 27, 51, 52, 15, 54, 17, 33, 91, - 83, 59, 60, 95, 10, 11, 12, 13, 13, 15, - 15, 17, 17, 19, 20, 21, 97, 35, 99, 100, - 26, 86, 87, 88, 30, 31, 32, 66, 34, 49, - 36, 51, 96, 39, 54, 53, 42, 43, 44, 45, - 72, 47, 16, 49, 18, 51, 52, 79, 54, 54, - 82, 14, 18, 59, 60, 1, 10, 11, 12, 13, - 23, 15, 15, 17, 27, 19, 20, 21, 14, 17, - 33, 13, 26, 15, 48, 17, 30, 31, 32, 45, - 34, 27, 36, 46, 83, 39, 52, 33, 42, 43, - 44, 45, 34, 47, 74, 49, 10, 51, 52, 13, - 54, 54, 50, 17, 84, 59, 60, 14, 10, 11, - 12, 13, 54, 15, 45, 17, 23, 19, 20, 21, - 27, 52, 100, 103, 26, 35, 33, 37, 30, 31, - 32, 22, 34, 67, 36, 69, 50, 39, 83, 46, - 42, 43, 44, 45, 35, 47, 72, 49, 10, 51, - 52, 13, 54, 79, 80, 17, 82, 59, 60, 1, - 10, 11, 12, 13, 16, 15, 18, 17, 72, 19, - 20, 21, 14, 107, 108, 79, 26, 71, 82, 18, - 30, 31, 32, 1, 34, 27, 36, 15, 50, 39, - 45, 33, 42, 43, 44, 45, 48, 47, 53, 49, - 10, 51, 52, 13, 54, 99, 100, 17, 36, 59, - 60, 29, 10, 11, 12, 13, 15, 15, 17, 17, - 13, 19, 20, 21, 8, 9, 54, 72, 26, 67, - 75, 69, 30, 31, 32, 78, 34, 82, 36, 24, - 50, 39, 17, 36, 42, 43, 44, 45, 74, 47, - 95, 49, 51, 51, 52, 54, 54, 35, 84, 37, - 103, 59, 60, 36, 10, 11, 12, 13, 74, 15, - 108, 17, 23, 19, 20, 21, 10, 103, 84, 13, - 26, 23, 36, 17, 30, 31, 32, 7, 34, 9, - 36, 17, 98, 39, 48, 46, 42, 43, 44, 45, - 17, 47, 53, 49, 46, 51, 52, 93, 54, 78, - 16, 1, 36, 59, 60, 101, 10, 11, 12, 13, - 35, 15, 37, 17, 48, 19, 20, 21, 18, 36, - 65, 66, 26, 74, 103, 104, 30, 31, 32, 45, - 34, 48, 36, 84, 36, 39, 52, 17, 42, 43, - 44, 45, 15, 47, 17, 49, 10, 51, 52, 13, - 54, 18, 74, 17, 82, 59, 60, 34, 10, 11, - 12, 13, 84, 15, 93, 17, 15, 19, 20, 21, - 1, 2, 101, 101, 26, 99, 100, 17, 30, 31, - 32, 48, 34, 96, 36, 98, 96, 39, 98, 71, - 42, 43, 44, 45, 35, 47, 37, 49, 27, 51, - 52, 67, 54, 69, 33, 54, 74, 59, 60, 17, - 10, 11, 12, 13, 96, 15, 84, 17, 34, 19, - 20, 21, 45, 78, 63, 64, 26, 99, 100, 16, - 30, 31, 32, 16, 34, 23, 36, 17, 17, 39, - 23, 51, 42, 43, 44, 45, 72, 47, 103, 49, - 78, 51, 52, 17, 54, 74, 82, 41, 46, 59, - 60, 67, 68, 69, 70, 84, 72, 73, 53, 75, - 76, 77, 53, 61, 15, 103, 82, 14, 51, 85, - 14, 37, 17, 8, 90, 91, 92, 1, 94, 95, - 3, 4, 5, 6, 7, 96, 82, 10, 11, 12, - 13, 97, 84, 81, 96, 74, 19, 20, 21, 78, - 82, 82, 1, 26, 104, 84, 2, 30, 31, 32, - 67, 68, 69, 70, 98, 72, 73, 109, 75, 76, - 77, 67, 109, 69, 103, 82, 72, 96, 85, 75, - 76, 77, 96, 90, 91, 92, 82, 94, 95, 85, - 10, 14, 96, 13, 90, 91, 92, 17, 94, 95, - 109, 109, 109, 109, 109, 109, 109, 27, 109, 105, - 106, 109, 109, 33, 4, 38, 39, 40, 109, 109, - 10, 11, 12, 13, 109, 15, 109, 109, 109, 19, - 20, 21, 55, 56, 57, 58, 26, 74, 109, 109, - 30, 31, 32, 109, 109, 109, 4, 84, 109, 86, - 87, 88, 10, 11, 12, 13, 109, 15, 109, 109, - 109, 19, 20, 21, 109, 74, 109, 109, 26, 109, - 60, 61, 30, 31, 32, 84, 109, 86, 87, 88, - 109, 109, 67, 109, 69, 70, 109, 72, 73, 109, - 75, 76, 77, 109, 109, 109, 109, 82, 109, 109, - 85, 109, 60, 61, 109, 90, 91, 92, 10, 94, - 95, 13, 109, 2, 67, 17, 69, 109, 109, 72, - 109, 109, 75, 76, 77, 27, 109, 29, 109, 82, - 109, 33, 85, 109, 109, 109, 109, 90, 91, 92, - 109, 94, 95, 109, 109, 109, 109, 36, 109, 38, - 39, 40, 105, 106, 109, 67, 109, 69, 109, 48, - 72, 109, 109, 75, 76, 77, 55, 56, 57, 58, - 82, 109, 109, 85, 109, 109, 109, 74, 90, 91, - 92, 78, 94, 95, 67, 27, 69, 84, 109, 72, - 102, 33, 75, 76, 77, 109, 38, 39, 40, 82, - 109, 109, 85, 109, 109, 109, 103, 90, 91, 92, - 109, 94, 95, 55, 56, 57, 58, 109, 109, 102, - 67, 109, 69, 109, 109, 72, 109, 109, 75, 76, - 77, 109, 109, 109, 109, 82, 109, 109, 85, 109, - 109, 109, 109, 90, 91, 92, 109, 94, 95, 109, - 109, 109, 67, 109, 69, 109, 1, 72, 109, 106, - 75, 76, 77, 109, 79, 109, 109, 82, 109, 14, - 85, 74, 109, 18, 109, 90, 91, 92, 109, 94, - 95, 84, 27, 86, 87, 88, 109, 67, 33, 69, - 109, 36, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 48, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 102, 109, 75, 76, 77, 67, 79, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 77, 109, 109, - 109, 109, 82, 109, 109, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 77, 67, 109, 69, - 109, 82, 72, 109, 85, 75, 76, 77, 109, 90, - 91, 92, 82, 94, 95, 85, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 109, 109, 109, - 109, 109, 82, 109, 109, 109, 109, 109, 109, 89, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 109, 67, 109, 69, - 109, 82, 72, 109, 109, 75, 76, 109, 89, 90, - 91, 92, 82, 94, 95, 109, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 109, 109, 109, - 109, 109, 82, 109, 109, 109, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 109, 67, 109, 69, - 109, 82, 72, 109, 109, 75, 76, 109, 109, 90, - 91, 92, 82, 94, 95, 109, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 109, 67, 109, 69, - 109, 109, 72, 109, 109, 75, 76, 109, 109, 109, - 109, 109, 82, 109, 109, 109, 109, 109, 109, 109, - 90, 91, 92, 109, 94, 95, 67, 109, 69, 109, - 109, 72, 109, 109, 75, 76, 109, 67, 109, 69, - 109, 82, 72, 109, 109, 75, 76, 109, 109, 90, - 91, 92, 82, 94, 95, 109, 109, 109, 109, 109, - 90, 91, 92, 2, 94, 95, 109, 25, 109, 27, - 109, 10, 109, 109, 13, 33, 109, 16, 17, 18, - 38, 39, 40, 37, 38, 39, 40, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 55, 56, 57, - 58, 55, 56, 57, 58, 109, 45, 109, 109, 48, - 109, 50, 2, 52, 10, 109, 109, 13, 109, 109, - 10, 17, 18, 13, 109, 109, 2, 17, 18, 109, - 109, 109, 109, 109, 10, 109, 109, 13, 109, 109, - 16, 17, 18, 109, 109, 109, 109, 109, 109, 45, - 109, 109, 48, 109, 50, 45, 52, 109, 48, 109, - 50, 109, 52, 53, 109, 109, 109, 109, 109, 45, - 109, 109, 48, 109, 50, 2, 52, 109, 109, 109, - 109, 109, 109, 10, 109, 109, 13, 109, 109, 2, - 17, 18, 2, 37, 38, 39, 40, 10, 109, 109, - 13, 109, 109, 109, 17, 18, 109, 109, 109, 109, - 109, 55, 56, 57, 58, 109, 109, 109, 45, 109, - 109, 48, 109, 50, 109, 52, 14, 109, 38, 39, - 40, 109, 45, 109, 109, 48, 109, 50, 109, 52, - 14, 109, 109, 109, 109, 55, 56, 57, 58, 109, - 38, 39, 40, 109, 109, 22, 109, 38, 39, 40, - 109, 14, 109, 109, 38, 39, 40, 55, 56, 57, - 58, 38, 39, 40, 55, 56, 57, 58, 109, 109, - 61, 55, 56, 57, 58, 38, 39, 40, 55, 56, - 57, 58, 14, 109, 109, 109, 28, 109, 109, 109, - 109, 109, 55, 56, 57, 58, 38, 39, 40, 109, - 109, 109, 38, 39, 40, 109, 38, 39, 40, 109, - 38, 39, 40, 55, 56, 57, 58, 53, 109, 55, - 56, 57, 58, 55, 56, 57, 58, 55, 56, 57, - 58, - ); - - public static $yy_shift_ofst = array( - -31, 406, 406, 458, 458, 94, 510, 94, 94, 94, - 510, 458, -10, 94, 94, 354, 146, 94, 94, 94, - 94, 146, 94, 94, 94, 94, 250, 94, 94, 94, - 94, 94, 94, 302, 94, 94, 94, 198, 42, 42, - 42, 42, 42, 42, 42, 42, 1772, 828, 828, 80, - 712, 925, 301, 65, 272, 680, 1942, 1920, 1886, 1776, - 647, 1949, 1977, 2008, 2004, 1963, 1998, 1956, 2012, 2012, - 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, - 2012, 2012, 2012, 768, 650, 272, 65, 272, 65, 134, - 126, 479, 597, 1854, 154, 290, 95, 55, 258, 366, - 248, 366, 282, 443, 437, 38, 38, 437, 7, 481, - 410, 38, 461, 621, 596, 596, 261, 596, 596, 261, - 596, 596, 596, 596, 596, -31, -31, 1840, 1791, 1917, - 1903, 1834, 158, 238, 394, 446, 38, 25, 147, 169, - 147, 25, 169, 25, 38, 38, 25, 25, 38, 25, - 307, 38, 38, 25, 527, 38, 38, 25, 38, 38, - 38, 38, 38, 596, 624, 261, 624, 327, 596, 596, - 261, 596, 261, -31, -31, -31, -31, -31, -31, 781, - 3, 31, 193, 137, -30, 186, -17, 522, 349, 469, - 322, 30, 82, 316, 346, 376, 190, 358, 393, 152, - 209, 380, 385, 245, 315, 523, 585, 554, 576, 575, - 537, 573, 569, 529, 525, 546, 500, 526, 531, 325, - 530, 487, 494, 502, 470, 433, 430, 408, 383, 327, - 374, - ); - - public static $yy_reduce_ofst = array( - 471, 504, 563, 717, 574, 685, 919, 890, 787, 758, - 855, 823, 1240, 1199, 1140, 1100, 1070, 1129, 1170, 1210, - 1269, 1280, 1310, 1339, 1350, 1380, 1409, 1420, 1450, 1479, - 1490, 1059, 1030, 1000, 930, 960, 989, 1520, 1549, 1700, - 1619, 1689, 1660, 1630, 1590, 1560, 633, 661, 867, 8, - 166, 773, 255, 541, 174, 262, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 294, -70, 196, 120, 68, 274, 19, - 206, 331, 444, 428, 257, 400, 382, 257, 257, 400, - 386, 397, 257, 386, 381, 388, 359, 314, 257, 442, - 482, 491, 484, 257, 257, 455, 386, 257, 257, 438, - 257, 257, 257, 257, 257, 257, 365, 509, 509, 509, - 509, 509, 524, 536, 509, 509, 528, 514, 539, 551, - 538, 514, 556, 514, 528, 528, 514, 514, 528, 514, - 518, 528, 528, 514, 532, 528, 528, 514, 528, 528, - 528, 528, 528, -90, 520, 122, 520, 566, -90, -90, - 122, -90, 122, -45, 36, 155, 101, 61, 17, - ); - - public static $yyExpectedTokens = array( - array(), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 53, 54, 59, - 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array( - 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60, - ), - array(25, 27, 33, 38, 39, 40, 55, 56, 57, 58,), - array(27, 33, 38, 39, 40, 55, 56, 57, 58,), - array(27, 33, 38, 39, 40, 55, 56, 57, 58,), - array(15, 17, 49, 51, 54,), - array(4, 10, 11, 12, 13, 15, 19, 20, 21, 26, 30, 31, 32, 60, 61,), - array(1, 14, 18, 27, 33, 36, 48,), - array(15, 17, 51, 54,), - array(1, 27, 33,), - array(15, 36, 54,), - array(4, 10, 11, 12, 13, 15, 19, 20, 21, 26, 30, 31, 32, 60, 61,), - array(14, 38, 39, 40, 55, 56, 57, 58,), - array(2, 38, 39, 40, 55, 56, 57, 58,), - array(37, 38, 39, 40, 55, 56, 57, 58,), - array(37, 38, 39, 40, 55, 56, 57, 58,), - array(14, 38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58, 61,), - array(14, 38, 39, 40, 55, 56, 57, 58,), - array(14, 38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 53, 55, 56, 57, 58,), - array(22, 38, 39, 40, 55, 56, 57, 58,), - array(28, 38, 39, 40, 55, 56, 57, 58,), - array(14, 38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(38, 39, 40, 55, 56, 57, 58,), - array(10, 13, 17, 27, 29, 33,), - array(10, 13, 17, 27, 33,), - array(15, 36, 54,), - array(1, 27, 33,), - array(15, 36, 54,), - array(1, 27, 33,), - array(18, 45, 52,), - array(16, 18, 48,), - array(1, 2,), - array(3, 4, 5, 6, 7, 10, 11, 12, 13, 19, 20, 21, 26, 30, 31, 32,), - array(2, 10, 13, 16, 17, 18, 45, 48, 50, 52,), - array(1, 14, 27, 33,), - array(10, 13, 17, 50,), - array(13, 15, 17, 54,), - array(1, 14, 27, 33,), - array(1, 14, 27, 33,), - array(10, 13, 17,), - array(16, 18, 48,), - array(10, 13, 17,), - array(1, 29,), - array(18, 48,), - array(15, 17,), - array(27, 33,), - array(27, 33,), - array(15, 17,), - array(1, 53,), - array(27, 33,), - array(1, 18,), - array(27, 33,), - array(15, 54,), - array(1,), - array(1,), - array(1,), - array(18,), - array(1,), - array(1,), - array(18,), - array(1,), - array(1,), - array(1,), - array(1,), - array(1,), - array(), - array(), - array(2, 10, 13, 17, 18, 45, 48, 50, 52, 53,), - array(2, 10, 13, 16, 17, 18, 45, 48, 50, 52,), - array(2, 10, 13, 17, 18, 45, 48, 50, 52,), - array(2, 10, 13, 17, 18, 45, 48, 50, 52,), - array(10, 13, 17, 18, 45, 48, 50, 52,), - array(13, 15, 17, 34, 54,), - array(10, 13, 17, 50,), - array(16, 45, 52,), - array(10, 13, 17,), - array(27, 33,), - array(45, 52,), - array(15, 54,), - array(45, 52,), - array(15, 54,), - array(45, 52,), - array(45, 52,), - array(45, 52,), - array(27, 33,), - array(27, 33,), - array(45, 52,), - array(45, 52,), - array(27, 33,), - array(45, 52,), - array(13, 36,), - array(27, 33,), - array(27, 33,), - array(45, 52,), - array(16, 23,), - array(27, 33,), - array(27, 33,), - array(45, 52,), - array(27, 33,), - array(27, 33,), - array(27, 33,), - array(27, 33,), - array(27, 33,), - array(1,), - array(2,), - array(18,), - array(2,), - array(36,), - array(1,), - array(1,), - array(18,), - array(1,), - array(18,), - array(), - array(), - array(), - array(), - array(), - array(), - array(2, 36, 38, 39, 40, 48, 55, 56, 57, 58,), - array(14, 22, 24, 27, 33, 35, 37, 45,), - array(14, 16, 27, 33, 36, 48,), - array(14, 23, 27, 33, 46,), - array(14, 23, 27, 33, 46,), - array(36, 45, 48, 53,), - array(10, 13, 17, 50,), - array(29, 36, 48,), - array(23, 46, 61,), - array(23, 46, 53,), - array(35, 37,), - array(35, 37,), - array(16, 45,), - array(35, 53,), - array(8, 9,), - array(36, 48,), - array(36, 48,), - array(35, 37,), - array(23, 46,), - array(36, 48,), - array(17, 50,), - array(22, 35,), - array(7, 9,), - array(35, 37,), - array(45, 53,), - array(24,), - array(16,), - array(8,), - array(37,), - array(14,), - array(17,), - array(51,), - array(14,), - array(15,), - array(53,), - array(53,), - array(17,), - array(51,), - array(41,), - array(17,), - array(17,), - array(17,), - array(45,), - array(34,), - array(17,), - array(17,), - array(34,), - array(17,), - array(36,), - array(17,), - array(36,), - array(17,), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - array(), - ); - - public static $yy_default = array( - 338, 514, 514, 499, 499, 514, 514, 476, 476, 476, - 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, - 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, - 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, - 514, 514, 514, 514, 514, 514, 379, 358, 379, 514, - 514, 415, 514, 379, 514, 514, 351, 514, 514, 514, - 514, 514, 514, 514, 514, 514, 384, 514, 399, 475, - 351, 403, 390, 474, 500, 502, 384, 501, 363, 381, - 404, 386, 391, 379, 379, 514, 379, 514, 379, 489, - 431, 370, 327, 430, 393, 441, 514, 393, 393, 441, - 431, 441, 393, 431, 514, 379, 360, 514, 393, 379, - 373, 379, 514, 406, 402, 375, 431, 396, 398, 486, - 393, 408, 397, 407, 406, 483, 336, 430, 430, 430, - 430, 430, 514, 443, 457, 441, 367, 438, 514, 436, - 514, 435, 434, 466, 368, 348, 439, 437, 361, 467, - 441, 356, 354, 468, 514, 366, 355, 469, 362, 359, - 352, 369, 365, 371, 478, 463, 477, 441, 374, 376, - 490, 424, 487, 441, 441, 482, 482, 336, 482, 415, - 411, 415, 405, 405, 415, 442, 415, 405, 405, 514, - 514, 411, 514, 514, 425, 514, 514, 405, 415, 514, - 514, 334, 514, 411, 387, 514, 514, 514, 514, 514, - 514, 514, 514, 420, 514, 514, 514, 417, 514, 514, - 514, 411, 413, 514, 514, 514, 514, 488, 514, 457, - 514, 421, 364, 420, 340, 422, 357, 341, 409, 400, - 480, 457, 462, 401, 485, 423, 426, 342, 447, 380, - 416, 339, 428, 329, 330, 444, 445, 446, 394, 331, - 395, 429, 419, 388, 332, 418, 410, 392, 412, 333, - 335, 414, 337, 472, 417, 479, 427, 497, 347, 461, - 460, 459, 378, 346, 464, 510, 495, 511, 498, 473, - 377, 496, 503, 506, 513, 512, 509, 507, 504, 508, - 345, 458, 471, 448, 505, 454, 452, 455, 456, 450, - 491, 449, 492, 493, 494, 470, 451, 328, 453, 343, - 344, 372, 481, 432, 433, 465, 440, - ); - - public static $yyFallback = array(); - - public static $yyRuleName = array( - 'start ::= template', - 'template ::= template PHP', - 'template ::= template TEXT', - 'template ::= template STRIPON', - 'template ::= template STRIPOFF', - 'template ::= template LITERALSTART literal_e2 LITERALEND', - 'literal_e2 ::= literal_e1 LITERALSTART literal_e1 LITERALEND', - 'literal_e2 ::= literal_e1', - 'literal_e1 ::= literal_e1 LITERAL', - 'literal_e1 ::=', - 'template ::= template smartytag', - 'template ::=', - 'smartytag ::= SIMPELOUTPUT', - 'smartytag ::= SIMPLETAG', - 'smartytag ::= SMARTYBLOCKCHILDPARENT', - 'smartytag ::= LDEL tagbody RDEL', - 'smartytag ::= tag RDEL', - 'tagbody ::= outattr', - 'tagbody ::= DOLLARID eqoutattr', - 'tagbody ::= varindexed eqoutattr', - 'eqoutattr ::= EQUAL outattr', - 'outattr ::= output attributes', - 'output ::= variable', - 'output ::= value', - 'output ::= expr', - 'tag ::= LDEL ID attributes', - 'tag ::= LDEL ID', - 'tag ::= LDEL ID modifierlist attributes', - 'tag ::= LDEL ID PTR ID attributes', - 'tag ::= LDEL ID PTR ID modifierlist attributes', - 'tag ::= LDELMAKENOCACHE DOLLARID', - 'tag ::= LDELIF expr', - 'tag ::= LDELIF expr attributes', - 'tag ::= LDELIF statement', - 'tag ::= LDELIF statement attributes', - 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', - 'foraction ::= EQUAL expr', - 'foraction ::= INCDEC', - 'tag ::= LDELFOR statement TO expr attributes', - 'tag ::= LDELFOR statement TO expr STEP expr attributes', - 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', - 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', - 'tag ::= LDELFOREACH attributes', - 'tag ::= LDELSETFILTER ID modparameters', - 'tag ::= LDELSETFILTER ID modparameters modifierlist', - 'smartytag ::= CLOSETAG', - 'tag ::= LDELSLASH ID', - 'tag ::= LDELSLASH ID modifierlist', - 'tag ::= LDELSLASH ID PTR ID', - 'tag ::= LDELSLASH ID PTR ID modifierlist', - 'attributes ::= attributes attribute', - 'attributes ::= attribute', - 'attributes ::=', - 'attribute ::= SPACE ID EQUAL ID', - 'attribute ::= ATTR expr', - 'attribute ::= ATTR value', - 'attribute ::= SPACE ID', - 'attribute ::= SPACE expr', - 'attribute ::= SPACE value', - 'attribute ::= SPACE INTEGER EQUAL expr', - 'statements ::= statement', - 'statements ::= statements COMMA statement', - 'statement ::= DOLLARID EQUAL INTEGER', - 'statement ::= DOLLARID EQUAL expr', - 'statement ::= varindexed EQUAL expr', - 'statement ::= OPENP statement CLOSEP', - 'expr ::= value', - 'expr ::= ternary', - 'expr ::= DOLLARID COLON ID', - 'expr ::= expr MATH value', - 'expr ::= expr UNIMATH value', - 'expr ::= expr tlop value', - 'expr ::= expr lop expr', - 'expr ::= expr scond', - 'expr ::= expr ISIN array', - 'expr ::= expr ISIN value', - 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', - 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', - 'value ::= variable', - 'value ::= UNIMATH value', - 'value ::= NOT value', - 'value ::= TYPECAST value', - 'value ::= variable INCDEC', - 'value ::= HEX', - 'value ::= INTEGER', - 'value ::= INTEGER DOT INTEGER', - 'value ::= INTEGER DOT', - 'value ::= DOT INTEGER', - 'value ::= ID', - 'value ::= function', - 'value ::= OPENP expr CLOSEP', - 'value ::= variable INSTANCEOF ns1', - 'value ::= variable INSTANCEOF variable', - 'value ::= SINGLEQUOTESTRING', - 'value ::= doublequoted_with_quotes', - 'value ::= varindexed DOUBLECOLON static_class_access', - 'value ::= smartytag', - 'value ::= value modifierlist', - 'value ::= NAMESPACE', - 'value ::= arraydef', - 'value ::= ns1 DOUBLECOLON static_class_access', - 'ns1 ::= ID', - 'ns1 ::= NAMESPACE', - 'variable ::= DOLLARID', - 'variable ::= varindexed', - 'variable ::= varvar AT ID', - 'variable ::= object', - 'variable ::= HATCH ID HATCH', - 'variable ::= HATCH ID HATCH arrayindex', - 'variable ::= HATCH variable HATCH', - 'variable ::= HATCH variable HATCH arrayindex', - 'varindexed ::= DOLLARID arrayindex', - 'varindexed ::= varvar arrayindex', - 'arrayindex ::= arrayindex indexdef', - 'arrayindex ::=', - 'indexdef ::= DOT DOLLARID', - 'indexdef ::= DOT varvar', - 'indexdef ::= DOT varvar AT ID', - 'indexdef ::= DOT ID', - 'indexdef ::= DOT INTEGER', - 'indexdef ::= DOT LDEL expr RDEL', - 'indexdef ::= OPENB ID CLOSEB', - 'indexdef ::= OPENB ID DOT ID CLOSEB', - 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', - 'indexdef ::= OPENB INTEGER CLOSEB', - 'indexdef ::= OPENB DOLLARID CLOSEB', - 'indexdef ::= OPENB variable CLOSEB', - 'indexdef ::= OPENB value CLOSEB', - 'indexdef ::= OPENB expr CLOSEB', - 'indexdef ::= OPENB CLOSEB', - 'varvar ::= DOLLARID', - 'varvar ::= DOLLAR', - 'varvar ::= varvar varvarele', - 'varvarele ::= ID', - 'varvarele ::= SIMPELOUTPUT', - 'varvarele ::= LDEL expr RDEL', - 'object ::= varindexed objectchain', - 'objectchain ::= objectelement', - 'objectchain ::= objectchain objectelement', - 'objectelement ::= PTR ID arrayindex', - 'objectelement ::= PTR varvar arrayindex', - 'objectelement ::= PTR LDEL expr RDEL arrayindex', - 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', - 'objectelement ::= PTR method', - 'function ::= ns1 OPENP params CLOSEP', - 'method ::= ID OPENP params CLOSEP', - 'method ::= DOLLARID OPENP params CLOSEP', - 'params ::= params COMMA expr', - 'params ::= expr', - 'params ::=', - 'modifierlist ::= modifierlist modifier modparameters', - 'modifierlist ::= modifier modparameters', - 'modifier ::= VERT AT ID', - 'modifier ::= VERT ID', - 'modparameters ::= modparameters modparameter', - 'modparameters ::=', - 'modparameter ::= COLON value', - 'modparameter ::= COLON UNIMATH value', - 'modparameter ::= COLON array', - 'static_class_access ::= method', - 'static_class_access ::= method objectchain', - 'static_class_access ::= ID', - 'static_class_access ::= DOLLARID arrayindex', - 'static_class_access ::= DOLLARID arrayindex objectchain', - 'lop ::= LOGOP', - 'lop ::= SLOGOP', - 'tlop ::= TLOGOP', - 'scond ::= SINGLECOND', - 'arraydef ::= OPENB arrayelements CLOSEB', - 'arraydef ::= ARRAYOPEN arrayelements CLOSEP', - 'arrayelements ::= arrayelement', - 'arrayelements ::= arrayelements COMMA arrayelement', - 'arrayelements ::=', - 'arrayelement ::= value APTR expr', - 'arrayelement ::= ID APTR expr', - 'arrayelement ::= expr', - 'doublequoted_with_quotes ::= QUOTE QUOTE', - 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', - 'doublequoted ::= doublequoted doublequotedcontent', - 'doublequoted ::= doublequotedcontent', - 'doublequotedcontent ::= BACKTICK variable BACKTICK', - 'doublequotedcontent ::= BACKTICK expr BACKTICK', - 'doublequotedcontent ::= DOLLARID', - 'doublequotedcontent ::= LDEL variable RDEL', - 'doublequotedcontent ::= LDEL expr RDEL', - 'doublequotedcontent ::= smartytag', - 'doublequotedcontent ::= TEXT', - ); +// line 23 "../smarty/lexer/smarty_internal_templateparser.y" - public static $yyRuleInfo = array( - array(0 => 63, 1 => 1), - array(0 => 64, 1 => 2), - array(0 => 64, 1 => 2), - array(0 => 64, 1 => 2), - array(0 => 64, 1 => 2), - array(0 => 64, 1 => 4), - array(0 => 65, 1 => 4), - array(0 => 65, 1 => 1), - array(0 => 66, 1 => 2), - array(0 => 66, 1 => 0), - array(0 => 64, 1 => 2), - array(0 => 64, 1 => 0), - array(0 => 67, 1 => 1), - array(0 => 67, 1 => 1), - array(0 => 67, 1 => 1), - array(0 => 67, 1 => 3), - array(0 => 67, 1 => 2), - array(0 => 68, 1 => 1), - array(0 => 68, 1 => 2), - array(0 => 68, 1 => 2), - array(0 => 71, 1 => 2), - array(0 => 70, 1 => 2), - array(0 => 73, 1 => 1), - array(0 => 73, 1 => 1), - array(0 => 73, 1 => 1), - array(0 => 69, 1 => 3), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 4), - array(0 => 69, 1 => 5), - array(0 => 69, 1 => 6), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 3), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 3), - array(0 => 69, 1 => 8), - array(0 => 81, 1 => 2), - array(0 => 81, 1 => 1), - array(0 => 69, 1 => 5), - array(0 => 69, 1 => 7), - array(0 => 69, 1 => 6), - array(0 => 69, 1 => 8), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 3), - array(0 => 69, 1 => 4), - array(0 => 67, 1 => 1), - array(0 => 69, 1 => 2), - array(0 => 69, 1 => 3), - array(0 => 69, 1 => 4), - array(0 => 69, 1 => 5), - array(0 => 74, 1 => 2), - array(0 => 74, 1 => 1), - array(0 => 74, 1 => 0), - array(0 => 84, 1 => 4), - array(0 => 84, 1 => 2), - array(0 => 84, 1 => 2), - array(0 => 84, 1 => 2), - array(0 => 84, 1 => 2), - array(0 => 84, 1 => 2), - array(0 => 84, 1 => 4), - array(0 => 80, 1 => 1), - array(0 => 80, 1 => 3), - array(0 => 79, 1 => 3), - array(0 => 79, 1 => 3), - array(0 => 79, 1 => 3), - array(0 => 79, 1 => 3), - array(0 => 77, 1 => 1), - array(0 => 77, 1 => 1), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 2), - array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), - array(0 => 85, 1 => 7), - array(0 => 85, 1 => 7), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 3), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 3), - array(0 => 76, 1 => 3), - array(0 => 76, 1 => 3), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 3), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 2), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 1), - array(0 => 76, 1 => 3), - array(0 => 91, 1 => 1), - array(0 => 91, 1 => 1), - array(0 => 75, 1 => 1), - array(0 => 75, 1 => 1), - array(0 => 75, 1 => 3), - array(0 => 75, 1 => 1), - array(0 => 75, 1 => 3), - array(0 => 75, 1 => 4), - array(0 => 75, 1 => 3), - array(0 => 75, 1 => 4), - array(0 => 72, 1 => 2), - array(0 => 72, 1 => 2), - array(0 => 96, 1 => 2), - array(0 => 96, 1 => 0), - array(0 => 97, 1 => 2), - array(0 => 97, 1 => 2), - array(0 => 97, 1 => 4), - array(0 => 97, 1 => 2), - array(0 => 97, 1 => 2), - array(0 => 97, 1 => 4), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 5), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 3), - array(0 => 97, 1 => 2), - array(0 => 82, 1 => 1), - array(0 => 82, 1 => 1), - array(0 => 82, 1 => 2), - array(0 => 98, 1 => 1), - array(0 => 98, 1 => 1), - array(0 => 98, 1 => 3), - array(0 => 95, 1 => 2), - array(0 => 99, 1 => 1), - array(0 => 99, 1 => 2), - array(0 => 100, 1 => 3), - array(0 => 100, 1 => 3), - array(0 => 100, 1 => 5), - array(0 => 100, 1 => 6), - array(0 => 100, 1 => 2), - array(0 => 90, 1 => 4), - array(0 => 101, 1 => 4), - array(0 => 101, 1 => 4), - array(0 => 102, 1 => 3), - array(0 => 102, 1 => 1), - array(0 => 102, 1 => 0), - array(0 => 78, 1 => 3), - array(0 => 78, 1 => 2), - array(0 => 103, 1 => 3), - array(0 => 103, 1 => 2), - array(0 => 83, 1 => 2), - array(0 => 83, 1 => 0), - array(0 => 104, 1 => 2), - array(0 => 104, 1 => 3), - array(0 => 104, 1 => 2), - array(0 => 93, 1 => 1), - array(0 => 93, 1 => 2), - array(0 => 93, 1 => 1), - array(0 => 93, 1 => 2), - array(0 => 93, 1 => 3), - array(0 => 87, 1 => 1), - array(0 => 87, 1 => 1), - array(0 => 86, 1 => 1), - array(0 => 88, 1 => 1), - array(0 => 94, 1 => 3), - array(0 => 94, 1 => 3), - array(0 => 105, 1 => 1), - array(0 => 105, 1 => 3), - array(0 => 105, 1 => 0), - array(0 => 106, 1 => 3), - array(0 => 106, 1 => 3), - array(0 => 106, 1 => 1), - array(0 => 92, 1 => 2), - array(0 => 92, 1 => 3), - array(0 => 107, 1 => 2), - array(0 => 107, 1 => 1), - array(0 => 108, 1 => 3), - array(0 => 108, 1 => 3), - array(0 => 108, 1 => 1), - array(0 => 108, 1 => 3), - array(0 => 108, 1 => 3), - array(0 => 108, 1 => 1), - array(0 => 108, 1 => 1), - ); - - public static $yyReduceMap = array( - 0 => 0, - 1 => 1, - 2 => 2, - 3 => 3, - 4 => 4, - 5 => 5, - 6 => 6, - 7 => 7, - 22 => 7, - 23 => 7, - 24 => 7, - 37 => 7, - 57 => 7, - 58 => 7, - 66 => 7, - 67 => 7, - 78 => 7, - 83 => 7, - 84 => 7, - 89 => 7, - 93 => 7, - 94 => 7, - 98 => 7, - 99 => 7, - 101 => 7, - 106 => 7, - 170 => 7, - 175 => 7, - 8 => 8, - 9 => 9, - 10 => 10, - 12 => 12, - 13 => 13, - 14 => 14, - 15 => 15, - 16 => 16, - 17 => 17, - 18 => 18, - 19 => 19, - 20 => 20, - 21 => 21, - 25 => 25, - 26 => 26, - 27 => 27, - 28 => 28, - 29 => 29, - 30 => 30, - 31 => 31, - 32 => 32, - 34 => 32, - 33 => 33, - 35 => 35, - 36 => 36, - 38 => 38, - 39 => 39, - 40 => 40, - 41 => 41, - 42 => 42, - 43 => 43, - 44 => 44, - 45 => 45, - 46 => 46, - 47 => 47, - 48 => 48, - 49 => 49, - 50 => 50, - 51 => 51, - 60 => 51, - 148 => 51, - 152 => 51, - 156 => 51, - 158 => 51, - 52 => 52, - 149 => 52, - 155 => 52, - 53 => 53, - 54 => 54, - 55 => 54, - 56 => 56, - 133 => 56, - 59 => 59, - 61 => 61, - 62 => 62, - 63 => 62, - 64 => 64, - 65 => 65, - 68 => 68, - 69 => 69, - 70 => 69, - 71 => 71, - 72 => 72, - 73 => 73, - 74 => 74, - 75 => 75, - 76 => 76, - 77 => 77, - 79 => 79, - 81 => 79, - 82 => 79, - 113 => 79, - 80 => 80, - 85 => 85, - 86 => 86, - 87 => 87, - 88 => 88, - 90 => 90, - 91 => 91, - 92 => 91, - 95 => 95, - 96 => 96, - 97 => 97, - 100 => 100, - 102 => 102, - 103 => 103, - 104 => 104, - 105 => 105, - 107 => 107, - 108 => 108, - 109 => 109, - 110 => 110, - 111 => 111, - 112 => 112, - 114 => 114, - 172 => 114, - 115 => 115, - 116 => 116, - 117 => 117, - 118 => 118, - 119 => 119, - 120 => 120, - 128 => 120, - 121 => 121, - 122 => 122, - 123 => 123, - 124 => 123, - 126 => 123, - 127 => 123, - 125 => 125, - 129 => 129, - 130 => 130, - 131 => 131, - 176 => 131, - 132 => 132, - 134 => 134, - 135 => 135, - 136 => 136, - 137 => 137, - 138 => 138, - 139 => 139, - 140 => 140, - 141 => 141, - 142 => 142, - 143 => 143, - 144 => 144, - 145 => 145, - 146 => 146, - 147 => 147, - 150 => 150, - 151 => 151, - 153 => 153, - 154 => 154, - 157 => 157, - 159 => 159, - 160 => 160, - 161 => 161, - 162 => 162, - 163 => 163, - 164 => 164, - 165 => 165, - 166 => 166, - 167 => 167, - 168 => 168, - 169 => 168, - 171 => 171, - 173 => 173, - 174 => 174, - 177 => 177, - 178 => 178, - 179 => 179, - 180 => 180, - 183 => 180, - 181 => 181, - 184 => 181, - 182 => 182, - 185 => 185, - 186 => 186, - ); + const ERR1 = 'Security error: Call to private object member not allowed'; + const ERR2 = 'Security error: Call to dynamic object member not allowed'; /** * result status @@ -1654,13 +81,19 @@ class Smarty_Internal_Templateparser */ public $lex; + /** + * internal error flag + * + * @var bool + */ + private $internalError = false; + /** * {strip} status * * @var bool */ public $strip = false; - /** * compiler object * @@ -1710,54 +143,6 @@ class Smarty_Internal_Templateparser */ public $template_postfix = array(); - public $yyTraceFILE; - - public $yyTracePrompt; - - public $yyidx; - - public $yyerrcnt; - - public $yystack = array(); - - public $yyTokenName = array( - '$', 'VERT', 'COLON', 'PHP', - 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', - 'LITERALEND', 'LITERAL', 'SIMPELOUTPUT', 'SIMPLETAG', - 'SMARTYBLOCKCHILDPARENT', 'LDEL', 'RDEL', 'DOLLARID', - 'EQUAL', 'ID', 'PTR', 'LDELMAKENOCACHE', - 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', - 'TO', 'STEP', 'LDELFOREACH', 'SPACE', - 'AS', 'APTR', 'LDELSETFILTER', 'CLOSETAG', - 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', - 'OPENP', 'CLOSEP', 'MATH', 'UNIMATH', - 'ISIN', 'QMARK', 'NOT', 'TYPECAST', - 'HEX', 'DOT', 'INSTANCEOF', 'SINGLEQUOTESTRING', - 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', - 'OPENB', 'CLOSEB', 'DOLLAR', 'LOGOP', - 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'ARRAYOPEN', - 'QUOTE', 'BACKTICK', 'error', 'start', - 'template', 'literal_e2', 'literal_e1', 'smartytag', - 'tagbody', 'tag', 'outattr', 'eqoutattr', - 'varindexed', 'output', 'attributes', 'variable', - 'value', 'expr', 'modifierlist', 'statement', - 'statements', 'foraction', 'varvar', 'modparameters', - 'attribute', 'ternary', 'tlop', 'lop', - 'scond', 'array', 'function', 'ns1', - 'doublequoted_with_quotes', 'static_class_access', 'arraydef', 'object', - 'arrayindex', 'indexdef', 'varvarele', 'objectchain', - 'objectelement', 'method', 'params', 'modifier', - 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', - 'doublequotedcontent', - ); - - /** - * internal error flag - * - * @var bool - */ - private $internalError = false; /* Index of top element in stack */ - private $_retvalue; /* Shifts left before out of the error */ /** * constructor * @@ -1772,16 +157,9 @@ public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_ $this->smarty = $this->template->smarty; $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false; $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template(); - } /* The parser's stack */ - public static function yy_destructor($yymajor, $yypminor) - { - switch ($yymajor) { - default: - break; /* If no destructor action specified: do nothing */ - } } - /** + /** * insert PHP code in current buffer * * @param string $code @@ -1823,6 +201,898 @@ public function mergePrefixCode($code) return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); } + + const TP_VERT = 1; + const TP_COLON = 2; + const TP_TEXT = 3; + const TP_STRIPON = 4; + const TP_STRIPOFF = 5; + const TP_LITERALSTART = 6; + const TP_LITERALEND = 7; + const TP_LITERAL = 8; + const TP_SIMPELOUTPUT = 9; + const TP_SIMPLETAG = 10; + const TP_SMARTYBLOCKCHILDPARENT = 11; + const TP_LDEL = 12; + const TP_RDEL = 13; + const TP_DOLLARID = 14; + const TP_EQUAL = 15; + const TP_ID = 16; + const TP_PTR = 17; + const TP_LDELMAKENOCACHE = 18; + const TP_LDELIF = 19; + const TP_LDELFOR = 20; + const TP_SEMICOLON = 21; + const TP_INCDEC = 22; + const TP_TO = 23; + const TP_STEP = 24; + const TP_LDELFOREACH = 25; + const TP_SPACE = 26; + const TP_AS = 27; + const TP_APTR = 28; + const TP_LDELSETFILTER = 29; + const TP_CLOSETAG = 30; + const TP_LDELSLASH = 31; + const TP_ATTR = 32; + const TP_INTEGER = 33; + const TP_COMMA = 34; + const TP_OPENP = 35; + const TP_CLOSEP = 36; + const TP_MATH = 37; + const TP_UNIMATH = 38; + const TP_ISIN = 39; + const TP_QMARK = 40; + const TP_NOT = 41; + const TP_TYPECAST = 42; + const TP_HEX = 43; + const TP_DOT = 44; + const TP_INSTANCEOF = 45; + const TP_SINGLEQUOTESTRING = 46; + const TP_DOUBLECOLON = 47; + const TP_NAMESPACE = 48; + const TP_AT = 49; + const TP_HATCH = 50; + const TP_OPENB = 51; + const TP_CLOSEB = 52; + const TP_DOLLAR = 53; + const TP_LOGOP = 54; + const TP_SLOGOP = 55; + const TP_TLOGOP = 56; + const TP_SINGLECOND = 57; + const TP_ARRAYOPEN = 58; + const TP_QUOTE = 59; + const TP_BACKTICK = 60; + const YY_NO_ACTION = 514; + const YY_ACCEPT_ACTION = 513; + const YY_ERROR_ACTION = 512; + + const YY_SZ_ACTTAB = 1997; +public static $yy_action = array( + 249, 250, 239, 1, 27, 127, 220, 184, 160, 213, + 11, 54, 278, 10, 173, 34, 108, 387, 282, 279, + 223, 321, 221, 8, 194, 387, 18, 387, 85, 41, + 387, 285, 42, 44, 264, 222, 387, 209, 387, 198, + 387, 52, 5, 307, 288, 288, 164, 283, 224, 4, + 50, 249, 250, 239, 1, 232, 131, 381, 189, 205, + 213, 11, 54, 39, 35, 243, 31, 108, 94, 17, + 381, 223, 321, 221, 439, 226, 381, 33, 49, 426, + 41, 439, 89, 42, 44, 264, 222, 9, 235, 163, + 198, 426, 52, 5, 131, 288, 212, 284, 102, 106, + 4, 50, 249, 250, 239, 1, 232, 129, 426, 189, + 347, 213, 11, 54, 175, 324, 347, 208, 108, 22, + 426, 301, 223, 321, 221, 302, 226, 135, 18, 49, + 52, 41, 26, 288, 42, 44, 264, 222, 16, 235, + 294, 198, 204, 52, 5, 170, 288, 32, 90, 267, + 268, 4, 50, 249, 250, 239, 1, 20, 129, 185, + 179, 255, 213, 11, 54, 455, 288, 192, 455, 108, + 175, 167, 455, 223, 321, 221, 439, 226, 256, 18, + 55, 292, 41, 439, 132, 42, 44, 264, 222, 427, + 235, 12, 198, 165, 52, 5, 232, 288, 288, 347, + 153, 427, 4, 50, 249, 250, 239, 1, 232, 129, + 286, 181, 347, 213, 11, 54, 24, 13, 347, 49, + 108, 232, 320, 426, 223, 321, 221, 195, 201, 173, + 18, 49, 139, 41, 296, 426, 42, 44, 264, 222, + 7, 235, 286, 198, 49, 52, 5, 147, 288, 117, + 150, 317, 263, 4, 50, 249, 250, 239, 1, 95, + 130, 173, 189, 155, 213, 11, 54, 22, 244, 271, + 192, 108, 323, 286, 101, 223, 321, 221, 294, 226, + 204, 18, 348, 257, 41, 166, 283, 42, 44, 264, + 222, 28, 235, 300, 198, 348, 52, 5, 247, 288, + 117, 348, 94, 206, 4, 50, 249, 250, 239, 1, + 95, 129, 22, 189, 277, 213, 11, 54, 91, 274, + 224, 426, 108, 323, 216, 156, 223, 321, 221, 132, + 180, 262, 18, 426, 100, 41, 12, 288, 42, 44, + 264, 222, 15, 235, 216, 198, 254, 52, 5, 233, + 288, 210, 190, 192, 100, 4, 50, 249, 250, 239, + 1, 3, 131, 94, 189, 192, 213, 11, 54, 269, + 10, 204, 290, 108, 325, 216, 224, 223, 321, 221, + 23, 226, 211, 33, 315, 100, 45, 513, 92, 42, + 44, 264, 222, 102, 235, 178, 198, 268, 52, 5, + 275, 288, 161, 192, 37, 25, 4, 50, 249, 250, + 239, 1, 286, 129, 172, 187, 305, 213, 11, 54, + 164, 283, 310, 141, 108, 281, 281, 236, 223, 321, + 221, 169, 226, 230, 18, 122, 171, 41, 225, 175, + 42, 44, 264, 222, 144, 235, 303, 198, 134, 52, + 5, 265, 288, 151, 286, 192, 175, 4, 50, 249, + 250, 239, 1, 286, 128, 94, 189, 143, 213, 11, + 54, 219, 152, 207, 193, 108, 149, 281, 31, 223, + 321, 221, 100, 226, 21, 6, 286, 288, 41, 158, + 16, 42, 44, 264, 222, 102, 235, 238, 198, 286, + 52, 5, 157, 288, 281, 122, 168, 283, 4, 50, + 249, 250, 239, 1, 30, 93, 308, 51, 215, 213, + 11, 54, 53, 251, 140, 248, 108, 245, 304, 116, + 223, 321, 221, 111, 226, 176, 18, 270, 266, 41, + 224, 322, 42, 44, 264, 222, 7, 235, 259, 198, + 147, 52, 5, 257, 288, 43, 40, 38, 83, 4, + 50, 241, 214, 204, 319, 280, 88, 107, 138, 182, + 97, 64, 311, 312, 313, 316, 95, 281, 298, 258, + 142, 234, 94, 105, 272, 197, 231, 482, 237, 323, + 37, 133, 324, 241, 214, 204, 319, 314, 88, 107, + 296, 183, 97, 82, 84, 43, 40, 38, 95, 296, + 296, 258, 296, 296, 296, 159, 272, 197, 231, 296, + 237, 323, 311, 312, 313, 316, 241, 296, 204, 296, + 296, 103, 296, 296, 199, 104, 77, 296, 296, 110, + 296, 95, 296, 296, 258, 278, 296, 296, 34, 272, + 197, 231, 279, 237, 323, 43, 40, 38, 296, 296, + 296, 241, 26, 204, 196, 276, 103, 296, 16, 199, + 104, 77, 311, 312, 313, 316, 95, 192, 296, 258, + 146, 296, 296, 296, 272, 197, 231, 296, 237, 323, + 286, 393, 39, 35, 243, 296, 296, 296, 296, 191, + 276, 296, 26, 318, 252, 253, 126, 296, 16, 249, + 250, 239, 1, 296, 296, 131, 296, 261, 213, 11, + 54, 296, 296, 296, 426, 108, 393, 393, 393, 223, + 321, 221, 241, 296, 204, 299, 426, 103, 107, 296, + 183, 97, 82, 393, 393, 393, 393, 95, 296, 260, + 258, 52, 296, 296, 288, 272, 197, 231, 296, 237, + 323, 293, 296, 296, 296, 296, 296, 249, 250, 239, + 2, 296, 295, 296, 296, 296, 213, 11, 54, 296, + 296, 177, 296, 108, 136, 296, 296, 223, 321, 221, + 296, 296, 296, 293, 43, 40, 38, 296, 296, 249, + 250, 239, 2, 296, 295, 43, 40, 38, 213, 11, + 54, 311, 312, 313, 316, 108, 296, 291, 14, 223, + 321, 221, 311, 312, 313, 316, 296, 296, 241, 296, + 204, 296, 192, 103, 296, 296, 199, 104, 77, 296, + 296, 296, 296, 95, 383, 296, 258, 296, 296, 297, + 14, 272, 197, 231, 296, 237, 323, 383, 296, 296, + 241, 296, 204, 383, 296, 99, 296, 287, 199, 120, + 48, 241, 112, 204, 296, 95, 103, 296, 258, 199, + 120, 74, 296, 272, 197, 231, 95, 237, 323, 258, + 455, 296, 296, 455, 272, 197, 231, 455, 237, 323, + 241, 296, 204, 296, 296, 103, 200, 296, 199, 120, + 74, 296, 296, 296, 296, 95, 296, 296, 258, 278, + 296, 296, 34, 272, 197, 231, 279, 237, 323, 241, + 455, 204, 296, 296, 99, 202, 296, 199, 120, 56, + 241, 211, 204, 296, 95, 103, 296, 258, 199, 120, + 74, 296, 272, 197, 231, 95, 237, 323, 258, 227, + 296, 296, 296, 272, 197, 231, 296, 237, 323, 241, + 296, 204, 148, 296, 103, 203, 86, 199, 120, 73, + 296, 296, 286, 296, 95, 296, 296, 258, 278, 296, + 296, 34, 272, 197, 231, 279, 237, 323, 241, 296, + 204, 175, 296, 103, 296, 296, 199, 120, 75, 241, + 296, 204, 296, 95, 103, 296, 258, 199, 120, 63, + 296, 272, 197, 231, 95, 237, 323, 258, 229, 192, + 296, 296, 272, 197, 231, 296, 237, 323, 241, 296, + 204, 380, 296, 103, 296, 296, 199, 120, 58, 296, + 296, 296, 296, 95, 380, 296, 258, 296, 296, 296, + 380, 272, 197, 231, 296, 237, 323, 241, 296, 204, + 296, 296, 103, 296, 296, 199, 120, 71, 241, 296, + 204, 296, 95, 103, 296, 258, 199, 120, 79, 296, + 272, 197, 231, 95, 237, 323, 258, 296, 296, 296, + 154, 272, 197, 231, 87, 237, 323, 241, 296, 204, + 286, 296, 103, 296, 296, 199, 120, 70, 296, 296, + 296, 296, 95, 296, 296, 258, 296, 296, 296, 175, + 272, 197, 231, 296, 237, 323, 241, 296, 204, 296, + 296, 103, 296, 296, 199, 120, 56, 241, 296, 204, + 296, 95, 103, 296, 258, 199, 120, 46, 296, 272, + 197, 231, 95, 237, 323, 258, 296, 296, 296, 296, + 272, 197, 231, 296, 237, 323, 241, 296, 204, 296, + 296, 103, 296, 296, 199, 120, 78, 296, 296, 296, + 296, 95, 296, 296, 258, 296, 296, 296, 296, 272, + 197, 231, 296, 237, 323, 241, 296, 204, 296, 296, + 103, 296, 296, 199, 120, 66, 241, 296, 204, 296, + 95, 103, 296, 258, 199, 120, 59, 296, 272, 197, + 231, 95, 237, 323, 258, 296, 296, 296, 296, 272, + 197, 231, 296, 237, 323, 241, 296, 204, 296, 296, + 103, 296, 296, 186, 109, 57, 296, 296, 296, 296, + 95, 296, 296, 258, 296, 296, 296, 296, 272, 197, + 231, 296, 237, 323, 241, 296, 204, 296, 296, 103, + 296, 296, 188, 120, 67, 241, 296, 204, 296, 95, + 103, 296, 258, 199, 96, 62, 296, 272, 197, 231, + 95, 237, 323, 258, 296, 296, 296, 296, 272, 197, + 231, 296, 237, 323, 241, 296, 204, 296, 296, 103, + 296, 296, 199, 120, 80, 296, 296, 296, 296, 95, + 296, 296, 258, 296, 296, 296, 296, 272, 197, 231, + 296, 237, 323, 241, 296, 204, 296, 296, 103, 296, + 296, 199, 120, 76, 241, 296, 204, 296, 95, 103, + 296, 258, 199, 120, 81, 296, 272, 197, 231, 95, + 237, 323, 258, 296, 296, 296, 296, 272, 197, 231, + 296, 237, 323, 241, 296, 204, 296, 296, 103, 296, + 296, 199, 120, 65, 296, 296, 296, 296, 95, 296, + 296, 258, 296, 296, 296, 296, 272, 197, 231, 296, + 237, 323, 241, 296, 204, 296, 296, 103, 296, 296, + 199, 96, 68, 241, 296, 204, 296, 95, 103, 296, + 258, 199, 120, 61, 296, 272, 197, 231, 95, 237, + 323, 258, 296, 296, 296, 296, 272, 197, 231, 296, + 237, 323, 241, 296, 204, 296, 296, 103, 296, 296, + 199, 98, 69, 296, 296, 296, 296, 95, 296, 296, + 258, 296, 296, 296, 296, 272, 197, 231, 296, 237, + 323, 241, 296, 204, 296, 296, 103, 296, 296, 199, + 120, 72, 241, 296, 204, 296, 95, 103, 296, 258, + 199, 120, 47, 296, 272, 197, 231, 95, 237, 323, + 258, 296, 296, 296, 296, 272, 197, 231, 296, 237, + 323, 241, 192, 204, 296, 296, 103, 296, 296, 199, + 120, 60, 296, 296, 351, 296, 95, 296, 217, 258, + 296, 296, 296, 296, 272, 197, 231, 26, 237, 323, + 241, 296, 204, 16, 296, 103, 426, 296, 199, 125, + 296, 241, 296, 204, 296, 95, 103, 296, 426, 199, + 118, 296, 242, 272, 197, 231, 95, 237, 323, 296, + 296, 296, 296, 246, 272, 197, 231, 296, 237, 323, + 241, 296, 204, 278, 296, 103, 34, 296, 199, 121, + 279, 296, 296, 296, 296, 95, 296, 296, 296, 296, + 26, 296, 162, 272, 197, 231, 16, 237, 323, 241, + 296, 204, 296, 296, 103, 296, 296, 199, 123, 296, + 241, 296, 204, 296, 95, 103, 296, 296, 199, 114, + 296, 296, 272, 197, 231, 95, 237, 323, 296, 296, + 296, 296, 296, 272, 197, 231, 296, 237, 323, 241, + 296, 204, 296, 145, 103, 296, 296, 199, 124, 296, + 296, 296, 296, 286, 95, 39, 35, 243, 296, 296, + 296, 296, 272, 197, 231, 296, 237, 323, 241, 296, + 204, 296, 296, 103, 296, 296, 199, 115, 296, 241, + 296, 204, 296, 95, 103, 296, 296, 199, 113, 296, + 296, 272, 197, 231, 95, 237, 323, 296, 296, 296, + 296, 296, 272, 197, 231, 228, 237, 323, 241, 296, + 204, 296, 455, 103, 296, 455, 199, 119, 3, 455, + 439, 296, 296, 95, 296, 296, 296, 296, 296, 296, + 296, 272, 197, 231, 228, 237, 323, 296, 296, 296, + 296, 455, 296, 296, 455, 296, 296, 439, 455, 439, + 439, 228, 455, 296, 439, 296, 296, 137, 455, 296, + 296, 455, 296, 296, 32, 455, 439, 286, 296, 39, + 35, 243, 29, 296, 26, 296, 439, 296, 296, 439, + 16, 455, 296, 439, 306, 43, 40, 38, 296, 296, + 296, 296, 296, 439, 296, 296, 439, 296, 455, 296, + 439, 26, 311, 312, 313, 316, 296, 16, 228, 296, + 296, 296, 43, 40, 38, 455, 296, 296, 455, 296, + 296, 296, 455, 439, 296, 296, 19, 296, 296, 311, + 312, 313, 316, 455, 296, 296, 455, 296, 296, 296, + 455, 439, 296, 296, 296, 43, 40, 38, 296, 296, + 439, 296, 296, 439, 174, 455, 296, 439, 296, 240, + 309, 296, 311, 312, 313, 316, 296, 289, 439, 296, + 36, 439, 296, 455, 296, 439, 296, 296, 43, 40, + 38, 296, 296, 43, 40, 38, 296, 296, 296, 296, + 296, 43, 40, 38, 296, 311, 312, 313, 316, 296, + 311, 312, 313, 316, 296, 43, 40, 38, 311, 312, + 313, 316, 273, 43, 40, 38, 296, 296, 296, 296, + 296, 296, 311, 312, 313, 316, 296, 296, 296, 296, + 311, 312, 313, 316, 455, 296, 296, 455, 43, 40, + 38, 455, 439, 218, 43, 40, 38, 296, 296, 296, + 296, 296, 296, 296, 296, 311, 312, 313, 316, 296, + 296, 311, 312, 313, 316, 296, 296, 296, 296, 439, + 296, 296, 439, 296, 455, 296, 439, + ); + public static $yy_lookahead = array( + 9, 10, 11, 12, 12, 14, 14, 16, 16, 18, + 19, 20, 9, 34, 102, 12, 25, 13, 70, 16, + 29, 30, 31, 35, 33, 21, 35, 23, 95, 38, + 26, 52, 41, 42, 43, 44, 32, 46, 34, 48, + 36, 50, 51, 52, 53, 53, 98, 99, 44, 58, + 59, 9, 10, 11, 12, 22, 14, 13, 16, 15, + 18, 19, 20, 85, 86, 87, 15, 25, 17, 21, + 26, 29, 30, 31, 44, 33, 32, 35, 45, 35, + 38, 51, 34, 41, 42, 43, 44, 35, 46, 77, + 48, 47, 50, 51, 14, 53, 16, 13, 47, 47, + 58, 59, 9, 10, 11, 12, 22, 14, 35, 16, + 26, 18, 19, 20, 102, 103, 32, 44, 25, 34, + 47, 36, 29, 30, 31, 52, 33, 14, 35, 45, + 50, 38, 26, 53, 41, 42, 43, 44, 32, 46, + 66, 48, 68, 50, 51, 77, 53, 15, 35, 7, + 8, 58, 59, 9, 10, 11, 12, 12, 14, 14, + 16, 16, 18, 19, 20, 9, 53, 1, 12, 25, + 102, 82, 16, 29, 30, 31, 44, 33, 33, 35, + 106, 107, 38, 51, 44, 41, 42, 43, 44, 35, + 46, 51, 48, 82, 50, 51, 22, 53, 53, 13, + 73, 47, 58, 59, 9, 10, 11, 12, 22, 14, + 83, 16, 26, 18, 19, 20, 28, 12, 32, 45, + 25, 22, 70, 35, 29, 30, 31, 65, 33, 102, + 35, 45, 73, 38, 60, 47, 41, 42, 43, 44, + 35, 46, 83, 48, 45, 50, 51, 95, 53, 71, + 95, 52, 74, 58, 59, 9, 10, 11, 12, 81, + 14, 102, 16, 73, 18, 19, 20, 34, 90, 36, + 1, 25, 94, 83, 81, 29, 30, 31, 66, 33, + 68, 35, 13, 96, 38, 98, 99, 41, 42, 43, + 44, 15, 46, 100, 48, 26, 50, 51, 14, 53, + 71, 32, 17, 74, 58, 59, 9, 10, 11, 12, + 81, 14, 34, 16, 36, 18, 19, 20, 82, 107, + 44, 35, 25, 94, 71, 95, 29, 30, 31, 44, + 33, 78, 35, 47, 81, 38, 51, 53, 41, 42, + 43, 44, 15, 46, 71, 48, 16, 50, 51, 22, + 53, 78, 79, 1, 81, 58, 59, 9, 10, 11, + 12, 15, 14, 17, 16, 1, 18, 19, 20, 66, + 34, 68, 36, 25, 16, 71, 44, 29, 30, 31, + 28, 33, 78, 35, 52, 81, 38, 62, 63, 41, + 42, 43, 44, 47, 46, 6, 48, 8, 50, 51, + 16, 53, 73, 1, 2, 40, 58, 59, 9, 10, + 11, 12, 83, 14, 77, 16, 52, 18, 19, 20, + 98, 99, 52, 95, 25, 97, 97, 92, 29, 30, + 31, 77, 33, 49, 35, 100, 14, 38, 16, 102, + 41, 42, 43, 44, 73, 46, 14, 48, 14, 50, + 51, 36, 53, 73, 83, 1, 102, 58, 59, 9, + 10, 11, 12, 83, 14, 17, 16, 50, 18, 19, + 20, 17, 71, 64, 65, 25, 73, 97, 15, 29, + 30, 31, 81, 33, 26, 35, 83, 53, 38, 73, + 32, 41, 42, 43, 44, 47, 46, 92, 48, 83, + 50, 51, 95, 53, 97, 100, 98, 99, 58, 59, + 9, 10, 11, 12, 23, 14, 52, 16, 16, 18, + 19, 20, 16, 7, 50, 16, 25, 13, 13, 16, + 29, 30, 31, 16, 33, 16, 35, 33, 33, 38, + 44, 16, 41, 42, 43, 44, 35, 46, 16, 48, + 95, 50, 51, 96, 53, 37, 38, 39, 81, 58, + 59, 66, 67, 68, 69, 83, 71, 72, 95, 74, + 75, 76, 54, 55, 56, 57, 81, 97, 60, 84, + 95, 13, 17, 80, 89, 90, 91, 1, 93, 94, + 2, 81, 103, 66, 67, 68, 69, 99, 71, 72, + 108, 74, 75, 76, 81, 37, 38, 39, 81, 108, + 108, 84, 108, 108, 108, 95, 89, 90, 91, 108, + 93, 94, 54, 55, 56, 57, 66, 108, 68, 108, + 108, 71, 108, 108, 74, 75, 76, 108, 108, 21, + 108, 81, 108, 108, 84, 9, 108, 108, 12, 89, + 90, 91, 16, 93, 94, 37, 38, 39, 108, 108, + 108, 66, 26, 68, 104, 105, 71, 108, 32, 74, + 75, 76, 54, 55, 56, 57, 81, 1, 108, 84, + 73, 108, 108, 108, 89, 90, 91, 108, 93, 94, + 83, 2, 85, 86, 87, 108, 108, 108, 108, 104, + 105, 108, 26, 3, 4, 5, 6, 108, 32, 9, + 10, 11, 12, 108, 108, 14, 108, 16, 18, 19, + 20, 108, 108, 108, 35, 25, 37, 38, 39, 29, + 30, 31, 66, 108, 68, 69, 47, 71, 72, 108, + 74, 75, 76, 54, 55, 56, 57, 81, 108, 48, + 84, 50, 108, 108, 53, 89, 90, 91, 108, 93, + 94, 3, 108, 108, 108, 108, 108, 9, 10, 11, + 12, 108, 14, 108, 108, 108, 18, 19, 20, 108, + 108, 13, 108, 25, 27, 108, 108, 29, 30, 31, + 108, 108, 108, 3, 37, 38, 39, 108, 108, 9, + 10, 11, 12, 108, 14, 37, 38, 39, 18, 19, + 20, 54, 55, 56, 57, 25, 108, 59, 60, 29, + 30, 31, 54, 55, 56, 57, 108, 108, 66, 108, + 68, 108, 1, 71, 108, 108, 74, 75, 76, 108, + 108, 108, 108, 81, 13, 108, 84, 108, 108, 59, + 60, 89, 90, 91, 108, 93, 94, 26, 108, 108, + 66, 108, 68, 32, 108, 71, 108, 105, 74, 75, + 76, 66, 78, 68, 108, 81, 71, 108, 84, 74, + 75, 76, 108, 89, 90, 91, 81, 93, 94, 84, + 9, 108, 108, 12, 89, 90, 91, 16, 93, 94, + 66, 108, 68, 108, 108, 71, 101, 108, 74, 75, + 76, 108, 108, 108, 108, 81, 108, 108, 84, 9, + 108, 108, 12, 89, 90, 91, 16, 93, 94, 66, + 49, 68, 108, 108, 71, 101, 108, 74, 75, 76, + 66, 78, 68, 108, 81, 71, 108, 84, 74, 75, + 76, 108, 89, 90, 91, 81, 93, 94, 84, 49, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 66, + 108, 68, 73, 108, 71, 101, 77, 74, 75, 76, + 108, 108, 83, 108, 81, 108, 108, 84, 9, 108, + 108, 12, 89, 90, 91, 16, 93, 94, 66, 108, + 68, 102, 108, 71, 108, 108, 74, 75, 76, 66, + 108, 68, 108, 81, 71, 108, 84, 74, 75, 76, + 108, 89, 90, 91, 81, 93, 94, 84, 49, 1, + 108, 108, 89, 90, 91, 108, 93, 94, 66, 108, + 68, 13, 108, 71, 108, 108, 74, 75, 76, 108, + 108, 108, 108, 81, 26, 108, 84, 108, 108, 108, + 32, 89, 90, 91, 108, 93, 94, 66, 108, 68, + 108, 108, 71, 108, 108, 74, 75, 76, 66, 108, + 68, 108, 81, 71, 108, 84, 74, 75, 76, 108, + 89, 90, 91, 81, 93, 94, 84, 108, 108, 108, + 73, 89, 90, 91, 77, 93, 94, 66, 108, 68, + 83, 108, 71, 108, 108, 74, 75, 76, 108, 108, + 108, 108, 81, 108, 108, 84, 108, 108, 108, 102, + 89, 90, 91, 108, 93, 94, 66, 108, 68, 108, + 108, 71, 108, 108, 74, 75, 76, 66, 108, 68, + 108, 81, 71, 108, 84, 74, 75, 76, 108, 89, + 90, 91, 81, 93, 94, 84, 108, 108, 108, 108, + 89, 90, 91, 108, 93, 94, 66, 108, 68, 108, + 108, 71, 108, 108, 74, 75, 76, 108, 108, 108, + 108, 81, 108, 108, 84, 108, 108, 108, 108, 89, + 90, 91, 108, 93, 94, 66, 108, 68, 108, 108, + 71, 108, 108, 74, 75, 76, 66, 108, 68, 108, + 81, 71, 108, 84, 74, 75, 76, 108, 89, 90, + 91, 81, 93, 94, 84, 108, 108, 108, 108, 89, + 90, 91, 108, 93, 94, 66, 108, 68, 108, 108, + 71, 108, 108, 74, 75, 76, 108, 108, 108, 108, + 81, 108, 108, 84, 108, 108, 108, 108, 89, 90, + 91, 108, 93, 94, 66, 108, 68, 108, 108, 71, + 108, 108, 74, 75, 76, 66, 108, 68, 108, 81, + 71, 108, 84, 74, 75, 76, 108, 89, 90, 91, + 81, 93, 94, 84, 108, 108, 108, 108, 89, 90, + 91, 108, 93, 94, 66, 108, 68, 108, 108, 71, + 108, 108, 74, 75, 76, 108, 108, 108, 108, 81, + 108, 108, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 66, 108, 68, 108, 108, 71, 108, + 108, 74, 75, 76, 66, 108, 68, 108, 81, 71, + 108, 84, 74, 75, 76, 108, 89, 90, 91, 81, + 93, 94, 84, 108, 108, 108, 108, 89, 90, 91, + 108, 93, 94, 66, 108, 68, 108, 108, 71, 108, + 108, 74, 75, 76, 108, 108, 108, 108, 81, 108, + 108, 84, 108, 108, 108, 108, 89, 90, 91, 108, + 93, 94, 66, 108, 68, 108, 108, 71, 108, 108, + 74, 75, 76, 66, 108, 68, 108, 81, 71, 108, + 84, 74, 75, 76, 108, 89, 90, 91, 81, 93, + 94, 84, 108, 108, 108, 108, 89, 90, 91, 108, + 93, 94, 66, 108, 68, 108, 108, 71, 108, 108, + 74, 75, 76, 108, 108, 108, 108, 81, 108, 108, + 84, 108, 108, 108, 108, 89, 90, 91, 108, 93, + 94, 66, 108, 68, 108, 108, 71, 108, 108, 74, + 75, 76, 66, 108, 68, 108, 81, 71, 108, 84, + 74, 75, 76, 108, 89, 90, 91, 81, 93, 94, + 84, 108, 108, 108, 108, 89, 90, 91, 108, 93, + 94, 66, 1, 68, 108, 108, 71, 108, 108, 74, + 75, 76, 108, 108, 13, 108, 81, 108, 17, 84, + 108, 108, 108, 108, 89, 90, 91, 26, 93, 94, + 66, 108, 68, 32, 108, 71, 35, 108, 74, 75, + 108, 66, 108, 68, 108, 81, 71, 108, 47, 74, + 75, 108, 88, 89, 90, 91, 81, 93, 94, 108, + 108, 108, 108, 88, 89, 90, 91, 108, 93, 94, + 66, 108, 68, 9, 108, 71, 12, 108, 74, 75, + 16, 108, 108, 108, 108, 81, 108, 108, 108, 108, + 26, 108, 28, 89, 90, 91, 32, 93, 94, 66, + 108, 68, 108, 108, 71, 108, 108, 74, 75, 108, + 66, 108, 68, 108, 81, 71, 108, 108, 74, 75, + 108, 108, 89, 90, 91, 81, 93, 94, 108, 108, + 108, 108, 108, 89, 90, 91, 108, 93, 94, 66, + 108, 68, 108, 73, 71, 108, 108, 74, 75, 108, + 108, 108, 108, 83, 81, 85, 86, 87, 108, 108, + 108, 108, 89, 90, 91, 108, 93, 94, 66, 108, + 68, 108, 108, 71, 108, 108, 74, 75, 108, 66, + 108, 68, 108, 81, 71, 108, 108, 74, 75, 108, + 108, 89, 90, 91, 81, 93, 94, 108, 108, 108, + 108, 108, 89, 90, 91, 2, 93, 94, 66, 108, + 68, 108, 9, 71, 108, 12, 74, 75, 15, 16, + 17, 108, 108, 81, 108, 108, 108, 108, 108, 108, + 108, 89, 90, 91, 2, 93, 94, 108, 108, 108, + 108, 9, 108, 108, 12, 108, 108, 44, 16, 17, + 47, 2, 49, 108, 51, 108, 108, 73, 9, 108, + 108, 12, 108, 108, 15, 16, 17, 83, 108, 85, + 86, 87, 24, 108, 26, 108, 44, 108, 108, 47, + 32, 49, 108, 51, 52, 37, 38, 39, 108, 108, + 108, 108, 108, 44, 108, 108, 47, 108, 49, 108, + 51, 26, 54, 55, 56, 57, 108, 32, 2, 108, + 108, 108, 37, 38, 39, 9, 108, 108, 12, 108, + 108, 108, 16, 17, 108, 108, 2, 108, 108, 54, + 55, 56, 57, 9, 108, 108, 12, 108, 108, 108, + 16, 17, 108, 108, 108, 37, 38, 39, 108, 108, + 44, 108, 108, 47, 13, 49, 108, 51, 108, 13, + 52, 108, 54, 55, 56, 57, 108, 13, 44, 108, + 2, 47, 108, 49, 108, 51, 108, 108, 37, 38, + 39, 108, 108, 37, 38, 39, 108, 108, 108, 108, + 108, 37, 38, 39, 108, 54, 55, 56, 57, 108, + 54, 55, 56, 57, 108, 37, 38, 39, 54, 55, + 56, 57, 36, 37, 38, 39, 108, 108, 108, 108, + 108, 108, 54, 55, 56, 57, 108, 108, 108, 108, + 54, 55, 56, 57, 9, 108, 108, 12, 37, 38, + 39, 16, 17, 36, 37, 38, 39, 108, 108, 108, + 108, 108, 108, 108, 108, 54, 55, 56, 57, 108, + 108, 54, 55, 56, 57, 108, 108, 108, 108, 44, + 108, 108, 47, 108, 49, 108, 51, +); + const YY_SHIFT_USE_DFLT = -22; + const YY_SHIFT_MAX = 230; + public static $yy_shift_ofst = array( + -22, 501, 501, 93, 399, 399, 450, 93, 93, 93, + 399, 450, -9, 93, 93, 93, 93, 93, 93, 144, + 93, 195, 93, 93, 93, 246, 195, 93, 93, 93, + 93, 93, 297, 93, 93, 93, 93, 348, 42, 42, + 42, 42, 42, 42, 42, 42, 1768, 1795, 1795, 701, + 758, 1521, 80, 676, 113, 790, 1927, 1828, 1896, 568, + 768, 1861, 757, 1866, 1874, 1888, 618, 518, 1921, 1921, + 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, + 1921, 1921, 1921, 1584, 636, 285, 676, 676, 346, 113, + 113, 402, 700, 1723, -8, 910, 831, 269, 1028, 51, + 3, 3, 422, 448, 352, 106, 422, 106, 458, 364, + 434, 454, 106, 166, 166, 166, 166, 565, 166, 166, + 166, 586, 565, 166, 166, -22, -22, 1752, 1769, 1826, + 1844, 1945, 145, 979, 156, 132, 284, 106, 140, 106, + 30, 140, 140, 30, 106, 106, 106, 140, 106, 106, + 140, 106, 327, 106, 106, 106, 140, 140, 106, 140, + 205, 106, 284, 166, 565, 588, 565, 588, 565, 166, + 166, -12, 166, -22, -22, -22, -22, -22, -22, 689, + 4, 44, 84, 186, 73, 881, 199, 188, 174, 286, + 48, 336, 384, 389, 332, 142, -21, 52, 154, 33, + 85, 276, 278, 233, 515, 509, 474, 516, 502, 464, + 491, 415, 417, 432, 514, 370, 463, 506, 365, 513, + -12, 517, 504, 519, 505, 511, 496, 525, 532, 330, + 358, +); + const YY_REDUCE_USE_DFLT = -89; + const YY_REDUCE_MAX = 178; + public static $yy_reduce_ofst = array( + 325, 527, 495, 666, 595, 560, 863, 874, 834, 805, + 762, 794, 1179, 1455, 1208, 1012, 1386, 1139, 1070, 1110, + 1150, 1219, 1248, 1277, 1288, 1317, 1346, 1357, 1415, 1426, + 1081, 1041, 1001, 972, 943, 932, 903, 1484, 1495, 1622, + 1633, 1662, 1593, 1564, 1553, 1524, 1704, 607, 1590, 178, + 74, 1027, 229, 899, 273, 212, -22, -22, -22, -22, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22, 380, 329, 187, 159, 127, -52, 253, + 304, 12, 303, 152, 193, 328, 68, 68, 68, 322, + 328, 407, 405, 322, 68, 190, 335, 416, 403, 68, + 401, 354, 371, 68, 68, 68, 337, 322, 68, 68, + 68, 68, 408, 68, 68, 68, 409, 455, 455, 455, + 455, 455, 510, 480, 455, 455, 477, 482, 457, 482, + 473, 457, 457, 485, 482, 482, 482, 457, 482, 482, + 457, 482, 503, 482, 482, 482, 457, 457, 482, 457, + 520, 482, 523, -88, 498, 489, 498, 489, 498, -88, + -88, -67, -88, 111, 155, 89, 236, 230, 162, +); + public static $yyExpectedTokens = array( + array(), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(9, 10, 11, 12, 14, 16, 18, 19, 20, 25, 29, 30, 31, 33, 35, 38, 41, 42, 43, 44, 46, 48, 50, 51, 53, 58, 59, ), + array(24, 26, 32, 37, 38, 39, 54, 55, 56, 57, ), + array(26, 32, 37, 38, 39, 54, 55, 56, 57, ), + array(26, 32, 37, 38, 39, 54, 55, 56, 57, ), + array(14, 16, 48, 50, 53, ), + array(3, 9, 10, 11, 12, 14, 18, 19, 20, 25, 29, 30, 31, 59, 60, ), + array(1, 13, 17, 26, 32, 35, 47, ), + array(14, 16, 50, 53, ), + array(1, 26, 32, ), + array(14, 35, 53, ), + array(3, 9, 10, 11, 12, 14, 18, 19, 20, 25, 29, 30, 31, 59, 60, ), + array(36, 37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 52, 54, 55, 56, 57, ), + array(36, 37, 38, 39, 54, 55, 56, 57, ), + array(13, 37, 38, 39, 54, 55, 56, 57, ), + array(13, 37, 38, 39, 54, 55, 56, 57, ), + array(13, 37, 38, 39, 54, 55, 56, 57, ), + array(27, 37, 38, 39, 54, 55, 56, 57, ), + array(13, 37, 38, 39, 54, 55, 56, 57, ), + array(13, 37, 38, 39, 54, 55, 56, 57, ), + array(2, 37, 38, 39, 54, 55, 56, 57, ), + array(21, 37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, 60, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(37, 38, 39, 54, 55, 56, 57, ), + array(9, 12, 16, 26, 28, 32, ), + array(9, 12, 16, 26, 32, ), + array(17, 44, 51, ), + array(1, 26, 32, ), + array(1, 26, 32, ), + array(15, 17, 47, ), + array(14, 35, 53, ), + array(14, 35, 53, ), + array(1, 2, ), + array(3, 4, 5, 6, 9, 10, 11, 12, 18, 19, 20, 25, 29, 30, 31, ), + array(2, 9, 12, 15, 16, 17, 44, 47, 49, 51, ), + array(12, 14, 16, 53, ), + array(9, 12, 16, 49, ), + array(1, 13, 26, 32, ), + array(1, 13, 26, 32, ), + array(1, 13, 26, 32, ), + array(15, 17, 47, ), + array(9, 12, 16, ), + array(9, 12, 16, ), + array(14, 16, ), + array(17, 47, ), + array(1, 28, ), + array(26, 32, ), + array(14, 16, ), + array(26, 32, ), + array(26, 32, ), + array(1, 52, ), + array(14, 53, ), + array(1, 17, ), + array(26, 32, ), + array(1, ), + array(1, ), + array(1, ), + array(1, ), + array(17, ), + array(1, ), + array(1, ), + array(1, ), + array(1, ), + array(17, ), + array(1, ), + array(1, ), + array(), + array(), + array(2, 9, 12, 16, 17, 44, 47, 49, 51, 52, ), + array(2, 9, 12, 15, 16, 17, 44, 47, 49, 51, ), + array(2, 9, 12, 16, 17, 44, 47, 49, 51, ), + array(2, 9, 12, 16, 17, 44, 47, 49, 51, ), + array(9, 12, 16, 17, 44, 47, 49, 51, ), + array(12, 14, 16, 33, 53, ), + array(9, 12, 16, 49, ), + array(9, 12, 16, ), + array(15, 44, 51, ), + array(14, 53, ), + array(26, 32, ), + array(44, 51, ), + array(26, 32, ), + array(44, 51, ), + array(44, 51, ), + array(44, 51, ), + array(44, 51, ), + array(26, 32, ), + array(26, 32, ), + array(26, 32, ), + array(44, 51, ), + array(26, 32, ), + array(26, 32, ), + array(44, 51, ), + array(26, 32, ), + array(15, 22, ), + array(26, 32, ), + array(26, 32, ), + array(26, 32, ), + array(44, 51, ), + array(44, 51, ), + array(26, 32, ), + array(44, 51, ), + array(12, 35, ), + array(26, 32, ), + array(14, 53, ), + array(1, ), + array(17, ), + array(2, ), + array(17, ), + array(2, ), + array(17, ), + array(1, ), + array(1, ), + array(35, ), + array(1, ), + array(), + array(), + array(), + array(), + array(), + array(), + array(2, 35, 37, 38, 39, 47, 54, 55, 56, 57, ), + array(13, 21, 23, 26, 32, 34, 36, 44, ), + array(13, 15, 26, 32, 35, 47, ), + array(13, 22, 26, 32, 45, ), + array(13, 22, 26, 32, 45, ), + array(35, 44, 47, 52, ), + array(9, 12, 16, 49, ), + array(22, 45, 52, ), + array(28, 35, 47, ), + array(22, 45, 60, ), + array(35, 47, ), + array(21, 34, ), + array(34, 36, ), + array(16, 49, ), + array(6, 8, ), + array(44, 52, ), + array(7, 8, ), + array(34, 52, ), + array(35, 47, ), + array(35, 47, ), + array(22, 45, ), + array(34, 36, ), + array(15, 44, ), + array(34, 36, ), + array(34, 36, ), + array(13, ), + array(16, ), + array(50, ), + array(7, ), + array(16, ), + array(52, ), + array(23, ), + array(36, ), + array(50, ), + array(14, ), + array(13, ), + array(52, ), + array(15, ), + array(16, ), + array(40, ), + array(16, ), + array(35, ), + array(16, ), + array(33, ), + array(16, ), + array(33, ), + array(35, ), + array(44, ), + array(16, ), + array(16, ), + array(16, ), + array(16, ), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), + array(), +); + public static $yy_default = array( + 336, 512, 512, 512, 497, 497, 512, 474, 474, 474, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 377, 377, 356, 512, + 512, 413, 512, 377, 512, 512, 512, 512, 512, 512, + 512, 512, 382, 512, 349, 512, 512, 512, 382, 379, + 389, 388, 384, 402, 473, 397, 498, 500, 401, 361, + 472, 499, 349, 377, 377, 487, 377, 377, 429, 512, + 512, 368, 326, 428, 512, 439, 391, 391, 391, 429, + 439, 439, 512, 429, 391, 377, 512, 377, 377, 391, + 512, 371, 358, 395, 394, 396, 373, 429, 400, 404, + 391, 404, 484, 406, 405, 481, 334, 428, 428, 428, + 428, 428, 512, 441, 439, 455, 512, 363, 435, 354, + 434, 437, 433, 432, 359, 357, 364, 436, 353, 367, + 466, 365, 512, 352, 350, 360, 467, 465, 346, 464, + 439, 366, 512, 369, 461, 475, 488, 476, 485, 372, + 422, 439, 374, 480, 439, 480, 480, 439, 334, 413, + 409, 413, 403, 403, 413, 440, 403, 413, 403, 413, + 512, 512, 512, 332, 409, 512, 512, 512, 423, 403, + 512, 409, 512, 512, 512, 512, 512, 512, 512, 418, + 385, 512, 512, 512, 512, 512, 512, 512, 415, 512, + 455, 512, 512, 512, 411, 486, 409, 512, 512, 512, + 512, 419, 407, 362, 445, 418, 425, 424, 420, 339, + 460, 421, 483, 398, 416, 340, 399, 455, 378, 337, + 338, 330, 328, 329, 442, 443, 444, 438, 392, 393, + 427, 426, 386, 417, 408, 390, 410, 331, 333, 335, + 412, 470, 414, 415, 503, 478, 495, 471, 459, 458, + 375, 457, 344, 462, 508, 493, 376, 496, 456, 509, + 494, 501, 504, 511, 510, 507, 505, 502, 506, 345, + 468, 469, 446, 355, 341, 452, 450, 454, 448, 453, + 447, 489, 490, 491, 463, 449, 492, 451, 327, 342, + 343, 370, 430, 431, 479, 477, +); + const YYNOCODE = 109; + const YYSTACKDEPTH = 500; + const YYNSTATE = 326; + const YYNRULE = 186; + const YYERRORSYMBOL = 61; + const YYERRSYMDT = 'yy0'; + const YYFALLBACK = 0; + public static $yyFallback = array( + ); public function Trace($TraceFILE, $zTracePrompt) { if (!$TraceFILE) { @@ -1840,18 +1110,250 @@ public function PrintTrace() $this->yyTracePrompt = '
'; } + public $yyTraceFILE; + public $yyTracePrompt; + public $yyidx; /* Index of top element in stack */ + public $yyerrcnt; /* Shifts left before out of the error */ + public $yystack = array(); /* The parser's stack */ + + public $yyTokenName = array( + '$', 'VERT', 'COLON', 'TEXT', + 'STRIPON', 'STRIPOFF', 'LITERALSTART', 'LITERALEND', + 'LITERAL', 'SIMPELOUTPUT', 'SIMPLETAG', 'SMARTYBLOCKCHILDPARENT', + 'LDEL', 'RDEL', 'DOLLARID', 'EQUAL', + 'ID', 'PTR', 'LDELMAKENOCACHE', 'LDELIF', + 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', + 'STEP', 'LDELFOREACH', 'SPACE', 'AS', + 'APTR', 'LDELSETFILTER', 'CLOSETAG', 'LDELSLASH', + 'ATTR', 'INTEGER', 'COMMA', 'OPENP', + 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', + 'QMARK', 'NOT', 'TYPECAST', 'HEX', + 'DOT', 'INSTANCEOF', 'SINGLEQUOTESTRING', 'DOUBLECOLON', + 'NAMESPACE', 'AT', 'HATCH', 'OPENB', + 'CLOSEB', 'DOLLAR', 'LOGOP', 'SLOGOP', + 'TLOGOP', 'SINGLECOND', 'ARRAYOPEN', 'QUOTE', + 'BACKTICK', 'error', 'start', 'template', + 'literal_e2', 'literal_e1', 'smartytag', 'tagbody', + 'tag', 'outattr', 'eqoutattr', 'varindexed', + 'output', 'attributes', 'variable', 'value', + 'expr', 'modifierlist', 'statement', 'statements', + 'foraction', 'varvar', 'modparameters', 'attribute', + 'ternary', 'tlop', 'lop', 'scond', + 'array', 'function', 'ns1', 'doublequoted_with_quotes', + 'static_class_access', 'arraydef', 'object', 'arrayindex', + 'indexdef', 'varvarele', 'objectchain', 'objectelement', + 'method', 'params', 'modifier', 'modparameter', + 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent', + ); + + public static $yyRuleName = array( + 'start ::= template', + 'template ::= template TEXT', + 'template ::= template STRIPON', + 'template ::= template STRIPOFF', + 'template ::= template LITERALSTART literal_e2 LITERALEND', + 'literal_e2 ::= literal_e1 LITERALSTART literal_e1 LITERALEND', + 'literal_e2 ::= literal_e1', + 'literal_e1 ::= literal_e1 LITERAL', + 'literal_e1 ::=', + 'template ::= template smartytag', + 'template ::=', + 'smartytag ::= SIMPELOUTPUT', + 'smartytag ::= SIMPLETAG', + 'smartytag ::= SMARTYBLOCKCHILDPARENT', + 'smartytag ::= LDEL tagbody RDEL', + 'smartytag ::= tag RDEL', + 'tagbody ::= outattr', + 'tagbody ::= DOLLARID eqoutattr', + 'tagbody ::= varindexed eqoutattr', + 'eqoutattr ::= EQUAL outattr', + 'outattr ::= output attributes', + 'output ::= variable', + 'output ::= value', + 'output ::= expr', + 'tag ::= LDEL ID attributes', + 'tag ::= LDEL ID', + 'tag ::= LDEL ID modifierlist attributes', + 'tag ::= LDEL ID PTR ID attributes', + 'tag ::= LDEL ID PTR ID modifierlist attributes', + 'tag ::= LDELMAKENOCACHE DOLLARID', + 'tag ::= LDELIF expr', + 'tag ::= LDELIF expr attributes', + 'tag ::= LDELIF statement', + 'tag ::= LDELIF statement attributes', + 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes', + 'foraction ::= EQUAL expr', + 'foraction ::= INCDEC', + 'tag ::= LDELFOR statement TO expr attributes', + 'tag ::= LDELFOR statement TO expr STEP expr attributes', + 'tag ::= LDELFOREACH SPACE expr AS varvar attributes', + 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', + 'tag ::= LDELFOREACH attributes', + 'tag ::= LDELSETFILTER ID modparameters', + 'tag ::= LDELSETFILTER ID modparameters modifierlist', + 'smartytag ::= CLOSETAG', + 'tag ::= LDELSLASH ID', + 'tag ::= LDELSLASH ID modifierlist', + 'tag ::= LDELSLASH ID PTR ID', + 'tag ::= LDELSLASH ID PTR ID modifierlist', + 'attributes ::= attributes attribute', + 'attributes ::= attribute', + 'attributes ::=', + 'attribute ::= SPACE ID EQUAL ID', + 'attribute ::= ATTR expr', + 'attribute ::= ATTR value', + 'attribute ::= SPACE ID', + 'attribute ::= SPACE expr', + 'attribute ::= SPACE value', + 'attribute ::= SPACE INTEGER EQUAL expr', + 'statements ::= statement', + 'statements ::= statements COMMA statement', + 'statement ::= DOLLARID EQUAL INTEGER', + 'statement ::= DOLLARID EQUAL expr', + 'statement ::= varindexed EQUAL expr', + 'statement ::= OPENP statement CLOSEP', + 'expr ::= value', + 'expr ::= ternary', + 'expr ::= DOLLARID COLON ID', + 'expr ::= expr MATH value', + 'expr ::= expr UNIMATH value', + 'expr ::= expr tlop value', + 'expr ::= expr lop expr', + 'expr ::= expr scond', + 'expr ::= expr ISIN array', + 'expr ::= expr ISIN value', + 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr', + 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', + 'value ::= variable', + 'value ::= UNIMATH value', + 'value ::= NOT value', + 'value ::= TYPECAST value', + 'value ::= variable INCDEC', + 'value ::= HEX', + 'value ::= INTEGER', + 'value ::= INTEGER DOT INTEGER', + 'value ::= INTEGER DOT', + 'value ::= DOT INTEGER', + 'value ::= ID', + 'value ::= function', + 'value ::= OPENP expr CLOSEP', + 'value ::= variable INSTANCEOF ns1', + 'value ::= variable INSTANCEOF variable', + 'value ::= SINGLEQUOTESTRING', + 'value ::= doublequoted_with_quotes', + 'value ::= varindexed DOUBLECOLON static_class_access', + 'value ::= smartytag', + 'value ::= value modifierlist', + 'value ::= NAMESPACE', + 'value ::= arraydef', + 'value ::= ns1 DOUBLECOLON static_class_access', + 'ns1 ::= ID', + 'ns1 ::= NAMESPACE', + 'variable ::= DOLLARID', + 'variable ::= varindexed', + 'variable ::= varvar AT ID', + 'variable ::= object', + 'variable ::= HATCH ID HATCH', + 'variable ::= HATCH ID HATCH arrayindex', + 'variable ::= HATCH variable HATCH', + 'variable ::= HATCH variable HATCH arrayindex', + 'varindexed ::= DOLLARID arrayindex', + 'varindexed ::= varvar arrayindex', + 'arrayindex ::= arrayindex indexdef', + 'arrayindex ::=', + 'indexdef ::= DOT DOLLARID', + 'indexdef ::= DOT varvar', + 'indexdef ::= DOT varvar AT ID', + 'indexdef ::= DOT ID', + 'indexdef ::= DOT INTEGER', + 'indexdef ::= DOT LDEL expr RDEL', + 'indexdef ::= OPENB ID CLOSEB', + 'indexdef ::= OPENB ID DOT ID CLOSEB', + 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB', + 'indexdef ::= OPENB INTEGER CLOSEB', + 'indexdef ::= OPENB DOLLARID CLOSEB', + 'indexdef ::= OPENB variable CLOSEB', + 'indexdef ::= OPENB value CLOSEB', + 'indexdef ::= OPENB expr CLOSEB', + 'indexdef ::= OPENB CLOSEB', + 'varvar ::= DOLLARID', + 'varvar ::= DOLLAR', + 'varvar ::= varvar varvarele', + 'varvarele ::= ID', + 'varvarele ::= SIMPELOUTPUT', + 'varvarele ::= LDEL expr RDEL', + 'object ::= varindexed objectchain', + 'objectchain ::= objectelement', + 'objectchain ::= objectchain objectelement', + 'objectelement ::= PTR ID arrayindex', + 'objectelement ::= PTR varvar arrayindex', + 'objectelement ::= PTR LDEL expr RDEL arrayindex', + 'objectelement ::= PTR ID LDEL expr RDEL arrayindex', + 'objectelement ::= PTR method', + 'function ::= ns1 OPENP params CLOSEP', + 'method ::= ID OPENP params CLOSEP', + 'method ::= DOLLARID OPENP params CLOSEP', + 'params ::= params COMMA expr', + 'params ::= expr', + 'params ::=', + 'modifierlist ::= modifierlist modifier modparameters', + 'modifierlist ::= modifier modparameters', + 'modifier ::= VERT AT ID', + 'modifier ::= VERT ID', + 'modparameters ::= modparameters modparameter', + 'modparameters ::=', + 'modparameter ::= COLON value', + 'modparameter ::= COLON UNIMATH value', + 'modparameter ::= COLON array', + 'static_class_access ::= method', + 'static_class_access ::= method objectchain', + 'static_class_access ::= ID', + 'static_class_access ::= DOLLARID arrayindex', + 'static_class_access ::= DOLLARID arrayindex objectchain', + 'lop ::= LOGOP', + 'lop ::= SLOGOP', + 'tlop ::= TLOGOP', + 'scond ::= SINGLECOND', + 'arraydef ::= OPENB arrayelements CLOSEB', + 'arraydef ::= ARRAYOPEN arrayelements CLOSEP', + 'arrayelements ::= arrayelement', + 'arrayelements ::= arrayelements COMMA arrayelement', + 'arrayelements ::=', + 'arrayelement ::= value APTR expr', + 'arrayelement ::= ID APTR expr', + 'arrayelement ::= expr', + 'doublequoted_with_quotes ::= QUOTE QUOTE', + 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE', + 'doublequoted ::= doublequoted doublequotedcontent', + 'doublequoted ::= doublequotedcontent', + 'doublequotedcontent ::= BACKTICK variable BACKTICK', + 'doublequotedcontent ::= BACKTICK expr BACKTICK', + 'doublequotedcontent ::= DOLLARID', + 'doublequotedcontent ::= LDEL variable RDEL', + 'doublequotedcontent ::= LDEL expr RDEL', + 'doublequotedcontent ::= smartytag', + 'doublequotedcontent ::= TEXT', + ); + public function tokenName($tokenType) { if ($tokenType === 0) { return 'End of Input'; } if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { - return $this->yyTokenName[ $tokenType ]; + return $this->yyTokenName[$tokenType]; } else { return 'Unknown'; } } + public static function yy_destructor($yymajor, $yypminor) + { + switch ($yymajor) { + default: break; /* If no destructor action specified: do nothing */ + } + } + public function yy_pop_parser_stack() { if (empty($this->yystack)) { @@ -1860,18 +1362,19 @@ public function yy_pop_parser_stack() $yytos = array_pop($this->yystack); if ($this->yyTraceFILE && $this->yyidx >= 0) { fwrite($this->yyTraceFILE, - $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . - "\n"); + $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . + "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); $this->yyidx--; + return $yymajor; } public function __destruct() { - while ($this->yystack !== array()) { + while ($this->yystack !== Array()) { $this->yy_pop_parser_stack(); } if (is_resource($this->yyTraceFILE)) { @@ -1883,14 +1386,14 @@ public function yy_get_expected_tokens($token) { static $res3 = array(); static $res4 = array(); - $state = $this->yystack[ $this->yyidx ]->stateno; - $expected = self::$yyExpectedTokens[ $state ]; - if (isset($res3[ $state ][ $token ])) { - if ($res3[ $state ][ $token ]) { + $state = $this->yystack[$this->yyidx]->stateno; + $expected = self::$yyExpectedTokens[$state]; + if (isset($res3[$state][$token])) { + if ($res3[$state][$token]) { return $expected; } } else { - if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { + if ($res3[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) { return $expected; } } @@ -1910,21 +1413,20 @@ public function yy_get_expected_tokens($token) return array_unique($expected); } $yyruleno = $yyact - self::YYNSTATE; - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; + $this->yyidx -= self::$yyRuleInfo[$yyruleno][1]; $nextstate = $this->yy_find_reduce_action( - $this->yystack[ $this->yyidx ]->stateno, - self::$yyRuleInfo[ $yyruleno ][ 0 ]); - if (isset(self::$yyExpectedTokens[ $nextstate ])) { - $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); - if (isset($res4[ $nextstate ][ $token ])) { - if ($res4[ $nextstate ][ $token ]) { + $this->yystack[$this->yyidx]->stateno, + self::$yyRuleInfo[$yyruleno][0]); + if (isset(self::$yyExpectedTokens[$nextstate])) { + $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); + if (isset($res4[$nextstate][$token])) { + if ($res4[$nextstate][$token]) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); } } else { - if ($res4[ $nextstate ][ $token ] = - in_array($token, self::$yyExpectedTokens[ $nextstate ], true)) { + if ($res4[$nextstate][$token] = in_array($token, self::$yyExpectedTokens[$nextstate], true)) { $this->yyidx = $yyidx; $this->yystack = $stack; return array_unique($expected); @@ -1936,8 +1438,8 @@ public function yy_get_expected_tokens($token) $this->yyidx++; $x = new TP_yyStackEntry; $x->stateno = $nextstate; - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; - $this->yystack[ $this->yyidx ] = $x; + $x->major = self::$yyRuleInfo[$yyruleno][0]; + $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; @@ -1958,8 +1460,9 @@ public function yy_get_expected_tokens($token) } break; } while (true); - $this->yyidx = $yyidx; - $this->yystack = $stack; + $this->yyidx = $yyidx; + $this->yystack = $stack; + return array_unique($expected); } @@ -1970,16 +1473,16 @@ public function yy_is_expected_token($token) if ($token === 0) { return true; // 0 is not part of this } - $state = $this->yystack[ $this->yyidx ]->stateno; - if (isset($res[ $state ][ $token ])) { - if ($res[ $state ][ $token ]) { + $state = $this->yystack[$this->yyidx]->stateno; + if (isset($res[$state][$token])) { + if ($res[$state][$token]) { return true; } } else { - if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { + if ($res[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) { return true; } - } + } $stack = $this->yystack; $yyidx = $this->yyidx; do { @@ -1996,20 +1499,18 @@ public function yy_is_expected_token($token) return true; } $yyruleno = $yyact - self::YYNSTATE; - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; + $this->yyidx -= self::$yyRuleInfo[$yyruleno][1]; $nextstate = $this->yy_find_reduce_action( - $this->yystack[ $this->yyidx ]->stateno, - self::$yyRuleInfo[ $yyruleno ][ 0 ]); - if (isset($res2[ $nextstate ][ $token ])) { - if ($res2[ $nextstate ][ $token ]) { + $this->yystack[$this->yyidx]->stateno, + self::$yyRuleInfo[$yyruleno][0]); + if (isset($res2[$nextstate][$token])) { + if ($res2[$nextstate][$token]) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; } } else { - if ($res2[ $nextstate ][ $token ] = - (isset(self::$yyExpectedTokens[ $nextstate ]) && - in_array($token, self::$yyExpectedTokens[ $nextstate ], true))) { + if ($res2[$nextstate][$token] = (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true))) { $this->yyidx = $yyidx; $this->yystack = $stack; return true; @@ -2020,8 +1521,8 @@ public function yy_is_expected_token($token) $this->yyidx++; $x = new TP_yyStackEntry; $x->stateno = $nextstate; - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; - $this->yystack[ $this->yyidx ] = $x; + $x->major = self::$yyRuleInfo[$yyruleno][0]; + $this->yystack[$this->yyidx] = $x; continue 2; } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) { $this->yyidx = $yyidx; @@ -2048,65 +1549,69 @@ public function yy_is_expected_token($token) } while (true); $this->yyidx = $yyidx; $this->yystack = $stack; + return true; } - public function yy_find_shift_action($iLookAhead) + public function yy_find_shift_action($iLookAhead) { - $stateno = $this->yystack[ $this->yyidx ]->stateno; + $stateno = $this->yystack[$this->yyidx]->stateno; + /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ - if (!isset(self::$yy_shift_ofst[ $stateno ])) { + if (!isset(self::$yy_shift_ofst[$stateno])) { // no shift actions - return self::$yy_default[ $stateno ]; + return self::$yy_default[$stateno]; } - $i = self::$yy_shift_ofst[ $stateno ]; + $i = self::$yy_shift_ofst[$stateno]; if ($i === self::YY_SHIFT_USE_DFLT) { - return self::$yy_default[ $stateno ]; + return self::$yy_default[$stateno]; } if ($iLookAhead === self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || - self::$yy_lookahead[ $i ] != $iLookAhead) { + self::$yy_lookahead[$i] != $iLookAhead) { if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) - && ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) { + && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) { if ($this->yyTraceFILE) { fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' . - $this->yyTokenName[ $iLookAhead ] . ' => ' . - $this->yyTokenName[ $iFallback ] . "\n"); + $this->yyTokenName[$iLookAhead] . ' => ' . + $this->yyTokenName[$iFallback] . "\n"); } + return $this->yy_find_shift_action($iFallback); } - return self::$yy_default[ $stateno ]; + + return self::$yy_default[$stateno]; } else { - return self::$yy_action[ $i ]; + return self::$yy_action[$i]; } } public function yy_find_reduce_action($stateno, $iLookAhead) { /* $stateno = $this->yystack[$this->yyidx]->stateno; */ - if (!isset(self::$yy_reduce_ofst[ $stateno ])) { - return self::$yy_default[ $stateno ]; + + if (!isset(self::$yy_reduce_ofst[$stateno])) { + return self::$yy_default[$stateno]; } - $i = self::$yy_reduce_ofst[ $stateno ]; + $i = self::$yy_reduce_ofst[$stateno]; if ($i === self::YY_REDUCE_USE_DFLT) { - return self::$yy_default[ $stateno ]; + return self::$yy_default[$stateno]; } if ($iLookAhead === self::YYNOCODE) { return self::YY_NO_ACTION; } $i += $iLookAhead; if ($i < 0 || $i >= self::YY_SZ_ACTTAB || - self::$yy_lookahead[ $i ] != $iLookAhead) { - return self::$yy_default[ $stateno ]; + self::$yy_lookahead[$i] != $iLookAhead) { + return self::$yy_default[$stateno]; } else { - return self::$yy_action[ $i ]; + return self::$yy_action[$i]; } } - // line 234 "../smarty/lexer/smarty_internal_templateparser.y" public function yy_shift($yyNewState, $yyMajor, $yypMinor) { $this->yyidx++; @@ -2118,9 +1623,11 @@ public function yy_shift($yyNewState, $yyMajor, $yypMinor) while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } - // line 221 "../smarty/lexer/smarty_internal_templateparser.y" - $this->internalError = true; - $this->compiler->trigger_template_error('Stack overflow in template parser'); +// line 220 "../smarty/lexer/smarty_internal_templateparser.y" + + $this->internalError = true; + $this->compiler->trigger_template_error('Stack overflow in template parser'); + return; } $yytos = new TP_yyStackEntry; @@ -2134,1357 +1641,1150 @@ public function yy_shift($yyNewState, $yyMajor, $yypMinor) fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); for ($i = 1; $i <= $this->yyidx; $i++) { fprintf($this->yyTraceFILE, " %s", - $this->yyTokenName[ $this->yystack[ $i ]->major ]); + $this->yyTokenName[$this->yystack[$i]->major]); } - fwrite($this->yyTraceFILE, "\n"); + fwrite($this->yyTraceFILE,"\n"); } } - // line 242 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r0() - { - $this->root_buffer->prepend_array($this, $this->template_prefix); - $this->root_buffer->append_array($this, $this->template_postfix); - $this->_retvalue = $this->root_buffer->to_smarty_php($this); - } + public static $yyRuleInfo = array( + array( 0 => 62, 1 => 1 ), + array( 0 => 63, 1 => 2 ), + array( 0 => 63, 1 => 2 ), + array( 0 => 63, 1 => 2 ), + array( 0 => 63, 1 => 4 ), + array( 0 => 64, 1 => 4 ), + array( 0 => 64, 1 => 1 ), + array( 0 => 65, 1 => 2 ), + array( 0 => 65, 1 => 0 ), + array( 0 => 63, 1 => 2 ), + array( 0 => 63, 1 => 0 ), + array( 0 => 66, 1 => 1 ), + array( 0 => 66, 1 => 1 ), + array( 0 => 66, 1 => 1 ), + array( 0 => 66, 1 => 3 ), + array( 0 => 66, 1 => 2 ), + array( 0 => 67, 1 => 1 ), + array( 0 => 67, 1 => 2 ), + array( 0 => 67, 1 => 2 ), + array( 0 => 70, 1 => 2 ), + array( 0 => 69, 1 => 2 ), + array( 0 => 72, 1 => 1 ), + array( 0 => 72, 1 => 1 ), + array( 0 => 72, 1 => 1 ), + array( 0 => 68, 1 => 3 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 4 ), + array( 0 => 68, 1 => 5 ), + array( 0 => 68, 1 => 6 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 3 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 3 ), + array( 0 => 68, 1 => 8 ), + array( 0 => 80, 1 => 2 ), + array( 0 => 80, 1 => 1 ), + array( 0 => 68, 1 => 5 ), + array( 0 => 68, 1 => 7 ), + array( 0 => 68, 1 => 6 ), + array( 0 => 68, 1 => 8 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 3 ), + array( 0 => 68, 1 => 4 ), + array( 0 => 66, 1 => 1 ), + array( 0 => 68, 1 => 2 ), + array( 0 => 68, 1 => 3 ), + array( 0 => 68, 1 => 4 ), + array( 0 => 68, 1 => 5 ), + array( 0 => 73, 1 => 2 ), + array( 0 => 73, 1 => 1 ), + array( 0 => 73, 1 => 0 ), + array( 0 => 83, 1 => 4 ), + array( 0 => 83, 1 => 2 ), + array( 0 => 83, 1 => 2 ), + array( 0 => 83, 1 => 2 ), + array( 0 => 83, 1 => 2 ), + array( 0 => 83, 1 => 2 ), + array( 0 => 83, 1 => 4 ), + array( 0 => 79, 1 => 1 ), + array( 0 => 79, 1 => 3 ), + array( 0 => 78, 1 => 3 ), + array( 0 => 78, 1 => 3 ), + array( 0 => 78, 1 => 3 ), + array( 0 => 78, 1 => 3 ), + array( 0 => 76, 1 => 1 ), + array( 0 => 76, 1 => 1 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 2 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 76, 1 => 3 ), + array( 0 => 84, 1 => 7 ), + array( 0 => 84, 1 => 7 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 2 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 1 ), + array( 0 => 75, 1 => 3 ), + array( 0 => 90, 1 => 1 ), + array( 0 => 90, 1 => 1 ), + array( 0 => 74, 1 => 1 ), + array( 0 => 74, 1 => 1 ), + array( 0 => 74, 1 => 3 ), + array( 0 => 74, 1 => 1 ), + array( 0 => 74, 1 => 3 ), + array( 0 => 74, 1 => 4 ), + array( 0 => 74, 1 => 3 ), + array( 0 => 74, 1 => 4 ), + array( 0 => 71, 1 => 2 ), + array( 0 => 71, 1 => 2 ), + array( 0 => 95, 1 => 2 ), + array( 0 => 95, 1 => 0 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 4 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 96, 1 => 4 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 5 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 3 ), + array( 0 => 96, 1 => 2 ), + array( 0 => 81, 1 => 1 ), + array( 0 => 81, 1 => 1 ), + array( 0 => 81, 1 => 2 ), + array( 0 => 97, 1 => 1 ), + array( 0 => 97, 1 => 1 ), + array( 0 => 97, 1 => 3 ), + array( 0 => 94, 1 => 2 ), + array( 0 => 98, 1 => 1 ), + array( 0 => 98, 1 => 2 ), + array( 0 => 99, 1 => 3 ), + array( 0 => 99, 1 => 3 ), + array( 0 => 99, 1 => 5 ), + array( 0 => 99, 1 => 6 ), + array( 0 => 99, 1 => 2 ), + array( 0 => 89, 1 => 4 ), + array( 0 => 100, 1 => 4 ), + array( 0 => 100, 1 => 4 ), + array( 0 => 101, 1 => 3 ), + array( 0 => 101, 1 => 1 ), + array( 0 => 101, 1 => 0 ), + array( 0 => 77, 1 => 3 ), + array( 0 => 77, 1 => 2 ), + array( 0 => 102, 1 => 3 ), + array( 0 => 102, 1 => 2 ), + array( 0 => 82, 1 => 2 ), + array( 0 => 82, 1 => 0 ), + array( 0 => 103, 1 => 2 ), + array( 0 => 103, 1 => 3 ), + array( 0 => 103, 1 => 2 ), + array( 0 => 92, 1 => 1 ), + array( 0 => 92, 1 => 2 ), + array( 0 => 92, 1 => 1 ), + array( 0 => 92, 1 => 2 ), + array( 0 => 92, 1 => 3 ), + array( 0 => 86, 1 => 1 ), + array( 0 => 86, 1 => 1 ), + array( 0 => 85, 1 => 1 ), + array( 0 => 87, 1 => 1 ), + array( 0 => 93, 1 => 3 ), + array( 0 => 93, 1 => 3 ), + array( 0 => 104, 1 => 1 ), + array( 0 => 104, 1 => 3 ), + array( 0 => 104, 1 => 0 ), + array( 0 => 105, 1 => 3 ), + array( 0 => 105, 1 => 3 ), + array( 0 => 105, 1 => 1 ), + array( 0 => 91, 1 => 2 ), + array( 0 => 91, 1 => 3 ), + array( 0 => 106, 1 => 2 ), + array( 0 => 106, 1 => 1 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 1 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 3 ), + array( 0 => 107, 1 => 1 ), + array( 0 => 107, 1 => 1 ), + ); - // line 251 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r1() - { - $code = - $this->compiler->compileTag('private_php', - array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), array('type' => $this->lex->phpType)), - array()); - if ($this->compiler->has_code && !empty($code)) { - $tmp = ''; - foreach ($this->compiler->prefix_code as $code) { - $tmp .= $code; + public static $yyReduceMap = array( + 0 => 0, + 1 => 1, + 2 => 2, + 3 => 3, + 4 => 4, + 5 => 5, + 6 => 6, + 21 => 6, + 22 => 6, + 23 => 6, + 36 => 6, + 56 => 6, + 57 => 6, + 65 => 6, + 66 => 6, + 77 => 6, + 82 => 6, + 83 => 6, + 88 => 6, + 92 => 6, + 93 => 6, + 97 => 6, + 98 => 6, + 100 => 6, + 105 => 6, + 169 => 6, + 174 => 6, + 7 => 7, + 8 => 8, + 9 => 9, + 11 => 11, + 12 => 12, + 13 => 13, + 14 => 14, + 15 => 15, + 16 => 16, + 17 => 17, + 18 => 18, + 19 => 19, + 20 => 20, + 24 => 24, + 25 => 25, + 26 => 26, + 27 => 27, + 28 => 28, + 29 => 29, + 30 => 30, + 31 => 31, + 33 => 31, + 32 => 32, + 34 => 34, + 35 => 35, + 37 => 37, + 38 => 38, + 39 => 39, + 40 => 40, + 41 => 41, + 42 => 42, + 43 => 43, + 44 => 44, + 45 => 45, + 46 => 46, + 47 => 47, + 48 => 48, + 49 => 49, + 50 => 50, + 59 => 50, + 147 => 50, + 151 => 50, + 155 => 50, + 157 => 50, + 51 => 51, + 148 => 51, + 154 => 51, + 52 => 52, + 53 => 53, + 54 => 53, + 55 => 55, + 132 => 55, + 58 => 58, + 60 => 60, + 61 => 61, + 62 => 61, + 63 => 63, + 64 => 64, + 67 => 67, + 68 => 68, + 69 => 68, + 70 => 70, + 71 => 71, + 72 => 72, + 73 => 73, + 74 => 74, + 75 => 75, + 76 => 76, + 78 => 78, + 80 => 78, + 81 => 78, + 112 => 78, + 79 => 79, + 84 => 84, + 85 => 85, + 86 => 86, + 87 => 87, + 89 => 89, + 90 => 90, + 91 => 90, + 94 => 94, + 95 => 95, + 96 => 96, + 99 => 99, + 101 => 101, + 102 => 102, + 103 => 103, + 104 => 104, + 106 => 106, + 107 => 107, + 108 => 108, + 109 => 109, + 110 => 110, + 111 => 111, + 113 => 113, + 171 => 113, + 114 => 114, + 115 => 115, + 116 => 116, + 117 => 117, + 118 => 118, + 119 => 119, + 127 => 119, + 120 => 120, + 121 => 121, + 122 => 122, + 123 => 122, + 125 => 122, + 126 => 122, + 124 => 124, + 128 => 128, + 129 => 129, + 130 => 130, + 175 => 130, + 131 => 131, + 133 => 133, + 134 => 134, + 135 => 135, + 136 => 136, + 137 => 137, + 138 => 138, + 139 => 139, + 140 => 140, + 141 => 141, + 142 => 142, + 143 => 143, + 144 => 144, + 145 => 145, + 146 => 146, + 149 => 149, + 150 => 150, + 152 => 152, + 153 => 153, + 156 => 156, + 158 => 158, + 159 => 159, + 160 => 160, + 161 => 161, + 162 => 162, + 163 => 163, + 164 => 164, + 165 => 165, + 166 => 166, + 167 => 167, + 168 => 167, + 170 => 170, + 172 => 172, + 173 => 173, + 176 => 176, + 177 => 177, + 178 => 178, + 179 => 179, + 182 => 179, + 180 => 180, + 183 => 180, + 181 => 181, + 184 => 184, + 185 => 185, + ); +// line 233 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r0(){ + $this->root_buffer->prepend_array($this, $this->template_prefix); + $this->root_buffer->append_array($this, $this->template_postfix); + $this->_retvalue = $this->root_buffer->to_smarty_php($this); + } +// line 240 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r1(){ + $text = $this->yystack[ $this->yyidx + 0 ]->minor; + + if ((string)$text == '') { + $this->current_buffer->append_subtree($this, null); + } + + $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Text($text, $this->strip)); + } +// line 250 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r2(){ + $this->strip = true; + } +// line 254 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r3(){ + $this->strip = false; + } +// line 259 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r4(){ + $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Text($this->yystack[$this->yyidx + -1]->minor)); + } +// line 264 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r5(){ + $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor.$this->yystack[$this->yyidx + -1]->minor; + } +// line 267 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r6(){ + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; + } +// line 271 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r7(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; + + } +// line 276 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r8(){ + $this->_retvalue = ''; + } +// line 280 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r9(){ + if ($this->compiler->has_code) { + $this->current_buffer->append_subtree($this, $this->mergePrefixCode($this->yystack[$this->yyidx + 0]->minor)); + } + $this->compiler->has_variable_string = false; + $this->block_nesting_level = count($this->compiler->_tag_stack); + } +// line 292 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r11(){ + $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength()), ' $'); + if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { + $this->_retvalue = $this->compiler->compileTag('private_print_expression',array('nocache'),array('value'=>$this->compiler->compileVariable('\''.$match[1].'\''))); + } else { + $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->compiler->compileVariable('\''.$var.'\''))); + } + } +// line 302 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r12(){ + $tag = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength())); + if ($tag == 'strip') { + $this->strip = true; + $this->_retvalue = null; + } else { + if (defined($tag)) { + if ($this->security) { + $this->security->isTrustedConstant($tag, $this->compiler); + } + $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$tag)); + } else { + if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { + $this->_retvalue = $this->compiler->compileTag($match[1],array('\'nocache\'')); + } else { + $this->_retvalue = $this->compiler->compileTag($tag,array()); } - $this->compiler->prefix_code = array(); - $this->current_buffer->append_subtree($this, - new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true))); } } - - // line 255 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r2() - { - $text = $this->yystack[ $this->yyidx + 0 ]->minor; - - if ((string)$text == '') { - $this->current_buffer->append_subtree($this, null); - } - - $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Text($text, $this->strip)); } - - // line 259 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r3() - { - $this->strip = true; +// line 323 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r13(){ + $j = strrpos($this->yystack[$this->yyidx + 0]->minor,'.'); + if ($this->yystack[$this->yyidx + 0]->minor[$j+1] == 'c') { + // {$smarty.block.child} + $this->_retvalue = $this->compiler->compileTag('child',array(),array($this->yystack[$this->yyidx + 0]->minor)); + } else { + // {$smarty.block.parent} + $this->_retvalue = $this->compiler->compileTag('parent',array(),array($this->yystack[$this->yyidx + 0]->minor)); + } + } +// line 334 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r14(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; + } +// line 338 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r15(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; + } +// line 342 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r16(){ + $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + 0]->minor[1],array('value'=>$this->yystack[$this->yyidx + 0]->minor[0])); + } +// line 351 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r17(){ + $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + 0]->minor[0]),array('var'=>'\''.substr($this->yystack[$this->yyidx + -1]->minor,1).'\'')),$this->yystack[$this->yyidx + 0]->minor[1])); + } +// line 355 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r18(){ + $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + 0]->minor[0]),array('var'=>$this->yystack[$this->yyidx + -1]->minor['var'])),$this->yystack[$this->yyidx + 0]->minor[1]),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'])); + } +// line 359 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r19(){ + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; + } +// line 363 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r20(){ + $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); + } +// line 378 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r24(){ + if (defined($this->yystack[$this->yyidx + -1]->minor)) { + if ($this->security) { + $this->security->isTrustedConstant($this->yystack[$this->yyidx + -1]->minor, $this->compiler); + } + $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + 0]->minor,array('value'=>$this->yystack[$this->yyidx + -1]->minor)); + } else { + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); + } } - - // line 264 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r4() - { +// line 388 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r25(){ + if (defined($this->yystack[$this->yyidx + 0]->minor)) { + if ($this->security) { + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); + } + $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + 0]->minor)); + } else { + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor,array()); + } + } +// line 401 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r26(){ + if (defined($this->yystack[$this->yyidx + -2]->minor)) { + if ($this->security) { + $this->security->isTrustedConstant($this->yystack[$this->yyidx + -2]->minor, $this->compiler); + } + $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + 0]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor, 'modifierlist'=>$this->yystack[$this->yyidx + -1]->minor)); + } else { + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + 0]->minor, array('modifierlist'=>$this->yystack[$this->yyidx + -1]->minor)); + } + } +// line 413 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r27(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + 0]->minor,array('object_method'=>$this->yystack[$this->yyidx + -1]->minor)); + } +// line 418 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r28(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + 0]->minor,array('modifierlist'=>$this->yystack[$this->yyidx + -1]->minor, 'object_method'=>$this->yystack[$this->yyidx + -2]->minor)); + } +// line 423 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r29(){ + $this->_retvalue = $this->compiler->compileTag('make_nocache',array(array('var'=>'\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''))); + } +// line 428 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r30(){ + $tag = trim(substr($this->yystack[$this->yyidx + -1]->minor,$this->compiler->getLdelLength())); + $this->_retvalue = $this->compiler->compileTag(($tag === 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 433 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r31(){ + $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->compiler->getLdelLength())); + $this->_retvalue = $this->compiler->compileTag(($tag === 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + 0]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); + } +// line 438 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r32(){ + $tag = trim(substr($this->yystack[$this->yyidx + -1]->minor,$this->compiler->getLdelLength())); + $this->_retvalue = $this->compiler->compileTag(($tag === 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 449 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r34(){ + $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -4]->minor),array('var'=>$this->yystack[$this->yyidx + -2]->minor),array('step'=>$this->yystack[$this->yyidx + -1]->minor))),1); + } +// line 453 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r35(){ + $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; + } +// line 461 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r37(){ + $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('start'=>$this->yystack[$this->yyidx + -3]->minor),array('to'=>$this->yystack[$this->yyidx + -1]->minor))),0); + } +// line 465 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r38(){ + $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('start'=>$this->yystack[$this->yyidx + -5]->minor),array('to'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -1]->minor))),0); + } +// line 470 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r39(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('from'=>$this->yystack[$this->yyidx + -3]->minor),array('item'=>$this->yystack[$this->yyidx + -1]->minor)))); + } +// line 474 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r40(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + 0]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -1]->minor),array('key'=>$this->yystack[$this->yyidx + -3]->minor)))); + } +// line 477 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r41(){ + $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + 0]->minor); + } +// line 482 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r42(){ + $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array($this->yystack[$this->yyidx + -1]->minor),$this->yystack[$this->yyidx + 0]->minor)))); + } +// line 486 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r43(){ + $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array($this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)),$this->yystack[$this->yyidx + 0]->minor))); + } +// line 492 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r44(){ + $tag = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength()), ' /'); + if ($tag === 'strip') { $this->strip = false; + $this->_retvalue = null; + } else { + $this->_retvalue = $this->compiler->compileTag($tag.'close',array()); + } + } +// line 501 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r45(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor.'close',array()); + } +// line 505 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r46(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 510 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r47(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('object_method'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 514 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r48(){ + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_method'=>$this->yystack[$this->yyidx + -1]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 522 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r49(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; + $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; + } +// line 528 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r50(){ + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); + } +// line 533 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r51(){ + $this->_retvalue = array(); + } +// line 538 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r52(){ + if (defined($this->yystack[$this->yyidx + 0]->minor)) { + if ($this->security) { + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); + } + $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); + } else { + $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'\''.$this->yystack[$this->yyidx + 0]->minor.'\''); } - - // line 269 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r5() - { - $this->current_buffer->append_subtree($this, - new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + -1 ]->minor)); } - - // line 272 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r6() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -3 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor; +// line 549 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r53(){ + $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor," =\n\r\t")=>$this->yystack[$this->yyidx + 0]->minor); } - - // line 276 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r7() - { - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; +// line 557 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r55(){ + $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } - - // line 281 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r8() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 569 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r58(){ + $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } - - // line 285 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r9() - { - $this->_retvalue = ''; +// line 582 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r60(){ + $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } - - // line 297 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r10() - { - if ($this->compiler->has_code) { - $this->current_buffer->append_subtree($this, - $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor)); - } - $this->compiler->has_variable_string = false; - $this->block_nesting_level = count($this->compiler->_tag_stack); +// line 587 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r61(){ + $this->_retvalue = array('var' => '\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'\'', 'value'=>$this->yystack[$this->yyidx + 0]->minor); } - - // line 307 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r12() - { - $var = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), ' $'); - if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', array('nocache'), - array('value' => $this->compiler->compileVariable('\'' . $match[ 1 ] . '\''))); - } else { - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', array(), - array('value' => $this->compiler->compileVariable('\'' . $var . '\''))); - } +// line 594 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r63(){ + $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); } - - // line 328 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r13() - { - $tag = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength())); - if ($tag == 'strip') { - $this->strip = true; - $this->_retvalue = null; - } else { - if (defined($tag)) { - if ($this->security) { - $this->security->isTrustedConstant($tag, $this->compiler); - } - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); - } else { - if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { - $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array('\'nocache\'')); - } else { - $this->_retvalue = $this->compiler->compileTag($tag, array()); - } - } - } +// line 598 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r64(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } - - // line 339 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r14() - { - $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); - if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { - // {$smarty.block.child} - $this->_retvalue = - $this->compiler->compileTag('child', array(), array($this->yystack[ $this->yyidx + 0 ]->minor)); - } else { - // {$smarty.block.parent} - $this->_retvalue = - $this->compiler->compileTag('parent', array(), array($this->yystack[ $this->yyidx + 0 ]->minor)); - } +// line 618 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r67(){ + $this->_retvalue = '$_smarty_tpl->getStreamVariable(\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'://' . $this->yystack[$this->yyidx + 0]->minor . '\')'; } - - // line 343 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r15() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; +// line 623 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r68(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } - - // line 347 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r16() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; +// line 633 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r70(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor['pre']. $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor['op'].$this->yystack[$this->yyidx + 0]->minor .')'; } - - // line 356 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r17() - { - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ], - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ])); +// line 637 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r71(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } - - // line 360 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r18() - { - $this->_retvalue = - $this->compiler->compileTag('assign', array_merge(array( - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]), - array('var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'') - ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ])); +// line 641 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r72(){ + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + -1]->minor . ')'; } - - // line 364 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r19() - { - $this->_retvalue = - $this->compiler->compileTag('assign', array_merge(array( - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]), - array('var' => $this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ]) - ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]), array( - 'smarty_internal_index' => $this->yystack[ $this->yyidx + - -1 ]->minor[ 'smarty_internal_index' ] - )); - } - - // line 368 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r20() - { - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; +// line 645 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r73(){ + $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; } - - // line 383 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r21() - { - $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); - } - - // line 393 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r25() - { - if (defined($this->yystack[ $this->yyidx + -1 ]->minor)) { - if ($this->security) { - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler); - } - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, - array('value' => $this->yystack[ $this->yyidx + -1 ]->minor)); - } else { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor); - } - } - - // line 406 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r26() - { - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { - if ($this->security) { - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); - } - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', array(), - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); - } else { - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); - } - } - - // line 418 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r27() - { - if (defined($this->yystack[ $this->yyidx + -2 ]->minor)) { - if ($this->security) { - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler); - } - $this->_retvalue = - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, - array( - 'value' => $this->yystack[ $this->yyidx + -2 ]->minor, - 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor - )); - } else { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor)); - } - } - - // line 423 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r28() - { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor)); - } - - // line 428 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r29() - { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -4 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, array( - 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'object_method' => $this->yystack[ $this->yyidx + -2 ]->minor - )); - } - - // line 433 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r30() - { - $this->_retvalue = - $this->compiler->compileTag('make_nocache', - array(array('var' => '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''))); - } - - // line 438 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r31() - { - $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength())); - $this->_retvalue = - $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(), - array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); - } - - // line 443 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r32() - { - $tag = trim(substr($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler->getLdelLength())); - $this->_retvalue = - $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('if condition' => $this->yystack[ $this->yyidx + -1 ]->minor)); - } - - // line 454 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r33() - { - $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength())); - $this->_retvalue = - $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(), - array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); - } - - // line 458 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r35() - { - $this->_retvalue = - $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( - array('start' => $this->yystack[ $this->yyidx + -6 ]->minor), - array('ifexp' => $this->yystack[ $this->yyidx + -4 ]->minor), - array('var' => $this->yystack[ $this->yyidx + -2 ]->minor), - array('step' => $this->yystack[ $this->yyidx + -1 ]->minor) - )), 1); - } - - // line 466 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r36() - { - $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 470 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r38() - { - $this->_retvalue = - $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( - array('start' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('to' => $this->yystack[ $this->yyidx + -1 ]->minor) - )), 0); - } - - // line 475 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r39() - { - $this->_retvalue = - $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( - array('start' => $this->yystack[ $this->yyidx + -5 ]->minor), - array('to' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('step' => $this->yystack[ $this->yyidx + -1 ]->minor) - )), 0); - } - - // line 479 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r40() - { - $this->_retvalue = - $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( - array('from' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('item' => $this->yystack[ $this->yyidx + -1 ]->minor) - ))); - } - - // line 482 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r41() - { - $this->_retvalue = - $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( - array('from' => $this->yystack[ $this->yyidx + -5 ]->minor), - array('item' => $this->yystack[ $this->yyidx + -1 ]->minor), - array('key' => $this->yystack[ $this->yyidx + -3 ]->minor) - ))); - } - - // line 487 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r42() - { - $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); - } - - // line 491 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r43() - { - $this->_retvalue = - $this->compiler->compileTag('setfilter', array(), array( - 'modifier_list' => array( - array_merge(array($this->yystack[ $this->yyidx + -1 ]->minor), - $this->yystack[ $this->yyidx + 0 ]->minor) - ) - )); - } - - // line 497 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r44() - { - $this->_retvalue = - $this->compiler->compileTag('setfilter', array(), array( - 'modifier_list' => array_merge(array( - array_merge(array( - $this->yystack[ $this->yyidx + - -2 ]->minor - ), $this->yystack[ $this->yyidx + -1 ]->minor) - ), $this->yystack[ $this->yyidx + 0 ]->minor) - )); - } - - // line 506 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r45() - { - $tag = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), ' /'); - if ($tag === 'strip') { - $this->strip = false; - $this->_retvalue = null; - } else { - $this->_retvalue = $this->compiler->compileTag($tag . 'close', array()); - } - } - - // line 510 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r46() - { - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); - } - - // line 515 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r47() - { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor . 'close', array(), - array('modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor)); - } - - // line 519 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r48() - { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor . 'close', array(), - array('object_method' => $this->yystack[ $this->yyidx + 0 ]->minor)); - } - - // line 527 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r49() - { - $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor . 'close', array(), array( - 'object_method' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor - )); - } - - // line 533 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r50() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; - $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 538 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r51() - { - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); - } - - // line 543 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r52() - { - $this->_retvalue = array(); - } - - // line 554 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r53() - { - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { - if ($this->security) { - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); - } - $this->_retvalue = - array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); - } else { - $this->_retvalue = - array( - $this->yystack[ $this->yyidx + -2 ]->minor => '\'' . - $this->yystack[ $this->yyidx + 0 ]->minor . - '\'' - ); - } - } - - // line 562 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r54() - { - $this->_retvalue = - array( - trim($this->yystack[ $this->yyidx + -1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + - 0 ]->minor - ); - } - - // line 574 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r56() - { - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; - } - - // line 587 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r59() - { - $this->_retvalue = - array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); - } - - // line 592 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r61() - { - $this->yystack[ $this->yyidx + -2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; - $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor; - } - - // line 599 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r62() - { - $this->_retvalue = - array( - 'var' => '\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'', - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor - ); - } - - // line 603 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r64() - { - $this->_retvalue = - array( - 'var' => $this->yystack[ $this->yyidx + -2 ]->minor, - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor - ); - } - - // line 623 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r65() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; - } - - // line 628 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r68() - { - $this->_retvalue = - '$_smarty_tpl->getStreamVariable(\'' . - substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . - '://' . - $this->yystack[ $this->yyidx + 0 ]->minor . - '\')'; - } - - // line 638 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r69() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -2 ]->minor . - trim($this->yystack[ $this->yyidx + -1 ]->minor) . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 642 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r71() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -1 ]->minor[ 'pre' ] . - $this->yystack[ $this->yyidx + -2 ]->minor . - $this->yystack[ $this->yyidx + -1 ]->minor[ 'op' ] . - $this->yystack[ $this->yyidx + 0 ]->minor . - ')'; - } - - // line 646 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r72() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -2 ]->minor . - $this->yystack[ $this->yyidx + -1 ]->minor . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 650 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r73() - { - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; - } - - // line 654 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r74() - { - $this->_retvalue = - 'in_array(' . - $this->yystack[ $this->yyidx + -2 ]->minor . - ',' . - $this->yystack[ $this->yyidx + 0 ]->minor . - ')'; - } - - // line 662 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r75() - { - $this->_retvalue = - 'in_array(' . - $this->yystack[ $this->yyidx + -2 ]->minor . - ',(array)' . - $this->yystack[ $this->yyidx + 0 ]->minor . - ')'; - } - - // line 666 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r76() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -5 ]->minor . - ' ? ' . - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'') . - ' : ' . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 676 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r77() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -5 ]->minor . - ' ? ' . - $this->yystack[ $this->yyidx + -2 ]->minor . - ' : ' . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 681 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r79() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 702 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r80() - { - $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 706 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r85() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 710 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r86() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.'; - } - - // line 715 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r87() - { - $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 732 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r88() - { - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { - if ($this->security) { - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); - } - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; - } else { - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; - } - } - - // line 736 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r90() - { - $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; - } - - // line 754 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r91() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -2 ]->minor . - $this->yystack[ $this->yyidx + -1 ]->minor . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 765 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r95() - { - $prefixVar = $this->compiler->getNewPrefixVariable(); - if ($this->yystack[ $this->yyidx + -2 ]->minor[ 'var' ] === '\'smarty\'') { - $this->compiler->appendPrefixCode("compiler->compileTag('private_special_variable', array(), - $this->yystack[ $this->yyidx + - -2 ]->minor[ 'smarty_internal_index' ]) . - ';?>'); - } else { - $this->compiler->appendPrefixCode("compiler->compileVariable($this->yystack[ $this->yyidx + - -2 ]->minor[ 'var' ]) . - $this->yystack[ $this->yyidx + -2 ]->minor[ 'smarty_internal_index' ] . - ';?>'); - } - $this->_retvalue = - $prefixVar . - '::' . - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; - } - - // line 772 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r96() - { - $prefixVar = $this->compiler->getNewPrefixVariable(); - $tmp = $this->compiler->appendCode('', $this->yystack[ $this->yyidx + 0 ]->minor); - $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "")); - $this->_retvalue = $prefixVar; - } - - // line 785 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r97() - { - $this->_retvalue = - $this->compiler->compileTag('private_modifier', array(), array( - 'value' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'modifierlist' => $this->yystack[ $this->yyidx + 0 ]->minor - )); +// line 649 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r74(){ + $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; } - - // line 804 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r100() - { - if (!in_array(strtolower($this->yystack[ $this->yyidx + -2 ]->minor), array('self', 'parent')) && - (!$this->security || - $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))) { - if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ])) { - $this->_retvalue = - $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ] . - '::' . - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; - } else { - $this->_retvalue = - $this->yystack[ $this->yyidx + -2 ]->minor . - '::' . - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; - } - } else { - $this->compiler->trigger_template_error('static class \'' . - $this->yystack[ $this->yyidx + -2 ]->minor . - '\' is undefined or not allowed by security setting'); - } - } - - // line 815 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r102() - { - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 818 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r103() - { - $this->_retvalue = - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); +// line 657 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r75(){ + $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '. $this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -2]->minor,1).'\'') . ' : '.$this->yystack[$this->yyidx + 0]->minor; } - - // line 831 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r104() - { - if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] === '\'smarty\'') { - $smarty_var = - $this->compiler->compileTag('private_special_variable', array(), - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]); - $this->_retvalue = $smarty_var; - } else { - // used for array reset,next,prev,end,current - $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; - $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; - $this->_retvalue = - $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; - } +// line 661 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r76(){ + $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; } - - // line 841 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r105() - { - $this->_retvalue = - '$_smarty_tpl->tpl_vars[' . - $this->yystack[ $this->yyidx + -2 ]->minor . - ']->' . - $this->yystack[ $this->yyidx + 0 ]->minor; +// line 671 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r78(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } - - // line 845 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r107() - { - $this->_retvalue = - $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\''); +// line 676 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r79(){ + $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 849 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r108() - { - $this->_retvalue = - '(is_array($tmp = ' . - $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'') . - ') ? $tmp' . - $this->yystack[ $this->yyidx + 0 ]->minor . - ' :null)'; +// line 697 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r84(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 853 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r109() - { - $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -1 ]->minor); - } - - // line 857 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r110() - { - $this->_retvalue = - '(is_array($tmp = ' . - $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -2 ]->minor) . - ') ? $tmp' . - $this->yystack[ $this->yyidx + 0 ]->minor . - ' : null)'; - } - - // line 860 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r111() - { - $this->_retvalue = - array( - 'var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'', - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor - ); - } - - // line 873 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r112() - { - $this->_retvalue = - array( - 'var' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor - ); - } - - // line 879 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r114() - { - return; - } - - // line 882 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r115() - { - $this->_retvalue = - '[' . - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . - ']'; - } - - // line 886 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r116() - { - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; - } - - // line 890 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r117() - { - $this->_retvalue = - '[' . - $this->compiler->compileVariable($this->yystack[ $this->yyidx + -2 ]->minor) . - '->' . - $this->yystack[ $this->yyidx + 0 ]->minor . - ']'; - } - - // line 894 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r118() - { - $this->_retvalue = '[\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\']'; - } - - // line 899 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r119() - { - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; - } - - // line 904 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r120() - { - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']'; - } - - // line 908 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r121() - { - $this->_retvalue = - '[' . - $this->compiler->compileTag('private_special_variable', array(), - '[\'section\'][\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'][\'index\']') . - ']'; - } - - // line 911 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r122() - { - $this->_retvalue = - '[' . - $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . - $this->yystack[ $this->yyidx + - -3 ]->minor . - '\'][\'' . - $this->yystack[ $this->yyidx + - -1 ]->minor . - '\']') . - ']'; - } - - // line 917 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r123() - { - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']'; - } - - // line 933 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r125() - { - $this->_retvalue = - '[' . - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'') . - ']'; - } - - // line 943 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r129() - { - $this->_retvalue = '[]'; - } - - // line 947 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r130() - { - $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; - } - - // line 952 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r131() - { - $this->_retvalue = '\'\''; - } - - // line 960 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r132() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 966 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r134() - { - $var = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), ' $'); - $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); - } - - // line 973 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r135() - { - $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; - } - - // line 982 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r136() - { - if ($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ] === '\'smarty\'') { - $this->_retvalue = - $this->compiler->compileTag('private_special_variable', array(), - $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ]) . - $this->yystack[ $this->yyidx + 0 ]->minor; - } else { - $this->_retvalue = - $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ]) . - $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ] . - $this->yystack[ $this->yyidx + 0 ]->minor; - } - } - - // line 987 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r137() - { - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; - } - - // line 992 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r138() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 701 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r85(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; } - - // line 999 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r139() - { - if ($this->security && substr($this->yystack[ $this->yyidx + -1 ]->minor, 0, 1) === '_') { - $this->compiler->trigger_template_error(self::ERR1); - } - $this->_retvalue = - '->' . $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 705 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r86(){ + $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1006 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r140() - { +// line 710 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r87(){ + if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { - $this->compiler->trigger_template_error(self::ERR2); + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); } - $this->_retvalue = - '->{' . - $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor) . - $this->yystack[ $this->yyidx + 0 ]->minor . - '}'; + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; + } else { + $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } - - // line 1013 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r141() - { - if ($this->security) { - $this->compiler->trigger_template_error(self::ERR2); - } - $this->_retvalue = - '->{' . $this->yystack[ $this->yyidx + -2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; } - - // line 1021 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r142() - { - if ($this->security) { - $this->compiler->trigger_template_error(self::ERR2); - } - $this->_retvalue = - '->{\'' . - $this->yystack[ $this->yyidx + -4 ]->minor . - '\'.' . - $this->yystack[ $this->yyidx + -2 ]->minor . - $this->yystack[ $this->yyidx + 0 ]->minor . - '}'; +// line 727 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r89(){ + $this->_retvalue = '('. $this->yystack[$this->yyidx + -1]->minor .')'; } - - // line 1029 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r143() - { - $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 731 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r90(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1037 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r144() - { - $this->_retvalue = - $this->compiler->compilePHPFunctionCall($this->yystack[ $this->yyidx + -3 ]->minor, - $this->yystack[ $this->yyidx + -1 ]->minor); +// line 749 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r94(){ + if ($this->security && $this->security->static_classes !== array()) { + $this->compiler->trigger_template_error('dynamic static class not allowed by security setting'); + } + $prefixVar = $this->compiler->getNewPrefixVariable(); + if ($this->yystack[$this->yyidx + -2]->minor['var'] === '\'smarty\'') { + $this->compiler->appendPrefixCode("compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).';?>'); + } else { + $this->compiler->appendPrefixCode("compiler->compileVariable($this->yystack[$this->yyidx + -2]->minor['var']).$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].';?>'); + } + $this->_retvalue = $prefixVar .'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; + } +// line 760 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r95(){ + $prefixVar = $this->compiler->getNewPrefixVariable(); + $tmp = $this->compiler->appendCode('', $this->yystack[$this->yyidx + 0]->minor); + $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "")); + $this->_retvalue = $prefixVar; + } +// line 767 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r96(){ + $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); + } +// line 780 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r99(){ + if (!in_array(strtolower($this->yystack[$this->yyidx + -2]->minor), array('self', 'parent')) && (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor, $this->compiler))) { + if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { + $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; + } else { + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; + } + } else { + $this->compiler->trigger_template_error ('static class \''.$this->yystack[$this->yyidx + -2]->minor.'\' is undefined or not allowed by security setting'); } - - // line 1044 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r145() - { - if ($this->security && substr($this->yystack[ $this->yyidx + -3 ]->minor, 0, 1) === '_') { - $this->compiler->trigger_template_error(self::ERR1); - } - $this->_retvalue = - $this->yystack[ $this->yyidx + -3 ]->minor . - '(' . - implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) . - ')'; } - - // line 1055 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r146() - { - if ($this->security) { - $this->compiler->trigger_template_error(self::ERR2); +// line 799 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r101(){ + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } - $prefixVar = $this->compiler->getNewPrefixVariable(); - $this->compiler->appendPrefixCode("compiler->compileVariable('\'' . - substr($this->yystack[ $this->yyidx + - -3 ]->minor, 1) . - '\'') . - ';?>'); - $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) . ')'; - } - - // line 1072 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r147() - { - $this->_retvalue = - array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); +// line 810 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r102(){ + $this->_retvalue = $this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''); + } +// line 813 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r103(){ + if ($this->yystack[$this->yyidx + 0]->minor['var'] === '\'smarty\'') { + $smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']); + $this->_retvalue = $smarty_var; + } else { + // used for array reset,next,prev,end,current + $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var']; + $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; + $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']).$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; + } + } +// line 826 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r104(){ + $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor; + } +// line 836 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r106(){ + $this->_retvalue = $this->compiler->compileConfigVariable('\'' . $this->yystack[$this->yyidx + -1]->minor . '\''); + } +// line 840 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r107(){ + $this->_retvalue = '(is_array($tmp = ' . $this->compiler->compileConfigVariable('\'' . $this->yystack[$this->yyidx + -2]->minor . '\'') . ') ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' :null)'; + } +// line 844 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r108(){ + $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + -1]->minor); + } +// line 848 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r109(){ + $this->_retvalue = '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + -2]->minor) . ') ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' : null)'; + } +// line 852 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r110(){ + $this->_retvalue = array('var'=>'\''.substr($this->yystack[$this->yyidx + -1]->minor,1).'\'', 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); + } +// line 855 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r111(){ + $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); + } +// line 868 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r113(){ + return; + } +// line 874 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r114(){ + $this->_retvalue = '['.$this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\'').']'; + } +// line 877 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r115(){ + $this->_retvalue = '['.$this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor).']'; + } +// line 881 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r116(){ + $this->_retvalue = '['.$this->compiler->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']'; + } +// line 885 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r117(){ + $this->_retvalue = '[\''. $this->yystack[$this->yyidx + 0]->minor .'\']'; + } +// line 889 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r118(){ + $this->_retvalue = '['. $this->yystack[$this->yyidx + 0]->minor .']'; + } +// line 894 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r119(){ + $this->_retvalue = '['. $this->yystack[$this->yyidx + -1]->minor .']'; } - - // line 1076 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r150() - { - $this->_retvalue = - array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array( - array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor) - )); +// line 899 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r120(){ + $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; + } +// line 903 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r121(){ + $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; + } +// line 906 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r122(){ + $this->_retvalue = '['.$this->yystack[$this->yyidx + -1]->minor.']'; + } +// line 912 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r124(){ + $this->_retvalue = '['.$this->compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -1]->minor,1).'\'').']'; + } +// line 928 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r128(){ + $this->_retvalue = '[]'; + } +// line 938 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r129(){ + $this->_retvalue = '\''.substr($this->yystack[$this->yyidx + 0]->minor,1).'\''; + } +// line 942 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r130(){ + $this->_retvalue = '\'\''; + } +// line 947 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r131(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1084 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r151() - { - $this->_retvalue = - array(array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); +// line 955 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r133(){ + $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->compiler->getLdelLength(), -$this->compiler->getRdelLength()), ' $'); + $this->_retvalue = $this->compiler->compileVariable('\''.$var.'\''); } - - // line 1092 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r153() - { - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); +// line 961 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r134(){ + $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } - - // line 1105 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r154() - { - $this->_retvalue = - array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); +// line 968 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r135(){ + if ($this->yystack[$this->yyidx + -1]->minor['var'] === '\'smarty\'') { + $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor; + } else { + $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + -1]->minor['var']).$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; } - - // line 1114 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r157() - { - $this->_retvalue = - array(trim($this->yystack[ $this->yyidx + -1 ]->minor) . $this->yystack[ $this->yyidx + 0 ]->minor); } - - // line 1119 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r159() - { - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); +// line 977 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r136(){ + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } - - // line 1124 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r160() - { - $this->_retvalue = - array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); +// line 982 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r137(){ + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1129 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r161() - { - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); +// line 987 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r138(){ + if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) === '_') { + $this->compiler->trigger_template_error (self::ERR1); } - - // line 1134 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r162() - { - $this->_retvalue = - array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); - } - - // line 1140 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r163() - { - $this->_retvalue = - array( - $this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor, 'property' - ); + $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1144 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r164() - { - $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; - } - - // line 1163 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r165() - { - static $lops = array( - 'eq' => ' == ', - 'ne' => ' != ', - 'neq' => ' != ', - 'gt' => ' > ', - 'ge' => ' >= ', - 'gte' => ' >= ', - 'lt' => ' < ', - 'le' => ' <= ', - 'lte' => ' <= ', - 'mod' => ' % ', - 'and' => ' && ', - 'or' => ' || ', - 'xor' => ' xor ', - ); - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); - $this->_retvalue = $lops[ $op ]; - } - - // line 1176 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r166() - { - static $tlops = array( - 'isdivby' => array('op' => ' % ', 'pre' => '!('), - 'isnotdivby' => array('op' => ' % ', 'pre' => '('), - 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), - 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), - 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), - 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '), - ); - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); - $this->_retvalue = $tlops[ $op ]; - } - - // line 1190 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r167() - { - static $scond = array( - 'iseven' => '!(1 & ', +// line 994 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r139(){ + if ($this->security) { + $this->compiler->trigger_template_error (self::ERR2); + } + $this->_retvalue = '->{'.$this->compiler->compileVariable($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor.'}'; + } +// line 1001 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r140(){ + if ($this->security) { + $this->compiler->trigger_template_error (self::ERR2); + } + $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; + } +// line 1008 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r141(){ + if ($this->security) { + $this->compiler->trigger_template_error (self::ERR2); + } + $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; + } +// line 1016 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r142(){ + $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; + } +// line 1024 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r143(){ + $this->_retvalue = $this->compiler->compilePHPFunctionCall($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + -1]->minor); + } +// line 1032 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r144(){ + if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) === '_') { + $this->compiler->trigger_template_error (self::ERR1); + } + $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . '('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')'; + } +// line 1039 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r145(){ + if ($this->security) { + $this->compiler->trigger_template_error (self::ERR2); + } + $prefixVar = $this->compiler->getNewPrefixVariable(); + $this->compiler->appendPrefixCode("compiler->compileVariable('\''.substr($this->yystack[$this->yyidx + -3]->minor,1).'\'').';?>'); + $this->_retvalue = $prefixVar .'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')'; + } +// line 1050 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r146(){ + $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor)); + } +// line 1067 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r149(){ + $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); + } +// line 1071 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r150(){ + $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); + } +// line 1079 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r152(){ + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); + } +// line 1087 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r153(){ + $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); + } +// line 1100 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r156(){ + $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor); + } +// line 1109 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r158(){ + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method'); + } +// line 1114 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r159(){ + $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method'); + } +// line 1119 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r160(){ + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, ''); + } +// line 1124 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r161(){ + $this->_retvalue = array($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property'); + } +// line 1129 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r162(){ + $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor, 'property'); + } +// line 1135 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r163(){ + $this->_retvalue = ' '. trim($this->yystack[$this->yyidx + 0]->minor) . ' '; + } +// line 1139 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r164(){ + static $lops = array( + 'eq' => ' == ', + 'ne' => ' != ', + 'neq' => ' != ', + 'gt' => ' > ', + 'ge' => ' >= ', + 'gte' => ' >= ', + 'lt' => ' < ', + 'le' => ' <= ', + 'lte' => ' <= ', + 'mod' => ' % ', + 'and' => ' && ', + 'or' => ' || ', + 'xor' => ' xor ', + ); + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); + $this->_retvalue = $lops[$op]; + } +// line 1158 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r165(){ + static $tlops = array( + 'isdivby' => array('op' => ' % ', 'pre' => '!('), + 'isnotdivby' => array('op' => ' % ', 'pre' => '('), + 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '), + 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), + 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), + 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '), + ); + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); + $this->_retvalue = $tlops[$op]; + } +// line 1171 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r166(){ + static $scond = array ( + 'iseven' => '!(1 & ', 'isnoteven' => '(1 & ', - 'isodd' => '(1 & ', - 'isnotodd' => '!(1 & ', + 'isodd' => '(1 & ', + 'isnotodd' => '!(1 & ', ); - $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); - $this->_retvalue = $scond[ $op ]; + $op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor)); + $this->_retvalue = $scond[$op]; } - - // line 1201 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r168() - { - $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; +// line 1185 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r167(){ + $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; } - - // line 1209 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r171() - { - $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 1196 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r170(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1213 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r173() - { - $this->_retvalue = - $this->yystack[ $this->yyidx + -2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 1204 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r172(){ + $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1229 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r174() - { - $this->_retvalue = - '\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; +// line 1208 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r173(){ + $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; } - - // line 1235 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r177() - { - $this->compiler->leaveDoubleQuote(); - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor->to_smarty_php($this); +// line 1224 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r176(){ + $this->compiler->leaveDoubleQuote(); + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php($this); } - - // line 1240 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r178() - { - $this->yystack[ $this->yyidx + -1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); - $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; +// line 1230 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r177(){ + $this->yystack[$this->yyidx + -1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); + $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } - - // line 1244 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r179() - { - $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); +// line 1235 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r178(){ + $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[$this->yyidx + 0]->minor); } - - // line 1248 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r180() - { - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + -1 ]->minor); +// line 1239 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r179(){ + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)'.$this->yystack[$this->yyidx + -1]->minor); } - - // line 1252 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r181() - { - $this->_retvalue = - new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'); +// line 1243 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r180(){ + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)('.$this->yystack[$this->yyidx + -1]->minor.')'); } - - // line 1264 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r182() - { - $this->_retvalue = - new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . - substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . - '\']->value'); +// line 1247 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r181(){ + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\']->value'); } - - // line 1268 "../smarty/lexer/smarty_internal_templateparser.y" - public function yy_r185() - { - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); +// line 1259 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r184(){ + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[$this->yyidx + 0]->minor); } - - public function yy_r186() - { - $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); +// line 1263 "../smarty/lexer/smarty_internal_templateparser.y" + public function yy_r185(){ + $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[$this->yyidx + 0]->minor); } + private $_retvalue; + public function yy_reduce($yyruleno) { if ($this->yyTraceFILE && $yyruleno >= 0 - && $yyruleno < count(self::$yyRuleName)) { + && $yyruleno < count(self::$yyRuleName)) { fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, - self::$yyRuleName[ $yyruleno ]); + self::$yyRuleName[$yyruleno]); } + $this->_retvalue = $yy_lefthand_side = null; - if (isset(self::$yyReduceMap[ $yyruleno ])) { + if (isset(self::$yyReduceMap[$yyruleno])) { // call the action $this->_retvalue = null; - $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); + $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); $yy_lefthand_side = $this->_retvalue; } - $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; - $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; + $yygoto = self::$yyRuleInfo[$yyruleno][0]; + $yysize = self::$yyRuleInfo[$yyruleno][1]; $this->yyidx -= $yysize; for ($i = $yysize; $i; $i--) { // pop all of the right-hand side parameters array_pop($this->yystack); } - $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); + $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); if ($yyact < self::YYNSTATE) { if (!$this->yyTraceFILE && $yysize) { $this->yyidx++; @@ -3492,7 +2792,7 @@ public function yy_reduce($yyruleno) $x->stateno = $yyact; $x->major = $yygoto; $x->minor = $yy_lefthand_side; - $this->yystack[ $this->yyidx ] = $x; + $this->yystack[$this->yyidx] = $x; } else { $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); } @@ -3505,37 +2805,38 @@ public function yy_parse_failed() { if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt); - } - while ($this->yyidx >= 0) { + } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } } public function yy_syntax_error($yymajor, $TOKEN) { - // line 214 "../smarty/lexer/smarty_internal_templateparser.y" - $this->internalError = true; - $this->yymajor = $yymajor; - $this->compiler->trigger_template_error(); +// line 213 "../smarty/lexer/smarty_internal_templateparser.y" + + $this->internalError = true; + $this->yymajor = $yymajor; + $this->compiler->trigger_template_error(); } public function yy_accept() { if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt); - } - while ($this->yyidx >= 0) { + } while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } - // line 207 "../smarty/lexer/smarty_internal_templateparser.y" - $this->successful = !$this->internalError; - $this->internalError = false; - $this->retvalue = $this->_retvalue; +// line 206 "../smarty/lexer/smarty_internal_templateparser.y" + + $this->successful = !$this->internalError; + $this->internalError = false; + $this->retvalue = $this->_retvalue; } public function doParse($yymajor, $yytokenvalue) { $yyerrorhit = 0; /* True if yymajor has invoked an error */ + if ($this->yyidx === null || $this->yyidx < 0) { $this->yyidx = 0; $this->yyerrcnt = -1; @@ -3545,15 +2846,17 @@ public function doParse($yymajor, $yytokenvalue) $this->yystack = array(); $this->yystack[] = $x; } - $yyendofinput = ($yymajor == 0); + $yyendofinput = ($yymajor==0); + if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sInput %s\n", - $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); + $this->yyTracePrompt, $this->yyTokenName[$yymajor]); } + do { $yyact = $this->yy_find_shift_action($yymajor); if ($yymajor < self::YYERRORSYMBOL && - !$this->yy_is_expected_token($yymajor)) { + !$this->yy_is_expected_token($yymajor)) { // force a syntax error $yyact = self::YY_ERROR_ACTION; } @@ -3576,22 +2879,22 @@ public function doParse($yymajor, $yytokenvalue) if ($this->yyerrcnt < 0) { $this->yy_syntax_error($yymajor, $yytokenvalue); } - $yymx = $this->yystack[ $this->yyidx ]->major; + $yymx = $this->yystack[$this->yyidx]->major; if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) { if ($this->yyTraceFILE) { fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", - $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); + $this->yyTracePrompt, $this->yyTokenName[$yymajor]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; } else { while ($this->yyidx >= 0 && - $yymx !== self::YYERRORSYMBOL && - ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE - ) { + $yymx !== self::YYERRORSYMBOL && + ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE + ){ $this->yy_pop_parser_stack(); } - if ($this->yyidx < 0 || $yymajor == 0) { + if ($this->yyidx < 0 || $yymajor==0) { $this->yy_destructor($yymajor, $yytokenvalue); $this->yy_parse_failed(); $yymajor = self::YYNOCODE; diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_internal_testinstall.php b/WEB-INF/lib/smarty/sysplugins/smarty_internal_testinstall.php index 504a4582c..1fac79b74 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_internal_testinstall.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_internal_testinstall.php @@ -362,7 +362,6 @@ public static function testInstall(Smarty $smarty, &$errors = null) 'smarty_internal_compile_function.php' => true, 'smarty_internal_compile_if.php' => true, 'smarty_internal_compile_include.php' => true, - 'smarty_internal_compile_include_php.php' => true, 'smarty_internal_compile_insert.php' => true, 'smarty_internal_compile_ldelim.php' => true, 'smarty_internal_compile_make_nocache.php' => true, @@ -373,7 +372,6 @@ public static function testInstall(Smarty $smarty, &$errors = null) 'smarty_internal_compile_private_modifier.php' => true, 'smarty_internal_compile_private_object_block_function.php' => true, 'smarty_internal_compile_private_object_function.php' => true, - 'smarty_internal_compile_private_php.php' => true, 'smarty_internal_compile_private_print_expression.php' => true, 'smarty_internal_compile_private_registered_block.php' => true, 'smarty_internal_compile_private_registered_function.php' => true, @@ -388,7 +386,6 @@ public static function testInstall(Smarty $smarty, &$errors = null) 'smarty_internal_config_file_compiler.php' => true, 'smarty_internal_data.php' => true, 'smarty_internal_debug.php' => true, - 'smarty_internal_errorhandler.php' => true, 'smarty_internal_extension_handler.php' => true, 'smarty_internal_method_addautoloadfilters.php' => true, 'smarty_internal_method_adddefaultmodifiers.php' => true, @@ -450,7 +447,6 @@ public static function testInstall(Smarty $smarty, &$errors = null) 'smarty_internal_resource_extends.php' => true, 'smarty_internal_resource_file.php' => true, 'smarty_internal_resource_php.php' => true, - 'smarty_internal_resource_registered.php' => true, 'smarty_internal_resource_stream.php' => true, 'smarty_internal_resource_string.php' => true, 'smarty_internal_runtime_cachemodify.php' => true, diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_resource.php b/WEB-INF/lib/smarty/sysplugins/smarty_resource.php index aae7e42f7..7fe84536f 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_resource.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_resource.php @@ -72,9 +72,7 @@ public static function load(Smarty $smarty, $type) } // try registered resource if (isset($smarty->registered_resources[ $type ])) { - return $smarty->_cache[ 'resource_handlers' ][ $type ] = - $smarty->registered_resources[ $type ] instanceof Smarty_Resource ? - $smarty->registered_resources[ $type ] : new Smarty_Internal_Resource_Registered(); + return $smarty->_cache[ 'resource_handlers' ][ $type ] = $smarty->registered_resources[ $type ]; } // try sysplugins dir if (isset(self::$sysplugins[ $type ])) { diff --git a/WEB-INF/lib/smarty/sysplugins/smarty_security.php b/WEB-INF/lib/smarty/sysplugins/smarty_security.php index 441a7e284..3c29c8132 100644 --- a/WEB-INF/lib/smarty/sysplugins/smarty_security.php +++ b/WEB-INF/lib/smarty/sysplugins/smarty_security.php @@ -21,19 +21,6 @@ */ class Smarty_Security { - /** - * This determines how Smarty handles "" tags in templates. - * possible values: - *
    - *
  • Smarty::PHP_PASSTHRU -> echo PHP tags as they are
  • - *
  • Smarty::PHP_QUOTE -> escape tags as entities
  • - *
  • Smarty::PHP_REMOVE -> remove php tags
  • - *
  • Smarty::PHP_ALLOW -> execute php tags
  • - *
- * - * @var integer - */ - public $php_handling = Smarty::PHP_PASSTHRU; /** * This is the list of template directories that are considered secure. diff --git a/WEB-INF/lib/smarty/sysplugins/smartycompilerexception.php b/WEB-INF/lib/smarty/sysplugins/smartycompilerexception.php index f7ad39b93..8833aa52c 100644 --- a/WEB-INF/lib/smarty/sysplugins/smartycompilerexception.php +++ b/WEB-INF/lib/smarty/sysplugins/smartycompilerexception.php @@ -16,12 +16,12 @@ public function __toString() } /** - * The line number of the template error - * - * @type int|null + * @param int $line */ - public $line = null; - + public function setLine($line) + { + $this->line = $line; + } /** * The template source snippet relating to the error * diff --git a/initialize.php b/initialize.php index 911c1f71d..f8d3cf7db 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5638"); +define("APP_VERSION", "1.20.0.5639"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0924ef499c2b0833a20c2d180b04fa70c6484b6d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 20 Feb 2022 20:46:15 +0000 Subject: [PATCH 2328/2515] Fixed Smarty.class.php so that it is possible to use it with php5.4. --- WEB-INF/lib/smarty/Smarty.class.php | 16 +++++++++++++++- WEB-INF/lib/smarty/readme | 7 +++---- initialize.php | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/smarty/Smarty.class.php b/WEB-INF/lib/smarty/Smarty.class.php index 05325a230..85a3d9a6e 100644 --- a/WEB-INF/lib/smarty/Smarty.class.php +++ b/WEB-INF/lib/smarty/Smarty.class.php @@ -60,6 +60,18 @@ */ define('SMARTY_MBSTRING', function_exists('mb_get_info')); } + +// Note: Nik put this back in from smarty3 for php5.4 that we still support. +// See also comment around Smarty::$_CHARSET. +if (!defined('SMARTY_RESOURCE_CHAR_SET')) { + // UTF-8 can only be done properly when mbstring is available! + /** + * @deprecated in favor of Smarty::$_CHARSET + */ + define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'); +} +// End of inserted fragment by Nik. + /** * Load Smarty_Autoloader */ @@ -160,7 +172,9 @@ class Smarty extends Smarty_Internal_TemplateBase /** * The character set to adhere to (e.g. "UTF-8") */ - public static $_CHARSET = SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'; + // public static $_CHARSET = SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'; + // Note by Nik: the above assignment only works with php >= 5.6, rolling back to SMARTY_RESOURCE_CHAR_SET as in smarty3. + public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; /** * The date format to be used internally diff --git a/WEB-INF/lib/smarty/readme b/WEB-INF/lib/smarty/readme index 91eff4784..0a894518a 100644 --- a/WEB-INF/lib/smarty/readme +++ b/WEB-INF/lib/smarty/readme @@ -1,8 +1,7 @@ -These are files from Smarty-4.1.0 with 2 modifications in: +The files in this directory are from Smarty-4.1.0. +There are 2 modified files though to support older versions of php such as 5.4. Smarty.class.php sysplugins/smarty_internal_cacheresource_file.php -Nik edited these files for php5.4 support, as they use php7.0 features. - - +Nik edited these files in a few places for php5.4 support, as they use php7.0 and php5.6 features. diff --git a/initialize.php b/initialize.php index f8d3cf7db..221f3f6cd 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5639"); +define("APP_VERSION", "1.20.0.5640"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 992bcdd2f13da3ffa7161bbb9ed7c7d118e9297a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 21 Feb 2022 13:12:10 +0000 Subject: [PATCH 2329/2515] Added a comment about required php version. Dutch file improved. --- WEB-INF/resources/nl.lang.php | 2 +- dbinstall.php | 4 ++++ initialize.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index dc86183ac..79baaa97d 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -110,7 +110,7 @@ 'button.stop' => 'Stop', 'button.approve' => 'Goedkeuren', 'button.disapprove' => 'Afkeuren', -// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. +'button.sync' => 'Sychroniseer', // Labels for controls on forms. Labels in this section are used on multiple forms. 'label.menu' => 'Menu', diff --git a/dbinstall.php b/dbinstall.php index 12a1e6232..a3168bbfa 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -94,6 +94,10 @@ function ttGenerateKeys() { // $required_version = '5.2.1'; // Something in TCPDF library does not work below this one. $required_version = '5.4.0'; // Week view (week.php) requires 5.4 because of []-way of referencing arrays. // This needs further investigation as we use [] elsewhere without obvious problems. + // Note: unmodified smarty 4.1.0 that we needed for php 8.1 support uses plp 5.6 and 7.0 features. + // Currently, embedded smarty in this product is adjusted to still support php 5.4. + // Next time we update smarty we may need to increase $required_version. + // Print a warning about php >= 8.1 because of a breaking change // with mysqli default error mode, see https://php.watch/versions/8.1/mysqli-error-mode if (version_compare(phpversion(), '8.1', '>=')) { diff --git a/initialize.php b/initialize.php index 221f3f6cd..295d77ca0 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5640"); +define("APP_VERSION", "1.20.0.5641"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0e2d6563e2d969209c502a1eae4ddd8e87b73299 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 21 Feb 2022 14:56:48 +0000 Subject: [PATCH 2330/2515] Addressed an sql injection vulnerability in puncher.php. --- initialize.php | 2 +- puncher.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index 295d77ca0..039438f08 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5641"); +define("APP_VERSION", "1.20.0.5642"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 787c6f34b..0cfd37f20 100644 --- a/puncher.php +++ b/puncher.php @@ -19,6 +19,13 @@ header('Location: feature_disabled.php'); exit(); } +// If we are passed in a date, make sure it is in correct format. +// TODO: redo this temporary sql injection fix as we are not supposed to pass a date. +$date = $request->getParameter('date'); +if ($date && !ttValidDbDateFormatDate($date)) { + header('Location: access_denied.php'); + exit(); +} if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); From 1804ff3d538651464545e1fac8fefcf10442ad7b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 22 Feb 2022 17:25:34 +0000 Subject: [PATCH 2331/2515] Improved puncher plugin. --- WEB-INF/lib/common.lib.php | 13 +++++++++ WEB-INF/lib/ttDate.class.php | 6 ++++ initialize.php | 2 +- puncher.php | 55 ++++++++++++++++++------------------ 4 files changed, 48 insertions(+), 28 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index d8ed3c8d5..f5baa1a12 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -270,6 +270,19 @@ function ttValidDbDateFormatDate($val) return true; } +// ttValidTime is used to check user input for time post. +function ttValidTime($val) +{ + if (is_null($val) || strlen($val) == 0) + return false; + + // This should validate a yime string in 24 hour format hh:mm. + if (!preg_match('/^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$/', $val)) + return false; + + return true; +} + // ttValidInteger is used to check user input to validate an integer. function ttValidInteger($val, $emptyValid = false) { diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index 1b5bad9c4..176692f84 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -111,6 +111,12 @@ function getDay() { return $this->day; } function getDayOfWeek() { return $this->dayOfWeek; } + // incrementDay increments our date by a number of days. + function incrementDay(/*int*/ $days = 1) { + $this->setFromUnixTimestamp(@mktime(0, 0, 0, $this->month, $this->day + $days, $this->year)); + } + + // A static function to obtain a date in DB_DATEFORMAT from a Unix timestamp. static function dateFromUnixTimestamp($unixTimestamp = null) { if ($unixTimestamp == null) { diff --git a/initialize.php b/initialize.php index 039438f08..9328d3c0f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5642"); +define("APP_VERSION", "1.20.0.5643"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 0cfd37f20..55c42e368 100644 --- a/puncher.php +++ b/puncher.php @@ -8,7 +8,7 @@ import('ttGroupHelper'); import('ttClientHelper'); import('ttTimeHelper'); -import('DateAndTime'); +import('ttDate'); // Access check. if (!ttAccessAllowed('track_own_time')) { @@ -19,13 +19,8 @@ header('Location: feature_disabled.php'); exit(); } -// If we are passed in a date, make sure it is in correct format. -// TODO: redo this temporary sql injection fix as we are not supposed to pass a date. -$date = $request->getParameter('date'); -if ($date && !ttValidDbDateFormatDate($date)) { - header('Location: access_denied.php'); - exit(); -} +// If we are passed in browser_today, make sure it is in correct format. +$browser_today = null; // Reused below beyond access checks. if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); @@ -34,6 +29,16 @@ exit(); } } +// If we are passed in browser_ttime, make sure it is in correct format. +$browser_time = null; // Reused below beyond access checks. +if ($request->isPost()) { + // Validate that browser_today parameter is in correct format. + $browser_time = $request->getParameter('browser_time'); + if ($browser_time && !ttValidTime($browser_time)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. $showClient = $user->isPluginEnabled('cl'); @@ -44,15 +49,9 @@ $taskRequired = false; if ($showTask) $taskRequired = $user->getConfigOption('task_required'); -// Initialize and store date in session. -$cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); -if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); -$_SESSION['date'] = $cl_date; -// TODO: for timer page we may limit the day to today only. +// Initialize $cl_date. +$date_today = new ttDate($browser_today); // Initialize to browser today if we are passed it in, otherwise server today. +$cl_date = $date_today->toString(); // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { @@ -66,8 +65,8 @@ $enable_controls = ($uncompleted == null); // Initialize variables. -$cl_start = trim($request->getParameter('browser_time')); -$cl_finish = trim($request->getParameter('browser_time')); +$cl_start = $browser_time; +$cl_finish = $browser_time; $cl_duration = $cl_note = null; // Disabled controls are not posted. Therefore, && $enable_controls condition in several places below. // This allows us to get values from session when controls are disabled and reset to null when not. @@ -204,9 +203,9 @@ // Start and stop buttons. $enable_start = $uncompleted ? false : true; if (!$uncompleted) - $form->addInput(array('type'=>'submit','name'=>'btn_start','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('button.start'),'enable'=>$enable_start)); + $form->addInput(array('type'=>'submit','name'=>'btn_start','onclick'=>'browser_today.value=get_date();browser_time.value=get_time()','value'=>$i18n->get('button.start'),'enable'=>$enable_start)); else - $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_time.value=get_time()','value'=>$i18n->get('button.stop'),'enable'=>!$enable_start)); + $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_today.value=get_date();browser_time.value=get_time()','value'=>$i18n->get('button.stop'),'enable'=>!$enable_start)); // Submit. if ($request->isPost()) { @@ -232,15 +231,17 @@ } // Finished validating user input. - // Prohibit creating entries in future. + // Prohibit creating entries in future. Tricky with a bogus browser_today data in post. if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) + // Just check if the date we are using is after server tomorrow. + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($date_today->after($server_tomorrow)) $err->add($i18n->get('error.future_date')); } // Prohibit creating time entries in locked interval. - if ($user->isDateLocked($selected_date)) + if ($user->isDateLocked($date_today)) $err->add($i18n->get('error.range_locked')); // Prohibit creating another uncompleted record. @@ -309,7 +310,7 @@ } } // isPost -$week_total = ttTimeHelper::getTimeForWeek($cl_date); +$week_total = ttTimeHelper::getTimeForWeek2($date_today); $timeRecords = ttTimeHelper::getRecords($cl_date); $smarty->assign('week_total', $week_total); @@ -329,7 +330,7 @@ $smarty->assign('task_list', $task_list); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="fillDropdowns()"'); -$smarty->assign('timestring', $selected_date->toString($user->date_format)); +$smarty->assign('timestring', $date_today->toString($user->getDateFormat())); $smarty->assign('title', $i18n->get('title.puncher')); $smarty->assign('content_page_name', 'puncher.tpl'); $smarty->display('index.tpl'); From c6e71668ca55e91c8d0f039949656a0994b3be81 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 23 Feb 2022 13:55:58 +0000 Subject: [PATCH 2332/2515] Improved a check for valid date. --- WEB-INF/lib/common.lib.php | 5 +++-- initialize.php | 2 +- puncher.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index f5baa1a12..6702919b7 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -267,7 +267,8 @@ function ttValidDbDateFormatDate($val) if (!preg_match('/^\d\d\d\d-\d\d-\d\d$/', $val)) return false; - return true; + $date_parts = explode('-', $val); + return checkdate($date_parts[1], $date_parts[2], $date_parts[0]); } // ttValidTime is used to check user input for time post. @@ -276,7 +277,7 @@ function ttValidTime($val) if (is_null($val) || strlen($val) == 0) return false; - // This should validate a yime string in 24 hour format hh:mm. + // This should validate a time string in 24 hour format hh:mm. if (!preg_match('/^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$/', $val)) return false; diff --git a/initialize.php b/initialize.php index 9328d3c0f..827e9ce29 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5643"); +define("APP_VERSION", "1.20.0.5644"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 55c42e368..d23fbd1f0 100644 --- a/puncher.php +++ b/puncher.php @@ -29,7 +29,7 @@ exit(); } } -// If we are passed in browser_ttime, make sure it is in correct format. +// If we are passed in browser_time, make sure it is in correct format. $browser_time = null; // Reused below beyond access checks. if ($request->isPost()) { // Validate that browser_today parameter is in correct format. From bb7d08fa61a40369e8eeb07e476ec0a674e2f092 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 23 Feb 2022 14:31:36 +0000 Subject: [PATCH 2333/2515] Replaced emoji with an asterisk for subgroups dropdown because it does not display properly in Chrome 98. --- WEB-INF/lib/ttUser.class.php | 5 +++-- initialize.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 592b5d9c8..19e689b58 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -555,9 +555,10 @@ function getGroupsForDropdown() { // addGroupToDropdown is a recursive function to populate a tree of groups, used with getGroupsForDropdown(). function addGroupToDropdown(&$groups, $group_id, $subgroup_level) { $name = ''; - // Add indentation markup to indicate subdirectory level. + // Add indentation markup to indicate a subdirectory level. for ($i = 0; $i < $subgroup_level; $i++) { - $name .= '🛑'; // Unicode stop sign. + $name .= '*'; + // $name .= '🛑'; // Unicode stop sign. Does not display properly in Chrome 98. } if ($subgroup_level) $name .= ' '; // Add an extra space. $name .= ttGroupHelper::getGroupName($group_id); diff --git a/initialize.php b/initialize.php index 827e9ce29..62c2c0f8f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5644"); +define("APP_VERSION", "1.20.0.5645"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6aaad31630500d13b6c8459daa9f406fd5eb4330 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 23 Feb 2022 15:43:34 +0000 Subject: [PATCH 2334/2515] Addressed stored XSS vulnerability when displaying primary group name. --- WEB-INF/lib/ttUser.class.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 19e689b58..f1eb3e094 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -834,7 +834,7 @@ function getUserPartForHeader() { $user_part .= ', '.htmlspecialchars($this->behalf_group_name).''; } else { if ($this->group_name) // Note: we did not require group names in the past. - $user_part .= ', '.$this->group_name; + $user_part .= ', '.htmlspecialchars($this->group_name); } return $user_part; } diff --git a/initialize.php b/initialize.php index 62c2c0f8f..b4ad492fa 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5645"); +define("APP_VERSION", "1.20.0.5646"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 48a36e432dbd8789b032499eb2a8ef5549b0c5f1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 2 Mar 2022 17:24:06 +0000 Subject: [PATCH 2335/2515] A fix for issue #118. --- WEB-INF/lib/ttClientHelper.class.php | 45 +++++++++++++++++++++++++++ WEB-INF/lib/ttProjectHelper.class.php | 7 ++++- initialize.php | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttClientHelper.class.php b/WEB-INF/lib/ttClientHelper.class.php index ba62d0f33..5c9dff349 100644 --- a/WEB-INF/lib/ttClientHelper.class.php +++ b/WEB-INF/lib/ttClientHelper.class.php @@ -358,4 +358,49 @@ static function deleteProjectFromClient($project_id, $client_id) { $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); } + + // unassignProjectFromAllClients - removes a project reference from all clients in tt_clients table + // and also from tt_client_project_binds. + static function unassignProjectFromAllClients($project_id) { + global $user; + $mdb2 = getConnection(); + + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $project_id = (int) $project_id; // Cast for sql injection protection, just in case. + + // Start with cleaning up tt_client_project_binds table. + $sql = "delete from tt_client_project_binds". + " where project_id = $project_id and group_id = $group_id and org_id = $org_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + + // Continue with tt_clients table. + $sql = "select id, projects from tt_clients where projects like '%$project_id%' and group_id = $group_id and org_id = $org_id"; + $res = $mdb2->query($sql); + while ($val = $res->fetchRow()) { + + $client_id = (int) $val['id']; + $projectListed = false; + + $projects = explode(',', $val['projects']); + if (($key = array_search($project_id, $projects)) !== false) { + unset($projects[$key]); + $projectListed = true; + } + if (!$projectListed) + continue; // Project not listed, continue iterating. + + // If we are here, project is listed and we need to remove it. + $comma_separated = implode(',', $projects); + $sql = "update tt_clients set projects = ".$mdb2->quote($comma_separated). + " where id = $client_id and group_id = $group_id and org_id = $org_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + } + return true; + } } diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index dd6e35cb8..97a9dbc29 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -357,7 +357,12 @@ static function update($fields) { return false; } // End of updating tt_project_task_binds table. - + + // If we are making the project inactive, remove references to it in tt_client_project_binds table. + if (constant('INACTIVE') == $status) { + ttClientHelper::unassignProjectFromAllClients($project_id); + } + // Update project name, description, tasks and status in tt_projects table. $comma_separated = implode(",", $tasks_to_bind); // This is a comma-separated list of associated task ids. $sql = "update tt_projects set name = ".$mdb2->quote($name).", description = ".$mdb2->quote($description). diff --git a/initialize.php b/initialize.php index b4ad492fa..5d433ef69 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.0.5646"); +define("APP_VERSION", "1.20.1.5647"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bcb15ae43e46f2ae8a326374286f95a7436647de Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 2 Mar 2022 17:27:20 +0000 Subject: [PATCH 2336/2515] Cosmetic. Comment changed for clarity. --- WEB-INF/lib/ttProjectHelper.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 97a9dbc29..4a827189b 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -358,7 +358,7 @@ static function update($fields) { } // End of updating tt_project_task_binds table. - // If we are making the project inactive, remove references to it in tt_client_project_binds table. + // If we are making the project inactive, unassign it from all clients. if (constant('INACTIVE') == $status) { ttClientHelper::unassignProjectFromAllClients($project_id); } From 407e6c65271d30c058377ece5a885ecfc852aaea Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 3 Mar 2022 18:56:25 +0000 Subject: [PATCH 2337/2515] Improved a check for overlap. Existing code was not working when finish is start as in uncompleted records. --- WEB-INF/lib/ttTimeHelper.class.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index b45c6d17f..70b98458f 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -718,7 +718,7 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { and start is not null and duration is not null and status = 1 and ( (cast(".$mdb2->quote($start)." as time) >= start and cast(".$mdb2->quote($start)." as time) < addtime(start, duration))"; if ($finish) { - $sql .= " or (cast(".$mdb2->quote($finish)." as time) <= addtime(start, duration) and cast(".$mdb2->quote($finish)." as time) > start) + $sql .= " or (cast(".$mdb2->quote($finish)." as time) < addtime(start, duration) and cast(".$mdb2->quote($finish)." as time) >= start) or (cast(".$mdb2->quote($start)." as time) < start and cast(".$mdb2->quote($finish)." as time) > addtime(start, duration))"; } $sql .= ")"; diff --git a/initialize.php b/initialize.php index 5d433ef69..61208f771 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.1.5647"); +define("APP_VERSION", "1.20.1.5648"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d3fcdf90b38f68f7ce1bed7f05ee74fa70fdeb7b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 4 Mar 2022 15:08:48 +0000 Subject: [PATCH 2338/2515] Rolling back a change from previous commit. --- WEB-INF/lib/ttTimeHelper.class.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 70b98458f..b45c6d17f 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -718,7 +718,7 @@ static function overlaps($user_id, $date, $start, $finish, $record_id = null) { and start is not null and duration is not null and status = 1 and ( (cast(".$mdb2->quote($start)." as time) >= start and cast(".$mdb2->quote($start)." as time) < addtime(start, duration))"; if ($finish) { - $sql .= " or (cast(".$mdb2->quote($finish)." as time) < addtime(start, duration) and cast(".$mdb2->quote($finish)." as time) >= start) + $sql .= " or (cast(".$mdb2->quote($finish)." as time) <= addtime(start, duration) and cast(".$mdb2->quote($finish)." as time) > start) or (cast(".$mdb2->quote($start)." as time) < start and cast(".$mdb2->quote($finish)." as time) > addtime(start, duration))"; } $sql .= ")"; diff --git a/initialize.php b/initialize.php index 61208f771..27e302483 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.1.5648"); +define("APP_VERSION", "1.20.1.5649"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 4bf1cc9e8a50d630db7571a2894cb6d87670ea3f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 10 Mar 2022 16:57:53 +0000 Subject: [PATCH 2339/2515] Added all users option to charts. --- WEB-INF/lib/ttChartHelper.class.php | 20 +++++++++--- WEB-INF/lib/ttRoleHelper.class.php | 2 +- WEB-INF/templates/header.tpl | 2 +- WEB-INF/templates/site_map.tpl | 2 +- charts.php | 48 +++++++++++++++++++++-------- dbinstall.php | 10 +++--- initialize.php | 2 +- mysql.sql | 4 +-- 8 files changed, 63 insertions(+), 27 deletions(-) diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index 60c9897cb..faf18263b 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -40,6 +40,11 @@ class ttChartHelper { // getTotals - returns total times by project or task for a given user in a specified period. static function getTotals($user_id, $chart_type, $selected_date, $interval_type) { + global $user; + $user_id = (int) $user_id; // Cast to int just in case for sql injections. + $group_id = $user->getGroup(); + $org_id = $user->org_id; + $period = null; switch ($interval_type) { case INTERVAL_THIS_DAY: @@ -62,25 +67,32 @@ static function getTotals($user_id, $chart_type, $selected_date, $interval_type) $result = array(); $mdb2 = getConnection(); + $userIdPart = ''; + if ($user_id > 0) { + // -1 here means "all users in group" both active and inactive. + // Therefore, we will not be using user id. + $userIdPart = "and l.user_id = $user_id"; + } + $q_period = ''; if ($period != null) { - $q_period = " and date >= '".$period->getStartDate(DB_DATEFORMAT)."' and date <= '".$period->getEndDate(DB_DATEFORMAT)."'"; + $q_period = "and date >= '".$period->getStartDate(DB_DATEFORMAT)."' and date <= '".$period->getEndDate(DB_DATEFORMAT)."'"; } if (CHART_PROJECTS == $chart_type) { // Data for projects. $sql = "select p.name as name, sum(time_to_sec(l.duration)) as time from tt_log l left join tt_projects p on (p.id = l.project_id) - where l.status = 1 and l.user_id = $user_id $q_period group by l.project_id"; + where l.status = 1 $userIdPart and l.group_id = $group_id and l.org_id = $org_id $q_period group by l.project_id"; } elseif (CHART_TASKS == $chart_type) { // Data for tasks. $sql = "select t.name as name, sum(time_to_sec(l.duration)) as time from tt_log l left join tt_tasks t on (t.id = l.task_id) - where l.status = 1 and l.user_id = $user_id $q_period group by l.task_id"; + where l.status = 1 $userIdPart and l.group_id = $group_id and l.org_id = $org_id $q_period group by l.task_id"; } elseif (CHART_CLIENTS == $chart_type) { // Data for clients. $sql = "select c.name as name, sum(time_to_sec(l.duration)) as time from tt_log l left join tt_clients c on (c.id = l.client_id) - where l.status = 1 and l.user_id = $user_id $q_period group by l.client_id"; + where l.status = 1 $userIdPart and l.group_id = $group_id and l.org_id = $org_id $q_period group by l.client_id"; } $res = $mdb2->query($sql); diff --git a/WEB-INF/lib/ttRoleHelper.class.php b/WEB-INF/lib/ttRoleHelper.class.php index 1ddc839cc..fa6739a5b 100644 --- a/WEB-INF/lib/ttRoleHelper.class.php +++ b/WEB-INF/lib/ttRoleHelper.class.php @@ -169,7 +169,7 @@ static function createPredefinedRoles($group_id, $lang) $rights_client = 'view_client_reports,view_client_invoices,manage_own_settings'; $rights_user = 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users'; $rights_supervisor = $rights_user.',track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_date_lock,override_own_date_lock,swap_roles'; - $rights_comanager = $rights_supervisor.',manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports'; + $rights_comanager = $rights_supervisor.',manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_charts,view_all_reports'; $rights_manager = $rights_comanager.',manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups'; // Active roles. diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index a189e50e5..af6151acb 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -114,7 +114,7 @@ {if $user->exists() && $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->can('view_client_invoices'))}
{$i18n.title.invoices}{$i18n.menu.charts}
-
Create database structure (v1.20.0) + Create database structure (v1.21.0)
(applies only to new installations, do not execute when updating)
@@ -1290,8 +1292,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.20)Update database structure (v1.19 to v1.21)
diff --git a/initialize.php b/initialize.php index 27e302483..48af9888e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.20.1.5649"); +define("APP_VERSION", "1.21.0.5650"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index 55d8e8b5c..05743ee54 100644 --- a/mysql.sql +++ b/mysql.sql @@ -78,7 +78,7 @@ create unique index role_idx on tt_roles(group_id, `rank`, status); # Insert site-wide roles - site administrator and top manager. INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Site administrator', 1024, 'administer_site'); -INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_reports,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,delete_group'); +INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_charts,view_all_reports,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,delete_group'); # @@ -621,4 +621,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.20.0', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.0', now()); # TODO: change when structure changes. From d6ee66fa1e218b13c093e7c7d0b34f34cb15bd06 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 12 Mar 2022 16:12:19 +0000 Subject: [PATCH 2340/2515] Updated links. --- .htaccess | 2 +- CONTRIBUTING.md | 4 ++-- WEB-INF/config.php.dist | 4 ++-- WEB-INF/lib/Auth.class.php | 2 +- WEB-INF/lib/DateAndTime.class.php | 2 +- WEB-INF/lib/I18n.class.php | 2 +- WEB-INF/lib/Period.class.php | 2 +- WEB-INF/lib/form/ActionErrors.class.php | 2 +- WEB-INF/lib/form/ActionForm.class.php | 2 +- WEB-INF/lib/form/Calendar.class.php | 2 +- WEB-INF/lib/form/Checkbox.class.php | 2 +- WEB-INF/lib/form/CheckboxCellRenderer.class.php | 2 +- WEB-INF/lib/form/CheckboxGroup.class.php | 2 +- WEB-INF/lib/form/DefaultCellRenderer.class.php | 2 +- WEB-INF/lib/form/FloatField.class.php | 2 +- WEB-INF/lib/form/Hidden.class.php | 2 +- WEB-INF/lib/form/Submit.class.php | 2 +- WEB-INF/lib/form/Table.class.php | 2 +- WEB-INF/lib/form/TableColumn.class.php | 2 +- WEB-INF/lib/form/TextArea.class.php | 2 +- WEB-INF/lib/form/TextField.class.php | 2 +- WEB-INF/lib/form/UploadFile.class.php | 2 +- WEB-INF/lib/html/HttpRequest.class.php | 2 +- WEB-INF/lib/mail/Mailer.class.php | 2 +- WEB-INF/lib/ttBehalfUser.class.php | 2 +- WEB-INF/lib/ttChartHelper.class.php | 2 +- WEB-INF/lib/ttCronJobHelper.class.php | 2 +- WEB-INF/lib/ttDebugTracer.class.php | 2 +- WEB-INF/lib/ttNotificationHelper.class.php | 2 +- WEB-INF/lib/ttOrgExportHelper.class.php | 2 +- WEB-INF/lib/ttOrgHelper.class.php | 2 +- WEB-INF/lib/ttPredefinedExpenseHelper.class.php | 2 +- WEB-INF/lib/ttProjectHelper.class.php | 2 +- WEB-INF/lib/ttTeamHelper.class.php | 2 +- initialize.php | 2 +- plugins/CustomFields.class.php | 2 +- plugins/MonthlyQuota.class.php | 2 +- readme.txt | 10 +++++----- 38 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.htaccess b/.htaccess index 189e6b4b8..3b6168c75 100644 --- a/.htaccess +++ b/.htaccess @@ -2,7 +2,7 @@ AddDefaultCharset utf-8 # Restrict access to Time Tracker only from certain IPs. # -# See https://www.anuko.com/time_tracker/faq/restrict_access_by_ip.htm for help. +# See https://www.anuko.com/time-tracker/faq/restrict-access-by-ip.htm for help. # For this to work make sure AllowOverride is set to All in web server config file. # Uncomment 3 lines below and set your IP accordingly. # diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7311238a..58c971801 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Resources -* [docs](https://www.anuko.com/time_tracker/features.htm) - detailed documentation about this project (needs updating). +* [docs](https://www.anuko.com/time-tracker/features.htm) - detailed documentation about this project (needs updating). * [forum](https://www.anuko.com/forum/viewforum.php?f=4) - general discussion. @@ -29,4 +29,4 @@ usr: admin psw: secret ``` -Without docker, perform a manual install of a web server, php, database server, and Time Tracker. Full installation and setup guide can be found [here](https://www.anuko.com/time_tracker/install_guide/index.htm). +Without docker, perform a manual install of a web server, php, database server, and Time Tracker. Full installation and setup guide can be found [here](https://www.anuko.com/time-tracker/install-guide/index.htm). diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index 9d9d90dfd..6b6a68d84 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -88,7 +88,7 @@ define('SENDER', 'Anuko Time Tracker '); // MAIL_MODE - mail sending mode. Can be 'mail' or 'smtp'. // 'mail' - sending through php mail() function. // 'smtp' - sending directly through SMTP server. -// See https://www.anuko.com/time_tracker/install_guide/mail.htm +// See https://www.anuko.com/time-tracker/install-guide/mail.htm // define('MAIL_MODE', 'smtp'); define('MAIL_SMTP_HOST', 'localhost'); // For gmail use 'ssl://smtp.gmail.com' instead of 'localhost' and port 465. @@ -133,7 +133,7 @@ define('REPORT_FOOTER', true); define('AUTH_MODULE', 'db'); // LDAP authentication examples. -// Go to https://www.anuko.com/time_tracker/install_guide/ldap_auth/index.htm for detailed configuration instructions. +// Go to https://www.anuko.com/time-tracker/install-guide/ldap-auth/index.htm for detailed configuration instructions. // Configuration example for OpenLDAP server: // define('AUTH_MODULE', 'ldap'); diff --git a/WEB-INF/lib/Auth.class.php b/WEB-INF/lib/Auth.class.php index ccf2d915d..783721090 100644 --- a/WEB-INF/lib/Auth.class.php +++ b/WEB-INF/lib/Auth.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class Auth { diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php index 1184bd853..e72245985 100644 --- a/WEB-INF/lib/DateAndTime.class.php +++ b/WEB-INF/lib/DateAndTime.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ /** diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index ed8380815..1760da48a 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class I18n { diff --git a/WEB-INF/lib/Period.class.php b/WEB-INF/lib/Period.class.php index 2d2269e52..57ea0e44c 100644 --- a/WEB-INF/lib/Period.class.php +++ b/WEB-INF/lib/Period.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ define('INTERVAL_THIS_DAY', 1); diff --git a/WEB-INF/lib/form/ActionErrors.class.php b/WEB-INF/lib/form/ActionErrors.class.php index 3eaf68729..ba35ea639 100644 --- a/WEB-INF/lib/form/ActionErrors.class.php +++ b/WEB-INF/lib/form/ActionErrors.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class ActionErrors { diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index 8e2ad8af4..abc5e006b 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import("DateAndTime"); diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index 072b48281..7de81d876 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/Checkbox.class.php b/WEB-INF/lib/form/Checkbox.class.php index c4acbc5f5..619d39fb3 100644 --- a/WEB-INF/lib/form/Checkbox.class.php +++ b/WEB-INF/lib/form/Checkbox.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/CheckboxCellRenderer.class.php b/WEB-INF/lib/form/CheckboxCellRenderer.class.php index d117c12ef..cd9682703 100644 --- a/WEB-INF/lib/form/CheckboxCellRenderer.class.php +++ b/WEB-INF/lib/form/CheckboxCellRenderer.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.DefaultCellRenderer'); diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index 9488b5cce..68b24853b 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/DefaultCellRenderer.class.php b/WEB-INF/lib/form/DefaultCellRenderer.class.php index 1e36f79b5..55f4bbca5 100644 --- a/WEB-INF/lib/form/DefaultCellRenderer.class.php +++ b/WEB-INF/lib/form/DefaultCellRenderer.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class DefaultCellRenderer { diff --git a/WEB-INF/lib/form/FloatField.class.php b/WEB-INF/lib/form/FloatField.class.php index 5b939754e..e6cbf1068 100644 --- a/WEB-INF/lib/form/FloatField.class.php +++ b/WEB-INF/lib/form/FloatField.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.TextField'); diff --git a/WEB-INF/lib/form/Hidden.class.php b/WEB-INF/lib/form/Hidden.class.php index 6e59bc8e1..89e90c7eb 100644 --- a/WEB-INF/lib/form/Hidden.class.php +++ b/WEB-INF/lib/form/Hidden.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index 5f8da37e5..151600b32 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index d617f8b39..acdf4813a 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/TableColumn.class.php b/WEB-INF/lib/form/TableColumn.class.php index cb4bebf1b..87538eaa8 100644 --- a/WEB-INF/lib/form/TableColumn.class.php +++ b/WEB-INF/lib/form/TableColumn.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.DefaultCellRenderer'); diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 715a6ea95..4faac1447 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index bb05c6738..bfc0e551f 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index 50e8aad56..36d0d92a7 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('form.FormElement'); diff --git a/WEB-INF/lib/html/HttpRequest.class.php b/WEB-INF/lib/html/HttpRequest.class.php index 2eb26f0a7..bc32debcf 100644 --- a/WEB-INF/lib/html/HttpRequest.class.php +++ b/WEB-INF/lib/html/HttpRequest.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class ttHttpRequest { diff --git a/WEB-INF/lib/mail/Mailer.class.php b/WEB-INF/lib/mail/Mailer.class.php index 30f0ffb64..4c7eb0134 100644 --- a/WEB-INF/lib/mail/Mailer.class.php +++ b/WEB-INF/lib/mail/Mailer.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class Mailer { diff --git a/WEB-INF/lib/ttBehalfUser.class.php b/WEB-INF/lib/ttBehalfUser.class.php index 408602a10..e85770c1b 100644 --- a/WEB-INF/lib/ttBehalfUser.class.php +++ b/WEB-INF/lib/ttBehalfUser.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttConfigHelper'); diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index faf18263b..4e4f9c832 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('Period'); diff --git a/WEB-INF/lib/ttCronJobHelper.class.php b/WEB-INF/lib/ttCronJobHelper.class.php index 8c44756c7..153938951 100644 --- a/WEB-INF/lib/ttCronJobHelper.class.php +++ b/WEB-INF/lib/ttCronJobHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttRoleHelper'); diff --git a/WEB-INF/lib/ttDebugTracer.class.php b/WEB-INF/lib/ttDebugTracer.class.php index 46469a908..33921e9dd 100644 --- a/WEB-INF/lib/ttDebugTracer.class.php +++ b/WEB-INF/lib/ttDebugTracer.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttConfigHelper'); diff --git a/WEB-INF/lib/ttNotificationHelper.class.php b/WEB-INF/lib/ttNotificationHelper.class.php index 35c309040..8189e5a9b 100644 --- a/WEB-INF/lib/ttNotificationHelper.class.php +++ b/WEB-INF/lib/ttNotificationHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ // Class ttNotificationHelper is used to help with notification related tasks. diff --git a/WEB-INF/lib/ttOrgExportHelper.class.php b/WEB-INF/lib/ttOrgExportHelper.class.php index 2dd54f1b3..277eac3ab 100644 --- a/WEB-INF/lib/ttOrgExportHelper.class.php +++ b/WEB-INF/lib/ttOrgExportHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttTeamHelper'); diff --git a/WEB-INF/lib/ttOrgHelper.class.php b/WEB-INF/lib/ttOrgHelper.class.php index 81169032a..656450f0e 100644 --- a/WEB-INF/lib/ttOrgHelper.class.php +++ b/WEB-INF/lib/ttOrgHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ // Class ttOrgHelper contains helper functions that operate with organizations. diff --git a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php index c6bc3f356..6d60d533e 100644 --- a/WEB-INF/lib/ttPredefinedExpenseHelper.class.php +++ b/WEB-INF/lib/ttPredefinedExpenseHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index 4a827189b..e1d5754c5 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttUserHelper'); diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 9bb538912..981f01b50 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttUserHelper'); diff --git a/initialize.php b/initialize.php index 48af9888e..d9e800df7 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.0.5650"); +define("APP_VERSION", "1.21.0.5651"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index 1a7b94e9e..4e2f13195 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -24,7 +24,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ class CustomFields { diff --git a/plugins/MonthlyQuota.class.php b/plugins/MonthlyQuota.class.php index 76a7c5100..b291d3730 100644 --- a/plugins/MonthlyQuota.class.php +++ b/plugins/MonthlyQuota.class.php @@ -23,7 +23,7 @@ // | // +----------------------------------------------------------------------+ // | Contributors: -// | https://www.anuko.com/time_tracker/credits.htm +// | https://www.anuko.com/time-tracker/credits.htm // +----------------------------------------------------------------------+ import('ttTimeHelper'); diff --git a/readme.txt b/readme.txt index 421a18cdb..90cdc970d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ Anuko Time Tracker Copyright (c) Anuko (https://www.anuko.com) -Project home page: https://www.anuko.com/time_tracker/index.htm +Project home page: https://www.anuko.com/time-tracker/index.htm Forum: https://www.anuko.com/forum/viewforum.php?f=4 -Info for developers: https://www.anuko.com/time_tracker/info_for_developers.htm +Info for developers: https://www.anuko.com/time-tracker/info-for-developers.htm Free hosting of Time Tracker for individuals and small groups is available at https://timetracker.anuko.com Unless otherwise noted, files in this archive are protected by the LIBERAL FREEWARE LICENSE. @@ -12,7 +12,7 @@ Read the file license.txt for details. INSTALLATION INSTRUCTIONS -Documentation is available at https://www.anuko.com/time_tracker/install_guide/index.htm +Documentation is available at https://www.anuko.com/time-tracker/install-guide/index.htm The general installation procedure looks like this: @@ -40,7 +40,7 @@ The general installation procedure looks like this: UPGRADE FROM EARLIER VERSIONS -See https://www.anuko.com/time_tracker/upgrade.htm +See https://www.anuko.com/time-tracker/install-guide/upgrade.htm BLANK PAGES IN TIME TRACKER @@ -62,4 +62,4 @@ Support is available on per-incident basis - see https://www.anuko.com/support.h CHANGE LOG -Change log is available at https://www.anuko.com/time_tracker/change_log/index.htm \ No newline at end of file +Change log is available at https://www.anuko.com/time-tracker/change-log/index.htm \ No newline at end of file From 84638df3b637f376deb70ed060cb4a4b6d015295 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 13 Mar 2022 14:56:32 +0000 Subject: [PATCH 2341/2515] Starting working on password complexity. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/group_advanced_edit.tpl | 11 +++++++++++ group_advanced_edit.php | 7 ++++++- 32 files changed, 49 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 6b74dced4..a9937cea6 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -584,6 +584,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 836ef4f28..9d5331736 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -596,6 +596,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index bc042b6e5..22aba0ded 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -562,6 +562,7 @@ // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index dae614fbc..9a845d1f0 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -537,6 +537,7 @@ 'form.group_edit.confirm_save' => 'Speichern bestätigen', 'form.group_edit.allow_ip' => 'Erlaube IP', // TODO: translate the following. +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 652c3e484..ab7769558 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -520,6 +520,7 @@ 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', 'form.group_edit.confirm_save' => 'Confirm saving', 'form.group_edit.allow_ip' => 'Allow IP', +'form.group_edit.password_complexity' => 'Password complexity', 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index f2bb893ba..b7942fbeb 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -598,6 +598,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 67210ee66..e14416bc1 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -571,6 +571,7 @@ 'form.group_edit.confirm_save' => 'Kinnita salvestamine', 'form.group_edit.allow_ip' => 'Luba IP', // TODO: translate the following. +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 31c1506fe..8ccc29f08 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -584,6 +584,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index c0d712667..26c150880 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -568,6 +568,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 61570ee8c..892b0291f 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -558,6 +558,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index c795c5073..f1dbbc3c5 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -549,6 +549,7 @@ // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 72a48ba5d..4f2a49236 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -588,6 +588,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 8b1e0b348..924b4acc9 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -588,6 +588,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 90167eb26..383b1ab13 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -564,6 +564,7 @@ // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index d0bad574e..b3fd57f48 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -590,6 +590,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 3e62d9d2d..d182519a3 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -588,6 +588,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 79baaa97d..8c1afa7fb 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -506,6 +506,8 @@ 'form.group_edit.uncompleted_indicators' => 'Onvolledige indicatoren', 'form.group_edit.confirm_save' => 'Bevestigen dat je wilt opslaan', 'form.group_edit.allow_ip' => 'Toegestane IP adressen', +// TODO: translate the following. +// 'form.group_edit.password_complexity' => 'Password complexity', 'form.group_edit.advanced_settings' => 'Geavanceerde instellingen', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 598950581..8b5e13f0f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -591,6 +591,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index c826441f3..97ac1e0da 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -570,6 +570,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index ba2ed1d73..b01e94d32 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -504,6 +504,8 @@ 'form.group_edit.uncompleted_indicators' => 'Indicadores incompletos', 'form.group_edit.confirm_save' => 'Confirme o salvamento', 'form.group_edit.allow_ip' => 'Permitir IP', +// TODO: translate the following. +// 'form.group_edit.password_complexity' => 'Password complexity', 'form.group_edit.advanced_settings' => 'Configurações avançadas', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index cac4c68e8..7c724cd29 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -570,6 +570,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 1d97b1fed..33c4547dc 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -592,6 +592,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 20d7d7e60..3707ce74a 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -507,6 +507,7 @@ 'form.group_edit.uncompleted_indicators' => 'Индикаторы незавершения', 'form.group_edit.confirm_save' => 'Предупреждать при сохранении', 'form.group_edit.allow_ip' => 'Разрешить доступ с IP', +'form.group_edit.password_complexity' => 'Сложность пароля', 'form.group_edit.advanced_settings' => 'Продвинутые настройки', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 89f26abde..345666d8f 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -574,6 +574,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 56eeb2050..d5b56f4a0 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -565,6 +565,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index c88e9d07c..652eaa893 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -570,6 +570,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 36c0a325c..b39366bc1 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -568,6 +568,7 @@ // TODO: translate the following. // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 2e5bed2bb..2aae8ed9c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -605,6 +605,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index b1c0667b3..f423fab84 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -579,6 +579,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 5212a3f80..92f5dbf52 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -582,6 +582,7 @@ // 'form.group_edit.uncompleted_indicators' => 'Uncompleted indicators', // 'form.group_edit.confirm_save' => 'Confirm saving', // 'form.group_edit.allow_ip' => 'Allow IP', +// 'form.group_edit.password_complexity' => 'Password complexity', // 'form.group_edit.advanced_settings' => 'Advanced settings', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl index 1f55adf77..66fa41035 100644 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ b/WEB-INF/templates/group_advanced_edit.tpl @@ -32,6 +32,17 @@ License: See license.txt *} {$i18n.label.what_is_it}
{$forms.groupAdvancedForm.password_complexity.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
{$i18n.label.required_fields}
{$forms.groupAdvancedForm.allow_ip.control} {$i18n.label.what_is_it} {$i18n.label.what_is_it}
{$forms.groupAdvancedForm.password_complexity.control} {$i18n.label.what_is_it} {$i18n.label.what_is_it} diff --git a/group_advanced_edit.php b/group_advanced_edit.php index 7683d879c..a4cf540e3 100644 --- a/group_advanced_edit.php +++ b/group_advanced_edit.php @@ -46,8 +46,8 @@ if (!ttValidString($cl_group)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc')); - if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.allow_ip')); - if (!ttValidPasswordComplexity($cl_password_complexity, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.password_complexity')); + if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_advanced_edit.allow_ip')); + if (!ttValidPasswordComplexity($cl_password_complexity, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_advanced_edit.password_complexity')); // Finished validating user input. if ($err->no()) { diff --git a/initialize.php b/initialize.php index 3389203ce..74d3da0ad 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5659"); +define("APP_VERSION", "1.21.1.5660"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 81b2e03236fd74fe773105841b0f26fdcaa5ab59 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 15 Mar 2022 17:45:26 +0000 Subject: [PATCH 2351/2515] Implmeneted handling of 2fa setting on advanced group settings page. --- WEB-INF/templates/group_advanced_edit.tpl | 11 +++++++++++ group_advanced_edit.php | 11 ++++++++++- initialize.php | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl index 4bcaedf49..d4bd55a1e 100644 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ b/WEB-INF/templates/group_advanced_edit.tpl @@ -41,6 +41,17 @@ License: See license.txt *} {$i18n.label.what_is_it}
{$forms.groupAdvancedForm.2fa.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.label.required_fields}
+ + + + + + + + + +
{$forms.2faForm.2fa_code.control}
{$forms.2faForm.btn_login.control}
+{$forms.2faForm.close} + From 3c7cba88f69edd54f694f34f0907990977673b79 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 16 Mar 2022 15:40:39 +0000 Subject: [PATCH 2354/2515] Added title.2fa string to translation files. --- 2fa.php | 7 ++----- WEB-INF/resources/ca.lang.php | 2 ++ WEB-INF/resources/cs.lang.php | 2 ++ WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 2 ++ WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 2 ++ WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 2 ++ WEB-INF/resources/ko.lang.php | 2 ++ WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 3 ++- WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 3 ++- WEB-INF/resources/ro.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 2 ++ WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 4 +++- WEB-INF/resources/zh-cn.lang.php | 2 ++ WEB-INF/resources/zh-tw.lang.php | 2 ++ initialize.php | 2 +- 32 files changed, 62 insertions(+), 9 deletions(-) diff --git a/2fa.php b/2fa.php index 7c1728d28..15d1a2628 100644 --- a/2fa.php +++ b/2fa.php @@ -28,12 +28,9 @@ if ($request->isPost()) { // Validate user input. - if (!ttValidString($cl_2fa_code)) $err->add($i18n->get('error.field'), $i18n->get('fprm.2fa.2fa_code')); + if (!ttValidString($cl_2fa_code)) $err->add($i18n->get('error.field'), $i18n->get('form.2fa.2fa_code')); if ($err->no()) { - // Use the "limit" plugin if we have one. Ignore include errors. - // The "limit" plugin is not required for normal operation of Time Tracker. - @include('plugins/limit/access_check.php'); if ($auth->doLogin($cl_login, $cl_password)) { // Set current user date (as determined by user browser) into session. @@ -82,6 +79,6 @@ $smarty->assign('show_hint', $show_hint); $smarty->assign('onload', 'onLoad="document.loginForm.'.(!$cl_login?'login':'password').'.focus()"'); $smarty->assign('about_text', $i18n->get('form.login.about')); -$smarty->assign('title', $i18n->get('title.login')); +$smarty->assign('title', $i18n->get('title.2fa')); $smarty->assign('content_page_name', '2fa.tpl'); $smarty->display('index.tpl'); diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3bd936dd1..8be97f9b4 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -277,6 +277,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Sessió iniciada', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Grups', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index a4f116022..a9cc11823 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -286,6 +286,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Přihlásit', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Týmy', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index d1b991f41..74a239ca9 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -266,6 +266,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Login', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Teams', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 75c2c0a72..e55d05641 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -257,6 +257,8 @@ 'title.error' => 'Fehler', 'title.success' => 'Erfol', 'title.login' => 'Anmelden', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Gruppen', 'title.add_group' => 'Gruppe anlegen', 'title.edit_group' => 'Gruppe bearbeiten', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 7adaceadc..f48c96eb7 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -241,6 +241,7 @@ 'title.error' => 'Error', 'title.success' => 'Success', 'title.login' => 'Login', +'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Groups', 'title.add_group' => 'Adding Group', 'title.edit_group' => 'Editing Group', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index a78f1e6f2..b7fbecd17 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -276,6 +276,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Sesión iniciada', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Grupos', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 854a52e00..a81b9021d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -277,6 +277,8 @@ 'title.error' => 'Viga', 'title.success' => 'Õnnestumine', 'title.login' => 'Sisene', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Grupid', 'title.add_group' => 'Lisa grupp', 'title.edit_group' => 'Muuda gruppi', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index bda4a4758..af722d6e7 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -277,6 +277,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'ورود', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'تیم ها', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 1d90ef233..86ee80d86 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -270,6 +270,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Kirjautuminen', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Tiimit', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index ccb429359..9debf4673 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -264,6 +264,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Connexion', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Équipes', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 4cf1f64f9..587e719a0 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -259,6 +259,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Σύνδεση', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Ομάδες', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 4342ea846..bde356c99 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -285,6 +285,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'כניסה', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'צוותים', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b105d2483..a8fc41ef3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -278,6 +278,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Bejelentkezés', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Csoportok', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 16727cfe7..af53176eb 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -267,6 +267,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Login', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Gruppi', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 46c705532..f4cfc5651 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -282,6 +282,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'ログイン', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'チーム', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a82356937..1c677aa96 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -282,6 +282,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => '로그인', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => '팀', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 9a7c1707d..dd89e3562 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -235,6 +235,8 @@ 'title.error' => 'Fout', 'title.success' => 'Succes', 'title.login' => 'Aanmelden', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Groepen', 'title.add_group' => 'Groep toevoegen', 'title.edit_group' => 'Groep bewerken', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index b7500bbaa..55cd54d45 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -281,7 +281,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Innlogging', -// TODO: translate the following. +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', // 'title.groups' => 'Groups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 0e482eebe..021e30cd6 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -271,6 +271,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Logowanie', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Zespoły', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index f0b564de9..b2b71608f 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -238,6 +238,8 @@ 'title.error' => 'Erro', 'title.success' => 'Sucesso', 'title.login' => 'Login', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Grupos', 'title.add_group' => 'Adicionando grupo', 'title.edit_group' => 'Editando grupo', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index dcb0d0357..ebbc50b37 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -267,7 +267,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Login', -// TODO: translate the following. +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', // 'title.groups' => 'Groups', // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 7a5b41a3d..670d00dcd 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -283,6 +283,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Autentificare', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Echipe', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index da8d8b0f9..9ef4dc027 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -236,6 +236,7 @@ 'title.error' => 'Ошибка', 'title.success' => 'Успех', 'title.login' => 'Вход в систему', +'title.2fa' => 'Двухфакторная аутентификация', 'title.groups' => 'Группы', 'title.add_group' => 'Добавление группы', 'title.edit_group' => 'Редактирование группы', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 3bdc0e4bd..e75e0f2e4 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -274,6 +274,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Prihlásenie', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Tímy', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index d7406f37a..150269293 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -263,6 +263,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Prijava', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Timi', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index b26d4f04a..44ad24e31 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -269,6 +269,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Prijava', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Timovi', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 1c139a0e4..2098b705f 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -265,6 +265,8 @@ // TODO: Translate the following. // 'title.success' => 'Success', 'title.login' => 'Logga in', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => 'Grupper', // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 9f57fa3e0..4df3f5bdc 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -292,7 +292,9 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => 'Giriş', -'title.groups' => 'Ekipler', // TODO: change "teams" to "groups". +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', + 'title.groups' => 'Ekipler', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', // 'title.edit_group' => 'Editing Group', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 400529f60..7fc1e3a15 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -274,6 +274,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => '登录', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => '团队', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 3ece1f0fc..0d3885b21 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -279,6 +279,8 @@ // 'title.error' => 'Error', // 'title.success' => 'Success', 'title.login' => '登錄', +// TODO: translate the follolwing. +// 'title.2fa' => 'Two Factor Authentication', 'title.groups' => '團隊', // TODO: change "teams" to "groups". // TODO: translate the following. // 'title.add_group' => 'Adding Group', diff --git a/initialize.php b/initialize.php index 2f537eb6b..3fb0921fa 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5662"); +define("APP_VERSION", "1.21.1.5663"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3ce1ed036de850af767d163d322dad93907a9df6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 16 Mar 2022 19:03:50 +0000 Subject: [PATCH 2355/2515] Smoe more work in progress on 2fa. --- WEB-INF/resources/ca.lang.php | 5 ++ WEB-INF/resources/cs.lang.php | 5 ++ WEB-INF/resources/da.lang.php | 5 ++ WEB-INF/resources/de.lang.php | 5 ++ WEB-INF/resources/en.lang.php | 5 +- WEB-INF/resources/es.lang.php | 5 ++ WEB-INF/resources/et.lang.php | 5 ++ WEB-INF/resources/fa.lang.php | 5 ++ WEB-INF/resources/fi.lang.php | 5 ++ WEB-INF/resources/fr.lang.php | 5 ++ WEB-INF/resources/gr.lang.php | 5 ++ WEB-INF/resources/he.lang.php | 5 ++ WEB-INF/resources/hu.lang.php | 5 ++ WEB-INF/resources/it.lang.php | 5 ++ WEB-INF/resources/ja.lang.php | 5 ++ WEB-INF/resources/ko.lang.php | 5 ++ WEB-INF/resources/nl.lang.php | 5 ++ WEB-INF/resources/no.lang.php | 5 ++ WEB-INF/resources/pl.lang.php | 5 ++ WEB-INF/resources/pt-br.lang.php | 5 ++ WEB-INF/resources/pt.lang.php | 5 ++ WEB-INF/resources/ro.lang.php | 5 ++ WEB-INF/resources/ru.lang.php | 4 + WEB-INF/resources/sk.lang.php | 5 ++ WEB-INF/resources/sl.lang.php | 5 ++ WEB-INF/resources/sr.lang.php | 5 ++ WEB-INF/resources/sv.lang.php | 5 ++ WEB-INF/resources/tr.lang.php | 5 ++ WEB-INF/resources/zh-cn.lang.php | 5 ++ WEB-INF/resources/zh-tw.lang.php | 5 ++ initialize.php | 2 +- login.php | 121 ++++++++++++++++++++++--------- 32 files changed, 236 insertions(+), 36 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 8be97f9b4..cdf0c7eda 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -422,6 +422,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index a9cc11823..2c64a8598 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -429,6 +429,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 74a239ca9..53644ed99 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -406,6 +406,11 @@ 'form.login.forgot_password' => 'Har du glemt din adgangskode?', 'form.login.about' => 'Anuko Time Tracker er et open source tidsregistrerings system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index e55d05641..006d7b89b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -393,6 +393,11 @@ 'form.login.forgot_password' => 'Passwort vergessen?', 'form.login.about' => 'Anuko Time Tracker ist ein Open-Source Zeiterfassungssystem.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index f48c96eb7..3d5e59a86 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -372,9 +372,12 @@ // Login form. See example at https://timetracker.anuko.com/login.php. 'form.login.forgot_password' => 'Forgot password?', -'form.login.2fa_code' => '2FA code', 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b7fbecd17..9ce3cb252 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -426,6 +426,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index a81b9021d..884d0e327 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -414,6 +414,11 @@ 'form.login.forgot_password' => 'Unustasid salasõna?', 'form.login.about' => 'Anuko Time Tracker on avatud lähtekoodiga ajaarvestussüsteem.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index af722d6e7..2eb5e5328 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -424,6 +424,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 86ee80d86..5b85ba637 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -412,6 +412,11 @@ // TODO: check translation of form.login.about - is open source "vapaan koodin"? 'form.login.about' => 'Anuko Time Tracker on vapaan koodin tuntiseurantaohjelmisto.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 9debf4673..19c3fbaa4 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -403,6 +403,11 @@ 'form.login.forgot_password' => 'Mot de passe oublié?', 'form.login.about' => 'Anuko Time Tracker est un système de gestion du temps, open source.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 587e719a0..9c07dd523 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -402,6 +402,11 @@ 'form.login.forgot_password' => 'Ξεχάσατε τον κωδικό πρόσβασης;', 'form.login.about' => 'Anuko Time Tracker είναι ένα ανοικτού κώδικα σύστημα παρακολούθησης χρόνου.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index bde356c99..3cb53daf0 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -430,6 +430,11 @@ // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker הינה מערכת פשוטה, קלה לשימוש וחינמית לניהול זמן.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index a8fc41ef3..61438d08a 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -423,6 +423,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index af53176eb..373587f5c 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -412,6 +412,11 @@ 'form.login.forgot_password' => 'Password dimenticata?', 'form.login.about' => 'Anuko Time Tracker è un sistema open source per registrare i tempi di lavoro.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index f4cfc5651..b86ed26e1 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -424,6 +424,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 1c677aa96..1a8106383 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -428,6 +428,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index dd89e3562..b2a7fd842 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -367,6 +367,11 @@ 'form.login.forgot_password' => 'Wachtwoord vergeten?', 'form.login.about' => 'Anuko Time Tracker is een open source tijdregistratiesysteem.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 55cd54d45..6cabab827 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -426,6 +426,11 @@ // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker er et enkelt, brukervennlig tidsregistreringssystem basert på åpen kildekode.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 021e30cd6..0aac60b48 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -414,6 +414,11 @@ 'form.login.forgot_password' => 'Nie pamiętasz hasła?', 'form.login.about' => 'Anuko Time Tracker jest otwartoźródłowym systemem śledzenia czasu.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index b2b71608f..d311c7a80 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -366,6 +366,11 @@ 'form.login.forgot_password' => 'Esqueceu a senha?', 'form.login.about' => 'Anuko Time Tracker é um sistema de código aberto de rastreamento do tempo.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index ebbc50b37..942ce2091 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -406,6 +406,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 670d00dcd..39e507f78 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -428,6 +428,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 9ef4dc027..98b6694ad 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -367,6 +367,10 @@ 'form.login.forgot_password' => 'Забыли пароль?', 'form.login.about' => 'Anuko Time Tracker - это открытая (open source) система трекинга рабочего времени.', +// Email subject and body for two-factor authentication. +'email.2fa_code.subject' => 'Anuko Time Tracker код для двухфакторной аутентификации', +'email.2fa_code.body' => "Уважаемый пользователь,\n\nВаш код для двухфакторной аутентификации:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. 'form.2fa.2fa_code' => '2FA код', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e75e0f2e4..08bda8581 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -417,6 +417,11 @@ 'form.login.forgot_password' => 'Zabudnuté heslo?', 'form.login.about' => 'Anuko Time Tracker je systém na sledovanie času s otvoreným zdrojovým kódom.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 150269293..804b7fc8e 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -400,6 +400,11 @@ // 'form.login.forgot_password' => 'Forgot password?', // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 44ad24e31..6f3495502 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -414,6 +414,11 @@ // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker je jednostavan i lak za korišćenje za praćenje radnog vremena.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 2098b705f..4cb93fa00 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -412,6 +412,11 @@ // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker är en lättanvänd applikation byggd med öppen källkod som enkelt låter dig spåra och hålla koll på arbetstider.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 4df3f5bdc..12bdebf38 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -436,6 +436,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 7fc1e3a15..c37b56616 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -419,6 +419,11 @@ // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', 'form.login.about' => 'Anuko Time Tracker 是一种简单、易用、开放源代码的实时跟踪系统。', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 0d3885b21..fd78f3e35 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -422,6 +422,11 @@ // TODO: translate the following. // 'form.login.about' => 'Anuko Time Tracker is an open source time tracking system.', +// Email subject and body for two-factor authentication. +// TODO: translate the following. +// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', +// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", + // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. // 'form.2fa.2fa_code' => '2FA code', diff --git a/initialize.php b/initialize.php index 3fb0921fa..c8b41c6d4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5663"); +define("APP_VERSION", "1.21.1.5664"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index 5ea77d185..da59757bb 100644 --- a/login.php +++ b/login.php @@ -4,8 +4,9 @@ require_once('initialize.php'); import('form.Form'); -import('ttOrgHelper'); +//import('ttOrgHelper'); import('ttUser'); +import('ttUserHelper'); // Access checks. if ($request->isPost()) { @@ -33,46 +34,98 @@ if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); if (!ttValidString($cl_password)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); + $loginSucceeded = $use2FA = false; if ($err->no()) { // Use the "limit" plugin if we have one. Ignore include errors. // The "limit" plugin is not required for normal operation of Time Tracker. @include('plugins/limit/access_check.php'); - if ($auth->doLogin($cl_login, $cl_password)) { - // Set current user date (as determined by user browser) into session. - $current_user_date = $request->getParameter('browser_today', null); - if ($current_user_date) - $_SESSION['date'] = $current_user_date; - - // Remember user login in a cookie. - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - - $user = new ttUser(null, $auth->getUserId()); - - // Determine if we have to additionally use two-factor authentication. - $config = $user->getConfigHelper(); - $use2FA = $config->getDefinedValue('2fa'); - if ($use2FA) { - - // TODO: send 2fa code to user. - $auth->doLogout(); - - header('Location: 2fa.php'); - exit(); - } - - // Redirect, depending on user role. - if ($user->can('administer_site')) { - header('Location: admin_groups.php'); - } elseif ($user->isClient()) { - header('Location: reports.php'); - } else { - header('Location: time.php'); - } - exit(); + // Check user login. + $loginSucceeded = $auth->doLogin($cl_login, $cl_password); + } + + // Do we have to use 2FA? + if ($err->no() && $loginSucceeded) { + $user = new ttUser(null, $auth->getUserId()); + + // Determine if we have to additionally use two-factor authentication. + $config = $user->getConfigHelper(); + $use2FA = $config->getDefinedValue('2fa'); + } + + // If we have to use 2FA, create and email auith code to user. + if ($use2FA) { + // To keep things simple, we use the same code as for password resets. + $cryptographically_strong = true; + $random_bytes = openssl_random_pseudo_bytes(16, $cryptographically_strong); + if ($random_bytes === false) die ("openssl_random_pseudo_bytes function call failed..."); + $temp_ref = bin2hex($random_bytes); + ttUserHelper::saveTmpRef($temp_ref, $user->id); + + // For user languague in email. + $user_i18n = null; + if ($user->lang != $i18n->lang) { + $user_i18n = new I18n(); + $user_i18n->load($user->lang); } else - $err->add($i18n->get('error.auth')); + $user_i18n = &$i18n; + + // Where do we email to? + $receiver = null; + if ($user->email) + $receiver = $user->email; + else { + if (ttValidEmail($user->login)) + $receiver = $user->login; + } + if (!$receiver) $err->add($user_i18n->get('error.no_email')); + + // Send 2FA_code email to user. + if ($receiver) { + import('mail.Mailer'); + $mailer = new Mailer(); + $mailer->setCharSet(CHARSET); + $mailer->setSender(SENDER); + $mailer->setReceiver("$receiver"); + + $subject = $user_i18n->get('email.2fa_code.subject'); + $body = sprintf($user_i18n->get('email.2fa_code.body'), $temp_ref); + + $mailer->setMailMode(MAIL_MODE); + if (!$mailer->send($subject, $body)) + $err->add($i18n->get('error.mail_send')); + } + + $auth->doLogout(); + + // Redirect to 2fa.php if we have no errors. + if ($err->no()) { + header('Location: 2fa.php'); + exit(); + } } + + if ($err->no() && $loginSucceeded) { + + // Set current user date (as determined by user browser) into session. + $current_user_date = $request->getParameter('browser_today', null); + if ($current_user_date) + $_SESSION['date'] = $current_user_date; + + // Remember user login in a cookie. + setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); + + // Redirect, depending on user role. + if ($user->can('administer_site')) { + header('Location: admin_groups.php'); + } elseif ($user->isClient()) { + header('Location: reports.php'); + } else { + header('Location: time.php'); + } + exit(); + } else + $err->add($i18n->get('error.auth')); } // isPost if(!isTrue('MULTIORG_MODE') && !ttOrgHelper::getOrgs()) From 3d74117cda7abf4b2ae2634eb1a623d0a04794e0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 16 Mar 2022 22:19:44 +0000 Subject: [PATCH 2356/2515] A bit more progress on 2fa. --- 2fa.php | 74 ++++++++------------------------ WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/2fa.tpl | 11 +---- login.php | 9 ++-- 33 files changed, 56 insertions(+), 69 deletions(-) diff --git a/2fa.php b/2fa.php index 15d1a2628..005b4ea42 100644 --- a/2fa.php +++ b/2fa.php @@ -4,81 +4,43 @@ require_once('initialize.php'); import('form.Form'); -import('ttOrgHelper'); import('ttUser'); +import('ttUserHelper'); // Access checks. -if ($request->isPost()) { - // Validate that browser_today parameter is in correct format. - $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { - header('Location: access_denied.php'); - exit(); - } -} +// ... anything to check? // End of access checks. $cl_2fa_code = $request->getParameter('2fa_code'); -$cl_password = $request->getParameter('password'); $form = new Form('2faForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'2fa_code','value'=>$cl_2fa_code)); -$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_login click. -$form->addInput(array('type'=>'submit','name'=>'btn_login','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.login'))); +$form->addInput(array('type'=>'submit','name'=>'btn_login','value'=>$i18n->get('button.login'))); if ($request->isPost()) { // Validate user input. if (!ttValidString($cl_2fa_code)) $err->add($i18n->get('error.field'), $i18n->get('form.2fa.2fa_code')); - if ($err->no()) { - - if ($auth->doLogin($cl_login, $cl_password)) { - // Set current user date (as determined by user browser) into session. - $current_user_date = $request->getParameter('browser_today', null); - if ($current_user_date) - $_SESSION['date'] = $current_user_date; - - // Remember user login in a cookie. - setcookie(LOGIN_COOKIE_NAME, $cl_login, time() + COOKIE_EXPIRE, '/'); - - $user = new ttUser(null, $auth->getUserId()); + // Get user id. + $user_id = ttUserHelper::getUserIdByTmpRef($cl_2fa_code); + if (!$user_id) $err->add($i18n->get('error.2fa_code')); - // Determine if we have to additionally use two-factor authentication. - $config = $user->getConfigHelper(); - $use2FA = $config->getDefinedValue('2fa'); - if ($use2FA) { - - // TODO: send 2fa code to user. - $auth->doLogout(); - - header('Location: 2fa.php'); - exit(); - } - - // Redirect, depending on user role. - if ($user->can('administer_site')) { - header('Location: admin_groups.php'); - } elseif ($user->isClient()) { - header('Location: reports.php'); - } else { - header('Location: time.php'); - } - exit(); - } else - $err->add($i18n->get('error.auth')); + if ($err->no()) { + $user = new ttUser(null, $user_id); // Note: reusing $user from initialize.php. + $auth->setAuth($user_id, $user->login); + + // Redirect, depending on user role. + if ($user->isClient()) { + header('Location: reports.php'); + } else { + header('Location: time.php'); + } + exit(); } } // isPost -if(!isTrue('MULTIORG_MODE') && !ttOrgHelper::getOrgs()) - $err->add($i18n->get('error.no_groups')); - -// Determine whether to show login hint. It is currently used only for Windows LDAP authentication. -$show_hint = ('ad' == isset($GLOBALS['AUTH_MODULE_PARAMS']['type']) ? $GLOBALS['AUTH_MODULE_PARAMS']['type'] : null); - $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('show_hint', $show_hint); -$smarty->assign('onload', 'onLoad="document.loginForm.'.(!$cl_login?'login':'password').'.focus()"'); -$smarty->assign('about_text', $i18n->get('form.login.about')); +$smarty->assign('onload', 'onLoad="document.2faForm.2fa_code.focus()"'); $smarty->assign('title', $i18n->get('title.2fa')); $smarty->assign('content_page_name', '2fa.tpl'); $smarty->display('index.tpl'); diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index cdf0c7eda..ef2d2ea6c 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -74,6 +74,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Usuari o parula de pas incorrecta.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2c64a8598..0f44c1cc5 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -76,6 +76,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nesprávné jméno nebo heslo.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 53644ed99..a159edfa2 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -67,6 +67,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Forkert brugernavn eller adgangskode.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Brugernavn eksistere allerede.', // TODO: translate the following. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 006d7b89b..5e2c19d5b 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -65,6 +65,7 @@ 'error.record' => 'Eintrag auswählen.', 'error.auth' => 'Benutzername oder Passwort ungültig.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Benutzer mit diesem Konto ist bereits vorhanden.', 'error.object_exists' => 'Objekt mit diesem Namen ist bereits vorhanden.', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 3d5e59a86..89cfcd264 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -60,6 +60,7 @@ 'error.report' => 'Select report.', 'error.record' => 'Select record.', 'error.auth' => 'Incorrect login or password.', +'error.2fa_code' => 'Invalid 2FA code.', 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'User with this login already exists.', 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 9ce3cb252..96988bdcd 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -72,6 +72,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Usuario o contraseña incorrecta.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 884d0e327..035fb644d 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -66,6 +66,7 @@ 'error.record' => 'Vali kirje.', 'error.auth' => 'Autentimine ebaõnnestus.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Selle nimega kasutaja on juba kasutusel.', 'error.object_exists' => 'Sellise nimega objekt on juba olemas.', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 2eb5e5328..e040921c0 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -72,6 +72,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'نام کاربری یا رمز عبور اشتباه است.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'کاربری با این نام کاربری موجود است.', // TODO: translate the following. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 5b85ba637..3dfa94431 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -69,6 +69,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Virheellinen käyttäjänimi tai salasana.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Tämä käyttäjänimi on jo olemassa.', // TODO: translate the following. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 19c3fbaa4..a7ef4f23e 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -67,6 +67,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nom d\\\'utilisateur ou mot de passe incorrect.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Un utilisateur avec cet identifiant existe déjà.', // TODO: translate the following. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 9c07dd523..72037b0ec 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -64,6 +64,7 @@ 'error.record' => 'Επιλογή εγγραφής.', 'error.auth' => 'Λανθασμένο όνομα εισόδου ή κωδικός.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Ο χρήστης με αυτήν τη σύνδεση υπάρχει ήδη.', 'error.object_exists' => 'Το αντικείμενο με αυτό το όνομα υπάρχει ήδη.', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 3cb53daf0..1e03b4f75 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -82,6 +82,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'שם משתמש או סיסמה שגויים', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'שם משתמש כבר קיים', // TODO: translate the following. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 61438d08a..1b4cf6d24 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -74,6 +74,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 373587f5c..8c12f14c7 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -66,6 +66,7 @@ 'error.record' => 'Seleziona record.', 'error.auth' => 'Login o password errati.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Esiste già un utente con questo username.', // TODO: translate the following. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index b86ed26e1..30156d526 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -74,6 +74,7 @@ // 'error.record' => 'Select record.', 'error.auth' => '不正確なログインあるいはパスワードが不正確です。', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'このログインと関連されたユーザーは既に存在します。', // TODO: translate the following. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 1a8106383..49e904b04 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -74,6 +74,7 @@ // 'error.record' => 'Select record.', 'error.auth' => '부정확한 로그인 혹은 암호가 틀립니다.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => '본 로그인과 연계된 사용자가 이미 있습니다.', // TODO: translate the following. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index b2a7fd842..85899c8ac 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -59,6 +59,8 @@ 'error.report' => 'Kies rapport.', 'error.record' => 'Kies record.', 'error.auth' => 'Onjuiste inlognaam of wachtwoord.', +// TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', 'error.weak_password' => 'Zwak wachtwoord.', 'error.user_exists' => 'Een gebruiker met deze inlognaam bestaat al.', 'error.object_exists' => 'Een object met deze naam bestaat al.', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 6cabab827..75910ddcf 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -75,6 +75,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Feil brukernavn eller passord.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Bruker med et slikt brukernavn eksisterer allerede.', // TODO: translate the following. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 0aac60b48..4a4f9e72a 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -70,6 +70,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Błędny login lub hasło.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Użytkownik o takiej nazwie już istnieje.', // TODO: translate the following. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index d311c7a80..ef122e23e 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -60,6 +60,7 @@ 'error.record' => 'Selecione o registro.', 'error.auth' => 'Usuário ou senha incorretos.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Já existe usuário com este login.', 'error.object_exists' => 'Já existe um objeto com este nome.', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 942ce2091..d6ded6515 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -72,6 +72,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 39e507f78..39e2f379b 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -78,6 +78,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nume de utilizator sau parola incorecta.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 98b6694ad..e4474b2f2 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -59,6 +59,7 @@ 'error.report' => 'Выберите отчёт.', 'error.record' => 'Выберите запись.', 'error.auth' => 'Неправильно введен логин или пароль.', +'error.2fa_code' => 'Неверный код 2FA.', 'error.weak_password' => 'Слабый пароль.', 'error.user_exists' => 'Пользователь с таким логином уже существует.', 'error.object_exists' => 'Объект с таким именем уже есть.', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 08bda8581..76337a615 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -71,6 +71,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Nesprávne prihlasovacie meno alebo heslo.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Používateľ s týmto prihlasovacím menom už existuje.', // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 804b7fc8e..9730c474c 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -69,6 +69,7 @@ // 'error.report' => 'Select report.', // 'error.record' => 'Select record.', // 'error.auth' => 'Incorrect login or password.', +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 6f3495502..3c490d20d 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -67,6 +67,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Pogrešno korisničko ime ili lozinka.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Korisnik pod ovim imenom već postoji.', // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 4cb93fa00..30ed6da05 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -66,6 +66,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Ogiltigt användarnamn eller lösenord.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => 'Det finns redan en användare med det här användarnamnet.', // TODO: translate the following. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 12bdebf38..5251ee8f6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -81,6 +81,7 @@ // 'error.record' => 'Select record.', 'error.auth' => 'Hatalı kullanıcı adı veya parola.', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', // 'error.user_exists' => 'User with this login already exists.', // 'error.object_exists' => 'Object with this name already exists.', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index c37b56616..fa7f78a37 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -69,6 +69,7 @@ // 'error.record' => 'Select record.', 'error.auth' => '不正确的用户名或密码。', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => '该用户登录信息已经存在。', // TODO: translate the following. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index fd78f3e35..71587399f 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -72,6 +72,7 @@ // 'error.record' => 'Select record.', 'error.auth' => '不正確的用戶名或密碼。', // TODO: translate the following. +// 'error.2fa_code' => 'Invalid 2FA code.', // 'error.weak_password' => 'Weak password.', 'error.user_exists' => '該使用者登錄資訊已經存在。', // TODO: translate the following. diff --git a/WEB-INF/templates/2fa.tpl b/WEB-INF/templates/2fa.tpl index e634b624b..1754f0357 100644 --- a/WEB-INF/templates/2fa.tpl +++ b/WEB-INF/templates/2fa.tpl @@ -1,18 +1,11 @@ {* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt *} - - {$forms.2faForm.open} - + - + diff --git a/login.php b/login.php index da59757bb..dbf5d0c39 100644 --- a/login.php +++ b/login.php @@ -35,6 +35,7 @@ if (!ttValidString($cl_password)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); $loginSucceeded = $use2FA = false; + if ($err->no()) { // Use the "limit" plugin if we have one. Ignore include errors. // The "limit" plugin is not required for normal operation of Time Tracker. @@ -42,6 +43,8 @@ // Check user login. $loginSucceeded = $auth->doLogin($cl_login, $cl_password); + if (!$loginSucceeded) + $err->add($i18n->get('error.auth')); } // Do we have to use 2FA? @@ -53,7 +56,7 @@ $use2FA = $config->getDefinedValue('2fa'); } - // If we have to use 2FA, create and email auith code to user. + // If we have to use 2FA, create and email auth code to user. if ($use2FA) { // To keep things simple, we use the same code as for password resets. $cryptographically_strong = true; @@ -106,7 +109,6 @@ } if ($err->no() && $loginSucceeded) { - // Set current user date (as determined by user browser) into session. $current_user_date = $request->getParameter('browser_today', null); if ($current_user_date) @@ -124,8 +126,7 @@ header('Location: time.php'); } exit(); - } else - $err->add($i18n->get('error.auth')); + } } // isPost if(!isTrue('MULTIORG_MODE') && !ttOrgHelper::getOrgs()) From 274906af2c15cda962c21c8d8d7addc42482b7fd Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Mar 2022 00:32:38 +0000 Subject: [PATCH 2357/2515] Added a hint for 2fa.php page to translation files. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 1 + WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/2fa.tpl | 1 + initialize.php | 2 +- 32 files changed, 32 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index ef2d2ea6c..5db492323 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -430,6 +430,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 0f44c1cc5..c689bafbc 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -437,6 +437,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index a159edfa2..e2a0da44e 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -414,6 +414,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 5e2c19d5b..10c6cba46 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -401,6 +401,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 89cfcd264..fb31f0f85 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -380,6 +380,7 @@ 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 96988bdcd..bbb923fd3 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -434,6 +434,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 035fb644d..e698f9391 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -422,6 +422,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index e040921c0..7a2e8fbca 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -432,6 +432,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 3dfa94431..4b6a1832d 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -420,6 +420,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index a7ef4f23e..b6d170271 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -411,6 +411,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 72037b0ec..a7eec7329 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -410,6 +410,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 1e03b4f75..e4ebe5198 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -438,6 +438,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 1b4cf6d24..7c761eec5 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -431,6 +431,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 8c12f14c7..a873bb477 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -420,6 +420,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 30156d526..9d5807078 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -432,6 +432,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 49e904b04..59222f086 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -436,6 +436,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 85899c8ac..6503da028 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -376,6 +376,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 75910ddcf..255495601 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -434,6 +434,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 4a4f9e72a..3a91e417d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -422,6 +422,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index ef122e23e..af1c6e943 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -374,6 +374,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d6ded6515..8b915d4db 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -414,6 +414,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 39e2f379b..5f267efa1 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -436,6 +436,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index e4474b2f2..c64c8e9c4 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -373,6 +373,7 @@ 'email.2fa_code.body' => "Уважаемый пользователь,\n\nВаш код для двухфакторной аутентификации:\n\n%s\n\n", // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. +'form.2fa.hint' => 'Проверьте электронную почту и введите высланный вам 2FA код здесь.', 'form.2fa.2fa_code' => '2FA код', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 76337a615..98d429610 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -425,6 +425,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 9730c474c..0f757c7d2 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -408,6 +408,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 3c490d20d..60c504ca0 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -422,6 +422,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Izmena forme za lozinku. Pogledajte primer na https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 30ed6da05..06e7f46af 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -420,6 +420,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 5251ee8f6..9d8ef4111 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -444,6 +444,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index fa7f78a37..1a91e596f 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -427,6 +427,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 71587399f..0a2f8510c 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -430,6 +430,7 @@ // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. // TODO: translate the following. +// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', // 'form.2fa.2fa_code' => '2FA code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. diff --git a/WEB-INF/templates/2fa.tpl b/WEB-INF/templates/2fa.tpl index 1754f0357..bd7e2f01b 100644 --- a/WEB-INF/templates/2fa.tpl +++ b/WEB-INF/templates/2fa.tpl @@ -1,6 +1,7 @@ {* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt *} +
{$i18n.form.2fa.hint}
{$forms.2faForm.open}
{$forms.2faForm.2fa_code.control}
diff --git a/initialize.php b/initialize.php index c8b41c6d4..31f4096b6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5664"); +define("APP_VERSION", "1.21.1.5665"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 09c609f8f08d9d1f9a5d5daf9d53462c495a4d08 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Mar 2022 13:39:56 +0000 Subject: [PATCH 2358/2515] Introduced override_2fa access right for top managers. --- dbinstall.php | 12 ++++++++---- initialize.php | 2 +- mysql.sql | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index 182910ada..f8e1b9362 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1151,7 +1151,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to12100"]) { + if ($_POST["convert11900to12102"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1193,6 +1193,10 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.20.0', modified = now() where param_name = 'version_db' and param_value = '1.19.29'"); ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.20.0') set rights = replace(rights, 'manage_basic_settings,view_all_reports', 'manage_basic_settings,view_all_charts,view_all_reports') where `rank` >= 68"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.0', modified = now() where param_name = 'version_db' and param_value = '1.20.0'"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, 'view_client_unapproved,delete_group', 'view_client_unapproved,override_2fa,delete_group') where `rank` = 512"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, ',manage_work', '')"); + ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, ',update_work', '')"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.2', modified = now() where param_name = 'version_db' and param_value = '1.21.0'"); } if ($_POST["cleanup"]) { @@ -1243,7 +1247,7 @@ function ttGenerateKeys() {

DB Install

-
Create database structure (v1.21.0) + Create database structure (v1.21.2)
(applies only to new installations, do not execute when updating)
@@ -1292,8 +1296,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.21)Update database structure (v1.19 to v1.21.2)
diff --git a/initialize.php b/initialize.php index 31f4096b6..8ed35c5cc 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.1.5665"); +define("APP_VERSION", "1.21.2.5666"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index 05743ee54..0856f94a0 100644 --- a/mysql.sql +++ b/mysql.sql @@ -78,7 +78,7 @@ create unique index role_idx on tt_roles(group_id, `rank`, status); # Insert site-wide roles - site administrator and top manager. INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Site administrator', 1024, 'administer_site'); -INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_charts,view_all_reports,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,delete_group'); +INSERT INTO `tt_roles` (`group_id`, `name`, `rank`, `rights`) VALUES (0, 'Top manager', 512, 'track_own_time,track_own_expenses,view_own_reports,view_own_charts,view_own_projects,view_own_tasks,manage_own_settings,view_users,view_client_reports,view_client_invoices,track_time,track_expenses,view_reports,approve_reports,approve_timesheets,view_charts,view_own_clients,override_punch_mode,override_own_punch_mode,override_date_lock,override_own_date_lock,swap_roles,manage_own_account,manage_users,manage_projects,manage_tasks,manage_custom_fields,manage_clients,manage_invoices,override_allow_ip,manage_basic_settings,view_all_charts,view_all_reports,manage_features,manage_advanced_settings,manage_roles,export_data,approve_all_reports,approve_own_timesheets,manage_subgroups,view_client_unapproved,override_2fa,delete_group'); # @@ -621,4 +621,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.0', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.2', now()); # TODO: change when structure changes. From a201018610d9d9f82c886104a7af879a28e1325a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Mar 2022 13:56:41 +0000 Subject: [PATCH 2359/2515] Started to use override_2fa access right. --- initialize.php | 2 +- login.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index 8ed35c5cc..d56c43b36 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.2.5666"); +define("APP_VERSION", "1.21.2.5667"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index dbf5d0c39..a097c8883 100644 --- a/login.php +++ b/login.php @@ -56,8 +56,8 @@ $use2FA = $config->getDefinedValue('2fa'); } - // If we have to use 2FA, create and email auth code to user. - if ($use2FA) { + // If we have to use 2FA, email auth code to user and redirect to 2fa.php. + if ($use2FA && !$user->can('override_2fa')) { // To keep things simple, we use the same code as for password resets. $cryptographically_strong = true; $random_bytes = openssl_random_pseudo_bytes(16, $cryptographically_strong); From f2358bfc5e20cd3b741166379779505e8b149be8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 17 Mar 2022 15:26:17 +0000 Subject: [PATCH 2360/2515] Initial implementation of two factor authentication. --- 2fa.php | 54 +++++++++++++++-------- WEB-INF/templates/2fa.tpl | 24 +++++++--- WEB-INF/templates/group_advanced_edit.tpl | 2 - initialize.php | 2 +- login.php | 9 ++-- 5 files changed, 60 insertions(+), 31 deletions(-) diff --git a/2fa.php b/2fa.php index 005b4ea42..a7e3dbb29 100644 --- a/2fa.php +++ b/2fa.php @@ -11,36 +11,54 @@ // ... anything to check? // End of access checks. -$cl_2fa_code = $request->getParameter('2fa_code'); -$form = new Form('2faForm'); -$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'2fa_code','value'=>$cl_2fa_code)); +$cl_login = $request->getParameter('login'); +if ($cl_login == null && $request->isGet()) $cl_login = @$_COOKIE[LOGIN_COOKIE_NAME]; +$cl_password = $request->getParameter('password'); +$cl_auth_code = $request->getParameter('auth_code'); + +$form = new Form('twoFactorAuthForm'); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login)); +$form->getElement('login')->setEnabled(false); +$form->addInput(array('type'=>'password','maxlength'=>'50','name'=>'password','value'=>$cl_password)); +$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'auth_code','value'=>$cl_auth_code)); $form->addInput(array('type'=>'submit','name'=>'btn_login','value'=>$i18n->get('button.login'))); if ($request->isPost()) { // Validate user input. - if (!ttValidString($cl_2fa_code)) $err->add($i18n->get('error.field'), $i18n->get('form.2fa.2fa_code')); - - // Get user id. - $user_id = ttUserHelper::getUserIdByTmpRef($cl_2fa_code); - if (!$user_id) $err->add($i18n->get('error.2fa_code')); + if (!ttValidString($cl_login)) $err->add($i18n->get('error.field'), $i18n->get('label.login')); + if (!ttValidString($cl_password)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); + if (!ttValidString($cl_auth_code)) $err->add($i18n->get('error.field'), $i18n->get('form.2fa.2fa_code')); if ($err->no()) { - $user = new ttUser(null, $user_id); // Note: reusing $user from initialize.php. - $auth->setAuth($user_id, $user->login); - - // Redirect, depending on user role. - if ($user->isClient()) { - header('Location: reports.php'); - } else { - header('Location: time.php'); + // Get user id. + $user_id = ttUserHelper::getUserIdByTmpRef($cl_auth_code); + if (!$user_id) + $err->add($i18n->get('error.2fa_code')); + + if ($err->no()) { + // Additionally check user password for better protection + // against brute force attacks guessing 2FA codes. + $user = new ttUser(null, $user_id); // Note: reusing $user from initialize.php. + // Check user password. + if (!$auth->doLogin($user->login, $cl_password)) + $err->add($i18n->get('error.auth')); + } + + if ($err->no()) { + // Redirect, depending on user role. + if ($user->isClient()) { + header('Location: reports.php'); + } else { + header('Location: time.php'); + } + exit(); } - exit(); } } // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.2faForm.2fa_code.focus()"'); +$smarty->assign('onload', 'onLoad="document.twoFactorAuthForm.auth_code.focus()"'); $smarty->assign('title', $i18n->get('title.2fa')); $smarty->assign('content_page_name', '2fa.tpl'); $smarty->display('index.tpl'); diff --git a/WEB-INF/templates/2fa.tpl b/WEB-INF/templates/2fa.tpl index bd7e2f01b..d425cbc11 100644 --- a/WEB-INF/templates/2fa.tpl +++ b/WEB-INF/templates/2fa.tpl @@ -2,17 +2,29 @@ License: See license.txt *}
{$i18n.form.2fa.hint}
-{$forms.2faForm.open} +{$forms.twoFactorAuthForm.open} - + - - + + + - + + + + + + + + + + + +
{$forms.2faForm.2fa_code.control}{$forms.twoFactorAuthForm.login.control}
{$forms.2faForm.btn_login.control}{$forms.twoFactorAuthForm.password.control}
{$forms.twoFactorAuthForm.auth_code.control}
{$forms.twoFactorAuthForm.btn_login.control}
-{$forms.2faForm.close} +{$forms.twoFactorAuthForm.close} diff --git a/WEB-INF/templates/group_advanced_edit.tpl b/WEB-INF/templates/group_advanced_edit.tpl index d4bd55a1e..82eac702c 100644 --- a/WEB-INF/templates/group_advanced_edit.tpl +++ b/WEB-INF/templates/group_advanced_edit.tpl @@ -41,7 +41,6 @@ License: See license.txt *} {$i18n.label.what_is_it}
{$i18n.label.required_fields}
{$forms.groupForm.one_uncompleted.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{if $time_records} + + +
@@ -177,10 +188,13 @@ License: See license.txt *} {/if} {/if} - diff --git a/initialize.php b/initialize.php index 84470d543..2f7224b8a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5691"); +define("APP_VERSION", "1.21.4.5692"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 92f500d87..2b25462d3 100644 --- a/puncher.php +++ b/puncher.php @@ -32,7 +32,7 @@ // If we are passed in browser_time, make sure it is in correct format. $browser_time = null; // Reused below beyond access checks. if ($request->isPost()) { - // Validate that browser_today parameter is in correct format. + // Validate that browser_time parameter is in correct format. $browser_time = $request->getParameter('browser_time'); if ($browser_time && !ttValidTime($browser_time)) { header('Location: access_denied.php'); diff --git a/time.php b/time.php index 4f08cfe2a..faf064a4a 100644 --- a/time.php +++ b/time.php @@ -46,6 +46,30 @@ exit(); } } +// Additional checks for hidden controls used for completion of uncompleted records. +// browser_date, browser_time, record_id. +if ($request->isPost() && $request->getParameter('btn_stop')) { + $recordId = (int) $request->getParameter('record_id'); + $time_rec = ttTimeHelper::getRecord($recordId); + if (!$time_rec) { + // We are passed a bogus record id. + header('Location: access_denied.php'); + exit(); + } + + // Validate that browser_date parameter is in correct format. + $browser_date = $request->getParameter('browser_date'); + if ($browser_date && !ttValidDbDateFormatDate($browser_date)) { + header('Location: access_denied.php'); + exit(); + } + // Validate that browser_time parameter is in correct format. + $browser_time = $request->getParameter('browser_time'); + if ($browser_time && !ttValidTime($browser_time)) { + header('Location: access_denied.php'); + exit(); + } +} // End of access checks. // Determine user for whom we display this page. From c88dfcd6d32eea8818f266e39144732f9c263184 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 9 Apr 2022 15:18:33 +0000 Subject: [PATCH 2385/2515] Resuming refactoring. --- WEB-INF/lib/common.lib.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index fc27d2945..2d8e287d5 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -577,7 +577,7 @@ function ttEndsWith($string, $endString) function ttDateToUserFormat($date) { global $user; - $o_date = new DateAndTime(DB_DATEFORMAT, $date); + $o_date = new ttDate($date); return $o_date->toString($user->date_format); } diff --git a/initialize.php b/initialize.php index 2f7224b8a..e787e27b0 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5692"); +define("APP_VERSION", "1.21.4.5693"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ba5e71ff40894946290f51979dc07f4ab00e21d0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 9 Apr 2022 16:52:18 +0000 Subject: [PATCH 2386/2515] Incremental refactoring. --- WEB-INF/lib/form/ActionForm.class.php | 43 +++++++-------------------- initialize.php | 2 +- time_edit.php | 1 - week.php | 1 - 4 files changed, 12 insertions(+), 35 deletions(-) diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index abc5e006b..5b88292c4 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -1,32 +1,9 @@ mValues[$name] = $value; if ($this->mForm) { if (isset($this->mForm->elements[$name])) { if ($this->mForm->elements[$name]->class=="DateField") { - $dt = new DateAndTime($user->date_format, $value); - $value = $dt->toString(DB_DATEFORMAT); + // TODO: It appears that we never get here. Refactor this entire class. + $dt = new ttDate($user->date_format, $value); + $value = $dt->toString(); } $this->mForm->elements[$name]->setValueSafe($value); } @@ -140,8 +118,9 @@ function setAttributes($value) { if ($this->mForm) { if (isset($this->mForm->elements[$name])) { if ($this->mForm->elements[$name]->class=="DateField") { - $dt = new DateAndTime($user->date_format, $value); - $value = $dt->toString(DB_DATEFORMAT); + // TODO: It appears that we never get here. Refactor this entire class. + $dt = new ttDate($user->date_format, $value); + $value = $dt->toString(); } $this->mForm->elements[$name]->setValueSafe($value); } diff --git a/initialize.php b/initialize.php index e787e27b0..a8b14bca9 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5693"); +define("APP_VERSION", "1.21.4.5694"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time_edit.php b/time_edit.php index a00f66051..03c721193 100644 --- a/time_edit.php +++ b/time_edit.php @@ -9,7 +9,6 @@ import('ttClientHelper'); import('ttTimeHelper'); import('ttConfigHelper'); -import('DateAndTime'); import('ttDate'); // Access checks. diff --git a/week.php b/week.php index 1e0ec1b41..92eb95ee3 100644 --- a/week.php +++ b/week.php @@ -13,7 +13,6 @@ import('ttClientHelper'); import('ttTimeHelper'); import('ttDate'); -import('DateAndTime'); // Access checks. if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) { From 43b0cadb33efc2bb97b3a62a95d6a7da5d93874b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 9 Apr 2022 18:40:23 +0000 Subject: [PATCH 2387/2515] More refactoring. --- expense_edit.php | 16 ++++++++-------- initialize.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/expense_edit.php b/expense_edit.php index 258437b33..e57db88d9 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -5,9 +5,9 @@ require_once('initialize.php'); import('form.Form'); import('ttGroupHelper'); -import('DateAndTime'); import('ttTimeHelper'); import('ttExpenseHelper'); +import('ttDate'); // Access checks. if (!(ttAccessAllowed('track_own_expenses') || ttAccessAllowed('track_expenses'))) { @@ -37,7 +37,7 @@ } // End of access checks. -$item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); +$item_date = new ttDate($expense_item['date']); $confirm_save = $user->getConfigOption('confirm_save'); $trackingMode = $user->getTrackingMode(); $show_project = MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode; @@ -150,11 +150,11 @@ if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date')); // This is a new date for the expense item. - $new_date = new DateAndTime($user->getDateFormat(), $cl_date); + $new_date = new ttDate($cl_date, $user->getDateFormat()); // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); + $browser_today = new ttDate($request->getParameter('browser_today', null)); if ($new_date->after($browser_today)) $err->add($i18n->get('error.future_date')); } @@ -178,9 +178,9 @@ // Now, an update. if ($err->no()) { - if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(DB_DATEFORMAT), + if (ttExpenseHelper::update(array('id'=>$cl_id,'date'=>$new_date->toString(), 'client_id'=>$cl_client,'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'paid'=>$cl_paid))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); + header('Location: expenses.php?date='.$new_date->toString()); exit(); } } @@ -194,9 +194,9 @@ // Now, a new insert. if ($err->no()) { - if (ttExpenseHelper::insert(array('date'=>$new_date->toString(DB_DATEFORMAT),'client_id'=>$cl_client, + if (ttExpenseHelper::insert(array('date'=>$new_date->toString(),'client_id'=>$cl_client, 'project_id'=>$cl_project,'name'=>$cl_item_name,'cost'=>$cl_cost,'status'=>1))) { - header('Location: expenses.php?date='.$new_date->toString(DB_DATEFORMAT)); + header('Location: expenses.php?date='.$new_date->toString()); exit(); } else $err->add($i18n->get('error.db')); diff --git a/initialize.php b/initialize.php index a8b14bca9..45fa67787 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5694"); +define("APP_VERSION", "1.21.4.5695"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 49ef4b11da9b456e26d5e1592fa79a3194a49b7e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 16:04:20 +0000 Subject: [PATCH 2388/2515] Resuming refactoring. --- WEB-INF/lib/ttDate.class.php | 9 +++++++++ initialize.php | 2 +- reports.php | 33 +++++++++++++++++---------------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index 1f1dfeaaf..3b798214a 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -153,6 +153,15 @@ function after(/*ttDate*/ $obj) { } + function compare(/*ttDate*/ $obj) { + $ts1 = $this->getTimestamp(); + $ts2 = $obj->getTimestamp(); + if ($ts1 < $ts2) return -1; + if ($ts1 == $ts2) return 0; + if ($ts1 > $ts2) return 1; + } + + // Getters. function getYear() { return $this->year; } function getMonth() { return $this->month; } diff --git a/initialize.php b/initialize.php index 45fa67787..201e96f4e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5695"); +define("APP_VERSION", "1.21.4.5696"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index c1df04387..858ca61cb 100644 --- a/reports.php +++ b/reports.php @@ -5,13 +5,13 @@ require_once('initialize.php'); import('form.Form'); import('form.ActionForm'); -import('DateAndTime'); import('ttGroupHelper'); -import('Period'); import('ttProjectHelper'); import('ttFavReportHelper'); import('ttClientHelper'); import('ttReportHelper'); +import('ttDate'); +import('ttPeriod'); // Access check. if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports') || ttAccessAllowed('view_all_reports') || ttAccessAllowed('view_client_reports'))) { @@ -357,9 +357,9 @@ if ($request->isGet() && !$bean->isSaved()) { // No previous form data were found in session. Use the following default values. $form->setValueByElement('users_active', array_keys((array)$user_list_active)); - $period = new Period(INTERVAL_THIS_MONTH, new DateAndTime($user->getDateFormat())); - $form->setValueByElement('start_date', $period->getStartDate()); - $form->setValueByElement('end_date', $period->getEndDate()); + $period = new ttPeriod(new ttDate(), INTERVAL_THIS_MONTH); + $form->setValueByElement('start_date', $period->getStartDate($user->getDateFormat())); + $form->setValueByElement('end_date', $period->getEndDate($user->getDateFormat())); $form->setValueByElement('chclient', '1'); $form->setValueByElement('chstart', '1'); @@ -438,17 +438,18 @@ } else { // Generate button pressed. Check some values. if (!$bean->getAttribute('period')) { - $start_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('start_date')); - - if ($start_date->isError() || !$bean->getAttribute('start_date')) - $err->add($i18n->get('error.field'), $i18n->get('label.start_date')); - - $end_date = new DateAndTime($user->getDateFormat(), $bean->getAttribute('end_date')); - if ($end_date->isError() || !$bean->getAttribute('end_date')) - $err->add($i18n->get('error.field'), $i18n->get('label.end_date')); - - if ($start_date->compare($end_date) > 0) - $err->add($i18n->get('error.interval'), $i18n->get('label.end_date'), $i18n->get('label.start_date')); + // Validate start date. + if (!ttValidDate($bean->getAttribute('start_date'))) $err->add($i18n->get('error.field'), $i18n->get('label.start_date')); + // Validate end date. + if (!ttValidDate($bean->getAttribute('end_date'))) $err->add($i18n->get('error.field'), $i18n->get('label.end_date')); + // Make sure that the end date is equal or after the start date. + if ($err->no()) { + $startDate = new ttDate($bean->getAttribute('start_date'), $user->getDateFormat()); + $endDate = new ttDate($bean->getAttribute('end_date'), $user->getDateFormat()); + if ($startDate->compare($endDate) > 0) { + $err->add($i18n->get('error.interval'), $i18n->get('label.end_date'), $i18n->get('label.start_date')); + } + } } $group_by1 = $bean->getAttribute('group_by1'); $group_by2 = $bean->getAttribute('group_by2'); From 66ee957d754819df5f672746af4d62aad44771a7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 16:15:10 +0000 Subject: [PATCH 2389/2515] A bit more refactoring. --- initialize.php | 2 +- invoice_view.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/initialize.php b/initialize.php index 201e96f4e..5703b55be 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5696"); +define("APP_VERSION", "1.21.4.5697"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/invoice_view.php b/invoice_view.php index b03b719e4..b1fcf91f9 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -3,7 +3,7 @@ License: See license.txt */ require_once('initialize.php'); -import('DateAndTime'); +import('ttDate'); import('ttInvoiceHelper'); import('ttClientHelper'); import('form.Form'); @@ -25,7 +25,7 @@ } // End of access checks. -$invoice_date = new DateAndTime(DB_DATEFORMAT, $invoice['date']); +$invoice_date = new ttDate($invoice['date']); $client = ttClientHelper::getClient($invoice['client_id'], true); if (!$client) // In case client was deleted. $client = ttClientHelper::getDeletedClient($invoice['client_id']); From a44ba11b58ef6f76c7570a3092bb94c0088b2008 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 16:39:55 +0000 Subject: [PATCH 2390/2515] More refactoring. --- expenses.php | 11 +++++------ initialize.php | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/expenses.php b/expenses.php index 897d64d91..34169b7dc 100644 --- a/expenses.php +++ b/expenses.php @@ -6,7 +6,7 @@ import('form.Form'); import('ttUserHelper'); import('ttGroupHelper'); -import('DateAndTime'); +import('ttDate'); import('ttTimeHelper'); import('ttExpenseHelper'); import('ttFileHelper'); @@ -65,13 +65,12 @@ // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); -$selected_date = new DateAndTime(DB_DATEFORMAT, $cl_date); -if($selected_date->isError()) - $selected_date = new DateAndTime(DB_DATEFORMAT); +$selected_date = new ttDate($cl_date); if(!$cl_date) - $cl_date = $selected_date->toString(DB_DATEFORMAT); + $cl_date = $selected_date->toString(); $_SESSION['date'] = $cl_date; + $tracking_mode = $user->getTrackingMode(); $show_project = MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode; $showFiles = $user->isPluginEnabled('at'); @@ -203,7 +202,7 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { - $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null)); + $browser_today = new ttDate($request->getParameter('browser_today', null)); if ($selected_date->after($browser_today)) $err->add($i18n->get('error.future_date')); } diff --git a/initialize.php b/initialize.php index 5703b55be..e1a5ffd06 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5697"); +define("APP_VERSION", "1.21.4.5698"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 8b66de3dd6a21fc65fa26a3a6fcbf940d8d2b05f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 16:53:05 +0000 Subject: [PATCH 2391/2515] A bit more refactoring. --- charts.php | 6 +++--- expense_delete.php | 4 ++-- initialize.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts.php b/charts.php index cfd01c5fe..1ad1c88d9 100644 --- a/charts.php +++ b/charts.php @@ -6,7 +6,7 @@ require_once('initialize.php'); import('form.Form'); -import('DateAndTime'); +import('ttDate'); import('ttChartHelper'); import('ttUserConfig'); import('PieChartEx'); @@ -72,8 +72,8 @@ // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); if(!$cl_date) { - $now = new DateAndTime(DB_DATEFORMAT); - $cl_date = $now->toString(DB_DATEFORMAT); + $now = new ttDate(); + $cl_date = $now->toString(); } $_SESSION['date'] = $cl_date; diff --git a/expense_delete.php b/expense_delete.php index 6c5cb791f..6dbf421a9 100644 --- a/expense_delete.php +++ b/expense_delete.php @@ -4,7 +4,7 @@ require_once('initialize.php'); import('form.Form'); -import('DateAndTime'); +import('ttDate'); import('ttExpenseHelper'); // Access checks. @@ -30,7 +30,7 @@ if ($request->getParameter('delete_button')) { // Delete button pressed. // Determine if it is okay to delete the record. - $item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']); + $item_date = new ttDate($expense_item['date']); if ($user->isDateLocked($item_date)) $err->add($i18n->get('error.range_locked')); diff --git a/initialize.php b/initialize.php index e1a5ffd06..6be6126dd 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5698"); +define("APP_VERSION", "1.21.4.5699"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 0a61c1b2469f7c519419b35712223838a37f40b9 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 17:28:27 +0000 Subject: [PATCH 2392/2515] Cleanup. --- WEB-INF/lib/ttTeamHelper.class.php | 30 ++---------------------------- WEB-INF/lib/ttTimeHelper.class.php | 2 -- initialize.php | 2 +- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 981f01b50..e12c2575b 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -1,33 +1,8 @@ query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); while ($val = $res->fetchRow()) { $result[] = $val; } diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index dd0977476..2e9eddbb1 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -2,8 +2,6 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -import('DateAndTime'); - // The ttTimeHelper is a class to help with time-related values. class ttTimeHelper { diff --git a/initialize.php b/initialize.php index 6be6126dd..9ae6dcdb6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5699"); +define("APP_VERSION", "1.21.4.5700"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 2cf98d9ab1e736794ff0131a41cb642374198fe5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 17:45:17 +0000 Subject: [PATCH 2393/2515] A bit more cleanup and refactoring. --- WEB-INF/lib/ttGroupHelper.class.php | 4 +--- initialize.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 81b0c7f34..81d1af696 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -431,10 +431,9 @@ static function getActiveInvoices($sort_options = false) $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); while ($val = $res->fetchRow()) { // Localize date. - $dt->parseVal($val['date']); + $dt = new ttDate($val['date']); $val['date'] = $dt->toString($user->getDateFormat()); if ($addPaidStatus) $val['paid'] = ttInvoiceHelper::isPaid($val['id']); @@ -679,7 +678,6 @@ static function getRecentInvoices($client_id) { $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); while ($val = $res->fetchRow()) { $result[] = $val; } diff --git a/initialize.php b/initialize.php index 9ae6dcdb6..6b4471a20 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5700"); +define("APP_VERSION", "1.21.4.5701"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 912ffe1bfcbb21a8e87e6a162b57148321109a22 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 20:01:41 +0000 Subject: [PATCH 2394/2515] Refactoring in progress. --- WEB-INF/lib/ttChartHelper.class.php | 40 ++++++----------------------- WEB-INF/lib/ttPeriod.class.php | 12 +++++++++ initialize.php | 2 +- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index 4e4f9c832..f0523036d 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -1,32 +1,8 @@ endDate = new ttDate(); switch ($period_type) { + case INTERVAL_THIS_DAY: + $this->startDate->setFromUnixTimestamp($ttDateInstance->getTimestamp()); + $this->endDate->setFromUnixTimestamp($ttDateInstance->getTimestamp()); + break; + case INTERVAL_THIS_WEEK: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); @@ -32,6 +39,11 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); break; + + case INTERVAL_THIS_YEAR: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,1,1,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,12,31,$t_arr[5])); + break; } } diff --git a/initialize.php b/initialize.php index 6b4471a20..a078f888c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5701"); +define("APP_VERSION", "1.21.4.5702"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 50e2643ca231372b72c42d4094cd195903efe31d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 10 Apr 2022 20:36:34 +0000 Subject: [PATCH 2395/2515] Refactoring in progress. --- WEB-INF/lib/ttPeriod.class.php | 24 ++++++++++++++++++++++++ WEB-INF/lib/ttReportHelper.class.php | 10 ++++++---- initialize.php | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php index 85022a85b..1d63ad9d1 100644 --- a/WEB-INF/lib/ttPeriod.class.php +++ b/WEB-INF/lib/ttPeriod.class.php @@ -6,6 +6,10 @@ define('INTERVAL_THIS_WEEK', 2); define('INTERVAL_THIS_MONTH', 3); define('INTERVAL_THIS_YEAR', 4); +define('INTERVAL_ALL_TIME', 5); +define('INTERVAL_LAST_WEEK', 6); +define('INTERVAL_LAST_MONTH', 7); +define('INTERVAL_LAST_DAY', 8); class ttPeriod { var $startDate; // ttDate object. @@ -30,16 +34,31 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { $this->endDate->setFromUnixTimestamp($ttDateInstance->getTimestamp()); break; + case INTERVAL_LAST_DAY: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); + break; + case INTERVAL_THIS_WEEK: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); break; + case INTERVAL_LAST_WEEK: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-7+$startWeekBias,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-1+$startWeekBias,$t_arr[5])); + break; + case INTERVAL_THIS_MONTH: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); break; + case INTERVAL_LAST_MONTH: + $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4],1,$t_arr[5])); + $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,0,$t_arr[5])); + break; + case INTERVAL_THIS_YEAR: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,1,1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,12,31,$t_arr[5])); @@ -47,6 +66,11 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { } } + // Sets period to designated start and and dates. + function setPeriod($start_date, $end_date) { + $this->startDate = $start_date; + $this->endDate = $end_date; + } // Returns start date in specified format. function getStartDate($format = null) { diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 20e6d7a46..bafa40221 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -4,7 +4,9 @@ import('ttClientHelper'); import('DateAndTime'); +import('ttDate'); import('Period'); +import('ttPeriod'); import('ttTimeHelper'); import('ttConfigHelper'); @@ -119,12 +121,12 @@ static function getWhere($options) { // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); if ($options['period']) - $period = new Period($options['period'], new DateAndTime($dateFormat)); + $period = new ttPeriod(new ttDate(), $options['period']); else { - $period = new Period(); + $period = new ttPeriod(new ttDate()); $period->setPeriod( - new DateAndTime($dateFormat, $options['period_start']), - new DateAndTime($dateFormat, $options['period_end'])); + new ttDate($options['period_start'], $dateFormat), + new ttDate($options['period_end'], $dateFormat)); } $where = " where l.status = 1 and l.date >= '".$period->getStartDate(DB_DATEFORMAT)."' and l.date <= '".$period->getEndDate(DB_DATEFORMAT)."'". " $user_list_part $dropdown_parts $cf_text_parts"; diff --git a/initialize.php b/initialize.php index a078f888c..7fbdc50ff 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5702"); +define("APP_VERSION", "1.21.4.5703"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 094e353b2f55375aedd70f14f495c23f179e1f24 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 15:43:46 +0000 Subject: [PATCH 2396/2515] Resuming refactoring. --- WEB-INF/lib/ttReportHelper.class.php | 29 +++++++++++++--------------- initialize.php | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index bafa40221..995cfa2b4 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -3,9 +3,7 @@ License: See license.txt */ import('ttClientHelper'); -import('DateAndTime'); import('ttDate'); -import('Period'); import('ttPeriod'); import('ttTimeHelper'); import('ttConfigHelper'); @@ -128,7 +126,7 @@ static function getWhere($options) { new ttDate($options['period_start'], $dateFormat), new ttDate($options['period_end'], $dateFormat)); } - $where = " where l.status = 1 and l.date >= '".$period->getStartDate(DB_DATEFORMAT)."' and l.date <= '".$period->getEndDate(DB_DATEFORMAT)."'". + $where = " where l.status = 1 and l.date >= '".$period->getStartDate()."' and l.date <= '".$period->getEndDate()."'". " $user_list_part $dropdown_parts $cf_text_parts"; return $where; } @@ -203,14 +201,14 @@ static function getExpenseWhere($options) { // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); if ($options['period']) - $period = new Period($options['period'], new DateAndTime($dateFormat)); + $period = new ttPeriod(new ttDate(), $options['period']); else { - $period = new Period(); + $period = new ttPeriod(new ttDate()); $period->setPeriod( - new DateAndTime($dateFormat, $options['period_start']), - new DateAndTime($dateFormat, $options['period_end'])); + new ttDate($options['period_start'], $dateFormat), + new ttDate($options['period_end'], $dateFormat)); } - $where = " where ei.status = 1 and ei.date >= '".$period->getStartDate(DB_DATEFORMAT)."' and ei.date <= '".$period->getEndDate(DB_DATEFORMAT)."'". + $where = " where ei.status = 1 and ei.date >= '".$period->getStartDate()."' and ei.date <= '".$period->getEndDate()."'". " $user_list_part $dropdown_parts $cf_text_parts"; return $where; } @@ -883,17 +881,16 @@ static function getTotals($options) $dateFormat = $user->getDateFormat(); if (isset($options['period']) && $options['period']) - $period = new Period($options['period'], new DateAndTime($dateFormat)); + $period = new ttPeriod(new ttDate(), $options['period']); else { - $period = new Period(); - if (isset($options['period_start']) && isset($options['period_end'])) - $period->setPeriod( - new DateAndTime($dateFormat, $options['period_start']), - new DateAndTime($dateFormat, $options['period_end'])); + $period = new ttPeriod(new ttDate()); + $period->setPeriod( + new ttDate($options['period_start'], $dateFormat), + new ttDate($options['period_end'], $dateFormat)); } - $totals['start_date'] = $period->getStartDate(); - $totals['end_date'] = $period->getEndDate(); + $totals['start_date'] = $period->getStartDate($user->getDateFormat()); + $totals['end_date'] = $period->getEndDate($user->getDateFormat()); $totals['time'] = $total_time; $totals['minutes'] = $val['time'] / 60; $totals['units'] = isset($val['units']) ? $val['units'] : null; diff --git a/initialize.php b/initialize.php index 7fbdc50ff..88849a738 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5703"); +define("APP_VERSION", "1.21.4.5705"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 83b155b827c5ec9923b6aadd74ad462f7d8e3b61 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 16:31:38 +0000 Subject: [PATCH 2397/2515] Refactoring. Fully replaced older Period class usage with newer ttPeriod. --- WEB-INF/lib/Period.class.php | 136 ------------------------ WEB-INF/lib/ttTimesheetHelper.class.php | 14 +-- initialize.php | 2 +- 3 files changed, 9 insertions(+), 143 deletions(-) delete mode 100644 WEB-INF/lib/Period.class.php diff --git a/WEB-INF/lib/Period.class.php b/WEB-INF/lib/Period.class.php deleted file mode 100644 index 57ea0e44c..000000000 --- a/WEB-INF/lib/Period.class.php +++ /dev/null @@ -1,136 +0,0 @@ -getWeekStart(); - - $this->startDate = new DateAndTime(); - $this->startDate->setFormat($date_point->getFormat()); - $this->endDate = new DateAndTime(); - $this->endDate->setFormat($date_point->getFormat()); - $t_arr = localtime($date_point->getTimestamp()); - $t_arr[5] = $t_arr[5] + 1900; - - if ($t_arr[6] < $weekStartDay) { - $startWeekBias = $weekStartDay - 7; - } else { - $startWeekBias = $weekStartDay; - } - - switch ($period_type) { - case INTERVAL_THIS_DAY: - $this->startDate->setTimestamp($date_point->getTimestamp()); - $this->endDate->setTimestamp($date_point->getTimestamp()); - break; - - case INTERVAL_LAST_DAY: - $this->startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); - $this->endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); - break; - - case INTERVAL_THIS_WEEK: - $this->startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5])); - $this->endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); - break; - case INTERVAL_LAST_WEEK: - $this->startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-7+$startWeekBias,$t_arr[5])); - $this->endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-1+$startWeekBias,$t_arr[5])); - break; - case INTERVAL_THIS_MONTH: - $this->startDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,1,$t_arr[5])); - $this->endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); - break; - case INTERVAL_LAST_MONTH: - $this->startDate->setTimestamp(mktime(0,0,0,$t_arr[4],1,$t_arr[5])); - $this->endDate->setTimestamp(mktime(0,0,0,$t_arr[4]+1,0,$t_arr[5])); - break; - - case INTERVAL_THIS_YEAR: - $this->startDate->setTimestamp(mktime(0, 0, 0, 1, 1, $t_arr[5])); - $this->endDate->setTimestamp(mktime(0, 0, 0, 12, 31, $t_arr[5])); - break; - } - } - - function setPeriod($b_date, $e_date) { - $this->startDate = $b_date; - $this->endDate = $e_date; - } - - // return date string - function getStartDate($format="") { - return $this->startDate->toString($format); - } - - // return date string - function getEndDate($format="") { - return $this->endDate->toString($format); - } -} diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index 5ca3abe66..ec2032efb 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -4,6 +4,8 @@ import('ttUserHelper'); import('ttFileHelper'); +import('ttPeriod'); +import('ttDate'); // Class ttTimesheetHelper is used to help with project related tasks. class ttTimesheetHelper { @@ -545,15 +547,15 @@ static function getMatchingTimesheets($options) { // Determine start and end dates. $dateFormat = $user->getDateFormat(); if ($options['period']) - $period = new Period($options['period'], new DateAndTime($dateFormat)); + $period = new ttPeriod(new ttDate(), $options['period']); else { - $period = new Period(); + $period = new ttPeriod(new ttDate()); $period->setPeriod( - new DateAndTime($dateFormat, $options['period_start']), - new DateAndTime($dateFormat, $options['period_end'])); + new ttDate($options['period_start'], $dateFormat), + new ttDate($options['period_end'], $dateFormat)); } - $start = $period->getStartDate(DB_DATEFORMAT); - $end = $period->getEndDate(DB_DATEFORMAT); + $start = $period->getStartDate(); + $end = $period->getEndDate(); $result = false; $sql = "select id, name from tt_timesheets". diff --git a/initialize.php b/initialize.php index 88849a738..242fa0ab4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5705"); +define("APP_VERSION", "1.21.4.5706"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 87386884d31673d31421cfb331f0957dc28ae971 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 16:45:51 +0000 Subject: [PATCH 2398/2515] Incremental refactoring. --- WEB-INF/lib/ttInvoiceHelper.class.php | 8 ++++---- WEB-INF/lib/ttReportHelper.class.php | 4 ++-- WEB-INF/lib/ttTimesheetHelper.class.php | 2 +- initialize.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 9a20730ae..3fa4f2ce1 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -226,11 +226,11 @@ static function invoiceableItemsExist($fields) { $client_id = (int) $fields['client_id']; - $start_date = new DateAndTime($user->date_format, $fields['start_date']); - $start = $start_date->toString(DB_DATEFORMAT); + $start_date = new ttDate($fields['start_date'], $user->getDateFormat()); + $start = $start_date->toString(); - $end_date = new DateAndTime($user->date_format, $fields['end_date']); - $end = $end_date->toString(DB_DATEFORMAT); + $end_date = new ttDate($fields['end_date'], $user->getDateFormat()); + $end = $end_date->toString(); $project_id = null; $project_part = ''; diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 995cfa2b4..693fe6521 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -118,7 +118,7 @@ static function getWhere($options) { // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); - if ($options['period']) + if (isset($options['period']) && $options['period']) $period = new ttPeriod(new ttDate(), $options['period']); else { $period = new ttPeriod(new ttDate()); @@ -200,7 +200,7 @@ static function getExpenseWhere($options) { // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); - if ($options['period']) + if (isset($options['period']) && $options['period']) $period = new ttPeriod(new ttDate(), $options['period']); else { $period = new ttPeriod(new ttDate()); diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index ec2032efb..070d31d7b 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -546,7 +546,7 @@ static function getMatchingTimesheets($options) { // Determine start and end dates. $dateFormat = $user->getDateFormat(); - if ($options['period']) + if (isset($options['period']) && $options['period']) $period = new ttPeriod(new ttDate(), $options['period']); else { $period = new ttPeriod(new ttDate()); diff --git a/initialize.php b/initialize.php index 242fa0ab4..ee6c46922 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5706"); +define("APP_VERSION", "1.21.4.5707"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a299407343dd43cb46a90ac3063fa9bcc5b7d700 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 17:01:00 +0000 Subject: [PATCH 2399/2515] A bit more refactoring. --- WEB-INF/lib/ttInvoiceHelper.class.php | 17 ++++++++--------- initialize.php | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 3fa4f2ce1..2ac63db44 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -3,7 +3,7 @@ License: See license.txt */ import('ttClientHelper'); -import('DateAndTime'); +import('ttDate'); // Class ttInvoiceHelper is used for help with invoices. class ttInvoiceHelper { @@ -159,9 +159,8 @@ static function getInvoiceItems($invoice_id) { $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { - $dt = new DateAndTime(DB_DATEFORMAT); while ($val = $res->fetchRow()) { - $dt->parseVal($val['date']); + $dt = new ttDate($val['date']); $val['date'] = $dt->toString($user->getDateFormat()); $result[] = $val; } @@ -304,14 +303,14 @@ static function createInvoice($fields) { $client_id = (int) $fields['client_id']; - $invoice_date = new DateAndTime($user->date_format, $fields['date']); - $date = $invoice_date->toString(DB_DATEFORMAT); + $invoice_date = new ttDate($fields['date'], $user->getDateFormat()); + $date = $invoice_date->toString(); - $start_date = new DateAndTime($user->date_format, $fields['start_date']); - $start = $start_date->toString(DB_DATEFORMAT); + $start_date = new ttDate($fields['start_date'], $user->getDateFormat()); + $start = $start_date->toString(); - $end_date = new DateAndTime($user->date_format, $fields['end_date']); - $end = $end_date->toString(DB_DATEFORMAT); + $end_date = new ttDate($fields['end_date'], $user->getDateFormat()); + $end = $end_date->toString(); $project_id = null; $project_part = ''; diff --git a/initialize.php b/initialize.php index ee6c46922..97e7b7701 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5707"); +define("APP_VERSION", "1.21.4.5708"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d17164a8ecd5880d4b16a5eff98bd130566bc5ce Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 17:54:04 +0000 Subject: [PATCH 2400/2515] More progress with refactoring. --- WEB-INF/lib/ttTimesheetHelper.class.php | 24 ++++++++++++------------ initialize.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index 070d31d7b..16d740291 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -47,11 +47,11 @@ static function createTimesheet($fields) $name = $fields['name']; $comment = $fields['comment']; - $start_date = new DateAndTime($user->date_format, $fields['start_date']); - $start = $start_date->toString(DB_DATEFORMAT); + $start_date = new ttDate($fields['start_date'], $user->getDateFormat()); + $start = $start_date->toString(); - $end_date = new DateAndTime($user->date_format, $fields['end_date']); - $end = $end_date->toString(DB_DATEFORMAT); + $end_date = new ttDate($fields['end_date'], $user->getDateFormat()); + $end = $end_date->toString(); $created_part = ', now(), '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', '.$user->id; @@ -448,11 +448,11 @@ static function timesheetItemsExist($fields) { if (isset($fields['client_id'])) $client_id = (int) $fields['client_id']; if (isset($fields['project_id'])) $project_id = (int) $fields['project_id']; - $start_date = new DateAndTime($user->date_format, $fields['start_date']); - $start = $start_date->toString(DB_DATEFORMAT); + $start_date = new ttDate($fields['start_date'], $user->getDateFormat()); + $start = $start_date->toString(); - $end_date = new DateAndTime($user->date_format, $fields['end_date']); - $end = $end_date->toString(DB_DATEFORMAT); + $end_date = new ttDate($fields['end_date'], $user->getDateFormat()); + $end = $end_date->toString(); // sql parts. $client_part = $project_part = ''; @@ -488,12 +488,12 @@ static function overlaps($fields) { if (isset($fields['client_id'])) $client_id = (int) $fields['client_id']; if (isset($fields['project_id'])) $project_id = (int) $fields['project_id']; - $start_date = new DateAndTime($user->date_format, $fields['start_date']); - $start = $start_date->toString(DB_DATEFORMAT); + $start_date = new ttDate($fields['start_date'], $user->getDateFormat()); + $start = $start_date->toString(); $quoted_start = $mdb2->quote($start); - $end_date = new DateAndTime($user->date_format, $fields['end_date']); - $end = $end_date->toString(DB_DATEFORMAT); + $end_date = new ttDate($fields['end_date'], $user->getDateFormat()); + $end = $end_date->toString(); $quoted_end = $mdb2->quote($end); // sql parts. diff --git a/initialize.php b/initialize.php index 97e7b7701..b567181c4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5708"); +define("APP_VERSION", "1.21.4.5709"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 24d68b74cec8556cb594366e59a75d2107ff1e3c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 19:29:44 +0000 Subject: [PATCH 2401/2515] Fixed loading fav reports. --- WEB-INF/lib/form/ActionForm.class.php | 8 ++++---- WEB-INF/lib/ttFavReportHelper.class.php | 9 +++++---- initialize.php | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/WEB-INF/lib/form/ActionForm.class.php b/WEB-INF/lib/form/ActionForm.class.php index 5b88292c4..253091b48 100644 --- a/WEB-INF/lib/form/ActionForm.class.php +++ b/WEB-INF/lib/form/ActionForm.class.php @@ -88,8 +88,8 @@ function setAttribute($name,$value) { if ($this->mForm) { if (isset($this->mForm->elements[$name])) { if ($this->mForm->elements[$name]->class=="DateField") { - // TODO: It appears that we never get here. Refactor this entire class. - $dt = new ttDate($user->date_format, $value); + // We get here when loading a fav report. Refactor this entire class. + $dt = new ttDate($value, $user->getDateFormat()); $value = $dt->toString(); } $this->mForm->elements[$name]->setValueSafe($value); @@ -118,8 +118,8 @@ function setAttributes($value) { if ($this->mForm) { if (isset($this->mForm->elements[$name])) { if ($this->mForm->elements[$name]->class=="DateField") { - // TODO: It appears that we never get here. Refactor this entire class. - $dt = new ttDate($user->date_format, $value); + // We get here when changing to --- no --- fav report. Refactor this entire class. + $dt = new ttDate($value, $user->getDateFormat()); $value = $dt->toString(); } $this->mForm->elements[$name]->setValueSafe($value); diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index 303750d63..9e1827e09 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -3,6 +3,7 @@ License: See license.txt */ import('ttGroupHelper'); +import('ttDate'); // Class ttFavReportHelper is used to help with favorite report related tasks. class ttFavReportHelper { @@ -212,12 +213,12 @@ static function saveReport($bean) { } if ($bean->getAttribute('start_date')) { - $dt = new DateAndTime($user->getDateFormat(), $bean->getAttribute('start_date')); - $from = $dt->toString(DB_DATEFORMAT); + $dt = new ttDate($bean->getAttribute('start_date'), $user->getDateFormat()); + $from = $dt->toString(); } if ($bean->getAttribute('end_date')) { - $dt = new DateAndTime($user->getDateFormat(), $bean->getAttribute('end_date')); - $to = $dt->toString(DB_DATEFORMAT); + $dt = new ttDate($bean->getAttribute('end_date'), $user->getDateFormat()); + $to = $dt->toString(); } $fields = array( diff --git a/initialize.php b/initialize.php index b567181c4..17750f01b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.4.5709"); +define("APP_VERSION", "1.21.5.5710"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 7478a60d4496328cf020a94c6e8b5b02aece11ab Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 11 Apr 2022 20:41:55 +0000 Subject: [PATCH 2402/2515] Refactoring. Finished replacing older DateAndTime class with newer ttDate class. --- WEB-INF/lib/DateAndTime.class.php | 348 ------------------------ WEB-INF/lib/form/DateField.class.php | 14 +- WEB-INF/lib/ttDate.class.php | 1 - WEB-INF/lib/ttFavReportHelper.class.php | 4 +- 4 files changed, 7 insertions(+), 360 deletions(-) delete mode 100644 WEB-INF/lib/DateAndTime.class.php diff --git a/WEB-INF/lib/DateAndTime.class.php b/WEB-INF/lib/DateAndTime.class.php deleted file mode 100644 index e72245985..000000000 --- a/WEB-INF/lib/DateAndTime.class.php +++ /dev/null @@ -1,348 +0,0 @@ -$sDate parsed, or false on error. - */ - -function my_strptime($sDate, $sFormat) -{ - $aResult = array - ( - 'tm_sec' => 0, - 'tm_min' => 0, - 'tm_hour' => 0, - 'tm_mday' => 1, - 'tm_mon' => 0, - 'tm_year' => 0, - 'tm_wday' => 0, - 'tm_yday' => 0, - 'unparsed' => $sDate, - ); - - while($sFormat != "") - { - // ===== Search a %x element, Check the static string before the %x ===== - $nIdxFound = strpos($sFormat, '%'); - if($nIdxFound === false) - { - - // There is no more format. Check the last static string. - $aResult['unparsed'] = ($sFormat == $sDate) ? "" : $sDate; - break; - } - - $sFormatBefore = mb_substr($sFormat, 0, $nIdxFound); - $sDateBefore = mb_substr($sDate, 0, $nIdxFound); - - if($sFormatBefore != $sDateBefore) break; - - // ===== Read the value of the %x found ===== - $sFormat = mb_substr($sFormat, $nIdxFound); - $sDate = mb_substr($sDate, $nIdxFound); - - $aResult['unparsed'] = $sDate; - - $sFormatCurrent = mb_substr($sFormat, 0, 2); - $sFormatAfter = mb_substr($sFormat, 2); - - $nValue = -1; - $sDateAfter = ""; - switch($sFormatCurrent) - { - case '%S': // Seconds after the minute (0-59) - - sscanf($sDate, "%2d%[^\\n]", $nValue, $sDateAfter); - - if(($nValue < 0) || ($nValue > 59)) return false; - - $aResult['tm_sec'] = $nValue; - break; - - // ---------- - case '%M': // Minutes after the hour (0-59) - sscanf($sDate, "%2d%[^\\n]", $nValue, $sDateAfter); - - if(($nValue < 0) || ($nValue > 59)) return false; - - $aResult['tm_min'] = $nValue; - break; - - // ---------- - case '%H': // Hour since midnight (0-23) - sscanf($sDate, "%2d%[^\\n]", $nValue, $sDateAfter); - - if(($nValue < 0) || ($nValue > 23)) return false; - - $aResult['tm_hour'] = $nValue; - break; - - // ---------- - case '%d': // Day of the month (1-31) - sscanf($sDate, "%2d%[^\\n]", $nValue, $sDateAfter); - - if(($nValue < 1) || ($nValue > 31)) return false; - - $aResult['tm_mday'] = $nValue; - break; - - // ---------- - case '%m': // Months since January (0-11) - sscanf($sDate, "%2d%[^\\n]", $nValue, $sDateAfter); - - if(($nValue < 1) || ($nValue > 12)) return false; - - $aResult['tm_mon'] = ($nValue - 1); - break; - - // ---------- - case '%Y': // Years since 1900 - sscanf($sDate, "%4d%[^\\n]", $nValue, $sDateAfter); - - if($nValue < 1900) return false; - - $aResult['tm_year'] = ($nValue - 1900); - break; - - // ---------- - default: - //sscanf($sDate, "%s%[^\\n]", $skip, $sDateAfter); - preg_match('/^(.+)(\s|$)/uU', $sDate, $matches); - if (isset($matches[1])) { - $sDateAfter = mb_substr($sDate, mb_strlen($matches[1])); - } else { - $sDateAfter = ''; - } - //break 2; // Break Switch and while - break; - } - - // ===== Next please ===== - $sFormat = $sFormatAfter; - $sDate = $sDateAfter; - - $aResult['unparsed'] = $sDate; - - } // END while($sFormat != "") - - - // ===== Create the other value of the result array ===== - $nParsedDateTimestamp = mktime($aResult['tm_hour'], $aResult['tm_min'], $aResult['tm_sec'], - $aResult['tm_mon'] + 1, $aResult['tm_mday'], $aResult['tm_year'] + 1900); - - // Before PHP 5.1 return -1 when error - if(($nParsedDateTimestamp === false) - ||($nParsedDateTimestamp === -1)) return false; - - $aResult['tm_wday'] = (int) strftime("%w", $nParsedDateTimestamp); // Days since Sunday (0-6) - $aResult['tm_yday'] = (strftime("%j", $nParsedDateTimestamp) - 1); // Days since January 1 (0-365) - - return $aResult; -} // END of function - -class DateAndTime { - var $mHour = 0; - var $mMinute = 0; - var $mSecond = 0; - var $mMonth; - var $mDay; // day of week - var $mDate; // day of month - var $mYear; - var $mIntrFormat = "%d.%m.%Y %H:%M:%S"; //29.02.2004 16:21:42 internal format date - var $mLocalFormat; - var $mParseResult = 0; - var $mAutoComplete = true; - - /** - * Constructor - * - * @param String $format - * @param String $strfDateTime - * @return DateAndTime - */ - function __construct($format="",$strfDateTime="") { - $this->mLocalFormat = ($format ? $format : $this->mIntrFormat); - $d = ($strfDateTime ? $strfDateTime : $this->do_strftime($this->mLocalFormat)); - $this->parseVal($d); - } - - function setFormat($format) { - $this->mLocalFormat = $format; - } - - function getFormat() { - return $this->mLocalFormat; - } - - //01 to 31 - function getDate() { return $this->mDate; } - - //0 (for Sunday) through 6 (for Saturday) - function getDay() { return $this->mDay; } - - //01 through 12 - function getMonth() { return $this->mMonth; } - - //1999 or 2003 - function getYear() { return $this->mYear; } - - function setDate($value) { $this->mDate = $value; } - function setMonth($value) { $this->mMonth = $value; } - function setYear($value) { $this->mYear = $value; } - - function setTimestamp($ts) { - $this->mDate = date("d",$ts); - $this->mDay = date("w",$ts); - $this->mMonth = date("m",$ts); - $this->mYear = date("Y",$ts); - $this->mHour = date("H",$ts); - $this->mMinute = date("i",$ts); - $this->mSecond = date("s",$ts); - } - - /** - * Return UNIX timestamp - */ - function getTimestamp() { - return @mktime($this->mHour, $this->mMinute, $this->mSecond, $this->mMonth, $this->mDate, $this->mYear); - } - - function compare($datetime) { - $ts1 = $this->getTimestamp(); - $ts2 = $datetime->getTimestamp(); - if ($ts1<$ts2) return -1; - if ($ts1==$ts2) return 0; - if ($ts1>$ts2) return 1; - } - - function toString($format="") { - if ($this->mParseResult==0) { - if ($format) { - return $this->do_strftime($format, $this->getTimestamp()); - } else { - return $this->do_strftime($this->mLocalFormat, $this->getTimestamp()); - } - } else { - if ($format) { - return $this->do_strftime($format); - } else { - return $this->do_strftime($this->mLocalFormat); - } - } - } - - function parseVal($szDate, $format="") { - $useformat = ($format ? $format : $this->mLocalFormat); - $res = my_strptime($szDate, $useformat); - if ($res !== false) { - $this->mDate = $res['tm_mday']; - $this->mDay = $res['tm_wday']; - $this->mMonth = $res['tm_mon'] + 1; // tm_mon - Months since January (0-11) - $this->mYear = 1900 + $res['tm_year']; // tm_year - Years since 1900 - $this->mHour = $res['tm_hour']; - $this->mMinute = $res['tm_min']; - $this->mSecond = $res['tm_sec']; - $this->mParseResult = 0; - } elseif ($this->mAutoComplete) { - $this->setTimestamp(time()); - $this->mParseResult = 1; - } - } - - function isError() { - if ($this->mParseResult != 0) return true; - return false; - } - - function before(/*DateAndTime*/ $obj) { - if ($this->getTimestamp() < $obj->getTimestamp()) return true; - return false; - } - - function after(/*DateAndTime*/ $obj) { - if ($this->getTimestamp() > $obj->getTimestamp()) return true; - return false; - } - - function equals(/*DateAndTime*/ $obj) { - if ($this->getTimestamp() == $obj->getTimestamp()) return true; - return false; - } - - function decDay(/*int*/$days=1) { - $this->setTimestamp(@mktime($this->mHour, $this->mMinute, $this->mSecond, $this->mMonth, $this->mDate - $days, $this->mYear)); - } - - function incDay(/*int*/$days=1) { - $this->setTimestamp(@mktime($this->mHour, $this->mMinute, $this->mSecond, $this->mMonth, $this->mDate + $days, $this->mYear)); - } - - /** - * @param $format string Datetime format string - * @return string Preprocessed string with all locale-depended format - * characters replaced by localized i18n strings. - */ - function preprocessFormatString($format) { - global $i18n; - - // replace locale-dependent strings - $format = str_replace('%a', mb_substr($i18n->getWeekDayName($this->mDay), 0, 3, 'utf-8'), $format); - $format = str_replace('%A', $i18n->getWeekDayName($this->mDay), $format); - /* This block is commented out because we currently do not use these formatters. - $abbrev_month = mb_substr($i18n->monthNames[$this->mMonth], 0, 3, 'utf-8'); - $format = str_replace('%b', $abbrev_month, $format); - $format = str_replace('%h', $abbrev_month, $format); - $format = str_replace('%z', date('O'), $format); - $format = str_replace('%Z', date('O'), $format); // format as 'O' for consistency with JS strftime - if (strpos($format, '%c') !== false) { - $format = str_replace('%c', $this->preprocessFormatString('%a %d %b %Y %T %Z'), $format); - }*/ - return $format; - } - - function do_strftime($format, $timestamp = null) - { - if (!is_null($timestamp)) { - return strftime($this->preprocessFormatString($format), $timestamp); - } else { - return strftime($this->preprocessFormatString($format)); - } - } -} diff --git a/WEB-INF/lib/form/DateField.class.php b/WEB-INF/lib/form/DateField.class.php index 922e8bf5e..d349d5687 100644 --- a/WEB-INF/lib/form/DateField.class.php +++ b/WEB-INF/lib/form/DateField.class.php @@ -3,20 +3,18 @@ License: See license.txt */ import('form.TextField'); -import('DateAndTime'); +import('ttDate'); class DateField extends TextField { var $mWeekStartDay = 0; var $mDateFormat = "d/m/Y"; var $lToday = "Today"; - var $mDateObj; var $lCalendarButtons = array('today'=>'Today', 'close'=>'Close'); function __construct($name) { $this->class = 'DateField'; $this->name = $name; - $this->mDateObj = new DateAndTime(); $this->localize(); } @@ -24,8 +22,6 @@ function localize() { global $user; global $i18n; - $this->mDateObj->setFormat($user->getDateFormat()); - $this->mMonthNames = $i18n->monthNames; $this->mWeekDayShortNames = $i18n->weekdayShortNames; $this->lToday = $i18n->get('label.today'); @@ -39,15 +35,15 @@ function localize() { // set current value taken from session or database function setValueSafe($value) { if (isset($value) && (strlen($value) > 0)) { - $this->mDateObj->parseVal($value, DB_DATEFORMAT); - $this->value = $this->mDateObj->toString($this->mDateFormat); //? + $ttDate = new ttDate($value); + $this->value = $ttDate->toString($this->mDateFormat); } } // get value for storing in session or database function getValueSafe() { if (strlen($this->value)>0) { - $this->mDateObj->parseVal($this->value, $this->mDateFormat); //? - return $this->mDateObj->toString(DB_DATEFORMAT); + $ttDate = new ttDate($this->value, $this->mDateFormat); + return $ttDate->toString(); } else { return null; } diff --git a/WEB-INF/lib/ttDate.class.php b/WEB-INF/lib/ttDate.class.php index 3b798214a..25dc4874a 100644 --- a/WEB-INF/lib/ttDate.class.php +++ b/WEB-INF/lib/ttDate.class.php @@ -5,7 +5,6 @@ import('I18n'); // ttDate class is used to represent a date in Time Tracker. -// It is a planned replacement for DateAndTime class, which is problematic with php8.1. class ttDate { var $year; // year diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index 9e1827e09..3de0c94c9 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -340,11 +340,11 @@ static function loadReport(&$bean) { $bean->setAttribute('users_inactive', explode(',', $val['users'])); $bean->setAttribute('period', $val['period']); if ($val['period_start']) { - $dt = new DateAndTime(DB_DATEFORMAT, $val['period_start']); + $dt = new ttDate($val['period_start']); $bean->setAttribute('start_date', $dt->toString($user->getDateFormat())); } if ($val['period_end']) { - $dt = new DateAndTime(DB_DATEFORMAT, $val['period_end']); + $dt = new ttDate($val['period_end']); $bean->setAttribute('end_date', $dt->toString($user->getDateFormat())); } $bean->setAttribute('chclient', $val['show_client']); From 886f8979d84e84a4b67207ec512d5e794f34e455 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 15 Apr 2022 14:19:03 +0000 Subject: [PATCH 2403/2515] Fixed ttUser::getUserDetails to work on top managers in subgroups. --- WEB-INF/lib/ttUser.class.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 7114bc7c6..e0565b3dd 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -603,7 +603,7 @@ function getUserDetails($user_id) { // Determine max rank. If we are searching in on behalf group // then rank restriction does not apply. - $max_rank = $this->behalfGroup ? MAX_RANK : $this->rank; + $max_rank = $this->behalfGroup ? MAX_RANK + 1 : $this->rank; $sql = "select u.id, u.name, u.login, u.role_id, u.client_id, u.status, u.rate, u.quota_percent, u.email from tt_users u". " left join tt_roles r on (u.role_id = r.id)". diff --git a/initialize.php b/initialize.php index 17750f01b..8709beede 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5710"); +define("APP_VERSION", "1.21.5.5712"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From b292d803a1bd81bb82cff089e7d19e2786e7319a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 15 Apr 2022 16:02:52 +0000 Subject: [PATCH 2404/2515] Fixed browser_today population on time.php. --- WEB-INF/templates/time.tpl | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index b04959cfc..6f6f73942 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -122,7 +122,7 @@ function handleStop(buttonElement) { {if $time_records} - +
{$i18n.label.files} + {if $record.approved || $record.timesheet_id || $record.invoice_id}   {else} + {if ($record.duration == '0:00' && $record.start <> '')} + + {/if} {$i18n.label.edit} {/if}
diff --git a/initialize.php b/initialize.php index 8709beede..b5707136e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5712"); +define("APP_VERSION", "1.21.5.5713"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e5a3f1ce50205b3fa4b6bc1ca3570ab29e75d101 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 15 Apr 2022 18:06:47 +0000 Subject: [PATCH 2405/2515] Improved a check for browser today. --- WEB-INF/lib/common.lib.php | 16 ++++++++++++++++ expense_edit.php | 2 +- expenses.php | 2 +- initialize.php | 2 +- puncher.php | 2 +- time.php | 4 ++-- time_edit.php | 2 +- week.php | 2 +- 8 files changed, 24 insertions(+), 8 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 2d8e287d5..52d82ed36 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -308,6 +308,22 @@ function ttValidDbDateFormatDate($val) return checkdate($date_parts[1], $date_parts[2], $date_parts[0]); } +// ttValidBrowserToday is used to check browser today parameter for sanity. +function ttValidBrowserToday($val) +{ + if (!ttValidDbDateFormatDate($val)) + return false; + + // Check if browser today is after server tomorrow. + $browser_today = new ttDate($val); + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($browser_today->after($server_tomorrow)) + return false; + + return true; +} + // ttValidTime is used to check user input for time post. function ttValidTime($val) { diff --git a/expense_edit.php b/expense_edit.php index e57db88d9..0281c2cff 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -30,7 +30,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } diff --git a/expenses.php b/expenses.php index 34169b7dc..b86c34d5a 100644 --- a/expenses.php +++ b/expenses.php @@ -47,7 +47,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } diff --git a/initialize.php b/initialize.php index b5707136e..f91645a76 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5713"); +define("APP_VERSION", "1.21.5.5714"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 2b25462d3..b959dcfbc 100644 --- a/puncher.php +++ b/puncher.php @@ -24,7 +24,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } diff --git a/time.php b/time.php index faf064a4a..329203449 100644 --- a/time.php +++ b/time.php @@ -41,7 +41,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } @@ -59,7 +59,7 @@ // Validate that browser_date parameter is in correct format. $browser_date = $request->getParameter('browser_date'); - if ($browser_date && !ttValidDbDateFormatDate($browser_date)) { + if ($browser_date && !ttValidBrowserToday($browser_date)) { header('Location: access_denied.php'); exit(); } diff --git a/time_edit.php b/time_edit.php index 03c721193..ad673ffe1 100644 --- a/time_edit.php +++ b/time_edit.php @@ -27,7 +27,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } diff --git a/week.php b/week.php index 92eb95ee3..cb3a1d9f8 100644 --- a/week.php +++ b/week.php @@ -47,7 +47,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { + if ($browser_today && !ttValidBrowserToday($browser_today)) { header('Location: access_denied.php'); exit(); } From aa5adfb54c3823b3172280be5914534e98279587 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 16 Apr 2022 13:24:42 +0000 Subject: [PATCH 2406/2515] Improved handling of future entries by tolerating out of time synced browsers. --- WEB-INF/lib/common.lib.php | 16 ---------------- expense_edit.php | 6 ++++-- expenses.php | 6 ++++-- initialize.php | 2 +- puncher.php | 2 +- time.php | 8 +++++--- time_edit.php | 6 ++++-- week.php | 2 +- 8 files changed, 20 insertions(+), 28 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 52d82ed36..2d8e287d5 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -308,22 +308,6 @@ function ttValidDbDateFormatDate($val) return checkdate($date_parts[1], $date_parts[2], $date_parts[0]); } -// ttValidBrowserToday is used to check browser today parameter for sanity. -function ttValidBrowserToday($val) -{ - if (!ttValidDbDateFormatDate($val)) - return false; - - // Check if browser today is after server tomorrow. - $browser_today = new ttDate($val); - $server_tomorrow = new ttDate(); - $server_tomorrow->incrementDay(); - if ($browser_today->after($server_tomorrow)) - return false; - - return true; -} - // ttValidTime is used to check user input for time post. function ttValidTime($val) { diff --git a/expense_edit.php b/expense_edit.php index 0281c2cff..98098a19f 100644 --- a/expense_edit.php +++ b/expense_edit.php @@ -30,7 +30,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } @@ -155,7 +155,9 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { $browser_today = new ttDate($request->getParameter('browser_today', null)); - if ($new_date->after($browser_today)) + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($new_date->after($browser_today) || $new_date->after($server_tomorrow)) $err->add($i18n->get('error.future_date')); } if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); diff --git a/expenses.php b/expenses.php index b86c34d5a..ba091a63e 100644 --- a/expenses.php +++ b/expenses.php @@ -47,7 +47,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } @@ -203,7 +203,9 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { $browser_today = new ttDate($request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($selected_date->after($browser_today) || $selected_date->after($server_tomorrow)) $err->add($i18n->get('error.future_date')); } // Finished validating input data. diff --git a/initialize.php b/initialize.php index f91645a76..a67bd3444 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5714"); +define("APP_VERSION", "1.21.5.5715"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index b959dcfbc..2b25462d3 100644 --- a/puncher.php +++ b/puncher.php @@ -24,7 +24,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } diff --git a/time.php b/time.php index 329203449..766ee5fd1 100644 --- a/time.php +++ b/time.php @@ -41,7 +41,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } @@ -59,7 +59,7 @@ // Validate that browser_date parameter is in correct format. $browser_date = $request->getParameter('browser_date'); - if ($browser_date && !ttValidBrowserToday($browser_date)) { + if ($browser_date && !ttValidDbDateFormatDate($browser_date)) { header('Location: access_denied.php'); exit(); } @@ -417,7 +417,9 @@ // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { $browser_today = new ttDate($request->getParameter('browser_today', null)); - if ($selected_date->after($browser_today)) + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($selected_date->after($browser_today) || $selected_date->after($server_tomorrow)) $err->add($i18n->get('error.future_date')); } diff --git a/time_edit.php b/time_edit.php index ad673ffe1..7c3491eab 100644 --- a/time_edit.php +++ b/time_edit.php @@ -27,7 +27,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } @@ -332,7 +332,9 @@ // Prohibit creating entries in future. if ($err->no() && !$user->isOptionEnabled('future_entries')) { $browser_today = new ttDate($request->getParameter('browser_today', null)); - if ($new_date->after($browser_today)) + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($new_date->after($browser_today) || $new_date->after($server_tomorrow)) $err->add($i18n->get('error.future_date')); } diff --git a/week.php b/week.php index cb3a1d9f8..92eb95ee3 100644 --- a/week.php +++ b/week.php @@ -47,7 +47,7 @@ if ($request->isPost()) { // Validate that browser_today parameter is in correct format. $browser_today = $request->getParameter('browser_today'); - if ($browser_today && !ttValidBrowserToday($browser_today)) { + if ($browser_today && !ttValidDbDateFormatDate($browser_today)) { header('Location: access_denied.php'); exit(); } From 855e71a0b04fdc3bc449b961c56dcaa495daec3a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 16 Apr 2022 14:31:43 +0000 Subject: [PATCH 2407/2515] Cosmetic improvement to handling of future entries. --- WEB-INF/lib/ttWeekViewHelper.class.php | 4 +++- initialize.php | 2 +- puncher.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index deefd8a17..9908d12b4 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -504,7 +504,9 @@ static function insertDurationFromWeekView($fields, $custom_fields, $err) { // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries') && $fields['browser_today']) { $objBrowserToday = new ttDate($fields['browser_today']); - if ($objEntryDate->after($objBrowserToday)) { + $server_tomorrow = new ttDate(); + $server_tomorrow->incrementDay(); + if ($objEntryDate->after($objBrowserToday) || $objEntryDate->after($server_tomorrow)) { $err->add($i18n->get('error.future_date')); return false; } diff --git a/initialize.php b/initialize.php index a67bd3444..3a99f5184 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5715"); +define("APP_VERSION", "1.21.5.5716"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 2b25462d3..9714ac242 100644 --- a/puncher.php +++ b/puncher.php @@ -235,9 +235,9 @@ } // Finished validating user input. - // Prohibit creating entries in future. Tricky with a bogus browser_today data in post. + // Prohibit creating entries in future. if (!$user->isOptionEnabled('future_entries')) { - // Just check if the date we are using is after server tomorrow. + // $date_today is already browser_today, just check if the date we are using is after server tomorrow. $server_tomorrow = new ttDate(); $server_tomorrow->incrementDay(); if ($date_today->after($server_tomorrow)) From 38797d661ba091cc7fbb8f92e2a9dc4ef94f8750 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 19 Apr 2022 15:55:49 +0000 Subject: [PATCH 2408/2515] Introduced an option defining whether or not to show weekends on week view. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/week_view.tpl | 9 +++++++++ initialize.php | 2 +- week.php | 27 ++++++++++++++++++++++++++- week_view.php | 4 ++++ 34 files changed, 74 insertions(+), 2 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 7964ede5e..1326d15aa 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -243,6 +243,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Només totals', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 5b930374b..d65c6dab3 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -252,6 +252,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Pouze součty', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 9c4d6c216..3fba73805 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -236,6 +236,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Kun Total', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 2cf17c453..fe4874640 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -228,6 +228,8 @@ 'label.mark_paid' => 'Als bezahlt setzen', 'label.week_note' => 'Wochennotiz', 'label.week_list' => 'Wochenliste', +// TODO: translate the following: +// 'label.weekends' => 'Weekends', 'label.work_units' => 'Arbeitseinheiten', 'label.work_units_short' => 'Einheiten', 'label.totals_only' => 'Nur Gesamtstunden', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index bffac8f7b..5b433b0a6 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -214,6 +214,7 @@ 'label.mark_paid' => 'Mark paid', 'label.week_note' => 'Week note', 'label.week_list' => 'Week list', +'label.weekends' => 'Weekends', 'label.work_units' => 'Work units', 'label.work_units_short' => 'Units', 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 3d16d8e27..f57f5795e 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -246,6 +246,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Solo totales', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 849eff788..57b92ff3c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -244,6 +244,8 @@ 'label.mark_paid' => 'Märgi makstuks', 'label.week_note' => 'Nädala märge', 'label.week_list' => 'Nädala nimekiri', +// TODO: translate the following: +// 'label.weekends' => 'Weekends', 'label.work_units' => 'Töö ühikud', 'label.work_units_short' => 'Ühikud', 'label.totals_only' => 'Ainult summad', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index bdddffa4c..62b70671d 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -248,6 +248,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 074ee794b..fa1dd9739 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -240,6 +240,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Vain yhteissummat', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 548d6e0ce..7472ddf62 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -234,6 +234,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Totaux uniquement', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 4de8f91d2..93fb5fba5 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -229,6 +229,7 @@ 'label.week_note' => 'Σημείωση εβδομάδας', 'label.week_list' => 'Λίστα εβδομάδων', // TODO: translate the following. +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Σύνολα μόνο', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 6abbd474e..388622c2a 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -255,6 +255,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'labl.totals_only' => 'סיכומים בלבד', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index b90ffdc56..635147d8c 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -249,6 +249,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 34ca37457..55ea5deb4 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -233,6 +233,7 @@ 'label.week_note' => 'Nota settimanale', 'label.week_list' => 'Lista settimanale', // TODO: translate the following. +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Solo i totali', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 8794e2edd..0cf547754 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -252,6 +252,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => '全体だけ', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 69f6fd6ce..426484617 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -252,6 +252,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => '오직 전체만', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 012f9d148..eacfd5a17 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -209,6 +209,8 @@ 'label.mark_paid' => 'Markeer als betaald', 'label.week_note' => 'Week aantekening', 'label.week_list' => 'Week overzicht', +// TODO: translate the following. +// 'label.weekends' => 'Weekends', 'label.work_units' => 'Werk eenheid', 'label.work_units_short' => 'Eenheid', 'label.totals_only' => 'Alleen totalen', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 9ffef3209..dd92cc788 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -252,6 +252,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 430416f5b..50ac9c62d 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -241,6 +241,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Tylko sumy', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index d156ccda8..0b250d69c 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -211,6 +211,8 @@ 'label.mark_paid' => 'Marcar como pago', 'label.week_note' => 'Anotação da semana', 'label.week_list' => 'Lista da semana', +// TODO: translate the following. +// 'label.weekends' => 'Weekends', 'label.work_units' => 'Unidades de trabalho', 'label.work_units_short' => 'Unidades', 'label.totals_only' => 'Somente totais', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 4277ff18f..e7b16d92a 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -238,6 +238,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 755e2c470..b160169d4 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -250,6 +250,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Numai totaluri', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 61777ff47..f24aa6f7a 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -209,6 +209,7 @@ 'label.mark_paid' => 'Отметить оплату', 'label.week_note' => 'Комментарий недели', 'label.week_list' => 'Список недели', +'label.weekends' => 'Выходные', 'label.work_units' => 'Единицы работы', 'label.work_units_short' => 'Единицы', 'label.totals_only' => 'Только итоги', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index fb8fae3e4..ca4f0535a 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -244,6 +244,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Iba celkové', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 02e79b401..574c32f09 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -234,6 +234,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 3917fc0a1..068678867 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -240,6 +240,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', 'label.totals_only' => 'Samo zbirno', // TODO: translate the following. diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index c638d213b..9f5725b86 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -235,6 +235,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Visa endast summeringar', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c55b901e5..f8fa7dd2b 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -257,6 +257,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', 'label.totals_only' => 'Sadece toplamlar', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 2550f7589..ca1709d3b 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -245,6 +245,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 08928decc..c59a87efe 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -250,6 +250,7 @@ // 'label.mark_paid' => 'Mark paid', // 'label.week_note' => 'Week note', // 'label.week_list' => 'Week list', +// 'label.weekends' => 'Weekends', // 'label.work_units' => 'Work units', // 'label.work_units_short' => 'Units', // 'label.totals_only' => 'Totals only', diff --git a/WEB-INF/templates/week_view.tpl b/WEB-INF/templates/week_view.tpl index 3226e0c44..00e6cd1d4 100644 --- a/WEB-INF/templates/week_view.tpl +++ b/WEB-INF/templates/week_view.tpl @@ -39,6 +39,15 @@ License: See license.txt *} + + + + + +
{$forms.weekViewForm.weekends.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$forms.weekViewForm.btn_save.control}
{$forms.weekViewForm.close} diff --git a/initialize.php b/initialize.php index 3a99f5184..7b2064ad4 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.5.5716"); +define("APP_VERSION", "1.21.6.5717"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index 92eb95ee3..302e4dfb3 100644 --- a/week.php +++ b/week.php @@ -73,6 +73,7 @@ if ($showTask) $taskRequired = $user->getConfigOption('task_required'); $showWeekNote = $user->isOptionEnabled('week_note'); $showWeekNotes = $user->isOptionEnabled('week_notes'); +$showWeekends = $user->isOptionEnabled('weekends'); $recordType = $user->getRecordType(); $showStart = TYPE_START_FINISH == $recordType || TYPE_ALL == $recordType; $showFiles = $user->isPluginEnabled('at'); @@ -158,6 +159,22 @@ // Get column headers, which are day numbers in month. $dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString()); $lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString()); +// If we are not showing weekends, reduce the above arrays to 5 days only. +$weekend_start_idx = $weekend_end_idx = 0; +if (!$showWeekends) { + if (defined('WEEKEND_START_DAY')) { + $weekend_start_idx = (7 + WEEKEND_START_DAY - $weekStartDay) % 7; + $weekend_end_idx = (7 + WEEKEND_START_DAY + 1 - $weekStartDay) % 7; + } else { + $weekend_start_idx = 6 - $weekStartDay; + $weekend_end_idx = (7 - $weekStartDay) % 7; + } + unset($dayHeaders[$weekend_start_idx]); + unset($dayHeaders[$weekend_end_idx]); + unset($lockedDays[$weekend_start_idx]); + unset($lockedDays[$weekend_end_idx]); +} + // Get already existing records. $records = ttWeekViewHelper::getRecordsForInterval($startDate->toString(), $endDate->toString(), $showFiles); // Build data array for the table. Format is described in ttWeekViewHelper::getDataForWeekView function. @@ -273,8 +290,16 @@ function render(&$table, $value, $row, $column, $selected = false) { $table->setData($dataArray); // Add columns to table. $table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label'])); + + + for ($i = 0; $i < 7; $i++) { - $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); + if ($showWeekends) + $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); + else { + if ($i <> $weekend_start_idx && $i <> $weekend_end_idx) + $table->addColumn(new TableColumn($dayHeaders[$i], $dayHeaders[$i], new WeekViewCellRenderer(), $dayTotals[$dayHeaders[$i]])); + } } $table->setInteractive(false); $form->addInputElement($table); diff --git a/week_view.php b/week_view.php index 1718afd4b..7db10226a 100644 --- a/week_view.php +++ b/week_view.php @@ -18,11 +18,13 @@ $cl_week_note = (bool)$request->getParameter('week_note'); $cl_week_list = (bool)$request->getParameter('week_list'); $cl_notes = (bool)$request->getParameter('notes'); + $cl_weekends = (bool)$request->getParameter('weekends'); } else { $cl_week_menu = $config->getDefinedValue('week_menu'); $cl_week_note = $config->getDefinedValue('week_note'); $cl_week_list = $config->getDefinedValue('week_list'); $cl_notes = $config->getDefinedValue('week_notes'); + $cl_weekends = $config->getDefinedValue('weekends'); } $form = new Form('weekViewForm'); @@ -30,6 +32,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'week_note','value'=>$cl_week_note)); $form->addInput(array('type'=>'checkbox','name'=>'week_list','value'=>$cl_week_list)); $form->addInput(array('type'=>'checkbox','name'=>'notes','value'=>$cl_notes)); +$form->addInput(array('type'=>'checkbox','name'=>'weekends','value'=>$cl_weekends)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ @@ -38,6 +41,7 @@ $config->setDefinedValue('week_note', $cl_week_note); $config->setDefinedValue('week_list', $cl_week_list); $config->setDefinedValue('week_notes', $cl_notes); + $config->setDefinedValue('weekends', $cl_weekends); if (!$user->updateGroup(array('config' => $config->getConfig()))) { $err->add($i18n->get('error.db')); } From f3ecd48c47df8af907cb46dec59cdd62793535e6 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 19 Apr 2022 16:00:27 +0000 Subject: [PATCH 2409/2515] Fixed label in html. --- WEB-INF/templates/week_view.tpl | 4 ++-- initialize.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/week_view.tpl b/WEB-INF/templates/week_view.tpl index 00e6cd1d4..9cd7b90a2 100644 --- a/WEB-INF/templates/week_view.tpl +++ b/WEB-INF/templates/week_view.tpl @@ -39,9 +39,9 @@ License: See license.txt *}
{$forms.weekViewForm.weekends.control} {$i18n.label.what_is_it} {$i18n.label.what_is_it} diff --git a/initialize.php b/initialize.php index 7b2064ad4..89c734ad6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.6.5717"); +define("APP_VERSION", "1.21.6.5718"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From dcfeafbc71bb9e1329f997bfc7e7b42050174453 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 26 Apr 2022 15:52:14 +0000 Subject: [PATCH 2410/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index eacfd5a17..949a3ac83 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -209,8 +209,7 @@ 'label.mark_paid' => 'Markeer als betaald', 'label.week_note' => 'Week aantekening', 'label.week_list' => 'Week overzicht', -// TODO: translate the following. -// 'label.weekends' => 'Weekends', +'label.weekends' => 'Weekeinden', 'label.work_units' => 'Werk eenheid', 'label.work_units_short' => 'Eenheid', 'label.totals_only' => 'Alleen totalen', diff --git a/initialize.php b/initialize.php index 89c734ad6..53810201d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.6.5718"); +define("APP_VERSION", "1.21.6.5719"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 761d451e6382b59fd96f133b5c9dc9cca3ccb753 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 30 Jun 2022 14:00:35 +0000 Subject: [PATCH 2411/2515] Starting to work on filtering by notes in reports. --- WEB-INF/resources/ca.lang.php | 2 ++ WEB-INF/resources/cs.lang.php | 2 ++ WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 2 ++ WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 2 ++ WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 2 ++ WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 2 ++ WEB-INF/resources/ko.lang.php | 2 ++ WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 2 ++ WEB-INF/resources/ro.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 2 ++ WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/resources/tr.lang.php | 2 ++ WEB-INF/resources/zh-cn.lang.php | 2 ++ WEB-INF/resources/zh-tw.lang.php | 2 ++ WEB-INF/templates/reports.tpl | 8 ++++++++ reports.php | 5 +++++ 32 files changed, 69 insertions(+) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 1326d15aa..f2eec1b5a 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -474,6 +474,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Seleccionar període de temps', 'form.reports.set_period' => 'o establir dates', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Mostrar camps', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index d65c6dab3..8573d71c2 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -482,6 +482,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Výberte období', 'form.reports.set_period' => 'nebo určete dny', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Zobrazit pole', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 3fba73805..dd1abd396 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -459,6 +459,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Vælg en periode', 'form.reports.set_period' => 'eller sæt datoer', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Vis felter', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index fe4874640..e295e7281 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -442,6 +442,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Zeitraum auswählen', 'form.reports.set_period' => 'oder Datum eingeben', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Felder anzeigen', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 5b433b0a6..5df99c403 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -425,6 +425,7 @@ 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Select time period', 'form.reports.set_period' => 'or set dates', +'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Show fields', 'form.reports.time_fields' => 'Time fields', 'form.reports.user_fields' => 'User fields', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index f57f5795e..7c59d3ae5 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -487,6 +487,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Seleccionar período de tiempo', 'form.reports.set_period' => 'o establecer fechas', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Mostrar campos', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 57b92ff3c..7a53024b7 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -472,6 +472,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Vali ajaperiood', 'form.reports.set_period' => 'või märgi kuupäevad', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Näita välju', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 62b70671d..2963414ee 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -480,6 +480,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'انتخاب بازه زمانی', 'form.reports.set_period' => 'یا تعیین تاریخ', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'نمایش فیلدها', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index fa1dd9739..112dc6b6a 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -465,6 +465,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Valitse ajanjakso', 'form.reports.set_period' => 'tai aseta päivät', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Näytä kentät', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 7472ddf62..a1268d1a7 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -456,6 +456,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Sélectionner la période de temps', 'form.reports.set_period' => 'ou dates indiquées', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Afficher les champs', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 93fb5fba5..9f1bf5d93 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -451,6 +451,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Επιλογή χρονικής περιόδου', 'form.reports.set_period' => 'ή εύρος ημερομηνιών', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Εμφάνιση πεδίων', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 388622c2a..3167fd8d9 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -483,6 +483,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'בחר תקופת זמן', 'form.reports.set_period' => 'או הגדר תאריכים', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'הראה שדות', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 635147d8c..636c29d07 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -478,6 +478,7 @@ 'form.reports.select_period' => 'Jelölj meg egy időszakot', 'form.reports.set_period' => 'vagy állíts be konkrét dátumot', // TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 55ea5deb4..d517fdede 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -464,6 +464,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Seleziona il periodo di tempo', 'form.reports.set_period' => 'oppure setta le date', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Mostra i campi', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 0cf547754..59500e015 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -482,6 +482,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => '時間期間の選択', 'form.reports.set_period' => 'あるいは日付を設定', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'フィールドの表示', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 426484617..e2f16ccec 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -480,6 +480,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => '시간 기간을 선택', 'form.reports.set_period' => '혹은 날짜를 설정', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => '필드들을 보기', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 949a3ac83..9f846bc5f 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -411,6 +411,8 @@ 'form.reports.include_pending' => 'in afwachting', 'form.reports.select_period' => 'Kies periode', 'form.reports.set_period' => 'of stel datums in', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Toon velden', 'form.reports.time_fields' => 'Tijd velden', 'form.reports.user_fields' => 'Medewerker velden', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index dd92cc788..cba06a82f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -482,6 +482,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Velg tidsperiode', 'form.reports.set_period' => 'eller sett dato', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Vis feltene', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 50ac9c62d..3470add1b 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -467,6 +467,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Wybierz okres', 'form.reports.set_period' => 'lub ustaw daty', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Pokaż pola', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 0b250d69c..60d505762 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -414,6 +414,8 @@ 'form.reports.include_pending' => 'pendente', 'form.reports.select_period' => 'Selecione o período de tempo', 'form.reports.set_period' => 'ou selecionar datas', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Exibir campos', 'form.reports.time_fields' => 'Campos de tempo', 'form.reports.user_fields' => 'Campos de usuário', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index e7b16d92a..d5a4413a2 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -459,6 +459,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Selecione o período de tempo', 'form.reports.set_period' => 'ou selecionar datas', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Exibir campos', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index b160169d4..f450bfd4e 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -482,6 +482,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Alege perioada', 'form.reports.set_period' => 'sau introdu intervalul de date', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Arata campuri', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index f24aa6f7a..47f87d496 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -412,6 +412,7 @@ 'form.reports.include_pending' => 'в ожидании', 'form.reports.select_period' => 'Выберите интервал времени', 'form.reports.set_period' => 'или укажите даты', +'form.reports.note_containing' => 'Комментарий содержит', 'form.reports.show_fields' => 'Показывать поля', 'form.reports.time_fields' => 'Поля времени', 'form.reports.user_fields' => 'Поля пользователя', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index ca4f0535a..1909ec9d1 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -470,6 +470,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Vyberte časový rozsah', 'form.reports.set_period' => 'alebo nastavte dátumy', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Zobraziť polia', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 574c32f09..304da23a0 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -456,6 +456,7 @@ // 'form.reports.include_pending' => 'pending', // 'form.reports.select_period' => 'Select time period', // 'form.reports.set_period' => 'or set dates', +// 'form.reports.note_containing' => 'Note containing', // 'form.reports.show_fields' => 'Show fields', // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 068678867..d1fb802e8 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -467,6 +467,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Odaberi vremenski raspon', 'form.reports.set_period' => 'ili podesi datum', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Prikaži polja u izveštaju', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 9f5725b86..1df983ecc 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -465,6 +465,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Välj intervall', 'form.reports.set_period' => 'eller ställ in datum', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Visa fält', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index f8fa7dd2b..c6fe800a6 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -493,6 +493,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => 'Zaman aralığını seç', 'form.reports.set_period' => 'ya da tarihleri belirle', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => 'Alanları göster', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index ca1709d3b..5b701c851 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -471,6 +471,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => '选择时间段', 'form.reports.set_period' => '或设定日期', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => '显示栏目', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index c59a87efe..14ef3c269 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -474,6 +474,8 @@ // 'form.reports.include_pending' => 'pending', 'form.reports.select_period' => '選擇時間段', 'form.reports.set_period' => '或設定日期', +// TODO: translate the following. +// 'form.reports.note_containing' => 'Note containing', 'form.reports.show_fields' => '顯示欄目', // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index aa8e9d633..d2dfcb475 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -358,6 +358,14 @@ License: See license.txt *}
{$forms.reportForm.notes_containing.control}
diff --git a/reports.php b/reports.php index 858ca61cb..8cf3736b1 100644 --- a/reports.php +++ b/reports.php @@ -239,6 +239,11 @@ $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start_date')); $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date')); +// Add control for notes containing. +if (isTrue('FILTER_BY_NOTES_DEBUG')) { + $form->addInput(array('type'=>'text','maxlength'=>'256','name'=>'notes_containing')); +} + // Add checkboxes for "Show fields" block. if ($showClient) $form->addInput(array('type'=>'checkbox','name'=>'chclient')); From a18e57436cb9170c22c6de7128053113913e289e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 6 Jul 2022 19:19:56 +0000 Subject: [PATCH 2412/2515] Initial implementation of report filter by notes. --- WEB-INF/lib/ttFavReportHelper.class.php | 7 +++++-- WEB-INF/lib/ttReportHelper.class.php | 17 +++++++++++++++-- WEB-INF/templates/reports.tpl | 6 +++--- dbinstall.php | 9 +++++---- initialize.php | 2 +- mysql.sql | 3 ++- reports.php | 2 +- 7 files changed, 32 insertions(+), 14 deletions(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index 3de0c94c9..df756649e 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -98,7 +98,7 @@ static function insertReport($fields) { $sql = "insert into tt_fav_reports". " (name, user_id, group_id, org_id, report_spec, client_id, project_id, task_id,". - " billable, approved, invoice, timesheet, paid_status, users, period, period_start,". + " billable, approved, invoice, timesheet, paid_status, note_containing, users, period, period_start,". " period_end, show_client, show_invoice, show_paid, show_ip,". " show_project, show_timesheet, show_start, show_duration, show_cost,". " show_task, show_end, show_note, show_approved, show_work_units,". @@ -110,7 +110,7 @@ static function insertReport($fields) { $mdb2->quote($fields['project']).", ".$mdb2->quote($fields['task']).", ". $mdb2->quote($fields['billable']).", ".$mdb2->quote($fields['approved']).", ". $mdb2->quote($fields['invoice']).", ".$mdb2->quote($fields['timesheet']).", ". - $mdb2->quote($fields['paid_status']).", ". + $mdb2->quote($fields['paid_status']).", ".$mdb2->quote($fields['note_containing']).",". $mdb2->quote($fields['users']).", ".$mdb2->quote($fields['period']).", ". $mdb2->quote($fields['from']).", ".$mdb2->quote($fields['to']).", ". $fields['chclient'].", ".$fields['chinvoice'].", ".$fields['chpaid'].", ".$fields['chip'].", ". @@ -146,6 +146,7 @@ static function updateReport($fields) { "invoice = ".$mdb2->quote($fields['invoice']).", ". "timesheet = ".$mdb2->quote($fields['timesheet']).", ". "paid_status = ".$mdb2->quote($fields['paid_status']).", ". + "note_containing = ".$mdb2->quote($fields['note_containing']).", ". "users = ".$mdb2->quote($fields['users']).", ". "period = ".$mdb2->quote($fields['period']).", ". "period_start = ".$mdb2->quote($fields['from']).", ". @@ -233,6 +234,7 @@ static function saveReport($bean) { 'paid_status'=>$bean->getAttribute('paid_status'), 'invoice'=>$bean->getAttribute('invoice'), 'timesheet'=>$bean->getAttribute('timesheet'), + 'note_containing'=>$bean->getAttribute('note_containing'), 'users'=>$users, 'period'=>$bean->getAttribute('period'), 'from'=>$from, @@ -336,6 +338,7 @@ static function loadReport(&$bean) { $bean->setAttribute('invoice', $val['invoice']); $bean->setAttribute('paid_status', $val['paid_status']); $bean->setAttribute('timesheet', $val['timesheet']); + $bean->setAttribute('note_containing', $val['note_containing']); $bean->setAttribute('users_active', explode(',', $val['users'])); $bean->setAttribute('users_inactive', explode(',', $val['users'])); $bean->setAttribute('period', $val['period']); diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 693fe6521..45b6ec1b6 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -116,6 +116,12 @@ static function getWhere($options) { $user_list_part = " and l.user_id = ".$user->getUser(); $user_list_part .= " and l.group_id = $group_id and l.org_id = $org_id"; + // Prepare part for note_containing using LIKE operator. + $note_containing_part = ''; + if (isset($options['note_containing']) && !empty($options['note_containing'])) { + $note_containing_part = " and l.comment like ".$mdb2->quote('%'.$options['note_containing'].'%'); + } + // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); if (isset($options['period']) && $options['period']) @@ -127,7 +133,7 @@ static function getWhere($options) { new ttDate($options['period_end'], $dateFormat)); } $where = " where l.status = 1 and l.date >= '".$period->getStartDate()."' and l.date <= '".$period->getEndDate()."'". - " $user_list_part $dropdown_parts $cf_text_parts"; + $user_list_part.$dropdown_parts.$cf_text_parts.$note_containing_part; return $where; } @@ -198,6 +204,12 @@ static function getExpenseWhere($options) { $user_list_part = " and ei.user_id = ".$user->getUser(); $user_list_part .= " and ei.group_id = $group_id and ei.org_id = $org_id"; + // Prepare part for note_containing using LIKE operator. + $note_containing_part = ''; + if (isset($options['note_containing']) && !empty($options['note_containing'])) { + $note_containing_part = " and ei.name like ".$mdb2->quote('%'.$options['note_containing'].'%'); + } + // Prepare sql query part for where. $dateFormat = $user->getDateFormat(); if (isset($options['period']) && $options['period']) @@ -209,7 +221,7 @@ static function getExpenseWhere($options) { new ttDate($options['period_end'], $dateFormat)); } $where = " where ei.status = 1 and ei.date >= '".$period->getStartDate()."' and ei.date <= '".$period->getEndDate()."'". - " $user_list_part $dropdown_parts $cf_text_parts"; + $user_list_part.$dropdown_parts.$cf_text_parts.$note_containing_part; return $where; } @@ -1541,6 +1553,7 @@ static function getReportOptions($bean) { $options['period'] = $bean->getAttribute('period'); $options['period_start'] = $bean->getAttribute('start_date'); $options['period_end'] = $bean->getAttribute('end_date'); + $options['note_containing'] = $bean->getAttribute('note_containing'); $options['show_client'] = $bean->getAttribute('chclient'); $options['show_invoice'] = $bean->getAttribute('chinvoice'); $options['show_approved'] = $bean->getAttribute('chapproved'); diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index d2dfcb475..3edec9d82 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -359,10 +359,10 @@ License: See license.txt *} {/if} {if isTrue('FILTER_BY_NOTES_DEBUG')} - + - - + + {/if} diff --git a/dbinstall.php b/dbinstall.php index f8e1b9362..bc0db6a0d 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1151,7 +1151,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to12102"]) { + if ($_POST["convert11900to12107"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1197,6 +1197,7 @@ function ttGenerateKeys() { ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, ',manage_work', '')"); ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, ',update_work', '')"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.2', modified = now() where param_name = 'version_db' and param_value = '1.21.0'"); + ttExecute("ALTER TABLE tt_fav_reports ADD COLUMN `note_containing` varchar(80) default NULL after `paid_status`"); } if ($_POST["cleanup"]) { @@ -1247,7 +1248,7 @@ function ttGenerateKeys() {

DB Install

{$forms.reportForm.notes_containing.control}{$forms.reportForm.note_containing.control}
-
Create database structure (v1.21.2) + Create database structure (v1.21.7)
(applies only to new installations, do not execute when updating)
@@ -1296,8 +1297,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.21.2)Update database structure (v1.19 to v1.21.7)
diff --git a/initialize.php b/initialize.php index 53810201d..7ab839782 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.6.5719"); +define("APP_VERSION", "1.21.7.5720"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index 0856f94a0..4fd33fa95 100644 --- a/mysql.sql +++ b/mysql.sql @@ -273,6 +273,7 @@ CREATE TABLE `tt_fav_reports` ( `invoice` tinyint(4) default NULL, # whether to include invoiced, not invoiced, or all records `timesheet` tinyint(4) default NULL, # include records with a specific timesheet status, or all records `paid_status` tinyint(4) default NULL, # whether to include paid, not paid, or all records + `note_containing` varchar(80) default NULL, # include only records with notes containing this text `users` text default NULL, # Comma-separated list of user ids. Nothing here means "all" users. `period` tinyint(4) default NULL, # selected period type for report `period_start` date default NULL, # period start @@ -621,4 +622,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.2', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.7', now()); # TODO: change when structure changes. diff --git a/reports.php b/reports.php index 8cf3736b1..0dbc79a8d 100644 --- a/reports.php +++ b/reports.php @@ -241,7 +241,7 @@ // Add control for notes containing. if (isTrue('FILTER_BY_NOTES_DEBUG')) { - $form->addInput(array('type'=>'text','maxlength'=>'256','name'=>'notes_containing')); + $form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'note_containing')); } // Add checkboxes for "Show fields" block. From d50ff284a5dcb55e3fd276f5499ef05a700a41a7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 8 Jul 2022 15:56:44 +0000 Subject: [PATCH 2413/2515] Removed FILTER_BY_NOTES_DEBUG condition. --- WEB-INF/templates/reports.tpl | 2 -- dbinstall.php | 1 + initialize.php | 2 +- reports.php | 4 +--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 3edec9d82..51c98212c 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -358,14 +358,12 @@ License: See license.txt *}
{$forms.reportForm.note_containing.control}
diff --git a/dbinstall.php b/dbinstall.php index bc0db6a0d..85d3f021a 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1198,6 +1198,7 @@ function ttGenerateKeys() { ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.21.0') set rights = replace(rights, ',update_work', '')"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.2', modified = now() where param_name = 'version_db' and param_value = '1.21.0'"); ttExecute("ALTER TABLE tt_fav_reports ADD COLUMN `note_containing` varchar(80) default NULL after `paid_status`"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.7', modified = now() where param_name = 'version_db' and param_value = '1.21.2'"); } if ($_POST["cleanup"]) { diff --git a/initialize.php b/initialize.php index 7ab839782..0eb176f01 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.7.5720"); +define("APP_VERSION", "1.21.7.5721"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 0dbc79a8d..65aba65d9 100644 --- a/reports.php +++ b/reports.php @@ -240,9 +240,7 @@ $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date')); // Add control for notes containing. -if (isTrue('FILTER_BY_NOTES_DEBUG')) { - $form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'note_containing')); -} +$form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'note_containing')); // Add checkboxes for "Show fields" block. if ($showClient) From 01bb80be971ad6c7d685c88c9da0150060eb4ff0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 8 Jul 2022 16:11:18 +0000 Subject: [PATCH 2414/2515] Fixed export / import for note_containing in fav reports. --- WEB-INF/lib/ttGroupExportHelper.class.php | 1 + WEB-INF/lib/ttOrgExportHelper.class.php | 28 ++--------------------- WEB-INF/lib/ttOrgImportHelper.class.php | 5 ++-- initialize.php | 2 +- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index a464f2e25..b7b6491e5 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -566,6 +566,7 @@ function writeData() { $fav_report_part .= " invoice=\"".$fav_report['invoice']."\""; $fav_report_part .= " timesheet=\"".$fav_report['timesheet']."\""; $fav_report_part .= " paid_status=\"".$fav_report['paid_status']."\""; + $fav_report_part .= " note_containing=\"".$fav_report['note_containing']."\""; $fav_report_part .= " users=\"".$user_list."\""; $fav_report_part .= " period=\"".$fav_report['period']."\""; $fav_report_part .= " period_start=\"".$fav_report['period_start']."\""; diff --git a/WEB-INF/lib/ttOrgExportHelper.class.php b/WEB-INF/lib/ttOrgExportHelper.class.php index 277eac3ab..9380231e4 100644 --- a/WEB-INF/lib/ttOrgExportHelper.class.php +++ b/WEB-INF/lib/ttOrgExportHelper.class.php @@ -1,30 +1,6 @@ $attrs['INVOICE'], 'timesheet' => $attrs['TIMESHEET'], 'paid_status' => $attrs['PAID_STATUS'], + 'note_containing' => $attrs['NOTE_CONTAINING'], 'users' => $user_list, 'period' => $attrs['PERIOD'], 'from' => $attrs['PERIOD_START'], @@ -1049,7 +1050,7 @@ private function insertFavReport($fields) { $sql = "insert into tt_fav_reports". " (name, user_id, group_id, org_id, report_spec, client_id, project_id, task_id,". - " billable, approved, invoice, timesheet, paid_status, users, period, period_start, period_end,". + " billable, approved, invoice, timesheet, paid_status, note_containing, users, period, period_start, period_end,". " show_client, show_invoice, show_paid, show_ip,". " show_project, show_timesheet, show_start, show_duration, show_cost,". " show_task, show_end, show_note, show_approved, show_work_units,". @@ -1060,7 +1061,7 @@ private function insertFavReport($fields) { $mdb2->quote($fields['project']).", ".$mdb2->quote($fields['task']).", ". $mdb2->quote($fields['billable']).", ".$mdb2->quote($fields['approved']).", ". $mdb2->quote($fields['invoice']).", ".$mdb2->quote($fields['timesheet']).", ". - $mdb2->quote($fields['paid_status']).", ". + $mdb2->quote($fields['paid_status']).", ".$mdb2->quote($fields['note_containing']).", ". $mdb2->quote($fields['users']).", ".$mdb2->quote($fields['period']).", ". $mdb2->quote($fields['from']).", ".$mdb2->quote($fields['to']).", ". $fields['chclient'].", ".$fields['chinvoice'].", ".$fields['chpaid'].", ".$fields['chip'].", ". diff --git a/initialize.php b/initialize.php index 0eb176f01..183c62f99 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.7.5721"); +define("APP_VERSION", "1.21.7.5722"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 821535bfa70fae447bede1c617e375458dd31751 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Aug 2022 13:45:10 +0000 Subject: [PATCH 2415/2515] Resolved a few compatibility issues with php8. --- WEB-INF/lib/ttOrgImportHelper.class.php | 6 ++++-- initialize.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index 61ed9ec78..92ba6276f 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -167,6 +167,7 @@ function startElement($parser, $name, $attrs) { // We get here when processing tags for the current group. // Prepare a list of task ids. + $mapped_tasks = null; if ($attrs['TASKS']) { $tasks = explode(',', $attrs['TASKS']); foreach ($tasks as $id) @@ -193,6 +194,7 @@ function startElement($parser, $name, $attrs) { // We get here when processing tags for the current group. // Prepare a list of project ids. + $mapped_projects = array(); if ($attrs['PROJECTS']) { $projects = explode(',', $attrs['PROJECTS']); foreach ($projects as $id) @@ -218,7 +220,6 @@ function startElement($parser, $name, $attrs) { if ($name == 'USER') { // We get here when processing tags for the current group. - $role_id = $attrs['ROLE_ID'] === '0' ? $this->top_role_id : $this->currentGroupRoleMap[$attrs['ROLE_ID']]; // 0 (not null) means top manager role. $user_id = $this->insertUser(array( @@ -899,7 +900,7 @@ private function insertProject($fields) $org_id = (int) $fields['org_id']; $name = $fields['name']; $description = $fields['description']; - $tasks = $fields['tasks']; + $tasks = isset($fields['tasks']) ? $fields['tasks'] : array(); $comma_separated = implode(',', $tasks); // This is a comma-separated list of associated task ids. $status = $fields['status']; @@ -1014,6 +1015,7 @@ private function insertClient($fields) $address = $fields['address']; $tax = $fields['tax']; $projects = $fields['projects']; + $comma_separated = null; if ($projects) $comma_separated = implode(',', $projects); // This is a comma-separated list of associated projects ids. $status = $fields['status']; diff --git a/initialize.php b/initialize.php index 183c62f99..f16a12b24 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.7.5722"); +define("APP_VERSION", "1.21.8.5723"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 8392a26f00e6303095a2ff06680f054ea4fb431f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 20 Aug 2022 14:22:15 +0000 Subject: [PATCH 2416/2515] Fixed a bug in export-import. --- WEB-INF/lib/ttGroupExportHelper.class.php | 1 + WEB-INF/lib/ttOrgImportHelper.class.php | 8 +++++--- initialize.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index b7b6491e5..fb0f60025 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -424,6 +424,7 @@ function writeData() { $custom_field_option_part = $this->indentation.' '."customFieldOptionMap[$option['id']]."\""; $custom_field_option_part .= " field_id=\"".$this->customFieldMap[$option['field_id']]."\""; $custom_field_option_part .= " value=\"".htmlspecialchars($option['value'])."\""; + $custom_field_option_part .= " status=\"".$option['status']."\""; $custom_field_option_part .= ">\n"; fwrite($this->file, $custom_field_option_part); } diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index 92ba6276f..aae3267c9 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -349,7 +349,8 @@ function startElement($parser, $name, $attrs) { 'group_id' => $this->current_group_id, 'org_id' => $this->org_id, 'field_id' => $this->currentGroupCustomFieldMap[$attrs['FIELD_ID']], - 'value' => $attrs['VALUE'])); + 'value' => $attrs['VALUE'], + 'status' => $attrs['STATUS'])); if ($custom_field_option_id) { // Add a mapping. $this->currentGroupCustomFieldOptionMap[$attrs['ID']] = $custom_field_option_id; @@ -1153,9 +1154,10 @@ private function insertCustomFieldOption($fields) { $org_id = (int) $fields['org_id']; $field_id = (int) $fields['field_id']; $value = $fields['value']; + $status = $fields['status']; - $sql = "insert into tt_custom_field_options (group_id, org_id, field_id, value)". - " values ($group_id, $org_id, $field_id, ".$mdb2->quote($value).")"; + $sql = "insert into tt_custom_field_options (group_id, org_id, field_id, value, status)". + " values ($group_id, $org_id, $field_id, ".$mdb2->quote($value).", ".$mdb2->quote($status).")"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/initialize.php b/initialize.php index f16a12b24..073178888 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.8.5723"); +define("APP_VERSION", "1.21.9.5724"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a3ec5e331f92641bb774b6f0310303d3043023be Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 16 Sep 2022 13:02:36 +0000 Subject: [PATCH 2417/2515] Fixed a JavaScript error condition (issue #128). --- WEB-INF/templates/user_edit.tpl | 6 +++++- initialize.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/user_edit.tpl b/WEB-INF/templates/user_edit.tpl index 744e8c40e..e4d916a5c 100644 --- a/WEB-INF/templates/user_edit.tpl +++ b/WEB-INF/templates/user_edit.tpl @@ -57,7 +57,11 @@ function setRate(element) { // handleClientRole - manages visibility and content of controls related to client role, // also hides and unselects projects when client role is selected. function handleClientRole() { - var selectedRoleId = document.getElementById("role").value; + var roleControl = document.getElementById("role"); + if (roleControl == null) { + return; // Role control not available, nothing to do... + } + var selectedRoleId = roleControl.value; var clientControl = document.getElementById("client"); var clientBlock = document.getElementById("client_block"); var nonClientBlock = document.getElementById("non_client_block"); diff --git a/initialize.php b/initialize.php index 073178888..c5cb7fe3d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5724"); +define("APP_VERSION", "1.21.9.5725"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 20ec9b24e53bc00b14241c6041dbd6c0f1fb0666 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Sep 2022 20:51:28 +0000 Subject: [PATCH 2418/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 9f846bc5f..2e87007cd 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -411,8 +411,7 @@ 'form.reports.include_pending' => 'in afwachting', 'form.reports.select_period' => 'Kies periode', 'form.reports.set_period' => 'of stel datums in', -// TODO: translate the following. -// 'form.reports.note_containing' => 'Note containing', +'form.reports.note_containing' => 'Notitie bevat', 'form.reports.show_fields' => 'Toon velden', 'form.reports.time_fields' => 'Tijd velden', 'form.reports.user_fields' => 'Medewerker velden', diff --git a/initialize.php b/initialize.php index c5cb7fe3d..92a3f3134 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5725"); +define("APP_VERSION", "1.21.9.5726"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 491f6c4a35c723ab7e6ddd58c0065166dcfff25d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 17 Oct 2022 15:17:19 +0000 Subject: [PATCH 2419/2515] Starting to implement cost per hour column on reports. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 1 + WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/display_options.tpl | 10 ++++++++++ display_options.php | 4 ++++ initialize.php | 2 +- 33 files changed, 46 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index f2eec1b5a..ae5a1df73 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -677,5 +677,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 8573d71c2..18c04aa69 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -689,5 +689,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index dd1abd396..9e4a61c96 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -655,5 +655,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index e295e7281..a2e730ddf 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -630,5 +630,6 @@ // TODO: translate the following. // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 5df99c403..f55cef6f3 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -601,5 +601,6 @@ 'form.display_options.note_on_separate_row' => 'Note on separate row', 'form.display_options.not_complete_days' => 'Not complete days', 'form.display_options.inactive_projects' => 'Inactive projects', +'form.display_options.cost_per_hour' => 'Cost per hour', 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 7c59d3ae5..b7ec4116c 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -692,5 +692,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 7a53024b7..0b2fd1d8c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -665,5 +665,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 2963414ee..ec3dfe6d6 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -678,5 +678,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 112dc6b6a..28033da2a 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -662,5 +662,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index a1268d1a7..20bc298f0 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -651,5 +651,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 9f1bf5d93..db2aa859e 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -644,5 +644,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 3167fd8d9..ef6e20f35 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -683,5 +683,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 636c29d07..5987b8850 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -680,5 +680,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index d517fdede..63c2ada5d 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -657,5 +657,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 59500e015..5e7070b1b 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -684,5 +684,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index e2f16ccec..a4ea97c23 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -682,5 +682,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 2e87007cd..73265f98d 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -586,5 +586,7 @@ 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', // Translator (Henk) comment: "kolom is the right word in Dutch." 'form.display_options.not_complete_days' => 'Niet complete dagen', 'form.display_options.inactive_projects' => 'Niet actieve projecten', +// TODO: translate the following. +// 'form.display_options.cost_per_hour' => 'Cost per hour', 'form.display_options.custom_css' => 'Aangepaste CSS', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index cba06a82f..8e3c4c888 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -684,5 +684,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 3470add1b..bf04ee74f 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -663,5 +663,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 60d505762..36dca948c 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -594,6 +594,7 @@ 'form.display_options.not_complete_days' => 'Dias não completos', // TODO: translate the following. // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', 'form.display_options.custom_css' => 'CSS customizado', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d5a4413a2..cce36ad07 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -662,5 +662,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index f450bfd4e..03e7a992e 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -685,5 +685,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 47f87d496..5a037b846 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -587,5 +587,6 @@ 'form.display_options.note_on_separate_row' => 'Комментарий в отдельном ряду', 'form.display_options.not_complete_days' => 'Незавершенные дни', 'form.display_options.inactive_projects' => 'Неактивные проекты', +'form.display_options.cost_per_hour' => 'Стоимость за час', 'form.display_options.custom_css' => 'Пользовательская CSS', ); diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 1909ec9d1..c3ad4da53 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -667,5 +667,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 304da23a0..04e709748 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -657,5 +657,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index d1fb802e8..9823f810e 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -665,5 +665,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 1df983ecc..4250318c2 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -663,5 +663,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index c6fe800a6..32838159e 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -698,5 +698,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 5b701c851..967a172ef 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -673,5 +673,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 14ef3c269..2fd31a762 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -676,5 +676,6 @@ // 'form.display_options.note_on_separate_row' => 'Note on separate row', // 'form.display_options.not_complete_days' => 'Not complete days', // 'form.display_options.inactive_projects' => 'Inactive projects', +// 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', ); diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index 6486c0b25..c09a18e9b 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -49,6 +49,16 @@ License: See license.txt *} {$i18n.label.what_is_it} +{if defined('REPORT_COST_PER_HOUR')} + + + + + +{/if} diff --git a/display_options.php b/display_options.php index 6e0ccc548..e449c3c91 100644 --- a/display_options.php +++ b/display_options.php @@ -21,6 +21,7 @@ $cl_record_custom_fields = (bool)$request->getParameter('record_custom_fields'); $cl_report_note_on_separate_row = (bool)$request->getParameter('report_note_on_separate_row'); $cl_report_inactive_projects = (bool)($request->getParameter('report_inactive_projects')); + $cl_report_cost_per_hour = (bool)$request->getParameter('report_cost_per_hour'); $cl_custom_css = trim($request->getParameter('custom_css')); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); @@ -28,6 +29,7 @@ $cl_record_custom_fields = $config->getDefinedValue('record_custom_fields'); $cl_report_note_on_separate_row = $config->getDefinedValue('report_note_on_separate_row'); $cl_report_inactive_projects = $config->getDefinedValue('report_inactive_projects'); + $cl_report_cost_per_hour = $config->getDefinedValue('report_cost_per_hour'); $cl_custom_css = $user->getCustomCss(); } @@ -49,6 +51,7 @@ // Reports. $form->addInput(array('type'=>'checkbox','name'=>'report_note_on_separate_row','value'=>$cl_report_note_on_separate_row)); $form->addInput(array('type'=>'checkbox','name'=>'report_inactive_projects','value'=>$cl_report_inactive_projects)); +$form->addInput(array('type'=>'checkbox','name'=>'report_cost_per_hour','value'=>$cl_report_cost_per_hour)); // TODO: add PDF break controller here. $form->addInput(array('type'=>'textarea','name'=>'custom_css','value'=>$cl_custom_css)); @@ -66,6 +69,7 @@ $config->setDefinedValue('record_custom_fields', $cl_record_custom_fields); $config->setDefinedValue('report_note_on_separate_row', $cl_report_note_on_separate_row); $config->setDefinedValue('report_inactive_projects', $cl_report_inactive_projects); + $config->setDefinedValue('report_cost_per_hour', $cl_report_cost_per_hour); if ($user->updateGroup(array( 'config' => $config->getConfig(), 'custom_css' => $cl_custom_css))) { diff --git a/initialize.php b/initialize.php index 92a3f3134..86aad8046 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5726"); +define("APP_VERSION", "1.21.9.5727"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 69de200456a6ad941f2a268f2efb406512b3973e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 17 Oct 2022 18:50:39 +0000 Subject: [PATCH 2420/2515] Work in progress on including cost per hour in reports. --- WEB-INF/lib/ttReportHelper.class.php | 13 ++++++-- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 2 ++ WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 2 ++ WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/puncher.tpl | 2 +- WEB-INF/templates/report.tpl | 45 ++++++++++++++++++---------- WEB-INF/templates/time.tpl | 2 +- WEB-INF/templates/week.tpl | 2 +- report.php | 8 ++++- 36 files changed, 87 insertions(+), 21 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 45b6ec1b6..d15d1e9bf 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -333,12 +333,19 @@ static function getItems($options) { // Handle cost. $includeCost = $options['show_cost']; if ($includeCost) { - if (MODE_TIME == $trackingMode) + $includeCostPerHour = $user->getConfigOption('report_cost_per_hour'); + if (MODE_TIME == $trackingMode) { + if ($includeCostPerHour) + array_push($fields, "cast(l.billable * coalesce(u.rate, 0) as decimal(10,2)) as cost_per_hour"); // Use default user rate. array_push($fields, "cast(l.billable * coalesce(u.rate, 0) * time_to_sec(l.duration)/3600 as decimal(10,2)) as cost"); // Use default user rate. - else + } else { + if ($includeCostPerHour) + array_push($fields, "cast(l.billable * coalesce(upb.rate, 0) as decimal(10,2)) as cost_per_hour"); // Use project rate for user. array_push($fields, "cast(l.billable * coalesce(upb.rate, 0) * time_to_sec(l.duration)/3600 as decimal(10,2)) as cost"); // Use project rate for user. + } array_push($fields, "null as expense"); } + // Add the fields used to determine if we show an edit icon for record. array_push($fields, 'l.approved'); array_push($fields, 'l.timesheet_id'); @@ -501,6 +508,8 @@ static function getItems($options) { // Use the note field to print item name. if ($options['show_note']) array_push($fields, 'ei.name as note'); + if ($user->getConfigOption('report_cost_per_hour')) + array_push($fields, 'null as cost_per_hour'); // null for cost_per_hour. array_push($fields, 'ei.cost as cost'); array_push($fields, 'ei.cost as expense'); // Add the fields used to determine if we show an edit icon for record. diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index ae5a1df73..a06c8a692 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -494,6 +494,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportar', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 18c04aa69..e8d297edc 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -502,6 +502,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportovat', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 9e4a61c96..6e27e5370 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -477,6 +477,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Eksport', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index a2e730ddf..8d5e030c3 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -459,6 +459,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportiere', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Zu Rechnung hinzufügen', // TODO: translate the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index f55cef6f3..2f42d2730 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -440,6 +440,7 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Export', +'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Assign to invoice', 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b7ec4116c..6dbfd29a8 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -507,6 +507,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportar', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 0b2fd1d8c..dc08bd01a 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -489,6 +489,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Eksport', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Lisa arvele', // TODO: translate the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index ec3dfe6d6..f8d8f6843 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -498,6 +498,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'پشتیبانی', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 28033da2a..8d5ec21ec 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -483,6 +483,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Vie', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 20bc298f0..8e7289715 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -474,6 +474,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exporter', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index db2aa859e..dc03db958 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -468,6 +468,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Εξαγωγή', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Ανάθεση στο τιμολόγιο', // TODO: translate the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index ef6e20f35..5249ee8e9 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -502,6 +502,7 @@ // TODO: form.report.export is just "Export" now in the English file. Shorten this translation. 'form.report.export' => 'ייצא נתונים בתבנית', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 5987b8850..f19593ba7 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -496,6 +496,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportálása', // TODO: is this correct? // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 63c2ada5d..f936ef123 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -481,6 +481,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Esporta', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Assegna alla fattura', // TODO: translate the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 5e7070b1b..02d4ad227 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -502,6 +502,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => '輸出する', // TODO: is this correct? // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index a4ea97c23..491631d04 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -500,6 +500,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => '익스포트', // TODO: is this correct? // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 73265f98d..90ee07697 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -426,6 +426,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exporteer', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Voeg toe aan factuur', 'form.report.assign_to_timesheet' => 'Wijs toe aan tijdenoverzicht', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 8e3c4c888..9fd520436 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -501,6 +501,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Eksporter', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index bf04ee74f..325948cdd 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -485,6 +485,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Eksport', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 36dca948c..279d9eb68 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -430,6 +430,8 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportar', +// TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', 'form.report.assign_to_invoice' => 'Atribuir a fatura', 'form.report.assign_to_timesheet' => 'Atribuir a planilha de horas', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index cce36ad07..d5c248b80 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -477,6 +477,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). // TODO: translate the following. // 'form.report.export' => 'Export', +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 03e7a992e..0984a7796 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -501,6 +501,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exporta', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 5a037b846..faab0e60d 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -427,6 +427,7 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Экспортировать', +'form.report.per_hour' => 'За час', 'form.report.assign_to_invoice' => 'Включить в счёт', 'form.report.assign_to_timesheet' => 'Включить в табель', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index c3ad4da53..8ba546295 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -488,6 +488,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportovať', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 04e709748..d041eaee1 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -473,6 +473,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). // TODO: translate the following. // 'form.report.export' => 'Export', +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 9823f810e..ac51518df 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -485,6 +485,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Izvoz', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 4250318c2..3c43c91cb 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -483,6 +483,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportera som', // TODO: translate the following. +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 32838159e..d37a1c547 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -513,6 +513,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). // TODO: translate the following. // 'form.report.export' => 'Export', +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 967a172ef..93c85118a 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -491,6 +491,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). // TODO: translate the following. // 'form.report.export' => 'Export', +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 2fd31a762..75ac102bf 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -494,6 +494,7 @@ // (after generating a report at https://timetracker.anuko.com/reports.php). // TODO: translate the following. // 'form.report.export' => 'Export', +// 'form.report.per_hour' => 'Per hour', // 'form.report.assign_to_invoice' => 'Assign to invoice', // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/WEB-INF/templates/puncher.tpl b/WEB-INF/templates/puncher.tpl index 9190af396..98bd5ca24 100644 --- a/WEB-INF/templates/puncher.tpl +++ b/WEB-INF/templates/puncher.tpl @@ -145,7 +145,7 @@ startTimer(); {if $show_client} {/if} - {* record custom fileds *} + {* record custom fields *} {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} diff --git a/WEB-INF/templates/report.tpl b/WEB-INF/templates/report.tpl index 8ae981a3b..3bd9f448c 100644 --- a/WEB-INF/templates/report.tpl +++ b/WEB-INF/templates/report.tpl @@ -38,7 +38,7 @@ License: See license.txt *} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - {* user custom fileds *} + {* user custom fields *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} @@ -48,7 +48,7 @@ License: See license.txt *} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} - {* time custom fileds *} + {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} @@ -60,7 +60,10 @@ License: See license.txt *} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')} + {if $show_cost_per_hour}{/if} + + {/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} @@ -79,7 +82,7 @@ License: See license.txt *} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - {* user custom fileds *} + {* user custom fields *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} @@ -90,7 +93,7 @@ License: See license.txt *} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} - {* time custom fileds *} + {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} @@ -102,7 +105,10 @@ License: See license.txt *} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')} + {if $show_cost_per_hour}{/if} + + {/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} @@ -120,7 +126,7 @@ License: See license.txt *} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - {* user custom fileds *} + {* user custom fields *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} {assign var="control_name" value='user_field_'|cat:$userField['id']} @@ -131,7 +137,7 @@ License: See license.txt *} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} - {* time custom fileds *} + {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} @@ -144,7 +150,10 @@ License: See license.txt *} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')} + {if $show_cost_per_hour}{/if} + + {/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} @@ -180,7 +189,7 @@ License: See license.txt *} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - {* user custom fileds *} + {* user custom fields *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} @@ -190,7 +199,7 @@ License: See license.txt *} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} - {* time custom fileds *} + {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} @@ -202,7 +211,10 @@ License: See license.txt *} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')} + {if $show_cost_per_hour}{/if} + + {/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} @@ -218,7 +230,7 @@ License: See license.txt *} {if $user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()}{/if} - {* user custom fileds *} + {* user custom fields *} {if isset($custom_fields) && $custom_fields->userFields} {foreach $custom_fields->userFields as $userField} {assign var="checkbox_control_name" value='show_user_field_'|cat:$userField['id']} @@ -228,7 +240,7 @@ License: See license.txt *} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} {if $bean->getAttribute('chtask')}{/if} - {* time custom fileds *} + {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="checkbox_control_name" value='show_time_field_'|cat:$timeField['id']} @@ -240,7 +252,10 @@ License: See license.txt *} {if $bean->getAttribute('chduration')}{/if} {if $bean->getAttribute('chunits')}{/if} {if $bean->getAttribute('chnote') && !$note_on_separate_row}{/if} - {if $bean->getAttribute('chcost')}{/if} + {if $bean->getAttribute('chcost')} + {if $show_cost_per_hour}{/if} + + {/if} {if $bean->getAttribute('chapproved')}{/if} {if $bean->getAttribute('chpaid')}{/if} {if $bean->getAttribute('chip')}{/if} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 6f6f73942..b601531ba 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -160,7 +160,7 @@ function handleStop(buttonElement) { {if $show_client} {/if} - {* record custom fileds *} + {* record custom fields *} {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 41568f601..74e94053f 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -130,7 +130,7 @@ function fillDropdowns() { {foreach $time_records as $record} - {* record custom fileds *} + {* record custom fields *} {if $show_record_custom_fields && isset($custom_fields) && $custom_fields->timeFields} {foreach $custom_fields->timeFields as $timeField} {assign var="control_name" value='time_field_'|cat:$timeField['id']} diff --git a/report.php b/report.php index bd2576f14..38e57fe23 100644 --- a/report.php +++ b/report.php @@ -18,6 +18,7 @@ // End of access checks. $config = new ttConfigHelper($user->getConfig()); +$show_cost_per_hour = $config->getDefinedValue('report_cost_per_hour'); if ($user->isPluginEnabled('ap')) { $cl_mark_approved_select_option = $request->getParameter('mark_approved_select_options', ($request->isPost() ? null : @$_SESSION['mark_approved_select_option'])); @@ -298,7 +299,11 @@ if ($bean->getAttribute('chduration')) $colspan++; if (!$user->getConfigOption('report_note_on_separate_row') && $bean->getAttribute('chnote')) $colspan++; if ($bean->getAttribute('chunits')) $colspan++; -if ($bean->getAttribute('chcost')) $colspan++; +if ($bean->getAttribute('chcost')) { + if ($show_cost_per_hour) + $colspan++; + $colspan++; +} if ($bean->getAttribute('chapproved')) $colspan++; if ($bean->getAttribute('chpaid')) $colspan++; if ($bean->getAttribute('chip')) $colspan++; @@ -316,6 +321,7 @@ $smarty->assign('report_items', $report_items); $smarty->assign('subtotals', $subtotals); $smarty->assign('totals', $totals); +$smarty->assign('show_cost_per_hour', $show_cost_per_hour); $smarty->assign('note_on_separate_row', $user->getConfigOption('report_note_on_separate_row')); $smarty->assign('colspan', $colspan); $smarty->assign('bean', $bean); From 350f206391875be2a1b1e3847f80030aca02210f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 18 Oct 2022 18:02:06 +0000 Subject: [PATCH 2421/2515] Fixed report exports for cost_per_hour column. --- WEB-INF/lib/ttReportHelper.class.php | 4 ++++ initialize.php | 2 +- report.php | 2 +- tofile.php | 20 +++++++++++++++++--- topdf.php | 7 +++++++ 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index d15d1e9bf..cfcc64356 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -613,6 +613,10 @@ static function getItems($options) { if($val['finish'] != '') $val['finish'] = ttTimeHelper::to12HourFormat($val['finish']); } + if (isset($val['cost_per_hour'])) { + if ('.' != $decimalMark) + $val['cost_per_hour'] = str_replace('.', $decimalMark, $val['cost_per_hour']); + } if (isset($val['cost'])) { if ('.' != $decimalMark) $val['cost'] = str_replace('.', $decimalMark, $val['cost']); diff --git a/initialize.php b/initialize.php index 86aad8046..ed2fe659a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5727"); +define("APP_VERSION", "1.21.9.5728"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/report.php b/report.php index 38e57fe23..4945ac173 100644 --- a/report.php +++ b/report.php @@ -18,7 +18,7 @@ // End of access checks. $config = new ttConfigHelper($user->getConfig()); -$show_cost_per_hour = $config->getDefinedValue('report_cost_per_hour'); +$show_cost_per_hour = $config->getDefinedValue('report_cost_per_hour') && ($user->can('manage_invoices') || $user->isClient()); if ($user->isPluginEnabled('ap')) { $cl_mark_approved_select_option = $request->getParameter('mark_approved_select_options', ($request->isPost() ? null : @$_SESSION['mark_approved_select_option'])); diff --git a/tofile.php b/tofile.php index 530d2f7df..6ea39ad82 100644 --- a/tofile.php +++ b/tofile.php @@ -20,6 +20,8 @@ $custom_fields = new CustomFields(); } +$show_cost_per_hour = $user->getConfigOption('report_cost_per_hour') && ($user->can('manage_invoices') || $user->isClient()); + // Report settings are stored in session bean before we get here. $bean = new ActionForm('reportBean', new Form('reportForm'), $request); @@ -123,6 +125,11 @@ } if ($bean->getAttribute('chunits')) print "\t\n"; if ($bean->getAttribute('chnote')) print "\t\n"; + if ($bean->getAttribute('chcost') && $show_cost_per_hour) { + print "\t\n"; + } if ($bean->getAttribute('chcost')) { print "\tcan('manage_invoices') || $user->isClient()) @@ -213,7 +220,11 @@ if ($bean->getAttribute('chduration')) print ',"'.$i18n->get('label.duration').'"'; if ($bean->getAttribute('chunits')) print ',"'.$i18n->get('label.work_units_short').'"'; if ($bean->getAttribute('chnote')) print ',"'.$i18n->get('label.note').'"'; - if ($bean->getAttribute('chcost')) print ',"'.$i18n->get('label.cost').'"'; + if ($bean->getAttribute('chcost')) { + if ($show_cost_per_hour) + print ',"'.$i18n->get('form.report.per_hour').'"'; + print ',"'.$i18n->get('label.cost').'"'; + } if ($bean->getAttribute('chapproved')) print ',"'.$i18n->get('label.approved').'"'; if ($bean->getAttribute('chpaid')) print ',"'.$i18n->get('label.paid').'"'; if ($bean->getAttribute('chip')) print ',"'.$i18n->get('label.ip').'"'; @@ -255,10 +266,13 @@ if ($bean->getAttribute('chunits')) print ',"'.$item['units'].'"'; if ($bean->getAttribute('chnote')) print ',"'.ttNeutralizeForCsv($item['note']).'"'; if ($bean->getAttribute('chcost')) { - if ($user->can('manage_invoices') || $user->isClient()) + if ($user->can('manage_invoices') || $user->isClient()) { + if ($show_cost_per_hour) + print ',"'.$item['cost_per_hour'].'"'; print ',"'.$item['cost'].'"'; - else + } else { print ',"'.$item['expense'].'"'; + } } if ($bean->getAttribute('chapproved')) print ',"'.$item['approved'].'"'; if ($bean->getAttribute('chpaid')) print ',"'.$item['paid'].'"'; diff --git a/topdf.php b/topdf.php index 85ff8d84e..931fa8145 100644 --- a/topdf.php +++ b/topdf.php @@ -38,6 +38,7 @@ $config = new ttConfigHelper($user->getConfig()); $show_note_column = $bean->getAttribute('chnote') && !$config->getDefinedValue('report_note_on_separate_row'); $show_note_row = $bean->getAttribute('chnote') && $config->getDefinedValue('report_note_on_separate_row'); +$show_cost_per_hour = $config->getDefinedValue('report_cost_per_hour') && ($user->can('manage_invoices') || $user->isClient()); // There are 2 variations of report: totals only, or normal. Totals only means that the report // is grouped by either date, user, client, project, or task and user only needs to see subtotals by group. @@ -152,6 +153,7 @@ if ($bean->getAttribute('chduration')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chunits')) { $colspan++; $html .= "'; } if ($show_note_column) { $colspan++; $html .= ''; } + if ($bean->getAttribute('chcost') && $show_cost_per_hour) { $colspan++; $html .= "'; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chapproved')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "'; } @@ -266,6 +268,11 @@ if ($bean->getAttribute('chduration')) $html .= "'; if ($bean->getAttribute('chunits')) $html .= "'; if ($show_note_column) $html .= ''; + if ($bean->getAttribute('chcost') && $show_cost_per_hour) { + $html .= "'; + } if ($bean->getAttribute('chcost')) { $html .= "'; if ($show_note_column) $body .= ''; + if ($show_cost_per_hour) + $body .= ''; if ($options['show_cost']) $body .= ''; if ($options['show_approved']) @@ -1263,6 +1267,7 @@ static function prepareReportBody($options, $comment = null) if ($options['show_duration']) $body .= ''; if ($options['show_work_units']) $body .= ''; if ($show_note_column) $body .= ''; + if ($show_cost_per_hour) $body .= ''; if ($options['show_cost']) { $body .= ''; if ($show_note_column) $body .= ''; + if ($show_cost_per_hour) + $body .= ''; if ($options['show_cost']) $body .= ''; if ($options['show_approved']) { @@ -1382,6 +1389,7 @@ static function prepareReportBody($options, $comment = null) if ($options['show_duration']) $body .= ''; if ($options['show_work_units']) $body .= ''; if ($show_note_column) $body .= ''; + if ($show_cost_per_hour) $body .= ''; if ($options['show_cost']) { $body .= ''; if ($options['show_work_units']) $body .= ''; if ($show_note_column) $body .= ''; + if ($show_cost_per_hour) $body .= ''; if ($options['show_cost']) { $body .= ' -{if defined('REPORT_COST_PER_HOUR')} @@ -58,7 +57,6 @@ License: See license.txt *} {$i18n.label.what_is_it} -{/if} diff --git a/initialize.php b/initialize.php index 25386c623..e58e54a1b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5729"); +define("APP_VERSION", "1.21.10.5730"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From dc03995e430b92b0e3f814d32f586a994996dc81 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 20 Oct 2022 22:01:13 +0000 Subject: [PATCH 2424/2515] German translation improved. --- WEB-INF/resources/de.lang.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 8d5e030c3..95d9af2ca 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -459,8 +459,7 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exportiere', -// TODO: translate the following. -// 'form.report.per_hour' => 'Per hour', +'form.report.per_hour' => 'Stundensatz', 'form.report.assign_to_invoice' => 'Zu Rechnung hinzufügen', // TODO: translate the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', diff --git a/initialize.php b/initialize.php index e58e54a1b..90872e605 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5730"); +define("APP_VERSION", "1.21.10.5731"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e8b8d42fc07ebce3d8a08303c21c488a3165019e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 21 Oct 2022 14:53:20 +0000 Subject: [PATCH 2425/2515] Starting to work on project custom fields. --- WEB-INF/templates/cf_custom_fields.tpl | 2 ++ cf_custom_field_add.php | 16 ++++++++++++---- initialize.php | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/WEB-INF/templates/cf_custom_fields.tpl b/WEB-INF/templates/cf_custom_fields.tpl index 70253cb3f..812943db8 100644 --- a/WEB-INF/templates/cf_custom_fields.tpl +++ b/WEB-INF/templates/cf_custom_fields.tpl @@ -19,6 +19,8 @@ License: See license.txt *} {elseif CustomFields::ENTITY_USER == $field['entity_type']} + {elseif CustomFields::ENTITY_PROJECT == $field['entity_type']} + {else} {/if} diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index 6cfd87256..38d672822 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -27,10 +27,18 @@ $form = new Form('fieldForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>'')); -$form->addInput(array('type'=>'combobox','name'=>'entity', - 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), - CustomFields::ENTITY_USER=>$i18n->get('entity.user')) -)); +if (defined('DEBUG_PROJECT_CUSTOM_FIELDS')) { + $form->addInput(array('type'=>'combobox','name'=>'entity', + 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), + CustomFields::ENTITY_USER=>$i18n->get('entity.user'), + CustomFields::ENTITY_PROJECT=>$i18n->get('entity.project')) + )); +} else { + $form->addInput(array('type'=>'combobox','name'=>'entity', + 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), + CustomFields::ENTITY_USER=>$i18n->get('entity.user')) + )); +} $form->addInput(array('type'=>'combobox','name'=>'type', 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->get('label.type_text'), CustomFields::TYPE_DROPDOWN=>$i18n->get('label.type_dropdown')) diff --git a/initialize.php b/initialize.php index 90872e605..6033d935a 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5731"); +define("APP_VERSION", "1.21.10.5732"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From b0381c6478f062d37bdbb38714d23ee6c2151805 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 21 Oct 2022 16:16:14 +0000 Subject: [PATCH 2426/2515] Work in progress on project custom fields. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + WEB-INF/templates/reports.tpl | 16 +++++++++++++--- initialize.php | 2 +- plugins/CustomFields.class.php | 29 ++--------------------------- reports.php | 17 +++++++++++++++++ 34 files changed, 65 insertions(+), 31 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index a06c8a692..13d8237c2 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -480,6 +480,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Agrupar per', 'form.reports.group_by_no' => '--- no agrupar ---', 'form.reports.group_by_date' => 'data', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index e8d297edc..4a93086de 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -488,6 +488,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Seskupit podle', // TODO: translate the following. // 'form.reports.group_by_no' => '--- no grouping ---', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 6e27e5370..595590f0a 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -465,6 +465,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Gruppér ved', 'form.reports.group_by_no' => '--- Ingen gruppereing ---', 'form.reports.group_by_date' => 'Dato', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 95d9af2ca..209df6b72 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -448,6 +448,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Gruppieren nach', 'form.reports.group_by_no' => '--- keine Gruppierung ---', 'form.reports.group_by_date' => 'Datum', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 2f42d2730..83808aa40 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -429,6 +429,7 @@ 'form.reports.show_fields' => 'Show fields', 'form.reports.time_fields' => 'Time fields', 'form.reports.user_fields' => 'User fields', +'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Group by', 'form.reports.group_by_no' => '--- no grouping ---', 'form.reports.group_by_date' => 'date', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 6dbfd29a8..507bbcaac 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -493,6 +493,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Agrupar por', 'form.reports.group_by_no' => '--- no agrupar ---', 'form.reports.group_by_date' => 'fecha', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index dc08bd01a..0295dc70f 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -478,6 +478,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Grupeeri', 'form.reports.group_by_no' => '--- grupeerimata ---', 'form.reports.group_by_date' => 'kuupäev', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index f8d8f6843..078872026 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -486,6 +486,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'گروه بندی شده با', 'form.reports.group_by_no' => '--- بدون گروه ---', 'form.reports.group_by_date' => 'تاریخ', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 8d5ec21ec..e9e92e018 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -471,6 +471,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Ryhmittelyperuste', 'form.reports.group_by_no' => '--- ei ryhmitystä ---', 'form.reports.group_by_date' => 'päivä', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 8e7289715..145fcb289 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -462,6 +462,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Regroupés par', 'form.reports.group_by_no' => '--- Aucun regroupement ---', 'form.reports.group_by_date' => 'Date', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index dc03db958..6265976d7 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -457,6 +457,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Ομαδοποίηση με βάση', 'form.reports.group_by_no' => '--- χωρίς ομαδοποίηση ---', 'form.reports.group_by_date' => 'ημερομηνία', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 5249ee8e9..727b0b761 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -489,6 +489,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'סדר לפי', 'form.reports.group_by_no' => '--- ללא סדר ---', 'form.reports.group_by_date' => 'תאריך', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index f19593ba7..8b0be9524 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -482,6 +482,7 @@ // 'form.reports.show_fields' => 'Show fields', // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Csoportosítva', 'form.reports.group_by_no' => '--- csoportosítás nélkül ---', 'form.reports.group_by_date' => 'dátum', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index f936ef123..d283830a1 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -470,6 +470,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Raggruppa per', 'form.reports.group_by_no' => '--- non raggruppare ---', 'form.reports.group_by_date' => 'data', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 02d4ad227..112e454cc 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -488,6 +488,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => '次のようにグループ化', 'form.reports.group_by_no' => '--- グループの機能がありません ---', 'form.reports.group_by_date' => '日付', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 491631d04..6bb78d772 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -486,6 +486,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => '다음것에 의한 그룹화', 'form.reports.group_by_no' => '--- 그룹화되지 않음 ---', 'form.reports.group_by_date' => '날짜', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 90ee07697..38d93efdb 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -415,6 +415,8 @@ 'form.reports.show_fields' => 'Toon velden', 'form.reports.time_fields' => 'Tijd velden', 'form.reports.user_fields' => 'Medewerker velden', +// TODO: translate the following. +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Groeperen op', 'form.reports.group_by_no' => '--- niet groeperen ---', 'form.reports.group_by_date' => 'datum', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 9fd520436..18e1ee69f 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -488,6 +488,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', 'form.reports.group_by_date' => 'dato', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 325948cdd..b7dd5024c 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -473,6 +473,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Grupowanie wg', 'form.reports.group_by_no' => '--- bez grupowania ---', 'form.reports.group_by_date' => 'daty', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 279d9eb68..fff94fa3d 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -419,6 +419,8 @@ 'form.reports.show_fields' => 'Exibir campos', 'form.reports.time_fields' => 'Campos de tempo', 'form.reports.user_fields' => 'Campos de usuário', +// TODO: translate the following. +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Agrupar por', 'form.reports.group_by_no' => '--- sem agrupar ---', 'form.reports.group_by_date' => 'data', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index d5c248b80..075e7b41c 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -465,6 +465,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0984a7796..0d8fe6d1f 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -488,6 +488,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Grupat dupa', 'form.reports.group_by_no' => '--- fara grupare ---', 'form.reports.group_by_date' => 'data', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index faab0e60d..805be45b5 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -416,6 +416,7 @@ 'form.reports.show_fields' => 'Показывать поля', 'form.reports.time_fields' => 'Поля времени', 'form.reports.user_fields' => 'Поля пользователя', +'form.reports.project_fields' => 'Поля проекта', 'form.reports.group_by' => 'Группировать по', 'form.reports.group_by_no' => '--- без группировки ---', 'form.reports.group_by_date' => 'дате', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 8ba546295..e57e63d74 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -476,6 +476,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', 'form.reports.group_by_date' => 'dátum', diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index d041eaee1..8ea8c445e 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -460,6 +460,7 @@ // 'form.reports.show_fields' => 'Show fields', // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', // 'form.reports.group_by' => 'Group by', // 'form.reports.group_by_no' => '--- no grouping ---', // 'form.reports.group_by_date' => 'date', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index ac51518df..055545b37 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -473,6 +473,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Grupiši po', 'form.reports.group_by_no' => '--- nemoj grupisati ---', 'form.reports.group_by_date' => 'datum', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 3c43c91cb..e0d212b9e 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -471,6 +471,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Gruppera efter', 'form.reports.group_by_no' => '--- Ingen gruppering ---', 'form.reports.group_by_date' => 'Datum', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index d37a1c547..098871718 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -499,6 +499,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => 'Gruplandırma kıstas', 'form.reports.group_by_no' => '--- gruplama yok ---', 'form.reports.group_by_date' => 'tarih', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 93c85118a..87f1cc1c9 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -477,6 +477,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => '分组方式', 'form.reports.group_by_no' => '--- 没有分组 ---', 'form.reports.group_by_date' => '日期', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 75ac102bf..181756e77 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -480,6 +480,7 @@ // TODO: translate the following. // 'form.reports.time_fields' => 'Time fields', // 'form.reports.user_fields' => 'User fields', +// 'form.reports.project_fields' => 'Project fields', 'form.reports.group_by' => '分組方式', 'form.reports.group_by_no' => '--- 沒有分組 ---', 'form.reports.group_by_date' => '日期', diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 51c98212c..370a6d462 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -245,9 +245,6 @@ function handleCheckboxes() { } -{* Copyright (c) Anuko International Ltd. https://www.anuko.com -License: See license.txt *} - {$forms.reportForm.open}
{$forms.displayOptionsForm.report_cost_per_hour.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
{$i18n.form.display_options.custom_css}
{$record.client|escape}
{$i18n.label.date}{$i18n.label.user}{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.duration}{$i18n.label.work_units_short}{$i18n.label.note}{$i18n.label.cost}{$i18n.form.report.per_hour}{$i18n.label.cost}{$i18n.label.approved}{$i18n.label.paid}{$i18n.label.ip}
{$i18n.label.subtotal}{$subtotals[$prev_grouped_by]['user']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$subtotals[$prev_grouped_by]['time']}{$subtotals[$prev_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$prev_grouped_by]['cost']}{else}{$subtotals[$prev_grouped_by]['expenses']}{/if}
{$item.date}{$item.user|escape}{$item.client|escape}{$item.project|escape}{$item.task|escape}{$item.duration}{$item.units}{$item.note|escape}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost_per_hour}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$item.cost}{else}{$item.expense}{/if}{if $item.approved == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.paid == 1}{$i18n.label.yes}{else}{$i18n.label.no}{/if}{if $item.modified}{$item.modified_ip} {$item.modified}{else}{$item.created_ip} {$item.created}{/if}{$i18n.label.subtotal}{$subtotals[$cur_grouped_by]['user']|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}{$subtotals[$cur_grouped_by]['time']}{$subtotals[$cur_grouped_by]['units']}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}{if $user->can('manage_invoices') || $user->isClient()}{$subtotals[$cur_grouped_by]['cost']}{else}{$subtotals[$cur_grouped_by]['expenses']}{/if}
{$i18n.label.total}{$totals['time']}{$totals['units']}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}{$user->currency|escape} {if $user->can('manage_invoices') || $user->isClient()}{$totals['cost']}{else}{$totals['expenses']}{/if}{$record.client|escape}
{$record.date}".$i18n->get('label.duration').'".$i18n->get('label.work_units_short').''.$i18n->get('label.note').'".$i18n->get('form.report.per_hour').'".$i18n->get('label.cost').'".$i18n->get('label.approved').'".$i18n->get('label.paid').'".$item['duration'].'".$item['units'].''.htmlspecialchars($item['note']).'"; + $html .= $item['cost_per_hour']; + $html .= '"; if ($user->can('manage_invoices') || $user->isClient()) From 85c1f6d14ceb9df215bae6c7478bc0ec363e2b77 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 18 Oct 2022 18:16:56 +0000 Subject: [PATCH 2422/2515] Fixed emailed reports for cost_per_hour column. --- WEB-INF/lib/ttReportHelper.class.php | 9 +++++++++ initialize.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index cfcc64356..056f4d4fb 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -1037,6 +1037,7 @@ static function prepareReportBody($options, $comment = null) $config = new ttConfigHelper($user->getConfig()); $show_note_column = $options['show_note'] && !$config->getDefinedValue('report_note_on_separate_row'); $show_note_row = $options['show_note'] && $config->getDefinedValue('report_note_on_separate_row'); + $show_cost_per_hour = $options['show_cost'] && $config->getDefinedValue('report_cost_per_hour') && ($user->can('manage_invoices') || $user->isClient()); $items = ttReportHelper::getItems($options); $grouping = ttReportHelper::grouping($options); @@ -1085,6 +1086,7 @@ static function prepareReportBody($options, $comment = null) if ($options['show_end']) $colspan++; if ($options['show_duration']) $colspan++; if ($options['show_work_units']) $colspan++; + if ($show_cost_per_hour) $colspan++; if ($options['show_cost']) $colspan++; if ($options['show_approved']) $colspan++; if ($options['show_paid']) $colspan++; @@ -1201,6 +1203,8 @@ static function prepareReportBody($options, $comment = null) $body .= ''.$i18n->get('label.work_units_short').''.$i18n->get('label.note').''.$i18n->get('form.report.per_hour').''.$i18n->get('label.cost').''.$subtotals[$prev_grouped_by]['time'].''.$subtotals[$prev_grouped_by]['units'].''; $body .= ($canViewReports || $isClient) ? $subtotals[$prev_grouped_by]['cost'] : $subtotals[$prev_grouped_by]['expenses']; @@ -1318,6 +1323,8 @@ static function prepareReportBody($options, $comment = null) $body .= ''.$record['units'].''.htmlspecialchars($record['note']).''.$record['cost_per_hour'].''.$record['cost'].''.$subtotals[$cur_grouped_by]['time'].''.$subtotals[$cur_grouped_by]['units'].''; $body .= ($canViewReports || $isClient) ? $subtotals[$cur_grouped_by]['cost'] : $subtotals[$cur_grouped_by]['expenses']; @@ -1424,6 +1432,7 @@ static function prepareReportBody($options, $comment = null) if ($options['show_duration']) $body .= ''.$totals['time'].''.$totals['units'].''.htmlspecialchars($user->currency).' '; $body .= ($canViewReports || $isClient) ? $totals['cost'] : $totals['expenses']; diff --git a/initialize.php b/initialize.php index ed2fe659a..25386c623 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.9.5728"); +define("APP_VERSION", "1.21.9.5729"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bd30ae8c78ced5dea93d10b0153f5b677e87891c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 18 Oct 2022 19:32:54 +0000 Subject: [PATCH 2423/2515] Finished adding cost per hour column in reports. --- WEB-INF/templates/display_options.tpl | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index c09a18e9b..5b487ec85 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -49,7 +49,6 @@ License: See license.txt *} {$i18n.label.what_is_it}
{$i18n.form.display_options.custom_css}
{$i18n.entity.time}{$i18n.entity.user}{$i18n.entity.project}
@@ -513,6 +510,19 @@ License: See license.txt *} {/foreach} {/if} +{if isset($custom_fields) && $custom_fields->projectFields} + + {foreach $custom_fields->projectFields as $projectField} + {assign var="control_name" value='project_field_'|cat:$projectField['id']} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + + + + + + + {/foreach} +{/if}
{$i18n.label.fav_report}:
{$i18n.form.reports.project_fields}
{$forms.reportForm.$control_name.control} {$forms.reportForm.$checkbox_control_name.control}
diff --git a/initialize.php b/initialize.php index 6033d935a..e6e457301 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5732"); +define("APP_VERSION", "1.21.10.5733"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index 4e2f13195..0e52871e2 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -1,31 +1,6 @@ projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,)); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'data'=>CustomFields::getOptions($projectField['id']), + 'empty'=>array(''=>$i18n->get('dropdown.all')))); + } + // Also add a checkbox (to print the field or not). + $form->addInput(array('type'=>'checkbox','name'=>$checkbox_field_name)); + } +} + // Add group by control. $group_by_options['no_grouping'] = $i18n->get('form.reports.group_by_no'); $group_by_options['date'] = $i18n->get('form.reports.group_by_date'); From ac2e96281d8be1c80d50cc08290609b60fc9f997 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 21 Oct 2022 19:28:55 +0000 Subject: [PATCH 2427/2515] Added handling of custom fields on project_add, project_edit, and project_delete pages. --- WEB-INF/lib/ttProjectHelper.class.php | 11 ++++ WEB-INF/templates/project_add.tpl | 11 ++++ WEB-INF/templates/project_edit.tpl | 12 +++++ project_add.php | 54 +++++++++++++++++-- project_edit.php | 75 ++++++++++++++++++++++++--- user_edit.php | 2 +- 6 files changed, 153 insertions(+), 12 deletions(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index e1d5754c5..e6459bd04 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -220,6 +220,17 @@ static function delete($id) { if (!ttClientHelper::deleteProject($id)) return false; + // Mark project custom fields as deleted, + require_once('plugins/CustomFields.class.php'); + $entity_type = CustomFields::ENTITY_PROJECT; + $modified_part = ', modified = now(), modified_ip = '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$mdb2->quote($user->id); + $sql = "update tt_entity_custom_fields set status = null $modified_part". + " where entity_type = $entity_type and entity_id = $id". + " and group_id = $group_id and org_id = $org_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + return false; + // Update entities_modified, too. if (!ttGroupHelper::updateEntitiesModified()) return false; diff --git a/WEB-INF/templates/project_add.tpl b/WEB-INF/templates/project_add.tpl index 8cc43fcaa..7b1fd835c 100644 --- a/WEB-INF/templates/project_add.tpl +++ b/WEB-INF/templates/project_add.tpl @@ -15,6 +15,17 @@ License: See license.txt *} +{if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="control_name" value='project_field_'|cat:$projectField['id']} + + + + + + + {/foreach} +{/if} {if $show_files} diff --git a/WEB-INF/templates/project_edit.tpl b/WEB-INF/templates/project_edit.tpl index 3ecc85a84..4e3b02e79 100644 --- a/WEB-INF/templates/project_edit.tpl +++ b/WEB-INF/templates/project_edit.tpl @@ -15,6 +15,18 @@ License: See license.txt *} +{if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="control_name" value='project_field_'|cat:$projectField['id']} + + + + + + + {/foreach} +{/if} + diff --git a/project_add.php b/project_add.php index 35b45c97a..859fdc259 100644 --- a/project_add.php +++ b/project_add.php @@ -19,6 +19,13 @@ } // End of access checks. +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + $showFiles = $user->isPluginEnabled('at'); $users = ttGroupHelper::getActiveUsers(); foreach ($users as $user_item) @@ -35,6 +42,18 @@ $cl_description = trim($request->getParameter('description')); $cl_users = $request->getParameter('users', array()); $cl_tasks = $request->getParameter('tasks', array()); + // If we have project custom fields - collect input. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $control_name = 'project_field_'.$projectField['id']; + $projectCustomFields[$projectField['id']] = array('field_id' => $projectField['id'], + 'control_name' => $control_name, + 'label' => $projectField['label'], + 'type' => $projectField['type'], + 'required' => $projectField['required'], + 'value' => trim($request->getParameter($control_name))); + } + } } else { foreach ($users as $user_item) $cl_users[] = $user_item['id']; @@ -45,6 +64,20 @@ $form = new Form('projectForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','value'=>$cl_name)); $form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); +// If we have custom fields - add controls for them. +if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$projectCustomFields[$projectField['id']]['value'])); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'data'=>CustomFields::getOptions($projectField['id']), + 'value'=>$projectCustomFields[$projectField['id']]['value'], + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } +} if ($showFiles) $form->addInput(array('type'=>'upload','name'=>'newfile','value'=>$i18n->get('button.submit'))); $form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); @@ -56,26 +89,37 @@ // Validate user input. if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); + // Validate input in project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($projectCustomFields as $projectField) { + // Validation is the same for text and dropdown fields. + if (!ttValidString($projectField['value'], !$projectField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($projectField['label'])); + } + } if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); if ($err->no()) { if (!ttProjectHelper::getProjectByName($cl_name)) { - $id = ttProjectHelper::insert(array('name' => $cl_name, + $project_id = ttProjectHelper::insert(array('name' => $cl_name, 'description' => $cl_description, 'users' => $cl_users, 'tasks' => $cl_tasks, 'status' => ACTIVE)); - + // Insert project custom fields if we have them. + $result = true; + if ($project_id && isset($custom_fields) && $custom_fields->projectFields) { + $result = $custom_fields->insertEntityFields(CustomFields::ENTITY_PROJECT, $project_id, $projectCustomFields); + } // Put a new file in storage if we have it. - if ($id && $showFiles && $_FILES['newfile']['name']) { + if ($project_id && $showFiles && $_FILES['newfile']['name']) { $fileHelper = new ttFileHelper($err); $fields = array('entity_type'=>'project', - 'entity_id' => $id, + 'entity_id' => $project_id, 'file_name' => $_FILES['newfile']['name']); $fileHelper->putFile($fields); } - if ($id) { + if ($project_id && $result) { header('Location: projects.php'); exit(); } else diff --git a/project_edit.php b/project_edit.php index 7d8e113dd..a0190ff83 100644 --- a/project_edit.php +++ b/project_edit.php @@ -24,6 +24,13 @@ } // End of access checks. +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + $users = ttGroupHelper::getActiveUsers(); foreach ($users as $user_item) $all_users[$user_item['id']] = $user_item['name']; @@ -39,9 +46,33 @@ $cl_status = $request->getParameter('status'); $cl_users = $request->getParameter('users', array()); $cl_tasks = $request->getParameter('tasks', array()); + // If we have project custom fields - collect input. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $control_name = 'project_field_'.$projectField['id']; + $projectCustomFields[$projectField['id']] = array('field_id' => $projectField['id'], + 'control_name' => $control_name, + 'label' => $projectField['label'], + 'type' => $projectField['type'], + 'required' => $projectField['required'], + 'value' => trim($request->getParameter($control_name))); + } + } } else { $cl_name = $project['name']; $cl_description = $project['description']; + // If we have project custom fields - collect values from database. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $control_name = 'project_field_'.$projectField['id']; + $projectCustomFields[$projectField['id']] = array('field_id' => $projectField['id'], + 'control_name' => $control_name, + 'label' => $projectField['label'], + 'type' => $projectField['type'], + 'required' => $projectField['required'], + 'value' => $custom_fields->getEntityFieldValue(CustomFields::ENTITY_PROJECT, $cl_project_id, $projectField['id'], $projectField['type'])); + } + } $cl_status = $project['status']; $cl_users = ttProjectHelper::getAssignedUsers($cl_project_id); $cl_tasks = explode(',', $project['tasks']); @@ -51,6 +82,20 @@ $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_project_id)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'project_name','value'=>$cl_name)); $form->addInput(array('type'=>'textarea','name'=>'description','value'=>$cl_description)); +// If we have custom fields - add controls for them. +if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name,'value'=>$projectCustomFields[$projectField['id']]['value'])); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'data'=>CustomFields::getOptions($projectField['id']), + 'value'=>$projectCustomFields[$projectField['id']]['value'], + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } +} $form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status, 'data'=>array(ACTIVE=>$i18n->get('dropdown.status_active'),INACTIVE=>$i18n->get('dropdown.status_inactive')))); $form->addInput(array('type'=>'checkboxgroup','name'=>'users','data'=>$all_users,'layout'=>'H','value'=>$cl_users)); @@ -63,6 +108,13 @@ // Validate user input. if (!ttValidString($cl_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description')); + // Validate input in project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($projectCustomFields as $projectField) { + // Validation is the same for text and dropdown fields. + if (!ttValidString($projectField['value'], !$projectField['required'])) $err->add($i18n->get('error.field'), htmlspecialchars($projectField['label'])); + } + } if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_users, 'tt_users')) $err->add($i18n->get('error.field'), $i18n->get('label.users')); if (!ttGroupHelper::validateCheckboxGroupInput($cl_tasks, 'tt_tasks')) $err->add($i18n->get('error.field'), $i18n->get('label.tasks')); @@ -72,28 +124,39 @@ $existing_project = ttProjectHelper::getProjectByName($cl_name); if (!$existing_project || ($cl_project_id == $existing_project['id'])) { // Update project information. - if (ttProjectHelper::update(array( + $result = ttProjectHelper::update(array( 'id' => $cl_project_id, 'name' => $cl_name, 'description' => $cl_description, 'status' => $cl_status, 'users' => $cl_users, - 'tasks' => $cl_tasks))) { + 'tasks' => $cl_tasks)); + // Update project custom fields if we have them. + if ($result && isset($custom_fields) && $custom_fields->projectFields) { + $result = $custom_fields->updateEntityFields(CustomFields::ENTITY_PROJECT, $cl_project_id, $projectCustomFields); + } + if ($result) { header('Location: projects.php'); exit(); - } else + } else $err->add($i18n->get('error.db')); - } else + } else $err->add($i18n->get('error.object_exists')); } if ($request->getParameter('btn_copy')) { if (!ttProjectHelper::getProjectByName($cl_name)) { - if (ttProjectHelper::insert(array('name' => $cl_name, + $project_id = ttProjectHelper::insert(array('name' => $cl_name, 'description' => $cl_description, 'users' => $cl_users, 'tasks' => $cl_tasks, - 'status' => ACTIVE))) { + 'status' => ACTIVE)); + // Insert project custom fields if we have them. + $result = true; + if ($project_id && isset($custom_fields) && $custom_fields->projectFields) { + $result = $custom_fields->insertEntityFields(CustomFields::ENTITY_PROJECT, $project_id, $projectCustomFields); + } + if ($project_id && $result) { header('Location: projects.php'); exit(); } else diff --git a/user_edit.php b/user_edit.php index 6bdbef693..0633e8a1f 100644 --- a/user_edit.php +++ b/user_edit.php @@ -199,7 +199,7 @@ function render(&$table, $value, $row, $column, $selected = false) { if ($user->isPluginEnabled('cl') && ttRoleHelper::isClientRole($cl_role_id) && !$cl_client_id) $err->add($i18n->get('error.client')); if (!ttValidStatus($cl_status)) $err->add($i18n->get('error.field'), $i18n->get('label.status')); if (!ttValidFloat($cl_quota_percent, true)) $err->add($i18n->get('error.field'), $i18n->get('label.quota')); - // Validate input in user custom fields. + // Validate input in user custom fields. if (isset($custom_fields) && $custom_fields->userFields) { foreach ($userCustomFields as $userField) { // Validation is the same for text and dropdown fields. From 2700f1d275ac01a18beeae8f9d3cd124fc214193 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 22 Oct 2022 13:51:57 +0000 Subject: [PATCH 2428/2515] Added a condition on including project custom fields on reports. --- WEB-INF/templates/reports.tpl | 2 +- initialize.php | 2 +- reports.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 370a6d462..6a5ecbbe0 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -510,7 +510,7 @@ function handleCheckboxes() { {/foreach} {/if} -{if isset($custom_fields) && $custom_fields->projectFields} +{if $show_project && isset($custom_fields) && $custom_fields->projectFields} {foreach $custom_fields->projectFields as $projectField} {assign var="control_name" value='project_field_'|cat:$projectField['id']} diff --git a/initialize.php b/initialize.php index e6e457301..f31382c7f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5733"); +define("APP_VERSION", "1.21.10.5734"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 2fb61ccdf..6d5b441a4 100644 --- a/reports.php +++ b/reports.php @@ -316,7 +316,7 @@ } // If we have projects custom fields - add controls for them. -if (isset($custom_fields) && $custom_fields->projectFields) { +if ($showProject && isset($custom_fields) && $custom_fields->projectFields) { foreach ($custom_fields->projectFields as $projectField) { $field_name = 'project_field_'.$projectField['id']; $checkbox_field_name = 'show_'.$field_name; From 318f74cc352cbbbd049077bc61375d7e2d4d6ff1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 22 Oct 2022 19:11:06 +0000 Subject: [PATCH 2429/2515] Made progress on including project custom fields on reports. --- WEB-INF/lib/ttProjectHelper.class.php | 2 +- WEB-INF/lib/ttReportHelper.class.php | 276 +++++++++++++++++++++++++- WEB-INF/templates/report.tpl | 36 ++++ initialize.php | 2 +- reports.php | 7 + 5 files changed, 318 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttProjectHelper.class.php b/WEB-INF/lib/ttProjectHelper.class.php index e6459bd04..bd166e864 100644 --- a/WEB-INF/lib/ttProjectHelper.class.php +++ b/WEB-INF/lib/ttProjectHelper.class.php @@ -166,7 +166,7 @@ static function getProjectByName($name) { } - // delete - deletes things associated with a project and marks the project as deleted. + // delete - deletes things associated with a project and marks the project and its custom fields as deleted. static function delete($id) { global $user; $mdb2 = getConnection(); diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 056f4d4fb..85c4d80b4 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -108,6 +108,30 @@ static function getWhere($options) { } } + // Add project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + if ($projectField['type'] == CustomFields::TYPE_DROPDOWN && $field_value) { + $cfoTable = 'cfo'.$projectField['id']; + $dropdown_parts .= " and $cfoTable.id = $field_value"; + } + } + } + + // Continue preparing part for text custom fields using LIKE operator. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + if ($projectField['type'] == CustomFields::TYPE_TEXT && $field_value) { + $ecfTableName = 'ecf'.$projectField['id']; + $cf_text_parts .= " and $ecfTableName.value like ".$mdb2->quote("%$field_value%"); + } + } + } + // Prepare sql query part for user list. $userlist = isset($options['users']) ? $options['users'] : '-1'; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) @@ -196,6 +220,30 @@ static function getExpenseWhere($options) { } } + // Add project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + if ($projectField['type'] == CustomFields::TYPE_DROPDOWN && $field_value) { + $cfoTable = 'cfo'.$projectField['id']; + $dropdown_parts .= " and $cfoTable.id = $field_value"; + } + } + } + + // Continue prparing parts for text custom fields using LIKE operator. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + if ($projectField['type'] == CustomFields::TYPE_TEXT && $field_value) { + $ecfTableName = 'ecf'.$projectField['id']; + $cf_text_parts .= " and $ecfTableName.value like ".$mdb2->quote("%$field_value%"); + } + } + } + // Prepare sql query part for user list. $userlist = isset($options['users']) ? $options['users'] : '-1'; if ($user->can('view_reports') || $user->can('view_all_reports') || $user->isClient()) @@ -306,6 +354,22 @@ static function getItems($options) { } } } + // Add project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + if ($options[$checkbox_field_name] || ttReportHelper::groupingBy($field_name, $options)) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + $ecfTableName = 'ecf'.$projectField['id']; + array_push($fields, "$ecfTableName.value as $field_name"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTableName = 'cfo'.$projectField['id']; + array_push($fields, "$cfoTableName.value as $field_name"); + } + } + } + } // Add start time. if ($options['show_start']) { array_push($fields, "l.start as unformatted_start"); @@ -372,8 +436,7 @@ static function getItems($options) { // Prepare sql query part for left joins. $left_joins = null; - // Left joins for custom fields. - // 1 join is required for each text field, 2 joins for each dropdown. + // Left joins for user custom fields. if (isset($custom_fields) && $custom_fields->userFields) { foreach ($custom_fields->userFields as $userField) { $field_name = 'user_field_'.$userField['id']; @@ -393,6 +456,26 @@ static function getItems($options) { } } } + // Left joins for project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($options[$field_name] || $options[$checkbox_field_name] || ttReportHelper::groupingBy($field_name, $options)) { + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } if ($options['show_client'] || $grouping_by_client) $left_joins .= " left join tt_clients c on (c.id = l.client_id)"; if (($canViewReports || $isClient) && $options['show_invoice']) @@ -495,6 +578,22 @@ static function getItems($options) { } } } + // Add project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + if ($options[$checkbox_field_name] || ttReportHelper::groupingBy($field_name, $options)) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + $ecfTableName = 'ecf'.$projectField['id']; + array_push($fields, "$ecfTableName.value as $field_name"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTableName = 'cfo'.$projectField['id']; + array_push($fields, "$cfoTableName.value as $field_name"); + } + } + } + } if ($options['show_start']) { array_push($fields, 'null'); // null for unformatted_start. array_push($fields, 'null'); // null for start. @@ -557,6 +656,26 @@ static function getItems($options) { } } } + // Left joins for project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($options[$field_name] || $options[$checkbox_field_name] || ttReportHelper::groupingBy($field_name, $options)) { + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } if ($canViewReports || $isClient) $left_joins .= " left join tt_users u on (u.id = ei.user_id)"; if ($options['show_client'] || $grouping_by_client) @@ -826,6 +945,26 @@ static function getTotals($options) } } } + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($field_value) { + // We need to add left joins when input is not null. + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } if (isset($options['show_cost']) && $options['show_cost']) { if (MODE_TIME == $trackingMode) { $left_joins .= " left join tt_users u on (l.user_id = u.id)"; @@ -876,6 +1015,26 @@ static function getTotals($options) } } } + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($field_value) { + // We need to add left joins when input is not null. + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } $sql_for_expenses .= ", sum(cost) as cost, sum(cost) as expenses from tt_expense_items ei $left_joins $where"; @@ -1617,7 +1776,15 @@ static function getReportOptions($bean) { } } - // TODO: add project fields here. + // Project fields. + if ($custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $control_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$control_name; + $options[$control_name] = $bean->getAttribute($control_name); + $options[$checkbox_control_name] = $bean->getAttribute($checkbox_control_name); + } + } } $options['group_by1'] = $bean->getAttribute('group_by1'); @@ -1795,6 +1962,19 @@ static function makeSingleDropdownConcatCustomFieldPart($dropdown_value) { } } } + // Iterate through project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($dropdown_value == $field_name) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + return (", ' - ', coalesce(ecf".$projectField['id'].".value, 'Null')"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + return (", ' - ', coalesce(cfo".$projectField['id'].".value, 'Null')"); + } + } + } + } // Iterate through time custom fields. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { @@ -1829,6 +2009,19 @@ static function makeSingleDropdownConcatCustomFieldExpensesPart($dropdown_value) } } } + // Iterate through project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($dropdown_value == $field_name) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + return (", ' - ', coalesce(ecf".$projectField['id'].".value, 'Null')"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + return (", ' - ', coalesce(cfo".$projectField['id'].".value, 'Null')"); + } + } + } + } // Iterate through time custom fields. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { @@ -1882,6 +2075,19 @@ static function makeSingleDropdownGroupByCustomFieldPart($dropdown_value) { } } } + // Iterate through project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($dropdown_value == $field_name) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + return (", ecf".$projectField['id'].".value as $field_name"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + return (", cfo".$projectField['id'].".value as $field_name"); + } + } + } + } // Iterate through time custom fields. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { @@ -1916,6 +2122,19 @@ static function makeSingleDropdownGroupByCustomFieldExpensesPart($dropdown_value } } } + // Iterate through project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($dropdown_value == $field_name) { + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + return (", ecf".$projectField['id'].".value as $field_name"); + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + return (", cfo".$projectField['id'].".value as $field_name"); + } + } + } + } // Iterate through time custom fields. if ($custom_fields && $custom_fields->timeFields) { foreach ($custom_fields->timeFields as $timeField) { @@ -2151,6 +2370,27 @@ static function makeJoinPart($options) { } } } + // Left joins for project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($field_value || ttReportHelper::groupingBy($field_name, $options)) { + // We need to add left joins when input is not null. + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = l.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } // Prepare inner joins. $inner_joins = null; @@ -2240,6 +2480,27 @@ static function makeJoinExpensesPart($options) { } } } + // Left joins for project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = $options[$field_name]; + $entity_type = CustomFields::ENTITY_PROJECT; + if ($field_value || ttReportHelper::groupingBy($field_name, $options)) { + // We need to add left joins when input is not null. + $ecfTable = 'ecf'.$projectField['id']; + if ($projectField['type'] == CustomFields::TYPE_TEXT) { + // Add one join for each text field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + } elseif ($projectField['type'] == CustomFields::TYPE_DROPDOWN) { + $cfoTable = 'cfo'.$projectField['id']; + // Add two joins for each dropdown field. + $left_joins .= " left join tt_entity_custom_fields $ecfTable on ($ecfTable.entity_type = $entity_type and $ecfTable.entity_id = ei.project_id and $ecfTable.field_id = ".$projectField['id'].")"; + $left_joins .= " left join tt_custom_field_options $cfoTable on ($cfoTable.field_id = $ecfTable.field_id and $cfoTable.id = $ecfTable.option_id)"; + } + } + } + } return $left_joins; } @@ -2299,6 +2560,15 @@ static function makeGroupByHeaderPart($dropdown_value) { } } } + // Process project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + if ($dropdown_value == $field_name) { + return $projectField['label']; + } + } + } // Return null if nothing is found. return null; diff --git a/WEB-INF/templates/report.tpl b/WEB-INF/templates/report.tpl index 3bd9f448c..b63e505f8 100644 --- a/WEB-INF/templates/report.tpl +++ b/WEB-INF/templates/report.tpl @@ -47,6 +47,13 @@ License: See license.txt *} {/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} + {* project custom fields *} + {if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} {if $bean->getAttribute('chtask')}{/if} {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} @@ -91,6 +98,13 @@ License: See license.txt *} {/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} + {* project custom fields *} + {if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} {if $bean->getAttribute('chtask')}{/if} {* time custom fields *} @@ -136,6 +150,14 @@ License: See license.txt *} {/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} + {* project custom fields *} + {if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="control_name" value='project_field_'|cat:$projectField['id']} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} {if $bean->getAttribute('chtask')}{/if} {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} @@ -198,6 +220,13 @@ License: See license.txt *} {/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} + {* project custom fields *} + {if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} {if $bean->getAttribute('chtask')}{/if} {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} @@ -239,6 +268,13 @@ License: See license.txt *} {/if} {if $bean->getAttribute('chclient')}{/if} {if $bean->getAttribute('chproject')}{/if} + {* project custom fields *} + {if isset($custom_fields) && $custom_fields->projectFields} + {foreach $custom_fields->projectFields as $projectField} + {assign var="checkbox_control_name" value='show_project_field_'|cat:$projectField['id']} + {if $bean->getAttribute($checkbox_control_name)}{/if} + {/foreach} + {/if} {if $bean->getAttribute('chtask')}{/if} {* time custom fields *} {if isset($custom_fields) && $custom_fields->timeFields} diff --git a/initialize.php b/initialize.php index f31382c7f..90cd73473 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5734"); +define("APP_VERSION", "1.21.10.5735"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 6d5b441a4..057787e7c 100644 --- a/reports.php +++ b/reports.php @@ -357,6 +357,13 @@ $group_by_options[$field_name] = $userField['label']; } } +// If we have project custom fields - add group by options for them. +if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $group_by_options[$field_name] = $projectField['label']; + } +} $group_by_options_size = sizeof($group_by_options); $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by1','data'=>$group_by_options)); if ($group_by_options_size > 2) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by2','data'=>$group_by_options)); From 3837b1a97765e4533b3aa4baf13cc9c78cc6a3fe Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 23 Oct 2022 15:29:04 +0000 Subject: [PATCH 2430/2515] Fixed pdf reports for per hour cost column, fixed all report exports for project custom fields. --- WEB-INF/lib/common.lib.php | 14 +++++++-- WEB-INF/lib/ttReportHelper.class.php | 11 +++++-- initialize.php | 2 +- tofile.php | 24 ++++++++++++++++ topdf.php | 43 ++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 2d8e287d5..370816cba 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -555,7 +555,7 @@ function ttMitigateCSRF() { return true; } -// ttStartsWith functions checks if a string starts with a given substring. +// ttStartsWith function checks if a string starts with a given substring. function ttStartsWith($string, $startString) { if (is_null($string)) @@ -565,7 +565,7 @@ function ttStartsWith($string, $startString) return (substr($string, 0, $len) === $startString); } -// ttEndsWith functions checks if a string ends with a given substring. +// ttEndsWith function checks if a string ends with a given substring. function ttEndsWith($string, $endString) { $len = strlen($endString); @@ -573,6 +573,16 @@ function ttEndsWith($string, $endString) return (substr($string, -$len) === $endString); } +// ttContains functions checks if a string contains a given substring. +function ttContains($string, $part) +{ + // Note: in php8 we can use str_contanins. + if (strpos($string, $part) !== false) + return true; + + return false; +} + // ttDateToUserFormat converts a date from database format to user format. function ttDateToUserFormat($date) { diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 85c4d80b4..6cfc1464a 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -232,7 +232,7 @@ static function getExpenseWhere($options) { } } - // Continue prparing parts for text custom fields using LIKE operator. + // Continue preparing parts for text custom fields using LIKE operator. if (isset($custom_fields) && $custom_fields->projectFields) { foreach ($custom_fields->projectFields as $projectField) { $field_name = 'project_field_'.$projectField['id']; @@ -2533,7 +2533,7 @@ static function makeGroupByHeaderPart($dropdown_value) { // First, try to get a label from a translation file, which is the most likely scenario // such as grouping by date, user, project, or task. - if (!ttStartsWith($dropdown_value, 'time_field_') && !ttStartsWith($dropdown_value, 'user_field_')) { + if (!ttContains($dropdown_value, '_field_')) { $key = 'label.'.$dropdown_value; $part = $i18n->get($key); if ($part) return $part; @@ -2605,6 +2605,13 @@ static function makeGroupByHeader($options) { // makeGroupByXmlTag creates an xml tag for a totals only report using group_by1, // group_by2, and group_by3 values passed in $options. static function makeGroupByXmlTag($options) { + // Note: there is a problem with this function for custom fields. + // Returned xml tags are like "project_field_1134" and not their user entered labels. + // This is on purpose because we are trying to avoid potential XML parsing problems. + // See https://stackoverflow.com/questions/1478486/using-in-xml-element-name + // Perhaps review this if someone complains, but there are W3C standard (section 2.3) rules + // on names (including starting character). + $tag = ''; if ($options['group_by1'] != null && $options['group_by1'] != 'no_grouping') { // We have group_by1. diff --git a/initialize.php b/initialize.php index 90cd73473..d24ca7fa9 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.10.5735"); +define("APP_VERSION", "1.21.11.5736"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/tofile.php b/tofile.php index 6ea39ad82..0134885f8 100644 --- a/tofile.php +++ b/tofile.php @@ -106,6 +106,14 @@ } if ($bean->getAttribute('chclient')) print "\t\n"; if ($bean->getAttribute('chproject')) print "\t\n"; + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) print "\t<$field_name>\n"; + } + } if ($bean->getAttribute('chtask')) print "\t\n"; // Time custom fields. if (isset($custom_fields) && $custom_fields->timeFields) { @@ -206,6 +214,14 @@ } if ($bean->getAttribute('chclient')) print ',"'.$i18n->get('label.client').'"'; if ($bean->getAttribute('chproject')) print ',"'.$i18n->get('label.project').'"'; + // Project custom field labels. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) print ',"'.ttNeutralizeForCsv($projectField['label']).'"'; + } + } if ($bean->getAttribute('chtask')) print ',"'.$i18n->get('label.task').'"'; // Time custom field labels. if (isset($custom_fields) && $custom_fields->timeFields) { @@ -246,6 +262,14 @@ } if ($bean->getAttribute('chclient')) print ',"'.ttNeutralizeForCsv($item['client']).'"'; if ($bean->getAttribute('chproject')) print ',"'.ttNeutralizeForCsv($item['project']).'"'; + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) print ',"'.ttNeutralizeForCsv($item[$field_name]).'"'; + } + } if ($bean->getAttribute('chtask')) print ',"'.ttNeutralizeForCsv($item['task']).'"'; // Time custom fields. if (isset($custom_fields) && $custom_fields->timeFields) { diff --git a/topdf.php b/topdf.php index 931fa8145..4e1e677db 100644 --- a/topdf.php +++ b/topdf.php @@ -139,6 +139,14 @@ } if ($bean->getAttribute('chclient')) { $colspan++; $html .= ''; } if ($bean->getAttribute('chproject')) { $colspan++; $html .= ''; } + // Project custom field labels. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) { $colspan++; $html .= ''; } + } + } if ($bean->getAttribute('chtask')) { $colspan++; $html .= ''; } // Time custom field labels. if (isset($custom_fields) && $custom_fields->timeFields) { @@ -194,6 +202,14 @@ $html .= htmlspecialchars($subtotals[$prev_grouped_by]['project']); $html .= ''; } + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) $html .= ''; + } + } if ($bean->getAttribute('chtask')) { $html .= ''; if ($bean->getAttribute('chunits')) $html .= "'; if ($show_note_column) $html .= ''; + if ($bean->getAttribute('chcost') && $show_cost_per_hour) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($bean->getAttribute('chproject')) $html .= ''; + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) $html .= ''; + } + } if ($bean->getAttribute('chtask')) $html .= ''; // Time custom fields. if (isset($custom_fields) && $custom_fields->timeFields) { @@ -339,6 +364,14 @@ $html .= htmlspecialchars($subtotals[$prev_grouped_by]['project']); $html .= ''; } + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) $html .= ''; + } + } if ($bean->getAttribute('chtask')) { $html .= ''; if ($bean->getAttribute('chunits')) $html .= "'; if ($show_note_column) $html .= ''; + if ($bean->getAttribute('chcost') && $show_cost_per_hour) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($bean->getAttribute('chproject')) $html .= ''; + // Project custom fields. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($bean->getAttribute($checkbox_control_name)) $html .= ''; + } + } if ($bean->getAttribute('chtask')) $html .= ''; // Time custom fields. if (isset($custom_fields) && $custom_fields->timeFields) { @@ -402,6 +444,7 @@ if ($bean->getAttribute('chduration')) $html .= "'; if ($bean->getAttribute('chunits')) $html .= "'; if ($show_note_column) $html .= ''; + if ($bean->getAttribute('chcost') && $show_cost_per_hour) $html .= ''; if ($bean->getAttribute('chcost')) { $html .= "'; if ($options['show_project']) $body .= ''; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $body .= ''; + } + } if ($options['show_task']) $body .= ''; // Time custom fields. @@ -1412,6 +1428,14 @@ static function prepareReportBody($options, $comment = null) } if ($options['show_client']) $body .= ''; if ($options['show_project']) $body .= ''; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $body .= ''; + } + } if ($options['show_task']) $body .= ''; // Time custom fields. if ($custom_fields && $custom_fields->timeFields) { @@ -1462,6 +1486,14 @@ static function prepareReportBody($options, $comment = null) $body .= ''; if ($options['show_project']) $body .= ''; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $body .= ''; + } + } if ($options['show_task']) $body .= ''; // Time custom fields. @@ -1534,6 +1566,14 @@ static function prepareReportBody($options, $comment = null) } if ($options['show_client']) $body .= ''; if ($options['show_project']) $body .= ''; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $body .= ''; + } + } if ($options['show_task']) $body .= ''; // Time custom fields. if ($custom_fields && $custom_fields->timeFields) { @@ -1577,6 +1617,14 @@ static function prepareReportBody($options, $comment = null) } if ($options['show_client']) $body .= ''; if ($options['show_project']) $body .= ''; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $body .= ''; + } + } if ($options['show_task']) $body .= ''; // Time custom fields. if ($custom_fields && $custom_fields->timeFields) { diff --git a/initialize.php b/initialize.php index d24ca7fa9..d310471ee 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.11.5736"); +define("APP_VERSION", "1.21.11.5737"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 95481ddf41d2914555d8b48b6dcfd7acb7aa25f1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 23 Oct 2022 16:15:16 +0000 Subject: [PATCH 2432/2515] Fixed fav reports to keep project custom fields settings. --- WEB-INF/lib/ttFavReportHelper.class.php | 23 +++++++++++++++++++++++ initialize.php | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index df756649e..0d8cc071f 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -328,6 +328,17 @@ static function loadReport(&$bean) { $bean->setAttribute($checkbox_field_name, $checkbox_value); } } + // Project custom field settings. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + $field_value = ttFavReportHelper::getFieldSettingFromReportSpec($field_name, $report_spec); + $bean->setAttribute($field_name, $field_value); + $checkbox_value = ttFavReportHelper::getFieldSettingFromReportSpec($checkbox_field_name, $report_spec); + $bean->setAttribute($checkbox_field_name, $checkbox_value); + } + } } $bean->setAttribute('client', $val['client_id']); @@ -579,6 +590,18 @@ static function makeReportSpec($bean) { } } + // Add project custom field settings. + if (isset($custom_fields) && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $field_value = str_replace(',',',',$bean->getAttribute($field_name)); + $checkbox_field_name = 'show_'.$field_name; + $checkbox_field_value = (int) $bean->getAttribute($checkbox_field_name); + if ($field_value) $reportSpecArray[] = $field_name.':'.$field_value; + if ($checkbox_field_value) $reportSpecArray[] = $checkbox_field_name.':1'; + } + } + $reportSpec = null; if (isset($reportSpecArray)) $reportSpec = implode(',', $reportSpecArray); diff --git a/initialize.php b/initialize.php index d310471ee..5ff396459 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.11.5737"); +define("APP_VERSION", "1.21.11.5738"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 10713c13048462dbd2c33c7cc38492f4c7a140af Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 23 Oct 2022 16:24:37 +0000 Subject: [PATCH 2433/2515] Fixed adjusting fav report options for cron. --- WEB-INF/lib/ttFavReportHelper.class.php | 12 +++++++++++- initialize.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttFavReportHelper.class.php b/WEB-INF/lib/ttFavReportHelper.class.php index 0d8cc071f..00a1bd5bb 100644 --- a/WEB-INF/lib/ttFavReportHelper.class.php +++ b/WEB-INF/lib/ttFavReportHelper.class.php @@ -541,7 +541,17 @@ static function adjustOptions($options) { $options[$checkbox_field_name] = $checkbox_value; } } - // TODO: add project fields here. + // Project fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_field_name = 'show_'.$field_name; + $field_value = ttFavReportHelper::getFieldSettingFromReportSpec($field_name, $report_spec); + $options[$field_name] = $field_value; + $checkbox_value = ttFavReportHelper::getFieldSettingFromReportSpec($checkbox_field_name, $report_spec); + $options[$checkbox_field_name] = $checkbox_value; + } + } } // Adjust period_start and period_end to user date format. diff --git a/initialize.php b/initialize.php index 5ff396459..5fd8012f6 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.11.5738"); +define("APP_VERSION", "1.21.11.5739"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 00a75a7ed04fa22de4211891580deee454f04ec2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 23 Oct 2022 16:32:14 +0000 Subject: [PATCH 2434/2515] Initial implementation of project custom fields. --- cf_custom_field_add.php | 17 +++++------------ initialize.php | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index 38d672822..c10803758 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -27,18 +27,11 @@ $form = new Form('fieldForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>'')); -if (defined('DEBUG_PROJECT_CUSTOM_FIELDS')) { - $form->addInput(array('type'=>'combobox','name'=>'entity', - 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), - CustomFields::ENTITY_USER=>$i18n->get('entity.user'), - CustomFields::ENTITY_PROJECT=>$i18n->get('entity.project')) - )); -} else { - $form->addInput(array('type'=>'combobox','name'=>'entity', - 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), - CustomFields::ENTITY_USER=>$i18n->get('entity.user')) - )); -} +$form->addInput(array('type'=>'combobox','name'=>'entity', + 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), + CustomFields::ENTITY_USER=>$i18n->get('entity.user'), + CustomFields::ENTITY_PROJECT=>$i18n->get('entity.project')) +)); $form->addInput(array('type'=>'combobox','name'=>'type', 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->get('label.type_text'), CustomFields::TYPE_DROPDOWN=>$i18n->get('label.type_dropdown')) diff --git a/initialize.php b/initialize.php index 5fd8012f6..552e5e2cb 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.11.5739"); +define("APP_VERSION", "1.21.12.5740"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c0ae1e6d07f2a64e4d54e47133b5bfda29ffcf87 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Oct 2022 16:26:46 +0000 Subject: [PATCH 2435/2515] Added a what is it link explaining note cotaining option in reports. --- WEB-INF/templates/reports.tpl | 5 ++++- initialize.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/reports.tpl b/WEB-INF/templates/reports.tpl index 6a5ecbbe0..42cdd661f 100644 --- a/WEB-INF/templates/reports.tpl +++ b/WEB-INF/templates/reports.tpl @@ -358,7 +358,10 @@ function handleCheckboxes() { - +
{$forms.projectForm.description.control}
{$forms.projectForm.$control_name.control}
{$forms.projectForm.description.control}
{$forms.projectForm.$control_name.control}
{$i18n.form.reports.project_fields}
{$i18n.label.client}{$i18n.label.project}{{$projectField['label']|escape}}{$i18n.label.task}{$subtotals[$prev_grouped_by]['client']|escape}{$subtotals[$prev_grouped_by]['project']|escape}{$subtotals[$prev_grouped_by]['task']|escape}{$item.client|escape}{$item.project|escape}{$item.$control_name|escape}{$item.task|escape}{$subtotals[$cur_grouped_by]['client']|escape}{$subtotals[$cur_grouped_by]['project']|escape}{$subtotals[$cur_grouped_by]['task']|escape}'.$i18n->get('label.client').''.$i18n->get('label.project').''.htmlspecialchars($projectField['label']).''.$i18n->get('label.task').''; $html .= htmlspecialchars($subtotals[$prev_grouped_by]['task']); @@ -212,6 +228,7 @@ if ($bean->getAttribute('chduration')) $html .= "".$subtotals[$prev_grouped_by]['time'].'".$subtotals[$prev_grouped_by]['units'].'"; if ($user->can('manage_invoices') || $user->isClient()) @@ -254,6 +271,14 @@ } if ($bean->getAttribute('chclient')) $html .= ''.htmlspecialchars($item['client']).''.htmlspecialchars($item['project']).''.htmlspecialchars($item[$field_name]).''.htmlspecialchars($item['task']).''; $html .= htmlspecialchars($subtotals[$prev_grouped_by]['task']); @@ -357,6 +390,7 @@ if ($bean->getAttribute('chduration')) $html .= "".$subtotals[$prev_grouped_by]['time'].'".$subtotals[$prev_grouped_by]['units'].'"; if ($user->can('manage_invoices') || $user->isClient()) @@ -388,6 +422,14 @@ } if ($bean->getAttribute('chclient')) $html .= '".$totals['time'].'".$totals['units'].'".htmlspecialchars($user->currency).' '; if ($user->can('manage_invoices') || $user->isClient()) From 0ec60fc296df0ca7447db3e2b725c8bbcac24e39 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 23 Oct 2022 15:46:07 +0000 Subject: [PATCH 2431/2515] Fixed emailed reports to handle project custom fields. --- WEB-INF/lib/common.lib.php | 2 +- WEB-INF/lib/ttReportHelper.class.php | 48 ++++++++++++++++++++++++++++ initialize.php | 2 +- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 370816cba..0f38f80fa 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -573,7 +573,7 @@ function ttEndsWith($string, $endString) return (substr($string, -$len) === $endString); } -// ttContains functions checks if a string contains a given substring. +// ttContains function checks if a string contains a given substring. function ttContains($string, $part) { // Note: in php8 we can use str_contanins. diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 6cfc1464a..a3f894497 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -1232,6 +1232,14 @@ static function prepareReportBody($options, $comment = null) } if ($options['show_client']) $colspan++; if ($options['show_project']) $colspan++; + // Project custom fields. + if ($custom_fields && $custom_fields->projectFields) { + foreach ($custom_fields->projectFields as $projectField) { + $field_name = 'project_field_'.$projectField['id']; + $checkbox_control_name = 'show_'.$field_name; + if ($options[$checkbox_control_name]) $colspan++; + } + } if ($options['show_task']) $colspan++; // Time custom fields. if ($custom_fields && $custom_fields->timeFields) { @@ -1342,6 +1350,14 @@ static function prepareReportBody($options, $comment = null) $body .= ''.$i18n->get('label.client').''.$i18n->get('label.project').''.htmlspecialchars($projectField['label']).''.$i18n->get('label.task').''.$subtotals[$prev_grouped_by]['client'].''.$subtotals[$prev_grouped_by]['project'].''.$subtotals[$prev_grouped_by]['task'].''.htmlspecialchars($record['client']).''.htmlspecialchars($record['project']).''.htmlspecialchars($record[$field_name]).''.htmlspecialchars($record['task']).''.$subtotals[$prev_grouped_by]['client'].''.$subtotals[$prev_grouped_by]['project'].''.$subtotals[$prev_grouped_by]['task'].'
{$forms.reportForm.note_containing.control}{$forms.reportForm.note_containing.control} + {$i18n.label.what_is_it} + {$i18n.label.what_is_it} +
diff --git a/initialize.php b/initialize.php index 552e5e2cb..0e90ef89d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.12.5740"); +define("APP_VERSION", "1.21.12.5741"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3102ef6e950150eccccee5f63922bf25fae8a83c Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 27 Oct 2022 15:18:50 +0000 Subject: [PATCH 2436/2515] Version change for 1.22 release. --- initialize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index 0e90ef89d..7fcb17aa2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.21.12.5741"); +define("APP_VERSION", "1.22.0.5742"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c4d2026603df8fa31a31f2ea440df436d67df7a7 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 27 Oct 2022 19:55:16 +0000 Subject: [PATCH 2437/2515] Addressed some php8 warnings. --- WEB-INF/lib/ttUser.class.php | 2 +- WEB-INF/lib/ttWeekViewHelper.class.php | 108 +++++++++++++++++++------ initialize.php | 2 +- 3 files changed, 86 insertions(+), 26 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index e0565b3dd..2e7ff2793 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -682,7 +682,7 @@ function updateGroup($fields) { $name_part = $description_part = $currency_part = $lang_part = $decimal_mark_part = $date_format_part = $time_format_part = $week_start_part = $tracking_mode_part = $project_required_part = $record_type_part = $bcc_email_part = $allow_ip_part = - $plugins_part = $config_part = $custom_css_part = $lock_spec_part = $holidays_part = $workday_minutes_part = ''; + $password_complexity_part = $plugins_part = $config_part = $custom_css_part = $lock_spec_part = $holidays_part = $workday_minutes_part = ''; if (isset($fields['name'])) $name_part = ', name = '.$mdb2->quote($fields['name']); if (isset($fields['description'])) $description_part = ', description = '.$mdb2->quote($fields['description']); if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); diff --git a/WEB-INF/lib/ttWeekViewHelper.class.php b/WEB-INF/lib/ttWeekViewHelper.class.php index 9908d12b4..4ee5346a9 100644 --- a/WEB-INF/lib/ttWeekViewHelper.class.php +++ b/WEB-INF/lib/ttWeekViewHelper.class.php @@ -167,22 +167,37 @@ static function getDataForWeekView($records, $dayHeaders) { global $i18n; $dataArray = array(); + $includeWeekends = $user->isOptionEnabled('weekends'); $includeNotes = $user->isOptionEnabled('week_notes'); // Construct the first row for a brand new entry. $dataArray[] = array('row_id' => null,'label' => $i18n->get('form.week.new_entry').':'); // Insert row. // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = '0_'. $dayHeaders[$i]; - $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } } if ($includeNotes) { // Construct the second row for daily comments for a brand new entry. $dataArray[] = array('row_id' => null,'label' => $i18n->get('label.notes').':'); // Insert row. // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = '1_'. $dayHeaders[$i]; - $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } } } @@ -205,18 +220,32 @@ static function getDataForWeekView($records, $dayHeaders) { $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); $pos = ttWeekViewHelper::findRow($row_id, $dataArray); // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = $pos.'_'. $dayHeaders[$i]; - $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } } // Insert row for comments. if ($includeNotes) { $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->get('label.notes').':'); $pos++; // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = $pos.'_'. $dayHeaders[$i]; - $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } } $pos--; } @@ -267,21 +296,38 @@ static function prePopulateFromPastWeeks($startDate, $dayHeaders) { } } + // We will need this for iterations below. + $includeWeekends = $user->isOptionEnabled('weekends'); + // Construct the first row for a brand new entry. $dataArray[] = array('row_id' => null,'label' => $i18n->get('form.week.new_entry').':'); // Insert row. // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = '0_'. $dayHeaders[$i]; - $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = '0_'. $dayHeaders[$i]; + $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } } $includeNotes = $user->isOptionEnabled('week_notes'); if ($includeNotes) { // Construct the second row for daily comments for a brand new entry. $dataArray[] = array('row_id' => null,'label' => $i18n->get('label.notes').':'); // Insert row. // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = '1_'. $dayHeaders[$i]; - $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = '1_'. $dayHeaders[$i]; + $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } } } @@ -296,18 +342,32 @@ static function prePopulateFromPastWeeks($startDate, $dayHeaders) { $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record)); $pos = ttWeekViewHelper::findRow($row_id, $dataArray); // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = $pos.'_'. $dayHeaders[$i]; - $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null); + } } // Insert row for comments. if ($includeNotes) { $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->get('label.notes').':'); $pos++; // Insert empty cells with proper control ids. - for ($i = 0; $i < 7; $i++) { - $control_id = $pos.'_'. $dayHeaders[$i]; - $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + if ($includeWeekends) { + for ($i = 0; $i < 7; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } + } else { + for ($i = 1; $i < 6; $i++) { + $control_id = $pos.'_'. $dayHeaders[$i]; + $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null); + } } $pos--; } diff --git a/initialize.php b/initialize.php index 7fcb17aa2..04f1245cf 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.0.5742"); +define("APP_VERSION", "1.22.0.5743"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From c2c48e291c4b12bb2e8fb5c64fc25ea5d1ae17b5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 28 Oct 2022 13:57:06 +0000 Subject: [PATCH 2438/2515] Fixed a bug on week view related to locking. Addressed a few php8 warnings. --- WEB-INF/templates/charts.tpl | 2 +- WEB-INF/templates/expenses.tpl | 2 +- WEB-INF/templates/time.tpl | 2 +- WEB-INF/templates/timesheets.tpl | 2 +- WEB-INF/templates/week.tpl | 2 +- initialize.php | 2 +- week.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl index ff15ea8f2..b38988e89 100644 --- a/WEB-INF/templates/charts.tpl +++ b/WEB-INF/templates/charts.tpl @@ -25,7 +25,7 @@ function adjustTodayLinks() {
{$forms.chartForm.date.control}
-{if $user_dropdown} +{if isset($user_dropdown)} diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl index 5b1da05fc..859ae3506 100644 --- a/WEB-INF/templates/expenses.tpl +++ b/WEB-INF/templates/expenses.tpl @@ -119,7 +119,7 @@ function recalculateCost() {
{$forms.expensesForm.date.control}
{$forms.chartForm.date.control}
-{if $user_dropdown} +{if isset($user_dropdown)} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index b601531ba..fa24e8062 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -23,7 +23,7 @@ function handleStop(buttonElement) {
{$forms.timeRecordForm.date.control}
{$forms.expensesForm.date.control}
-{if $user_dropdown} +{if isset($user_dropdown)} diff --git a/WEB-INF/templates/timesheets.tpl b/WEB-INF/templates/timesheets.tpl index e5f9abdb6..2bd927369 100644 --- a/WEB-INF/templates/timesheets.tpl +++ b/WEB-INF/templates/timesheets.tpl @@ -7,7 +7,7 @@ License: See license.txt *} {$forms.timesheetsForm.open}
{$forms.timeRecordForm.date.control}
-{if $user_dropdown} +{if isset($user_dropdown)} diff --git a/WEB-INF/templates/week.tpl b/WEB-INF/templates/week.tpl index 74e94053f..6032d4eb5 100644 --- a/WEB-INF/templates/week.tpl +++ b/WEB-INF/templates/week.tpl @@ -28,7 +28,7 @@ function fillDropdowns() {
{$forms.weekTimeForm.date.control}
-{if $user_dropdown} +{if isset($user_dropdown)} diff --git a/initialize.php b/initialize.php index 04f1245cf..1ebbab823 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.0.5743"); +define("APP_VERSION", "1.22.1.5744"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/week.php b/week.php index 302e4dfb3..9d96abfbe 100644 --- a/week.php +++ b/week.php @@ -228,7 +228,7 @@ function render(&$table, $value, $row, $column, $selected = false) { $field = new TextField($field_name); // Disable control if the date is locked. global $lockedDays; - if ($lockedDays[$column-1]) + if ($lockedDays[$column]) $field->setEnabled(false); $field->setFormName($table->getFormName()); $field->setStyle('width: 60px;'); // TODO: need to style everything properly, eventually. From 50796b8d606dae53f1c39fa08e44be4f86e863f4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 28 Oct 2022 15:40:46 +0000 Subject: [PATCH 2439/2515] Addressed a few more php8 warnings. --- WEB-INF/lib/ttUser.class.php | 2 +- WEB-INF/lib/ttUserHelper.class.php | 3 ++- initialize.php | 2 +- topdf.php | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 2e7ff2793..b32c27792 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -151,7 +151,7 @@ function __construct($login, $id = null) { // getUser returns user id on behalf of whom the current user is operating. function getUser() { - return ($this->behalfUser ? $this->behalfUser->id : $this->id); + return (isset($this->behalfUser) ? $this->behalfUser->id : $this->id); } // getName returns user name on behalf of whom the current user is operating. diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index 122c7889c..2aeada43c 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -68,7 +68,8 @@ static function getUserIdByTmpRef($ref) { if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - return $val['user_id']; + if ($val) + return $val['user_id']; } return false; } diff --git a/initialize.php b/initialize.php index 1ebbab823..432cbb891 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.1.5744"); +define("APP_VERSION", "1.22.1.5745"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/topdf.php b/topdf.php index 4e1e677db..6393d5f55 100644 --- a/topdf.php +++ b/topdf.php @@ -55,6 +55,7 @@ $totals = ttReportHelper::getTotals($options); // Totals for the entire report. // Assign variables that are used to print subtotals. +$print_subtotals = $first_pass = false; if ($items && $grouping) { $print_subtotals = true; $first_pass = true; From 89cae455e41364dec480637ec387e3e849e84c25 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 5 Nov 2022 14:59:31 +0000 Subject: [PATCH 2440/2515] Started work on adding a fav report selector on charts. --- WEB-INF/templates/charts.tpl | 67 ++++++++++++++++++++++++++++++------ charts.php | 16 ++++++++- initialize.php | 2 +- 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl index b38988e89..ee0c48346 100644 --- a/WEB-INF/templates/charts.tpl +++ b/WEB-INF/templates/charts.tpl @@ -19,26 +19,59 @@ function adjustTodayLinks() { } } } + +// handleFavReportSelection - manages visibility of controls that are not relevant +// when a fav report is selected. +function handleFavReportSelection() { + var selectedFavReportId = document.getElementById("favorite_report").value; + + var userLabel = document.getElementById("user_label"); + var userControl = document.getElementById("user_control"); + var intervalLabel = document.getElementById("interval_label"); + var intervalControl = document.getElementById("interval_control"); + + if (selectedFavReportId == -1) { + if (userLabel != null) { + userLabel.style.display = ""; + } + if (userControl != null) { + userControl.style.display = ""; + } + if (intervalLabel != null) { + intervalLabel.style.display = ""; + } + if (intervalControl != null) { + intervalControl.style.display = ""; + } + } else { + if (userLabel != null) { + userLabel.style.display = "none"; + } + if (userControl != null) { + userControl.style.display = "none"; + } + if (intervalLabel != null) { + intervalLabel.style.display = "none"; + } + if (intervalControl != null) { + intervalControl.style.display = "none"; + } + } +} {$forms.chartForm.open}
{$forms.chartForm.date.control}
{$forms.weekTimeForm.date.control}
-{if isset($user_dropdown)} - +{if defined('FAV_REPORTS_ON_CHARTS_DEBUG')} + - - + + {/if} - - - - - - {if $chart_selector} @@ -47,6 +80,20 @@ function adjustTodayLinks() { {/if} +{if isset($user_dropdown)} + + + + + + +{/if} + + + + + +
{$forms.chartForm.date.control}
{$forms.chartForm.user.control}{$forms.chartForm.favorite_report.control}
{$forms.chartForm.interval.control}
{$forms.chartForm.user.control}
{$forms.chartForm.interval.control}
diff --git a/charts.php b/charts.php index 1ad1c88d9..10335594a 100644 --- a/charts.php +++ b/charts.php @@ -12,6 +12,7 @@ import('PieChartEx'); import('ttUserHelper'); import('ttTeamHelper'); +import('ttFavReportHelper'); define('ALL_USERS_OPTION_ID', -1); // An identifier for "all users" seclection in User dropdown. @@ -106,7 +107,7 @@ // Set user selection to all users, if necessary. $allUsersSetInSession = @$_SESSION['chart_all_users']; if ($allUsersSetInSession) - $userDropdownSelectionId = constant('ALL_USERS_OPTION_ID'); + $userDropdownSelectionId = constant('ALL_USERS_OPTION_ID'); } // Elements of chartForm. @@ -177,6 +178,19 @@ $largeScreenCalendarRowSpan += 2; } +// Fav report control. +if (defined('FAV_REPORTS_ON_CHARTS_DEBUG')) { + // Get saved favorite reports for user. + $report_list = ttFavReportHelper::getReports(); + $chart_form->addInput(array('type'=>'combobox', + 'name'=>'favorite_report', + 'onchange'=>'handleFavReportSelection();this.form.submit();', + 'data'=>$report_list, + 'datakeys'=>array('id','name'), + 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); + $largeScreenCalendarRowSpan += 2; +} + // Calendar. $chart_form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar diff --git a/initialize.php b/initialize.php index 432cbb891..8bc3c5f4c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.1.5745"); +define("APP_VERSION", "1.22.1.5746"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6f0f261a87ab5c4bd59866a45c087f17af044cd3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 5 Nov 2022 16:17:41 +0000 Subject: [PATCH 2441/2515] Some progress on handling fav reports in charts. --- charts.php | 97 ++++++++++++++++++++++++++++---------------------- initialize.php | 2 +- 2 files changed, 55 insertions(+), 44 deletions(-) diff --git a/charts.php b/charts.php index 10335594a..aa0b9bd51 100644 --- a/charts.php +++ b/charts.php @@ -79,10 +79,9 @@ $_SESSION['date'] = $cl_date; if ($request->isPost()) { - $cl_interval = (int)$request->getParameter('interval'); - if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; - $_SESSION['chart_interval'] = $cl_interval; - $uc->setValue(SYSC_CHART_INTERVAL, $cl_interval); + $cl_fav_report = (int)$request->getParameter('favorite_report'); + if (!$cl_fav_report) $cl_fav_report = -1; + $_SESSION['fav_report'] = $cl_fav_report; $cl_type = (int)$request->getParameter('type'); if (!$cl_type) $cl_type = ttChartHelper::adjustType($cl_type); @@ -91,12 +90,16 @@ // Remember all users selection in session. $_SESSION['chart_all_users'] = $userDropdownSelectionId == constant('ALL_USERS_OPTION_ID') ? true : false; -} else { - // Initialize chart interval. - $cl_interval = @$_SESSION['chart_interval']; - if (!$cl_interval) $cl_interval = $uc->getValue(SYSC_CHART_INTERVAL); + + $cl_interval = (int)$request->getParameter('interval'); if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; $_SESSION['chart_interval'] = $cl_interval; + $uc->setValue(SYSC_CHART_INTERVAL, $cl_interval); +} else { + // Initialize fav report selector. + $cl_fav_report = @$_SESSION['fav_report']; + if (!$cl_fav_report) $cl_fav_report = -1; + $_SESSION['fav_report'] = $cl_fav_report; // Initialize chart type. $cl_type = @$_SESSION['chart_type']; @@ -108,12 +111,53 @@ $allUsersSetInSession = @$_SESSION['chart_all_users']; if ($allUsersSetInSession) $userDropdownSelectionId = constant('ALL_USERS_OPTION_ID'); + + // Initialize chart interval. + $cl_interval = @$_SESSION['chart_interval']; + if (!$cl_interval) $cl_interval = $uc->getValue(SYSC_CHART_INTERVAL); + if (!$cl_interval) $cl_interval = INTERVAL_THIS_MONTH; + $_SESSION['chart_interval'] = $cl_interval; } // Elements of chartForm. $chart_form = new Form('chartForm'); $largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. +// Fav report control. +if (defined('FAV_REPORTS_ON_CHARTS_DEBUG')) { + // Get saved favorite reports for user. + $report_list = ttFavReportHelper::getReports(); + $chart_form->addInput(array('type'=>'combobox', + 'name'=>'favorite_report', + 'onchange'=>'handleFavReportSelection();this.form.submit();', + 'data'=>$report_list, + 'value' => $cl_fav_report, + 'datakeys'=>array('id','name'), + 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); + $largeScreenCalendarRowSpan += 2; +} + +// Chart type options. +$chart_selector = (MODE_PROJECTS_AND_TASKS == $tracking_mode || $user->isPluginEnabled('cl')); +if ($chart_selector) { + $types = array(); + if (MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode) + $types[CHART_PROJECTS] = $i18n->get('dropdown.projects'); + if (MODE_PROJECTS_AND_TASKS == $tracking_mode) + $types[CHART_TASKS] = $i18n->get('dropdown.tasks'); + if ($user->isPluginEnabled('cl')) + $types[CHART_CLIENTS] = $i18n->get('dropdown.clients'); + + // Add chart type dropdown. + $chart_form->addInput(array('type' => 'combobox', + 'onchange' => 'this.form.submit();', + 'name' => 'type', + 'value' => $cl_type, + 'data' => $types + )); + $largeScreenCalendarRowSpan += 2; +} + // User dropdown. Changes the user "on behalf" of whom we are working. if ($user->can('view_charts') || $user->can('view_all_charts')) { $rank = $user->getMaxRankForGroup($user->getGroup()); @@ -157,44 +201,11 @@ )); $largeScreenCalendarRowSpan += 2; -// Chart type options. -$chart_selector = (MODE_PROJECTS_AND_TASKS == $tracking_mode || $user->isPluginEnabled('cl')); -if ($chart_selector) { - $types = array(); - if (MODE_PROJECTS == $tracking_mode || MODE_PROJECTS_AND_TASKS == $tracking_mode) - $types[CHART_PROJECTS] = $i18n->get('dropdown.projects'); - if (MODE_PROJECTS_AND_TASKS == $tracking_mode) - $types[CHART_TASKS] = $i18n->get('dropdown.tasks'); - if ($user->isPluginEnabled('cl')) - $types[CHART_CLIENTS] = $i18n->get('dropdown.clients'); - - // Add chart type dropdown. - $chart_form->addInput(array('type' => 'combobox', - 'onchange' => 'this.form.submit();', - 'name' => 'type', - 'value' => $cl_type, - 'data' => $types - )); - $largeScreenCalendarRowSpan += 2; -} - -// Fav report control. -if (defined('FAV_REPORTS_ON_CHARTS_DEBUG')) { - // Get saved favorite reports for user. - $report_list = ttFavReportHelper::getReports(); - $chart_form->addInput(array('type'=>'combobox', - 'name'=>'favorite_report', - 'onchange'=>'handleFavReportSelection();this.form.submit();', - 'data'=>$report_list, - 'datakeys'=>array('id','name'), - 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); - $largeScreenCalendarRowSpan += 2; -} - // Calendar. $chart_form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar // Get data for our chart. +// TODO: adjust this call below for fav report selection. $totals = ttChartHelper::getTotals($userDropdownSelectionId, $cl_type, $cl_date, $cl_interval); $smarty->assign('totals', $totals); @@ -243,7 +254,7 @@ $smarty->assign('large_screen_calendar_row_span', $largeScreenCalendarRowSpan); $smarty->assign('img_file_name', $img_ref); $smarty->assign('chart_selector', $chart_selector); -$smarty->assign('onload', 'onLoad="adjustTodayLinks()"'); +$smarty->assign('onload', 'onLoad="adjustTodayLinks();handleFavReportSelection();"'); $smarty->assign('forms', array($chart_form->getName() => $chart_form->toArray())); $smarty->assign('title', $i18n->get('title.charts')); $smarty->assign('content_page_name', 'charts.tpl'); diff --git a/initialize.php b/initialize.php index 8bc3c5f4c..c99e16dc3 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.1.5746"); +define("APP_VERSION", "1.22.1.5747"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6b0489f569695247ba373b3a8c3e39f96fe7eacb Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 5 Nov 2022 17:30:23 +0000 Subject: [PATCH 2442/2515] Initial implenentation of fav reports on charts. --- WEB-INF/lib/ttChartHelper.class.php | 100 +++++++++++++++++++++++++++- charts.php | 6 +- initialize.php | 2 +- 3 files changed, 104 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index f0523036d..7ee712796 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -4,6 +4,8 @@ import('ttPeriod'); import('ttTimeHelper'); +import('ttFavReportHelper'); +import('ttReportHelper'); // Definitions for chart types. define('CHART_PROJECTS', 1); @@ -13,7 +15,7 @@ // Class ttChartHelper is a helper class for charts. class ttChartHelper { - // getTotals - returns total times by project or task for a given user in a specified period. + // getTotals - returns total times by project, task, or client for a given user in a specified period. static function getTotals($user_id, $chart_type, $selected_date, $interval_type) { global $user; @@ -123,6 +125,102 @@ static function getTotals($user_id, $chart_type, $selected_date, $interval_type) return $result; } + + // getTotals - returns total times by project, task, or client for a selected fav report. + static function getTotalsForFavReport($fav_report_id, $chart_type) { + + global $user; + + // Use custom fields plugin if it is enabled. + if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + } + + $result = array(); + $mdb2 = getConnection(); + + // Get favorite report details. + $options = ttFavReportHelper::getReportOptions($fav_report_id); + if (!$options) + return $result; // Return empty array if something went wrong. + + $options = ttFavReportHelper::adjustOptions($options); + + // Obtain the where clause for fav report. + $where = ttReportHelper::getWhere($options); + + // Build sql query according to selected chart type. + if (CHART_PROJECTS == $chart_type) { + // Data for projects. + $sql = "select p.name as name, sum(time_to_sec(l.duration)) as time from tt_log l + left join tt_projects p on (p.id = l.project_id) + $where group by l.project_id"; + } elseif (CHART_TASKS == $chart_type) { + // Data for tasks. + $sql = "select t.name as name, sum(time_to_sec(l.duration)) as time from tt_log l + left join tt_tasks t on (t.id = l.task_id) + $where group by l.task_id"; + } elseif (CHART_CLIENTS == $chart_type) { + // Data for clients. + $sql = "select c.name as name, sum(time_to_sec(l.duration)) as time from tt_log l + left join tt_clients c on (c.id = l.client_id) + $where group by l.client_id"; + } + + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + if ($val['time'] > 0) // Only positive totals make sense in pie charts. Skip negatives entirely. + $result[] = array('name'=>$val['name'],'time'=>$val['time']); // name - entity name, time - total for entity in seconds. + } + } + + // Get total time. We'll need it to calculate percentages (for labels to the right of diagram). + $total = 0; + foreach ($result as $one_val) { + $total += $one_val['time']; + } + // Add a string representation of time + percentage to names. Example: "Time Tracker (1:15 - 6%)". + foreach ($result as &$one_val) { + $percent = round(100*$one_val['time']/$total).'%'; + $one_val['name'] .= ' ('.ttTimeHelper::minutesToDuration($one_val['time'] / 60).' - '.$percent.')'; + } + + // Note: the remaining code here is needed to display labels on the side of the diagram. + // We print labels ourselves (not using libchart.php) because quality of libchart labels is not good. + + // Note: Optimize this sorting and reversing. + $result = mu_sort($result, 'time'); + $result = array_reverse($result); // This is to assign correct colors to labels. + + // Add color to array items. This is used in labels on the side of a chart. + $colors = array( + array(2, 78, 0), + array(148, 170, 36), + array(233, 191, 49), + array(240, 127, 41), + array(243, 63, 34), + array(190, 71, 47), + array(135, 81, 60), + array(128, 78, 162), + array(121, 75, 255), + array(142, 165, 250), + array(162, 254, 239), + array(137, 240, 166), + array(104, 221, 71), + array(98, 174, 35), + array(93, 129, 1) + ); + for ($i = 0; $i < count($result); $i++) { + $color = $colors[$i%count($colors)]; + $result[$i]['color_html'] = sprintf('#%02x%02x%02x', $color[0], $color[1], $color[2]); + } + + return $result; + } + + // adjustType - adjust chart type to something that is available for a group. static function adjustType($requested_type) { global $user; diff --git a/charts.php b/charts.php index aa0b9bd51..9a67e86e9 100644 --- a/charts.php +++ b/charts.php @@ -205,8 +205,10 @@ $chart_form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar // Get data for our chart. -// TODO: adjust this call below for fav report selection. -$totals = ttChartHelper::getTotals($userDropdownSelectionId, $cl_type, $cl_date, $cl_interval); +if ($cl_fav_report == -1) + $totals = ttChartHelper::getTotals($userDropdownSelectionId, $cl_type, $cl_date, $cl_interval); +else + $totals = ttChartHelper::getTotalsForFavReport($cl_fav_report, $cl_type); $smarty->assign('totals', $totals); // Prepare chart for drawing. diff --git a/initialize.php b/initialize.php index c99e16dc3..c54bf1d79 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.1.5747"); +define("APP_VERSION", "1.22.2.5748"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From e9193034b33070e621e010ff13accee708fa7b3a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Nov 2022 13:26:53 +0000 Subject: [PATCH 2443/2515] Removed debug condition for fav reports on charts feature. --- WEB-INF/templates/charts.tpl | 2 -- charts.php | 21 +++++++++------------ initialize.php | 2 +- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl index ee0c48346..41a6fd1e7 100644 --- a/WEB-INF/templates/charts.tpl +++ b/WEB-INF/templates/charts.tpl @@ -64,14 +64,12 @@ function handleFavReportSelection() {
{$forms.chartForm.date.control}
-{if defined('FAV_REPORTS_ON_CHARTS_DEBUG')} -{/if} {if $chart_selector} diff --git a/charts.php b/charts.php index 9a67e86e9..1fd7792b3 100644 --- a/charts.php +++ b/charts.php @@ -124,18 +124,15 @@ $largeScreenCalendarRowSpan = 1; // Number of rows calendar spans on large screens. // Fav report control. -if (defined('FAV_REPORTS_ON_CHARTS_DEBUG')) { - // Get saved favorite reports for user. - $report_list = ttFavReportHelper::getReports(); - $chart_form->addInput(array('type'=>'combobox', - 'name'=>'favorite_report', - 'onchange'=>'handleFavReportSelection();this.form.submit();', - 'data'=>$report_list, - 'value' => $cl_fav_report, - 'datakeys'=>array('id','name'), - 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); - $largeScreenCalendarRowSpan += 2; -} +$report_list = ttFavReportHelper::getReports(); +$chart_form->addInput(array('type'=>'combobox', + 'name'=>'favorite_report', + 'onchange'=>'handleFavReportSelection();this.form.submit();', + 'data'=>$report_list, + 'value' => $cl_fav_report, + 'datakeys'=>array('id','name'), + 'empty'=>array('-1'=>$i18n->get('dropdown.no')))); +$largeScreenCalendarRowSpan += 2; // Chart type options. $chart_selector = (MODE_PROJECTS_AND_TASKS == $tracking_mode || $user->isPluginEnabled('cl')); diff --git a/initialize.php b/initialize.php index c54bf1d79..43ef2f378 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5748"); +define("APP_VERSION", "1.22.2.5749"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 876d5387cce5819f2724e7dab3407ae44ccdb1a3 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 6 Nov 2022 13:47:57 +0000 Subject: [PATCH 2444/2515] Improved charts by hiding calendar for fav reports. --- WEB-INF/templates/charts.tpl | 18 ++++++++++++++++-- initialize.php | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/WEB-INF/templates/charts.tpl b/WEB-INF/templates/charts.tpl index 41a6fd1e7..27d335ffb 100644 --- a/WEB-INF/templates/charts.tpl +++ b/WEB-INF/templates/charts.tpl @@ -29,6 +29,8 @@ function handleFavReportSelection() { var userControl = document.getElementById("user_control"); var intervalLabel = document.getElementById("interval_label"); var intervalControl = document.getElementById("interval_control"); + var smallScreenCalendarDiv = document.getElementById("small_screen_calendar"); + var largeScreenCalendarDiv = document.getElementById("large_screen_calendar"); if (selectedFavReportId == -1) { if (userLabel != null) { @@ -43,6 +45,12 @@ function handleFavReportSelection() { if (intervalControl != null) { intervalControl.style.display = ""; } + if (smallScreenCalendarDiv != null) { + smallScreenCalendarDiv.style.display = ""; + } + if (largeScreenCalendarDiv != null) { + largeScreenCalendarDiv.style.display = ""; + } } else { if (userLabel != null) { userLabel.style.display = "none"; @@ -56,14 +64,20 @@ function handleFavReportSelection() { if (intervalControl != null) { intervalControl.style.display = "none"; } + if (smallScreenCalendarDiv != null) { + smallScreenCalendarDiv.style.display = "none"; + } + if (largeScreenCalendarDiv != null) { + largeScreenCalendarDiv.style.display = "none"; + } } } {$forms.chartForm.open} -
{$forms.chartForm.date.control}
+
{$forms.chartForm.date.control}
{$forms.chartForm.date.control}
{$forms.chartForm.favorite_report.control}
- + diff --git a/initialize.php b/initialize.php index 43ef2f378..60af5b19d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5749"); +define("APP_VERSION", "1.22.2.5750"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 66d2e4776f8e906b233783d91632f1aa0a80a287 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 18 Nov 2022 14:19:31 +0000 Subject: [PATCH 2445/2515] Removed a redundant call in puncher. --- initialize.php | 2 +- puncher.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/initialize.php b/initialize.php index 60af5b19d..71a97bb7b 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5750"); +define("APP_VERSION", "1.22.2.5751"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/puncher.php b/puncher.php index 9714ac242..26b371fcd 100644 --- a/puncher.php +++ b/puncher.php @@ -324,7 +324,6 @@ $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); $smarty->assign('task_required', $taskRequired); -$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('time_records', $timeRecords); $smarty->assign('show_record_custom_fields', $user->isOptionEnabled('record_custom_fields')); From 4692f7163525e25c5efff09de72bd3fb73690f08 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 6 Dec 2022 22:02:58 +0000 Subject: [PATCH 2446/2515] Dutch translation improved. --- WEB-INF/resources/nl.lang.php | 9 +++------ initialize.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 38d93efdb..c162f858d 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -415,8 +415,7 @@ 'form.reports.show_fields' => 'Toon velden', 'form.reports.time_fields' => 'Tijd velden', 'form.reports.user_fields' => 'Medewerker velden', -// TODO: translate the following. -// 'form.reports.project_fields' => 'Project fields', +'form.reports.project_fields' => 'Project velden', 'form.reports.group_by' => 'Groeperen op', 'form.reports.group_by_no' => '--- niet groeperen ---', 'form.reports.group_by_date' => 'datum', @@ -428,8 +427,7 @@ // Report form. See example at https://timetracker.anuko.com/report.php // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exporteer', -// TODO: translate the following. -// 'form.report.per_hour' => 'Per hour', +'form.report.per_hour' => 'Per uur', 'form.report.assign_to_invoice' => 'Voeg toe aan factuur', 'form.report.assign_to_timesheet' => 'Wijs toe aan tijdenoverzicht', @@ -590,7 +588,6 @@ 'form.display_options.note_on_separate_row' => 'Notitie in aparte kolom', // Translator (Henk) comment: "kolom is the right word in Dutch." 'form.display_options.not_complete_days' => 'Niet complete dagen', 'form.display_options.inactive_projects' => 'Niet actieve projecten', -// TODO: translate the following. -// 'form.display_options.cost_per_hour' => 'Cost per hour', +'form.display_options.cost_per_hour' => 'Kosten per uur', 'form.display_options.custom_css' => 'Aangepaste CSS', ); diff --git a/initialize.php b/initialize.php index 71a97bb7b..6c62a5c94 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5751"); +define("APP_VERSION", "1.22.2.5752"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 136681fa3019c4e80ef9e93a59d5334925486121 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Dec 2022 16:36:09 +0000 Subject: [PATCH 2447/2515] Added previous month option on charts. --- WEB-INF/lib/ttChartHelper.class.php | 4 ++++ WEB-INF/lib/ttPeriod.class.php | 12 ++++++------ charts.php | 1 + initialize.php | 2 +- reports.php | 6 +++--- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/WEB-INF/lib/ttChartHelper.class.php b/WEB-INF/lib/ttChartHelper.class.php index 7ee712796..eaa5a4c07 100644 --- a/WEB-INF/lib/ttChartHelper.class.php +++ b/WEB-INF/lib/ttChartHelper.class.php @@ -37,6 +37,10 @@ static function getTotals($user_id, $chart_type, $selected_date, $interval_type) $period = new ttPeriod(new ttDate($selected_date), INTERVAL_THIS_MONTH); break; + case INTERVAL_PREVIOUS_MONTH: + $period = new ttPeriod(new ttDate($selected_date), INTERVAL_PREVIOUS_MONTH); + break; + case INTERVAL_THIS_YEAR: $period = new ttPeriod(new ttDate($selected_date), INTERVAL_THIS_YEAR); break; diff --git a/WEB-INF/lib/ttPeriod.class.php b/WEB-INF/lib/ttPeriod.class.php index 1d63ad9d1..0dcbf71c1 100644 --- a/WEB-INF/lib/ttPeriod.class.php +++ b/WEB-INF/lib/ttPeriod.class.php @@ -7,9 +7,9 @@ define('INTERVAL_THIS_MONTH', 3); define('INTERVAL_THIS_YEAR', 4); define('INTERVAL_ALL_TIME', 5); -define('INTERVAL_LAST_WEEK', 6); -define('INTERVAL_LAST_MONTH', 7); -define('INTERVAL_LAST_DAY', 8); +define('INTERVAL_PREVIOUS_WEEK', 6); +define('INTERVAL_PREVIOUS_MONTH', 7); +define('INTERVAL_PREVIOUS_DAY', 8); class ttPeriod { var $startDate; // ttDate object. @@ -34,7 +34,7 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { $this->endDate->setFromUnixTimestamp($ttDateInstance->getTimestamp()); break; - case INTERVAL_LAST_DAY: + case INTERVAL_PREVIOUS_DAY: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5])); break; @@ -44,7 +44,7 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5])); break; - case INTERVAL_LAST_WEEK: + case INTERVAL_PREVIOUS_WEEK: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-7+$startWeekBias,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]-1+$startWeekBias,$t_arr[5])); break; @@ -54,7 +54,7 @@ function __construct($ttDateInstance, $period_type = INTERVAL_THIS_MONTH) { $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+2,0,$t_arr[5])); break; - case INTERVAL_LAST_MONTH: + case INTERVAL_PREVIOUS_MONTH: $this->startDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4],1,$t_arr[5])); $this->endDate->setFromUnixTimestamp(mktime(0,0,0,$t_arr[4]+1,0,$t_arr[5])); break; diff --git a/charts.php b/charts.php index 1fd7792b3..a4c24f0a0 100644 --- a/charts.php +++ b/charts.php @@ -186,6 +186,7 @@ $intervals[INTERVAL_THIS_DAY] = $i18n->get('dropdown.selected_day'); $intervals[INTERVAL_THIS_WEEK] = $i18n->get('dropdown.selected_week'); $intervals[INTERVAL_THIS_MONTH] = $i18n->get('dropdown.selected_month'); +$intervals[INTERVAL_PREVIOUS_MONTH] = $i18n->get('dropdown.previous_month'); $intervals[INTERVAL_THIS_YEAR] = $i18n->get('dropdown.selected_year'); $intervals[INTERVAL_ALL_TIME] = $i18n->get('dropdown.all_time'); diff --git a/initialize.php b/initialize.php index 6c62a5c94..d499de945 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5752"); +define("APP_VERSION", "1.22.2.5753"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/reports.php b/reports.php index 057787e7c..fd4ca156b 100644 --- a/reports.php +++ b/reports.php @@ -229,11 +229,11 @@ $form->addInput(array('type'=>'combobox', 'name'=>'period', 'data'=>array(INTERVAL_THIS_MONTH=>$i18n->get('dropdown.current_month'), - INTERVAL_LAST_MONTH=>$i18n->get('dropdown.previous_month'), + INTERVAL_PREVIOUS_MONTH=>$i18n->get('dropdown.previous_month'), INTERVAL_THIS_WEEK=>$i18n->get('dropdown.current_week'), - INTERVAL_LAST_WEEK=>$i18n->get('dropdown.previous_week'), + INTERVAL_PREVIOUS_WEEK=>$i18n->get('dropdown.previous_week'), INTERVAL_THIS_DAY=>$i18n->get('dropdown.current_day'), - INTERVAL_LAST_DAY=>$i18n->get('dropdown.previous_day')), + INTERVAL_PREVIOUS_DAY=>$i18n->get('dropdown.previous_day')), 'empty'=>array(''=>$i18n->get('dropdown.select')))); // Add controls for start and end dates. $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start_date')); From 700d2e19cd276432dd03e3817a5e03aa056ea3cc Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Dec 2022 13:53:20 +0000 Subject: [PATCH 2448/2515] Started to work on custom translation feature. --- dbinstall.php | 10 ++++++---- initialize.php | 2 +- mysql.sql | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index 85d3f021a..c79cd558a 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -1151,7 +1151,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to12107"]) { + if ($_POST["convert11900to12203"]) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1199,6 +1199,8 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.2', modified = now() where param_name = 'version_db' and param_value = '1.21.0'"); ttExecute("ALTER TABLE tt_fav_reports ADD COLUMN `note_containing` varchar(80) default NULL after `paid_status`"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.21.7', modified = now() where param_name = 'version_db' and param_value = '1.21.2'"); + ttExecute("ALTER TABLE `tt_groups` ADD `custom_translation` text default NULL AFTER `custom_css`"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.22.3', modified = now() where param_name = 'version_db' and param_value = '1.21.7'"); } if ($_POST["cleanup"]) { @@ -1249,7 +1251,7 @@ function ttGenerateKeys() {

DB Install

{$forms.chartForm.date.control}
{$forms.chartForm.date.control}
-
Create database structure (v1.21.7) + Create database structure (v1.22.3)
(applies only to new installations, do not execute when updating)
@@ -1298,8 +1300,8 @@ function ttGenerateKeys() {
Update database structure (v1.19 to v1.21.7)Update database structure (v1.19 to v1.22.3)
diff --git a/initialize.php b/initialize.php index d499de945..7c1e90f6e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.2.5753"); +define("APP_VERSION", "1.22.3.5754"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/mysql.sql b/mysql.sql index 4fd33fa95..d50b6c46c 100644 --- a/mysql.sql +++ b/mysql.sql @@ -39,6 +39,7 @@ CREATE TABLE `tt_groups` ( `custom_logo` tinyint(4) default 0, # whether to use a custom logo or not `config` text default NULL, # miscellaneous group configuration settings `custom_css` text default NULL, # custom css for group + `custom_translation` text default NULL, # custom translation for group `created` datetime default NULL, # creation timestamp `created_ip` varchar(45) default NULL, # creator ip `created_by` int(11) default NULL, # creator user_id @@ -622,4 +623,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.21.7', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.22.3', now()); # TODO: change when structure changes. From 6908f224aa200ae785a9b819ca73f81bb9af6f7f Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 18 Dec 2022 15:03:08 +0000 Subject: [PATCH 2449/2515] Added localization string for custom translation. --- WEB-INF/resources/ca.lang.php | 1 + WEB-INF/resources/cs.lang.php | 1 + WEB-INF/resources/da.lang.php | 1 + WEB-INF/resources/de.lang.php | 1 + WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/et.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 1 + WEB-INF/resources/fr.lang.php | 1 + WEB-INF/resources/gr.lang.php | 1 + WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/hu.lang.php | 1 + WEB-INF/resources/it.lang.php | 1 + WEB-INF/resources/ja.lang.php | 1 + WEB-INF/resources/ko.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/no.lang.php | 1 + WEB-INF/resources/pl.lang.php | 1 + WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/pt.lang.php | 1 + WEB-INF/resources/ro.lang.php | 1 + WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 1 + WEB-INF/resources/sl.lang.php | 1 + WEB-INF/resources/sr.lang.php | 1 + WEB-INF/resources/sv.lang.php | 1 + WEB-INF/resources/tr.lang.php | 1 + WEB-INF/resources/zh-cn.lang.php | 1 + WEB-INF/resources/zh-tw.lang.php | 1 + initialize.php | 2 +- 31 files changed, 33 insertions(+), 1 deletion(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 13d8237c2..3cb547511 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -681,4 +681,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 4a93086de..2c32c9641 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -693,4 +693,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 595590f0a..8c86b742d 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -659,4 +659,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 209df6b72..eadc49e74 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -634,4 +634,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 83808aa40..c1defcb5f 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -605,4 +605,5 @@ 'form.display_options.inactive_projects' => 'Inactive projects', 'form.display_options.cost_per_hour' => 'Cost per hour', 'form.display_options.custom_css' => 'Custom CSS', +'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 507bbcaac..63e6fbac5 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -696,4 +696,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 0295dc70f..59f6ecf5e 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -670,4 +670,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 078872026..bfe8044d5 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -682,4 +682,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index e9e92e018..d5cbe9286 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -666,4 +666,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 145fcb289..a0df933eb 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -655,4 +655,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 6265976d7..c5c0c2b7a 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -649,4 +649,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 727b0b761..1d0c24f40 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -687,4 +687,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 8b0be9524..4c133d9fd 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -684,4 +684,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index d283830a1..7cf157ba7 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -662,4 +662,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 112e454cc..16a882f83 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -688,4 +688,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 6bb78d772..f0c695e03 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -686,4 +686,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index c162f858d..febb14a98 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -590,4 +590,6 @@ 'form.display_options.inactive_projects' => 'Niet actieve projecten', 'form.display_options.cost_per_hour' => 'Kosten per uur', 'form.display_options.custom_css' => 'Aangepaste CSS', +// TODO: translate the following. +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 18e1ee69f..ec80e93eb 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -688,4 +688,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index b7dd5024c..e6eba0521 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -667,4 +667,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index fff94fa3d..04f860459 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -600,5 +600,7 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', 'form.display_options.custom_css' => 'CSS customizado', +// TODO: translate the following. +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 075e7b41c..fdedcf435 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -666,4 +666,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 0d8fe6d1f..55d010f86 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -689,4 +689,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 805be45b5..3e804c7da 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -591,4 +591,5 @@ 'form.display_options.inactive_projects' => 'Неактивные проекты', 'form.display_options.cost_per_hour' => 'Стоимость за час', 'form.display_options.custom_css' => 'Пользовательская CSS', +'form.display_options.custom_translation' => 'Пользовательский перевод', ); diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index e57e63d74..1802f518a 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -671,4 +671,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index 8ea8c445e..cd6149671 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -661,4 +661,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 055545b37..18c64ec78 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -669,4 +669,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index e0d212b9e..6b2a0d2bc 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -667,4 +667,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 098871718..0473d081c 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -702,4 +702,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 87f1cc1c9..44dc443ee 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -677,4 +677,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index 181756e77..e5faa1cbf 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -680,4 +680,5 @@ // 'form.display_options.inactive_projects' => 'Inactive projects', // 'form.display_options.cost_per_hour' => 'Cost per hour', // 'form.display_options.custom_css' => 'Custom CSS', +// 'form.display_options.custom_translation' => 'Custom translation', ); diff --git a/initialize.php b/initialize.php index 7c1e90f6e..54e0c36d0 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.3.5754"); +define("APP_VERSION", "1.22.3.5755"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 08fbd9a080c042685df6ccc40b9fd0eba0914795 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Dec 2022 15:44:16 +0000 Subject: [PATCH 2450/2515] Work in progress on custom translation. --- WEB-INF/lib/common.lib.php | 14 ++++++++++++++ WEB-INF/lib/ttUser.class.php | 17 ++++++++++++++--- WEB-INF/templates/display_options.tpl | 7 +++++++ default.css | 4 ++-- display_options.php | 7 ++++++- initialize.php | 2 +- 6 files changed, 44 insertions(+), 7 deletions(-) diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 0f38f80fa..7a79e0a74 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -162,6 +162,20 @@ function ttValidCss($val) return true; } +// ttValidTranslation is used to check user input for custom translation. +function ttValidTranslation($val) +{ + $val = trim($val); + if (strlen($val) == 0) + return true; + + // String must not contain any tags. + if (stristr($val, '<')) + return false; + + return false; // Not implemented yet. +} + // ttValidTemplateText is used to check template-based user input. // When templates are used, required input parts must be filled by user. // We identify these parts by 3 "stop sign" emojis (aka "octagonal sign" U+1F6D1). diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index b32c27792..37591fa5f 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -50,6 +50,7 @@ class ttUser { var $config = null; // Comma-separated list of miscellaneous config options. var $configHelper = null; // An instance of ttConfigHelper class. var $custom_css = null; // Custom css. + var $custom_translation = null; // Custom translation. var $custom_logo = 0; // Whether to use a custom logo for group. var $lock_spec = null; // Cron specification for record locking. @@ -73,7 +74,8 @@ function __construct($login, $id = null) { $sql = "SELECT u.id, u.login, u.name, u.group_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id,". " u.quota_percent, u.email, g.org_id, g.group_key, g.name as group_name, g.currency, g.lang, g.decimal_mark, g.date_format,". " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.record_type,". - " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.holidays, g.workday_minutes, g.custom_logo". + " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.custom_translation,". + " g.holidays, g.workday_minutes, g.custom_logo". " FROM tt_users u LEFT JOIN tt_groups g ON (u.group_id = g.id) LEFT JOIN tt_roles r on (r.id = u.role_id) WHERE "; if ($id) $sql .= "u.id = $id"; @@ -131,6 +133,7 @@ function __construct($login, $id = null) { $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); $this->custom_css = $val['custom_css']; + $this->custom_translation = $val['custom_translation']; // Set "on behalf" id and name (user). if (isset($_SESSION['behalf_id'])) { @@ -290,6 +293,11 @@ function getCustomCss() { return ($this->behalfGroup ? $this->behalfGroup->custom_css : $this->custom_css); } + // getCustomTranslation returns custom translation for active group. + function getCustomTranslation() { + return ($this->behalfGroup ? $this->behalfGroup->custom_translation : $this->custom_translation); + } + // can - determines whether user has a right to do something. function can($do_something) { return in_array($do_something, $this->rights); @@ -682,7 +690,8 @@ function updateGroup($fields) { $name_part = $description_part = $currency_part = $lang_part = $decimal_mark_part = $date_format_part = $time_format_part = $week_start_part = $tracking_mode_part = $project_required_part = $record_type_part = $bcc_email_part = $allow_ip_part = - $password_complexity_part = $plugins_part = $config_part = $custom_css_part = $lock_spec_part = $holidays_part = $workday_minutes_part = ''; + $password_complexity_part = $plugins_part = $config_part = $custom_css_part = $custom_translation_part = $lock_spec_part = + $holidays_part = $workday_minutes_part = ''; if (isset($fields['name'])) $name_part = ', name = '.$mdb2->quote($fields['name']); if (isset($fields['description'])) $description_part = ', description = '.$mdb2->quote($fields['description']); if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']); @@ -702,6 +711,7 @@ function updateGroup($fields) { if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); if (isset($fields['custom_css'])) $custom_css_part = ', custom_css = '.$mdb2->quote($fields['custom_css']); + if (isset($fields['custom_translation'])) $custom_translation_part = ', custom_translation = '.$mdb2->quote($fields['custom_translation']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['holidays'])) $holidays_part = ', holidays = '.$mdb2->quote($fields['holidays']); if (isset($fields['workday_minutes'])) $workday_minutes_part = ', workday_minutes = '.$mdb2->quote($fields['workday_minutes']); @@ -709,7 +719,8 @@ function updateGroup($fields) { $parts = trim($name_part.$description_part.$currency_part.$lang_part.$decimal_mark_part.$date_format_part. $time_format_part.$week_start_part.$tracking_mode_part.$project_required_part.$record_type_part. - $bcc_email_part.$allow_ip_part.$password_complexity_part.$plugins_part.$config_part.$custom_css_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); + $bcc_email_part.$allow_ip_part.$password_complexity_part.$plugins_part.$config_part.$custom_css_part. + $custom_translation_part.$lock_spec_part.$holidays_part.$workday_minutes_part.$modified_part, ','); $sql = "update tt_groups set $parts where id = $group_id and org_id = $this->org_id"; $affected = $mdb2->exec($sql); diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index 5b487ec85..a6abe34f2 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -63,6 +63,13 @@ License: See license.txt *}
{$forms.displayOptionsForm.custom_css.control}
{$i18n.label.what_is_it}
{$i18n.form.display_options.custom_translation}
{$forms.displayOptionsForm.custom_translation.control}
{$i18n.label.what_is_it}
{$forms.displayOptionsForm.btn_save.control}
{$forms.displayOptionsForm.close} diff --git a/default.css b/default.css index 98e40562a..38de0f53f 100644 --- a/default.css +++ b/default.css @@ -363,7 +363,7 @@ input[type="text"].short-text-field { } /* textareas for fields */ -#description, #address, #item_name, #comment, #custom_css, #content { +#description, #address, #item_name, #comment, #custom_css, #custom_translation, #content { width: 220px; border-radius: 4px; border: 1px solid #c9c9c9; @@ -371,7 +371,7 @@ input[type="text"].short-text-field { } /* textareas with focus */ -#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #content:focus { +#description:focus, #address:focus, #item_name:focus, #comment:focus, #custom_css:focus, #custom_translation:focus, #content:focus { background-color: yellow; border: 1px solid black; outline: none; diff --git a/display_options.php b/display_options.php index e449c3c91..e0b7bc987 100644 --- a/display_options.php +++ b/display_options.php @@ -23,6 +23,7 @@ $cl_report_inactive_projects = (bool)($request->getParameter('report_inactive_projects')); $cl_report_cost_per_hour = (bool)$request->getParameter('report_cost_per_hour'); $cl_custom_css = trim($request->getParameter('custom_css')); + $cl_custom_translation = trim($request->getParameter('custom_translation')); } else { $cl_time_note_on_separate_row = $config->getDefinedValue('time_note_on_separate_row'); $cl_time_not_complete_days = $config->getDefinedValue('time_not_complete_days'); @@ -31,6 +32,7 @@ $cl_report_inactive_projects = $config->getDefinedValue('report_inactive_projects'); $cl_report_cost_per_hour = $config->getDefinedValue('report_cost_per_hour'); $cl_custom_css = $user->getCustomCss(); + $cl_custom_translation = $user->getCustomTranslation(); } $form = new Form('displayOptionsForm'); @@ -55,11 +57,13 @@ // TODO: add PDF break controller here. $form->addInput(array('type'=>'textarea','name'=>'custom_css','value'=>$cl_custom_css)); +$form->addInput(array('type'=>'textarea','name'=>'custom_translation','value'=>$cl_custom_translation)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ // Validate user input. if (!ttValidCss($cl_custom_css)) $err->add($i18n->get('error.field'), $i18n->get('form.display_options.custom_css')); + if (!ttValidTranslation($cl_custom_translation)) $err->add($i18n->get('error.field'), $i18n->get('form.display_options.custom_translation')); // Finished validating user input. if ($err->no()) { @@ -72,7 +76,8 @@ $config->setDefinedValue('report_cost_per_hour', $cl_report_cost_per_hour); if ($user->updateGroup(array( 'config' => $config->getConfig(), - 'custom_css' => $cl_custom_css))) { + 'custom_css' => $cl_custom_css, + 'custom_translation' => $cl_custom_translation))) { header('Location: success.php'); exit(); } else diff --git a/initialize.php b/initialize.php index 54e0c36d0..bb1aa4f95 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.3.5755"); +define("APP_VERSION", "1.22.3.5756"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From bd106a61bb80f88b7c4d6b7f7e3d2e28441f3851 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 19 Dec 2022 21:26:01 +0000 Subject: [PATCH 2451/2515] More progress on custom translation feature. --- WEB-INF/lib/I18n.class.php | 40 +++++++++++++++++++++++++++++++++-- WEB-INF/lib/common.lib.php | 43 +++++++++++++++++++++++++++++++++++--- initialize.php | 2 +- 3 files changed, 79 insertions(+), 6 deletions(-) diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index 1760da48a..99015a93e 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -51,9 +51,16 @@ function get($key) { return $value; } + // get - keyExists determines if a key exists. + function keyExists($key) { + $value = $this->get($key); + return ($value != null && strlen($value) > 0); + } + // load - loads localized strings into $keys array by first going through the default file (en.lang.php) - // and then through the requested language file (which is supplied as parameter). - // This means we end up with default English strings when keys are missing in the translation file. + // and then through the requested language file (which is supplied as parameter), + // (this means we end up with default English strings when keys are missing in the translation file), + // and then from a group custom translation field, if available. function load($langName) { // Load default English keys first. $defaultFileName = RESOURCE_DIR . '/' . $this->defaultLang . '.lang.php'; @@ -105,6 +112,35 @@ function load($langName) { } } } + + // Now load custom translation for group. + global $user; + $customTranslation = $user->getCustomTranslation(); + if ($customTranslation != null) { + $lines = preg_split("/\r\n|\n|\r/", $customTranslation); + for ($i = 0; $i < count($lines); $i++) { + $parts = explode('=', $lines[$i]); + if (count($parts) != 2) continue; + + $key = trim($parts[0]); + $value = trim($parts[1]); + if (!$value) continue; + + $value = htmlspecialchars(trim($parts[1])); + + $pos = strpos($key, "."); + if (!($pos === false)) { + $p = explode(".", $key); + $str = ""; + foreach ($p as $w) { + $str .= "[\"".$w."\"]"; + } + eval("\$this->keys".$str."='".$value."';"); + } else { + $this->keys[$key] = $value; + } + } + } } // hasLang determines if a file for requested language exists. diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 7a79e0a74..85ece4480 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -169,11 +169,48 @@ function ttValidTranslation($val) if (strlen($val) == 0) return true; - // String must not contain any tags. - if (stristr($val, '<')) + // Validate lines. + $lines = preg_split("/\r\n|\n|\r/", $val); + for ($i = 0; $i < count($lines); $i++) { + if (!ttValidTranslationLine($lines[$i])) + return false; + } + + return true; +} + +// ttValidTranslationLine is used to check an individual line in custom translation. +function ttValidTranslationLine($val) +{ + $val = trim($val); + if (strlen($val) == 0) + return false; // Empty line is not valid. + + $parts = explode('=', $val); + if (count($parts) != 2) { + // We need exactly 2 parts. return false; + } + + $key = trim($parts[0]); + global $i18n; + if (!$i18n->keyExists($key)) { + // Key does not exist. + return false; + } - return false; // Not implemented yet. + $value = trim($parts[1]); + if (!$value) { + // Do not allow empty values. + return false; + } + + // Prohibit apostrophes in values for now until I figure out how to handle them properly. + if (ttContains($value, "'")) { + return false; + } + + return true; } // ttValidTemplateText is used to check template-based user input. diff --git a/initialize.php b/initialize.php index bb1aa4f95..060c63ea2 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.3.5756"); +define("APP_VERSION", "1.22.3.5757"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From cd24019d91a1582bbe50c1e65a047c97fc9f19b1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 20 Dec 2022 15:40:01 +0000 Subject: [PATCH 2452/2515] Allowed empty custom translation strings and also containing single quotes. --- WEB-INF/lib/I18n.class.php | 8 ++++---- WEB-INF/lib/common.lib.php | 11 ----------- WEB-INF/resources/ca.lang.php | 3 ++- WEB-INF/resources/cs.lang.php | 3 ++- WEB-INF/resources/da.lang.php | 3 ++- WEB-INF/resources/de.lang.php | 3 ++- WEB-INF/resources/en.lang.php | 3 ++- WEB-INF/resources/es.lang.php | 3 ++- WEB-INF/resources/et.lang.php | 3 ++- WEB-INF/resources/fa.lang.php | 4 +++- WEB-INF/resources/fi.lang.php | 3 ++- WEB-INF/resources/fr.lang.php | 3 ++- WEB-INF/resources/gr.lang.php | 3 ++- WEB-INF/resources/he.lang.php | 3 ++- WEB-INF/resources/hu.lang.php | 3 ++- WEB-INF/resources/it.lang.php | 3 ++- WEB-INF/resources/ja.lang.php | 3 ++- WEB-INF/resources/ko.lang.php | 3 ++- WEB-INF/resources/nl.lang.php | 3 ++- WEB-INF/resources/no.lang.php | 3 ++- WEB-INF/resources/pl.lang.php | 3 ++- WEB-INF/resources/pt-br.lang.php | 3 ++- WEB-INF/resources/pt.lang.php | 3 ++- WEB-INF/resources/ro.lang.php | 3 ++- WEB-INF/resources/ru.lang.php | 3 ++- WEB-INF/resources/sk.lang.php | 3 ++- WEB-INF/resources/sl.lang.php | 3 ++- WEB-INF/resources/sr.lang.php | 3 ++- WEB-INF/resources/sv.lang.php | 3 ++- WEB-INF/resources/tr.lang.php | 3 ++- WEB-INF/resources/zh-cn.lang.php | 3 ++- WEB-INF/resources/zh-tw.lang.php | 3 ++- initialize.php | 2 +- 33 files changed, 66 insertions(+), 46 deletions(-) diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index 99015a93e..bd4e9ffd3 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -54,7 +54,7 @@ function get($key) { // get - keyExists determines if a key exists. function keyExists($key) { $value = $this->get($key); - return ($value != null && strlen($value) > 0); + return ($value !== null); } // load - loads localized strings into $keys array by first going through the default file (en.lang.php) @@ -124,9 +124,9 @@ function load($langName) { $key = trim($parts[0]); $value = trim($parts[1]); - if (!$value) continue; - - $value = htmlspecialchars(trim($parts[1])); + // Escape single quotes and backslashes. + $value = addcslashes($value, "'\\"); + $value = htmlspecialchars($value); $pos = strpos($key, "."); if (!($pos === false)) { diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 85ece4480..86570a5f0 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -199,17 +199,6 @@ function ttValidTranslationLine($val) return false; } - $value = trim($parts[1]); - if (!$value) { - // Do not allow empty values. - return false; - } - - // Prohibit apostrophes in values for now until I figure out how to handle them properly. - if (ttContains($value, "'")) { - return false; - } - return true; } diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 3cb547511..327132ed8 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Catalan (Català)'; diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 2c32c9641..c89457e6d 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 8c86b742d..6fe93c261 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Danish (Dansk)'; diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index eadc49e74..9cb0340b9 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'German (Deutsch)'; diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index c1defcb5f..5858b63d4 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'English'; diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 63e6fbac5..b302de1c4 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Spanish (Español)'; diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 59f6ecf5e..19a74b4cd 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index bfe8044d5..32dacdf00 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -2,8 +2,10 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. + $i18n_language = 'Persian (فارسی)'; // TODO: translate the following. $i18n_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index d5cbe9286..cdfc4c5fe 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Finnish (Suomi)'; diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index a0df933eb..b488be0bc 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'French (Français)'; diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index c5c0c2b7a..34f1890eb 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Greek (Ελληνικά)'; diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 1d0c24f40..585a7ec2f 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Hebrew (עברית)'; diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index 4c133d9fd..e2d7500d3 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 7cf157ba7..73ca8a022 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 16a882f83..0de6e88ea 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Japanese (日本語)'; diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index f0c695e03..fcbe14d24 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Korean (한국어)'; diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index febb14a98..16fe1ecf8 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Dutch (Nederlands)'; diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index ec80e93eb..720f71f34 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Norwegian (Norsk)'; diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index e6eba0521..69dddf311 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Polish (Polski)'; diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 04f860459..c9a4ad998 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Portuguese (Português Brasileiro)'; diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index fdedcf435..abcd5793f 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Please use proper capitalization rules for your language. diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 55d010f86..03db7da44 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Please use proper capitalization rules for your language. diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 3e804c7da..6c924df2d 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Russian (Русский)'; diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 1802f518a..0404fb8d0 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Slovak (Slovenčina)'; diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index cd6149671..b3153ad79 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 18c64ec78..6902d9223 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Serbian (Srpski)'; diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 6b2a0d2bc..dba0fd6f2 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Swedish (Svenska)'; diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 0473d081c..f2531ee76 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. // Note to translators: Use proper capitalization rules for your language. diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index 44dc443ee..d30515863 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Chinese (简体中文)'; diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index e5faa1cbf..890244f66 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -2,7 +2,8 @@ /* Copyright (c) Anuko International Ltd. https://www.anuko.com License: See license.txt */ -// Note: escape apostrophes with THREE backslashes, like here: choisir l\\\'option. +// Note: escape apostrophes with THREE backslashes, like here: 'choisir l\\\'option'. +// Alternatively: use one backslash and surround by double-quotes: "choisir l\'option". // Other characters (such as double-quotes in http links, etc.) do not have to be escaped. $i18n_language = 'Chinese (簡體中文)'; diff --git a/initialize.php b/initialize.php index 060c63ea2..55613a09d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.3.5757"); +define("APP_VERSION", "1.22.3.5758"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 3c7b6f53a0f34d7b9fa712b9a0a7d48f21081b3e Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Dec 2022 13:50:06 +0000 Subject: [PATCH 2453/2515] Initial release of custom translation feature in display options. --- WEB-INF/templates/display_options.tpl | 2 -- initialize.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/WEB-INF/templates/display_options.tpl b/WEB-INF/templates/display_options.tpl index a6abe34f2..0d0418af9 100644 --- a/WEB-INF/templates/display_options.tpl +++ b/WEB-INF/templates/display_options.tpl @@ -63,13 +63,11 @@ License: See license.txt *}
{$forms.displayOptionsForm.custom_css.control}
{$i18n.label.what_is_it}
{$i18n.form.display_options.custom_translation}
{$forms.displayOptionsForm.custom_translation.control}
{$i18n.label.what_is_it}
{$forms.displayOptionsForm.btn_save.control}
{$forms.displayOptionsForm.close} diff --git a/initialize.php b/initialize.php index 55613a09d..afb52e81d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.3.5758"); +define("APP_VERSION", "1.22.4.5759"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From f7dbaf2086bb5793ef5e5ecacc74709ac1c7a947 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 23 Dec 2022 13:01:08 +0000 Subject: [PATCH 2454/2515] Dutch transation improved. --- WEB-INF/resources/nl.lang.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 16fe1ecf8..2ca444c0a 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -591,6 +591,5 @@ 'form.display_options.inactive_projects' => 'Niet actieve projecten', 'form.display_options.cost_per_hour' => 'Kosten per uur', 'form.display_options.custom_css' => 'Aangepaste CSS', -// TODO: translate the following. -// 'form.display_options.custom_translation' => 'Custom translation', +'form.display_options.custom_translation' => 'Maatwerk vertaling', ); diff --git a/initialize.php b/initialize.php index afb52e81d..08bcf66e8 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.4.5759"); +define("APP_VERSION", "1.22.4.5760"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From a38d8502bbcea6f0d877ca4ea0ba202a0a830790 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 25 Dec 2022 16:04:57 +0000 Subject: [PATCH 2455/2515] Fixed export-import for custom_css and custom_translation fields. --- WEB-INF/lib/ttGroupExportHelper.class.php | 3 ++- WEB-INF/lib/ttOrgImportHelper.class.php | 6 ++++-- initialize.php | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index fb0f60025..ecd4f80ac 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -137,7 +137,8 @@ function writeData() { $group_part .= " workday_minutes=\"".$group['workday_minutes']."\""; $group_part .= " custom_logo=\"".$group['custom_logo']."\""; $group_part .= " config=\"".$group['config']."\""; - $group_part .= " custom_css=\"".$group['custom_css']."\""; + $group_part .= " custom_css=\"".htmlspecialchars($group['custom_css'])."\""; + $group_part .= " custom_translation=\"".htmlspecialchars($group['custom_translation'])."\""; $group_part .= ">\n"; // Write group info. diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index aae3267c9..cc0ecf1d8 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -99,7 +99,8 @@ function startElement($parser, $name, $attrs) { 'workday_minutes' => $attrs['WORKDAY_MINUTES'], 'custom_logo' => $attrs['CUSTOM_LOGO'], 'config' => $attrs['CONFIG'], - 'custom_css' => $attrs['CUSTOM_CSS'])); + 'custom_css' => $attrs['CUSTOM_CSS'], + 'custom_translation' => $attrs['CUSTOM_TRANSLATION'])); // Special handling for top group. if (!$this->org_id && $this->current_group_id) { @@ -685,7 +686,7 @@ private function createGroup($fields) { $columns = '(parent_id, org_id, group_key, name, description, currency, decimal_mark, lang, date_format, time_format,'. ' week_start, tracking_mode, project_required, record_type, bcc_email,'. ' allow_ip, password_complexity, plugins, lock_spec,'. - ' workday_minutes, config, custom_css, created, created_ip, created_by)'; + ' workday_minutes, config, custom_css, custom_translation, created, created_ip, created_by)'; $values = ' values ('; $values .= $mdb2->quote($fields['parent_id']); @@ -710,6 +711,7 @@ private function createGroup($fields) { $values .= ', '.(int)$fields['workday_minutes']; $values .= ', '.$mdb2->quote($fields['config']); $values .= ', '.$mdb2->quote($fields['custom_css']); + $values .= ', '.$mdb2->quote($fields['custom_translation']); $values .= ', now(), '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', '.$user->id; $values .= ')'; diff --git a/initialize.php b/initialize.php index 08bcf66e8..fb76ba64d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.4.5760"); +define("APP_VERSION", "1.22.4.5761"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From afa80d3b183cadcc586b6ffb3d33f0f4e156e1f8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 28 Dec 2022 16:53:14 +0000 Subject: [PATCH 2456/2515] Fixed a bug with deleting custom field dropdown options with 0 as name. --- cf_dropdown_option_delete.php | 2 +- initialize.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index e6eeeeb75..cb8c8a31a 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -17,7 +17,7 @@ } $cl_id = (int)$request->getParameter('id'); $option = CustomFields::getOptionName($cl_id); -if (!$option) { +if ($option == null || $option === false) { header('Location: access_denied.php'); exit(); } diff --git a/initialize.php b/initialize.php index fb76ba64d..5a0189f28 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.4.5761"); +define("APP_VERSION", "1.22.5.5762"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 17705ca52e9e9fbc8cf6c209afecc9c4d5969d7d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 29 Dec 2022 16:10:51 +0000 Subject: [PATCH 2457/2515] Work in progress improving German translation. --- WEB-INF/resources/de.lang.php | 99 ++++++++++++++--------------------- initialize.php | 2 +- 2 files changed, 40 insertions(+), 61 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 9cb0340b9..8f0aae4c2 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -20,19 +20,16 @@ 'menu.logout' => 'Abmelden', 'menu.forum' => 'Forum', 'menu.help' => 'Hilfe', -// TODO: translate the following. -// 'menu.register' => 'Register', +'menu.register' => 'Registrieren', 'menu.profile' => 'Profil', 'menu.group' => 'Gruppe', 'menu.plugins' => 'Erweiterungen', 'menu.time' => 'Zeiten', -// TODO: translate the following. -// 'menu.puncher' => 'Punch', +'menu.puncher' => 'Stempeluhr', 'menu.week' => 'Woche', 'menu.expenses' => 'Kosten', 'menu.reports' => 'Berichte', -// TODO: translate the following. -// 'menu.timesheets' => 'Timesheets', +'menu.timesheets' => 'Arbeitszeittabellen', 'menu.charts' => 'Diagramme', 'menu.projects' => 'Projekte', 'menu.tasks' => 'Aufgaben', @@ -52,8 +49,7 @@ 'error.access_denied' => 'Zugriff verweigert.', 'error.sys' => 'Systemfehler.', 'error.db' => 'Datenbankfehler.', -// TODO: translate the following. -// 'error.registered_recently' => 'Registered recently.', +'error.registered_recently' => 'Kürzlich registriert.', 'error.feature_disabled' => 'Funktion ist deaktiviert.', 'error.field' => 'Ungültige "{0}" Daten.', 'error.empty' => 'Feld "{0}" ist leer.', @@ -65,40 +61,34 @@ 'error.report' => 'Bericht auswählen.', 'error.record' => 'Eintrag auswählen.', 'error.auth' => 'Benutzername oder Passwort ungültig.', -// TODO: translate the following. -// 'error.2fa_code' => 'Invalid 2FA code.', -// 'error.weak_password' => 'Weak password.', +'error.2fa_code' => 'Ungültiger 2FA-Code.', +'error.weak_password' => 'Schwaches Passwort.', 'error.user_exists' => 'Benutzer mit diesem Konto ist bereits vorhanden.', 'error.object_exists' => 'Objekt mit diesem Namen ist bereits vorhanden.', 'error.invoice_exists' => 'Rechnung mit dieser Nummer existiert bereits.', 'error.role_exists' => 'Rolle mit diesem Rang existiert bereits.', 'error.no_invoiceable_items' => 'Keine Einträge zur Rechnungsstellung gefunden.', -// TODO: translate the following. -// 'error.no_records' => 'There are no records.', +'error.no_records' => 'Es gibt keine Einträge.', 'error.no_login' => 'Benutzer mit diesen Anmeldedaten nicht vorhanden.', 'error.no_groups' => 'Die Datenbank ist leer. Als Administrator anmelden und ein neues Gruppe erzeugen.', 'error.upload' => 'Fehler beim hochladen einer Datei.', 'error.range_locked' => 'Zeitinterval ist gesperrt.', -'error.mail_send' => 'Fehler beim versenden einer E-Mail.', -// TODO: improve the translation above by adding MAIL_SMTP_DEBUG part. -// 'error.mail_send' => 'Error sending mail. Use MAIL_SMTP_DEBUG for diagnostics.', +'error.mail_send' => 'Fehler beim versenden einer E-Mail. Verwenden Sie MAIL_SMTP_DEBUG für die Diagnose.', 'error.no_email' => 'Dieser Benutzer besitzt keine e-Mail Adresse.', 'error.uncompleted_exists' => 'Unvollständiger Eintrag bereits vorhanden. Schließen oder Löschen.', 'error.goto_uncompleted' => 'Zum unvollständigen Eintrag gehen.', 'error.overlap' => 'Der Zeitinterval überschneidet sich mit vorhandenen Einträgen.', 'error.future_date' => 'Datum ist in der Zukunft.', -// TODO: translate the following. -// 'error.xml' => 'Error in XML file at line %d: %s.', -// 'error.cannot_import' => 'Cannot import: %s.', -// 'error.format' => 'Invalid file format.', -// 'error.user_count' => 'Limit on user count.', -// 'error.expired' => 'Expiration date reached.', -// 'error.file_storage' => 'File storage server error.', // See comment in English file. +'error.xml' => 'Fehler in der XML-Datei in der Zeile %d: %s.', +'error.cannot_import' => 'Kann nicht importiert werden: %s.', +'error.format' => 'Ungültiges Dateiformat.', +'error.user_count' => 'Begrenzung der Benutzeranzahl erreicht.', +'error.expired' => 'Ablaufdatum erreicht.', +'error.file_storage' => 'Dateispeicherserver-Fehler.', // Warning messages. 'warn.sure' => 'Sind Sie sicher?', -// TODO: translate the following. -// 'warn.confirm_save' => 'Date has changed. Confirm saving, not copying this item.', +'warn.confirm_save' => 'Das Datum hat sich geändert. Bestätigen Sie das Speichern, nicht das Kopieren dieses Elements.', // Success messages. 'msg.success' => 'Operation vollständig abgeschlossen.', @@ -120,19 +110,14 @@ 'button.export' => 'Gruppe exportieren', 'button.import' => 'Gruppe importieren', 'button.close' => 'Schließen', -// TODO: translate the following. -// 'button.start' => 'Start', +'button.start' => 'Start', 'button.stop' => 'Stop', -// TODO: translate the following. -// (PR#81 suggested 'Freigeben / Genehmigen' for 'Approve' and 'Freigabe zurücknehmen' for 'Disapprove'. -// The problem is they do not appear precise, deviate from the meaning of approval / disaproval of report items.) -// 'button.approve' => 'Approve', (suggested 'Freigeben / Genehmigen' does not appear precise) -// 'button.disapprove' => 'Disapprove', -// 'button.sync' => 'Sync', // Used in Android app. The meaning is to synchronize offline time records with server. +'button.approve' => 'Annehmen', +'button.disapprove' => 'Ablehnen', +'button.sync' => 'Sync', // Labels for controls on forms. Labels in this section are used on multiple forms. -// TODO: translate the following. -// 'label.menu' => 'Menu', +'label.menu' => 'Menü', 'label.group_name' => 'Gruppenname', 'label.address' => 'Adresse', 'label.currency' => 'Währung', @@ -152,9 +137,8 @@ 'label.end_date' => 'Enddatum', 'label.user' => 'Benutzer', 'label.users' => 'Personen', -// TODO: translate the following. -// 'label.group' => 'Group', -// 'label.subgroups' => 'Subgroups', +'label.group' => 'Gruppe', +'label.subgroups' => 'Untergruppen', 'label.roles' => 'Rollen', 'label.client' => 'Kunde', 'label.clients' => 'Kunden', @@ -185,8 +169,7 @@ 'label.select_none' => 'Alle abwählen', 'label.day_view' => 'Tagesansicht', 'label.week_view' => 'Wochenansicht', -// TODO: translate the following: -// 'label.puncher' => 'Puncher', +'label.puncher' => 'Stempeluhr', 'label.id' => 'ID', 'label.language' => 'Sprache', 'label.decimal_mark' => 'Dezimaltrennzeichen', @@ -213,8 +196,7 @@ // Labels for plugins (extensions to Time Tracker that provide additional features). 'label.custom_fields' => 'Benutzerfelder', 'label.monthly_quotas' => 'Monatliche Quoten', -// TODO: translate the following. -// 'label.entity' => 'Entity', +'label.entity' => 'Einheit', 'label.type' => 'Typ', 'label.type_dropdown' => 'Ausklappen', 'label.type_text' => 'Text', @@ -229,33 +211,30 @@ 'label.mark_paid' => 'Als bezahlt setzen', 'label.week_note' => 'Wochennotiz', 'label.week_list' => 'Wochenliste', -// TODO: translate the following: -// 'label.weekends' => 'Weekends', +'label.weekends' => 'Wochenenden', 'label.work_units' => 'Arbeitseinheiten', 'label.work_units_short' => 'Einheiten', 'label.totals_only' => 'Nur Gesamtstunden', 'label.quota' => 'Quote', -// TODO: translate the following. -// 'label.timesheet' => 'Timesheet', -// 'label.submitted' => 'Submitted', -// 'label.approved' => 'Approved', -// 'label.approval' => 'Report approval', -// 'label.mark_approved' => 'Mark approved', -// 'label.template' => 'Template', -// 'label.bind_templates_with_projects' => 'Bind templates with projects', -// 'label.prepopulate_note' => 'Prepopulate Note field', -// 'label.attachments' => 'Attachments', -// 'label.files' => 'Files', -// 'label.file' => 'File', +'label.timesheet' => 'Arbeitszeittabelle', +'label.submitted' => 'Eingereicht', +'label.approved' => 'Genehmigt', +'label.approval' => 'Genehmigung des Berichts', +'label.mark_approved' => 'Als genehmigt markieren', +'label.template' => 'Vorlage', +'label.bind_templates_with_projects' => 'Vorlagen mit Projekten verbinden', +'label.prepopulate_note' => 'Notizfeld vorab ausfüllen', +'label.attachments' => 'Anhänge', +'label.files' => 'Dateien', +'label.file' => 'Datei', 'label.active_users' => 'Aktive Nutzer', 'label.inactive_users' => 'Inaktive Nutzer', // Entity names. We use lower case (in English) because they are used in dropdowns, too. // They are used to associate a custom field with an entity type. -// TODO: translate the following. -// 'entity.time' => 'time', -// 'entity.user' => 'user', -// 'entity.project' => 'project', +'entity.time' => 'Zeit', +'entity.user' => 'Benutzer', +'entity.project' => 'Projekt', // Form titles. 'title.error' => 'Fehler', diff --git a/initialize.php b/initialize.php index 5a0189f28..e71ea88f8 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.5.5762"); +define("APP_VERSION", "1.22.5.5763"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 9acc6b2db4c3739bd89632bc1d36216099799931 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 29 Dec 2022 21:44:28 +0000 Subject: [PATCH 2458/2515] Continued to improve German translation. --- WEB-INF/resources/de.lang.php | 78 +++++++++++++++-------------------- initialize.php | 2 +- 2 files changed, 34 insertions(+), 46 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 8f0aae4c2..d0bbf01b9 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -240,8 +240,7 @@ 'title.error' => 'Fehler', 'title.success' => 'Erfol', 'title.login' => 'Anmelden', -// TODO: translate the follolwing. -// 'title.2fa' => 'Two Factor Authentication', +'title.2fa' => 'Zwei-Faktor-Authentifizierung', 'title.groups' => 'Gruppen', 'title.add_group' => 'Gruppe anlegen', 'title.edit_group' => 'Gruppe bearbeiten', @@ -251,9 +250,8 @@ 'title.time' => 'Zeiten', 'title.edit_time_record' => 'Bearbeiten des Stundeneintrags', 'title.delete_time_record' => 'Eintrag löschen', -// TODO: Translate the following. -// 'title.time_files' => 'Time Record Files', -// 'title.puncher' => 'Puncher', +'title.time_files' => 'Zeiterfassungsdateien', +'title.puncher' => 'Stempeluhr', 'title.expenses' => 'Kosten', 'title.edit_expense' => 'Kostenposition ändern', 'title.delete_expense' => 'Kostenposition löschen', @@ -262,10 +260,9 @@ 'title.reports' => 'Berichte', 'title.report' => 'Bericht', 'title.send_report' => 'Bericht senden', -// TODO: Translate the following. -// 'title.timesheets' => 'Timesheets', -// 'title.timesheet' => 'Timesheet', -// 'title.timesheet_files' => 'Timesheet Files', +'title.timesheets' => 'Arbeitszeittabellen', +'title.timesheet' => 'Arbeitszeittabelle', +'title.timesheet_files' => 'Arbeitszeittabellendateien', 'title.invoice' => 'Rechnung', 'title.send_invoice' => 'Rechnung senden', 'title.charts' => 'Diagramme', @@ -298,10 +295,9 @@ 'title.add_notification' => 'Benachrichtigung hinzufügen', 'title.edit_notification' => 'Benachrichtigung bearbeiten', 'title.delete_notification' => 'Benachrichtigung löschen', -// TODO: translate the following. -// 'title.add_timesheet' => 'Adding Timesheet', -// 'title.edit_timesheet' => 'Editing Timesheet', -// 'title.delete_timesheet' => 'Deleting Timesheet', +'title.add_timesheet' => 'Arbeitszeittabelle hinzufügen', +'title.edit_timesheet' => 'Arbeitszeittabelle bearbeiten', +'title.delete_timesheet' => 'Arbeitszeittabelle löschen', 'title.monthly_quotas' => 'Monatliche Quoten', 'title.export' => 'Daten exportieren', 'title.import' => 'Daten importieren', @@ -321,14 +317,13 @@ 'title.week_view' => 'Wochenansicht', 'title.swap_roles' => 'Tausche Rollen', 'title.work_units' => 'Arbeitseinheiten', -// TODO: translate the following. -// 'title.templates' => 'Templates', -// 'title.add_template' => 'Adding Template', -// 'title.edit_template' => 'Editing Template', -// 'title.delete_template' => 'Deleting Template', -// 'title.edit_file' => 'Editing File', -// 'title.delete_file' => 'Deleting File', -// 'title.download_file' => 'Downloading File', +'title.templates' => 'Vorlagen', +'title.add_template' => 'Vorlage hinzufügen', +'title.edit_template' => 'Vorlage bearbeiten', +'title.delete_template' => 'Vorlage löschen', +'title.edit_file' => 'Datei bearbeiten', +'title.delete_file' => 'Datei löschen', +'title.download_file' => 'Datei herunterladen', // Section for common strings inside combo boxes on forms. Strings shared between forms shall be placed here. // Strings that are used in a single form must go to the specific form section. @@ -352,20 +347,17 @@ 'dropdown.clients' => 'Kunden', 'dropdown.select' => '--- auswählen ---', 'dropdown.select_invoice' => '--- Rechnung auswählen ---', -// TODO: translate the following. -// 'dropdown.select_timesheet' => '--- select timesheet ---', +'dropdown.select_timesheet' => '--- Arbeitszeittabelle auswählen ---', 'dropdown.status_active' => 'aktiv', 'dropdown.status_inactive' => 'inaktiv', 'dropdown.delete' => 'löschen', 'dropdown.do_not_delete' => 'nicht löschen', -// TODO: translate the following. -// 'dropdown.approved' => 'approved', -// 'dropdown.not_approved' => 'not approved', +'dropdown.approved' => 'genehmigt', +'dropdown.not_approved' => 'abgelehnt', 'dropdown.paid' => 'bezahlt', 'dropdown.not_paid' => 'nicht bezahlt', -// TODO: translate the following. -// 'dropdown.ascending' => 'ascending', -// 'dropdown.descending' => 'descending', +'dropdown.ascending' => 'aufsteigend', +'dropdown.descending' => 'absteigend', // Below is a section for strings that are used on individual forms. When a string is used only on one form it should be placed here. // One exception is for closely related forms such as "Time" and "Editing Time Record" with similar controls. In such cases @@ -377,14 +369,12 @@ 'form.login.about' => 'Anuko Time Tracker ist ein Open-Source Zeiterfassungssystem.', // Email subject and body for two-factor authentication. -// TODO: translate the following. -// 'email.2fa_code.subject' => 'Anuko Time Tracker two-factor authentication code', -// 'email.2fa_code.body' => "Dear User,\n\nYour two-factor authentication code is:\n\n%s\n\n", +'email.2fa_code.subject' => 'Anuko Time Tracker Zwei-Faktor-Authentifizierungscode', +'email.2fa_code.body' => "Sehr geehrter Benutzer,\n\nIhr Zwei-Faktor-Authentifizierungscode lautet:\n\n%s\n\n", // Two-factor authentication form. See example at https://timetracker.anuko.com/2fa.php. -// TODO: translate the following. -// 'form.2fa.hint' => 'Check your email for 2FA code and enter it here.', -// 'form.2fa.2fa_code' => '2FA code', +'form.2fa.hint' => 'Überprüfen Sie Ihre E-Mails auf den 2FA-Code und geben Sie ihn hier ein.', +'form.2fa.2fa_code' => '2FA-Code', // Resetting Password form. See example at https://timetracker.anuko.com/password_reset.php. 'form.reset_password.message' => 'Anfrage zur Zurücksetzung des Passwortes wurde per E-mail gesendet.', @@ -416,19 +406,17 @@ 'form.reports.include_not_billable' => 'nicht in Rechnung stellen', 'form.reports.include_invoiced' => 'berechnet', 'form.reports.include_not_invoiced' => 'nicht berechnet', -// TODO: translate the following. -// 'form.reports.include_assigned' => 'assigned', -// 'form.reports.include_not_assigned' => 'not assigned', -// 'form.reports.include_pending' => 'pending', +'form.reports.include_pending' => 'Ausstehend', 'form.reports.select_period' => 'Zeitraum auswählen', 'form.reports.set_period' => 'oder Datum eingeben', -// TODO: translate the following. -// 'form.reports.note_containing' => 'Note containing', +// TODO: review form.reports.note_containing translation for accuracy. +// This is basically a string filter in user notes, see https://www.anuko.com/time-tracker/what-is/note-containing.htm +'form.reports.note_containing' => 'Enthält Notitz', // The concern is that it may be translated as "Containing a note", which is different + // from "Note containing a substring in this field." 'form.reports.show_fields' => 'Felder anzeigen', -// TODO: translate the following. -// 'form.reports.time_fields' => 'Time fields', -// 'form.reports.user_fields' => 'User fields', -// 'form.reports.project_fields' => 'Project fields', +'form.reports.time_fields' => 'Zeitfelder', +'form.reports.user_fields' => 'Benutzerfelder', +'form.reports.project_fields' => 'Projektfelder', 'form.reports.group_by' => 'Gruppieren nach', 'form.reports.group_by_no' => '--- keine Gruppierung ---', 'form.reports.group_by_date' => 'Datum', diff --git a/initialize.php b/initialize.php index e71ea88f8..fb4b2f494 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.5.5763"); +define("APP_VERSION", "1.22.5.5764"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From eb8a5bab0ad7cf9654c40fcf005d6021f3756044 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 30 Dec 2022 16:08:27 +0000 Subject: [PATCH 2459/2515] Work in progress on German translation. Almost done. --- WEB-INF/resources/de.lang.php | 58 ++++++++++++++++------------------- initialize.php | 2 +- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index d0bbf01b9..0217fa236 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -430,18 +430,21 @@ 'form.report.export' => 'Exportiere', 'form.report.per_hour' => 'Stundensatz', 'form.report.assign_to_invoice' => 'Zu Rechnung hinzufügen', -// TODO: translate the following. +// TODO: REVIEW the following. // 'form.report.assign_to_timesheet' => 'Assign to timesheet', +// See how this feature works: https://www.anuko.com/time-tracker/user-guide/timesheets.htm +// Basically, we are selecting records in a report and assign them TO (include IN) one of timesheets. +// The concern is that it is now translated as "Assign timesheet", which is different from how +// form.report.assign_to_invoice above is translated. +'form.report.assign_to_timesheet' => 'Arbeitszeittabelle zuweisen', // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php -// TODO: translate the following. -// 'form.timesheets.active_timesheets' => 'Active Timesheets', -// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', +'form.timesheets.active_timesheets' => 'Aktive Arbeitszeittabellen', +'form.timesheets.inactive_timesheets' => 'Inaktive Arbeitszeittabellen', // Templates form. See example at https://timetracker.anuko.com/templates.php -// TODO: translate the following. -// 'form.templates.active_templates' => 'Active Templates', -// 'form.templates.inactive_templates' => 'Inactive Templates', +'form.templates.active_templates' => 'Aktive Vorlagen', +'form.templates.inactive_templates' => 'Inaktive Vorlagen', // Invoice form. See example at https://timetracker.anuko.com/invoice_view.php // (you can get to this form after generating an invoice). @@ -466,8 +469,7 @@ 'form.tasks.inactive_tasks' => 'Inaktive Tasks', // Users form. See example at https://timetracker.anuko.com/users.php -// TODO: translate the following. -// 'form.users.uncompleted_entry_today' => 'User has an uncompleted time entry today', +'form.users.uncompleted_entry_today' => 'Der Benutzer hat heute einen nicht abgeschlossenen Zeiteintrag', 'form.users.uncompleted_entry' => 'Nutzer hat einen unvollständigen Zeiteintrag', 'form.users.role' => 'Rolle', 'form.users.manager' => 'Manager', @@ -521,21 +523,18 @@ 'form.group_edit.type_all' => 'alle', 'form.group_edit.type_start_finish' => 'Start und Ende', 'form.group_edit.type_duration' => 'Dauer', -'form.group_edit.punch_mode' => 'Stechuhr-Modus', -// TODO: translate the following. -// 'form.group_edit.one_uncompleted' => 'One uncompleted', +'form.group_edit.punch_mode' => 'Stempeluhr-Modus', +'form.group_edit.one_uncompleted' => 'Eine unvollendete', 'form.group_edit.allow_overlap' => 'Erlaube Überschneidung', 'form.group_edit.future_entries' => 'Einträge in der Zukunft', 'form.group_edit.uncompleted_indicators' => 'Zeige unfertige Einträge', 'form.group_edit.confirm_save' => 'Speichern bestätigen', -// TODO: translate the following. -// 'form.group_edit.advanced_settings' => 'Advanced settings', +'form.group_edit.advanced_settings' => 'Erweiterte Einstellungen', // Advanced Group Settings form. See example at https://timetracker.anuko.com/group_advanced_edit.php. 'form.group_advanced_edit.allow_ip' => 'Erlaube IP', -// TODO: Translate the following. -// 'form.group_advanced_edit.password_complexity' => 'Password complexity', -// 'form.group_advanced_edit.2fa' => 'Two factor authentication', +'form.group_advanced_edit.password_complexity' => 'Komplexität des Passworts', +'form.group_advanced_edit.2fa' => 'Zwei-Faktor-Authentifizierung', // Deleting Group form. See example at https://timetracker.anuko.com/delete_group.php 'form.group_delete.hint' => 'Sind Sie sicher, dass Sie die gesamte Gruppe löschen möchten?', @@ -569,7 +568,6 @@ 'role.client.low_case_label' => 'Kunde', // TODO: translate the following. // 'role.client.description' => 'A client can view its own data.', -'role.client.description' => 'Ein Kunde kann zu ihm gehörende Berichte und Rechnungen ansehen.', 'role.supervisor.label' => 'Dienstvorgesetzter', 'role.supervisor.low_case_label' => 'Dienstvorgesetzter', 'role.supervisor.description' => 'Eine Person mit ein paar Administrationsrechten.', @@ -587,20 +585,18 @@ 'role.admin.description' => 'Aadminsitrator der Seite.', // Timesheet View form. See example at https://timetracker.anuko.com/timesheet_view.php. -// TODO: translate the following. -// 'form.timesheet_view.submit_subject' => 'Timesheet approval request', -// 'form.timesheet_view.submit_body' => "A new timesheet requires approval.

User: %s.", -// 'form.timesheet_view.approve_subject' => 'Timesheet approved', -// 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", -// 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', -// 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", +'form.timesheet_view.submit_subject' => 'Antrag auf Genehmigung der Arbeitszeittabelle', +'form.timesheet_view.submit_body' => "Eine neue Arbeitszeittabelle muss genehmigt werden.

Benutzer: %s.", +'form.timesheet_view.approve_subject' => 'Arbeitszeittabelle genehmigt', +'form.timesheet_view.approve_body' => "Ihre Arbeitszeittabelle %s wurde genehmigt.

%s", +'form.timesheet_view.disapprove_subject' => 'Arbeitszeittabelle nicht genehmigt', +'form.timesheet_view.disapprove_body' => "Ihre Arbeitszeittabelle %s wurde nicht genehmigt.

%s", // Display Options form. See example at https://timetracker.anuko.com/display_options.php. 'form.display_options.note_on_separate_row' => 'Beschreibung in separater Zeile', -// TODO: translate the following. -// 'form.display_options.not_complete_days' => 'Not complete days', -// 'form.display_options.inactive_projects' => 'Inactive projects', -// 'form.display_options.cost_per_hour' => 'Cost per hour', -// 'form.display_options.custom_css' => 'Custom CSS', -// 'form.display_options.custom_translation' => 'Custom translation', +'form.display_options.not_complete_days' => 'Nicht vollständige Tage', +'form.display_options.inactive_projects' => 'Inaktive Projekte', +'form.display_options.cost_per_hour' => 'Kosten pro Stunde', +'form.display_options.custom_css' => 'Benutzerdefiniertes CSS', +'form.display_options.custom_translation' => 'Benutzerdefinierte Übersetzung', ); diff --git a/initialize.php b/initialize.php index fb4b2f494..67bd4373c 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.5.5764"); +define("APP_VERSION", "1.22.5.5765"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From ae138917e7a9e4bf5efcf36bd7969303a0831d19 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 31 Dec 2022 14:48:48 +0000 Subject: [PATCH 2460/2515] Bug fixes related to using 0 as entity name. --- WEB-INF/lib/form/TextField.class.php | 2 +- WEB-INF/lib/ttAdmin.class.php | 7 +++++-- admin_group_delete.php | 2 +- admin_group_edit.php | 2 +- cf_dropdown_option_delete.php | 2 +- cf_dropdown_option_edit.php | 2 +- initialize.php | 2 +- plugins/CustomFields.class.php | 8 +++++--- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index 91f8b5c2a..bfc0e551f 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -56,7 +56,7 @@ function getHtml() { if (!empty($this->on_change)) $html .= " onchange=\"$this->on_change\""; } - $html .= " value=\"".htmlspecialchars($this->getValue() ? $this->getValue() : '')."\""; + $html .= " value=\"".htmlspecialchars($this->getValue())."\""; if(!$this->isEnabled()) $html .= " readonly"; $html .= ">\n"; diff --git a/WEB-INF/lib/ttAdmin.class.php b/WEB-INF/lib/ttAdmin.class.php index 35a26afbe..00bd0ff59 100644 --- a/WEB-INF/lib/ttAdmin.class.php +++ b/WEB-INF/lib/ttAdmin.class.php @@ -150,6 +150,8 @@ static function updateSelf($fields) { // getGroupName obtains group name. static function getGroupName($group_id) { + $group_id = (int) $group_id; // Just in case because it is used in sql. + $result = array(); $mdb2 = getConnection(); @@ -158,10 +160,11 @@ static function getGroupName($group_id) { $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - return $val['name']; + if (isset($val['name'])) + return $val['name']; } - return false; + return null; } // getOrgDetails obtains group name and its top manager details. diff --git a/admin_group_delete.php b/admin_group_delete.php index 0cea02b32..909b2347a 100644 --- a/admin_group_delete.php +++ b/admin_group_delete.php @@ -13,7 +13,7 @@ } $group_id = (int)$request->getParameter('id'); $group_name = ttAdmin::getGroupName($group_id); -if (!($group_id && $group_name)) { +if (!($group_id && $group_name != null)) { header('Location: access_denied.php'); exit(); } diff --git a/admin_group_edit.php b/admin_group_edit.php index 81588ebec..496c7b8fb 100644 --- a/admin_group_edit.php +++ b/admin_group_edit.php @@ -14,7 +14,7 @@ } $group_id = (int)$request->getParameter('id'); $group_name = ttAdmin::getGroupName($group_id); -if (!($group_id && $group_name)) { +if (!($group_id && $group_name != null)) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index cb8c8a31a..50c685014 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -17,7 +17,7 @@ } $cl_id = (int)$request->getParameter('id'); $option = CustomFields::getOptionName($cl_id); -if ($option == null || $option === false) { +if ($option == null) { header('Location: access_denied.php'); exit(); } diff --git a/cf_dropdown_option_edit.php b/cf_dropdown_option_edit.php index eee02f63c..2477b057c 100644 --- a/cf_dropdown_option_edit.php +++ b/cf_dropdown_option_edit.php @@ -17,7 +17,7 @@ } $cl_id = (int)$request->getParameter('id'); $cl_name = CustomFields::getOptionName($cl_id); -if (!$cl_name) { +if ($cl_name == null) { header('Location: access_denied.php'); exit(); } diff --git a/initialize.php b/initialize.php index 67bd4373c..b6d48738d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.5.5765"); +define("APP_VERSION", "1.22.6.5766"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index 0e52871e2..b4839cf1b 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -221,6 +221,8 @@ static function getOptionName($id) { global $user; $mdb2 = getConnection(); + $id = (int) $id; // Just in case. Better safe than sorry as it is used in sql. + $group_id = $user->getGroup(); $org_id = $user->org_id; @@ -229,10 +231,10 @@ static function getOptionName($id) { $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - $name = $val['value']; - return $name; + if (isset($val['value'])) + return $val['value']; } - return false; + return null; } // getFields returns an array of custom fields for group. From aa8c6961dcce1ae929f1108033871f9574bddae5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 31 Dec 2022 15:17:40 +0000 Subject: [PATCH 2461/2515] Fixes related to using 0 in fields. --- WEB-INF/lib/ttAdmin.class.php | 3 ++- admin_options.php | 2 +- initialize.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttAdmin.class.php b/WEB-INF/lib/ttAdmin.class.php index 00bd0ff59..4a631d5e3 100644 --- a/WEB-INF/lib/ttAdmin.class.php +++ b/WEB-INF/lib/ttAdmin.class.php @@ -138,7 +138,8 @@ static function updateSelf($fields) { // Update self. $user_id = $user->id; $login_part = 'login = '.$mdb2->quote($fields['login']); - if ($fields['password1']) + $password_part = ''; + if (isset($fields['password1'])) $password_part = ', password = md5('.$mdb2->quote($fields['password1']).')'; $name_part = ', name = '.$mdb2->quote($fields['name']); $email_part = ', email = '.$mdb2->quote($fields['email']); diff --git a/admin_options.php b/admin_options.php index 84a0ed3a5..aed852320 100644 --- a/admin_options.php +++ b/admin_options.php @@ -48,7 +48,7 @@ // If we change login, it must be unique. if ($cl_login != $user->login && ttUserHelper::getUserByLogin($cl_login)) $err->add($i18n->get('error.user_exists')); - if (!$auth->isPasswordExternal() && ($cl_password1 || $cl_password2)) { + if (!$auth->isPasswordExternal() && ($cl_password1 != null || $cl_password2 != null)) { if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password')); if (!ttValidString($cl_password2)) diff --git a/initialize.php b/initialize.php index b6d48738d..3e332ebab 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.6.5766"); +define("APP_VERSION", "1.22.6.5767"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From d019c044c0e8d21ce463f680fd45f86fcf6c8014 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 1 Jan 2023 16:21:43 +0000 Subject: [PATCH 2462/2515] Disallowed adding a duplicate custom field with the same name and entity type. --- cf_custom_field_add.php | 2 +- initialize.php | 2 +- plugins/CustomFields.class.php | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index c10803758..87d46bcd5 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -15,7 +15,6 @@ header('Location: feature_disabled.php'); exit(); } -$fields = CustomFields::getFields(); // End of access checks. if ($request->isPost()) { @@ -42,6 +41,7 @@ if ($request->isPost()) { // Validate user input. if (!ttValidString($cl_field_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name')); + if (CustomFields::getFieldByName($cl_field_name, $cl_entity_type) != null) $err->add($i18n->get('error.object_exists')); if ($err->no()) { $res = CustomFields::insertField($cl_field_name, $cl_entity_type, $cl_field_type, $cl_required); diff --git a/initialize.php b/initialize.php index 3e332ebab..e43e33d3e 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.6.5767"); +define("APP_VERSION", "1.22.6.5768"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index b4839cf1b..b561af804 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -278,6 +278,27 @@ static function getField($id) { return false; } + // getFieldByName returns a custom field by name and its entity type. + static function getFieldByName($fieldName, $entityType) { + global $user; + $mdb2 = getConnection(); + + $entityType = (int) $entityType; // Just in case. + $group_id = $user->getGroup(); + $org_id = $user->org_id; + + $sql = "select label, type, required from tt_custom_fields" . + " where label = ". $mdb2->quote($fieldName) . " and entity_type = $entityType". + " and group_id = $group_id and org_id = $org_id and status is not null"; + $res = $mdb2->query($sql); + if (!is_a($res, 'PEAR_Error')) { + $val = $res->fetchRow(); + if (isset($val)) + return $val; + } + return null; + } + // getFieldIdForOption returns field id from an associated option id. static function getFieldIdForOption($option_id) { global $user; From e0b9d2112e4b8134839e9540acb6d133bf1dce6b Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 2 Jan 2023 17:15:59 +0000 Subject: [PATCH 2463/2515] Fixed a printing problem by eliminating a 1st page break for large reports. --- default.css | 13 +++++++++++++ initialize.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/default.css b/default.css index 38de0f53f..7c88fc2d6 100644 --- a/default.css +++ b/default.css @@ -145,6 +145,19 @@ div.page-hint { border-collapse: collapse; } +/* For printing large tables that do not fit into one page, we have to change the display +property to "block" and also use "break-before: avoid;". This eliminates a page break between +header and large table on print previews. I could not accomplish this with inline-block +because break-before is apparently ignored for inline elements. +inline-block above in itself is needed for nice horizontal centering on screen. */ +@media print +{ + .x-scrollable-table { display: block; break-before: avoid; break-after: auto; } + /* Not sure if we need this, keep commented out for now. + .x-scrollable-table tr { page-break-inside:avoid; page-break-after:auto; } + .x-scrollable-table td { page-break-inside:avoid; page-break-after:auto; } */ +} + /* th in x-scrollable-table */ .x-scrollable-table th { white-space: nowrap; diff --git a/initialize.php b/initialize.php index e43e33d3e..c43bafddd 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.6.5768"); +define("APP_VERSION", "1.22.7.5769"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 791d64428e8242a5bc4fd8af311c36ba1379d602 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 2 Jan 2023 20:57:22 +0000 Subject: [PATCH 2464/2515] A fix for invoices to allow 0 as invoice name. --- WEB-INF/lib/ttInvoiceHelper.class.php | 3 +-- initialize.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 2ac63db44..44206fa0e 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -298,8 +298,7 @@ static function createInvoice($fields) { $group_id = $user->getGroup(); $org_id = $user->org_id; - $name = $fields['name']; - if (!$name) return false; + $name = isset($fields['name']) ? $fields['name'] : null; $client_id = (int) $fields['client_id']; diff --git a/initialize.php b/initialize.php index c43bafddd..9f8a7a45f 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.7.5769"); +define("APP_VERSION", "1.22.7.5770"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From b3f906536d4f6e8e9eb64e6b7a8c4a7db2969b06 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 5 Jan 2023 15:48:15 +0000 Subject: [PATCH 2465/2515] Some fixes for incompatible database structure. --- WEB-INF/lib/ttUser.class.php | 162 +++++++++++++++++++---------------- default.css | 5 +- initialize.php | 2 +- login.php | 12 ++- 4 files changed, 98 insertions(+), 83 deletions(-) diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 37591fa5f..2e86eacb9 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -62,6 +62,9 @@ class ttUser { var $behalfUser = null; // A ttBehalfUser instance with on behalf user attributes. var $behalfGroup = null; // A ttGroup instance with on behalf group attributes. + var $initialized = false; // Set to true when an object is initialized. + + // Constructor. function __construct($login, $id = null) { if (!$login && !$id) { @@ -69,86 +72,93 @@ function __construct($login, $id = null) { return; } - $mdb2 = getConnection(); - - $sql = "SELECT u.id, u.login, u.name, u.group_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id,". - " u.quota_percent, u.email, g.org_id, g.group_key, g.name as group_name, g.currency, g.lang, g.decimal_mark, g.date_format,". - " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.record_type,". - " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.custom_translation,". - " g.holidays, g.workday_minutes, g.custom_logo". - " FROM tt_users u LEFT JOIN tt_groups g ON (u.group_id = g.id) LEFT JOIN tt_roles r on (r.id = u.role_id) WHERE "; - if ($id) - $sql .= "u.id = $id"; - else - $sql .= "u.login = ".$mdb2->quote($login); - $sql .= " AND u.status = 1"; + try { + $mdb2 = getConnection(); + + $sql = "SELECT u.id, u.login, u.name, u.group_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id,". + " u.quota_percent, u.email, g.org_id, g.group_key, g.name as group_name, g.currency, g.lang, g.decimal_mark, g.date_format,". + " g.time_format, g.week_start, g.tracking_mode, g.project_required, g.record_type,". + " g.bcc_email, g.allow_ip, g.password_complexity, g.plugins, g.config, g.lock_spec, g.custom_css, g.custom_translation,". + " g.holidays, g.workday_minutes, g.custom_logo". + " FROM tt_users u LEFT JOIN tt_groups g ON (u.group_id = g.id) LEFT JOIN tt_roles r on (r.id = u.role_id) WHERE "; + if ($id) + $sql .= "u.id = $id"; + else + $sql .= "u.login = ".$mdb2->quote($login); + $sql .= " AND u.status = 1"; + + $res = $mdb2->query($sql); + if (is_a($res, 'PEAR_Error')) { + return; + } - $res = $mdb2->query($sql); - if (is_a($res, 'PEAR_Error')) { - return; - } + $val = $res->fetchRow(); + if ($val['id'] > 0) { + $this->login = $val['login']; + $this->name = $val['name']; + $this->id = $val['id']; + $this->org_id = $val['org_id']; + $this->group_id = $val['group_id']; + $this->group_key = $val['group_key']; + if ($this->org_id == $this->group_key) $this->org_key = $val['group_key']; + $this->role_id = $val['role_id']; + $this->role_name = $val['role_name']; + $this->rights = explode(',', $val['rights']); + $this->rank = $val['rank']; + $this->client_id = $val['client_id']; + $this->is_client = $this->client_id && !in_array('track_own_time', $this->rights); + if ($val['quota_percent']) $this->quota_percent = $val['quota_percent']; + $this->email = $val['email']; + if ($val['lang']) $this->lang = $val['lang']; + if ($val['decimal_mark']) $this->decimal_mark = $val['decimal_mark']; + $this->date_format = $val['date_format']; + $this->time_format = $val['time_format']; + $this->week_start = $val['week_start']; + $this->tracking_mode = $val['tracking_mode']; + $this->project_required = $val['project_required']; + $this->record_type = $val['record_type']; + $this->bcc_email = $val['bcc_email']; + $this->allow_ip = $val['allow_ip']; + $this->password_complexity = $val['password_complexity']; + $this->group_name = $val['group_name']; + $this->currency = $val['currency']; + $this->plugins = $val['plugins']; + $this->lock_spec = $val['lock_spec']; + $this->holidays = $val['holidays']; + $this->workday_minutes = $val['workday_minutes']; + $this->custom_logo = $val['custom_logo']; + + // TODO: refactor this. + $this->config = $val['config']; + $this->configHelper = new ttConfigHelper($val['config']); + + // Set user config options. + $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); + $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); + + $this->custom_css = $val['custom_css']; + $this->custom_translation = $val['custom_translation']; + + // Set "on behalf" id and name (user). + if (isset($_SESSION['behalf_id'])) { + $this->behalf_id = $_SESSION['behalf_id']; + $this->behalf_name = $_SESSION['behalf_name']; + + $this->behalfUser = new ttBehalfUser($this->behalf_id, $this->org_id); + } + // Set "on behalf" id and name (group). + if (isset($_SESSION['behalf_group_id'])) { + $this->behalf_group_id = $_SESSION['behalf_group_id']; + $this->behalf_group_name = $_SESSION['behalf_group_name']; - $val = $res->fetchRow(); - if ($val['id'] > 0) { - $this->login = $val['login']; - $this->name = $val['name']; - $this->id = $val['id']; - $this->org_id = $val['org_id']; - $this->group_id = $val['group_id']; - $this->group_key = $val['group_key']; - if ($this->org_id == $this->group_key) $this->org_key = $val['group_key']; - $this->role_id = $val['role_id']; - $this->role_name = $val['role_name']; - $this->rights = explode(',', $val['rights']); - $this->rank = $val['rank']; - $this->client_id = $val['client_id']; - $this->is_client = $this->client_id && !in_array('track_own_time', $this->rights); - if ($val['quota_percent']) $this->quota_percent = $val['quota_percent']; - $this->email = $val['email']; - if ($val['lang']) $this->lang = $val['lang']; - if ($val['decimal_mark']) $this->decimal_mark = $val['decimal_mark']; - $this->date_format = $val['date_format']; - $this->time_format = $val['time_format']; - $this->week_start = $val['week_start']; - $this->tracking_mode = $val['tracking_mode']; - $this->project_required = $val['project_required']; - $this->record_type = $val['record_type']; - $this->bcc_email = $val['bcc_email']; - $this->allow_ip = $val['allow_ip']; - $this->password_complexity = $val['password_complexity']; - $this->group_name = $val['group_name']; - $this->currency = $val['currency']; - $this->plugins = $val['plugins']; - $this->lock_spec = $val['lock_spec']; - $this->holidays = $val['holidays']; - $this->workday_minutes = $val['workday_minutes']; - $this->custom_logo = $val['custom_logo']; - - // TODO: refactor this. - $this->config = $val['config']; - $this->configHelper = new ttConfigHelper($val['config']); - - // Set user config options. - $this->punch_mode = $this->configHelper->getDefinedValue('punch_mode'); - $this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap'); - - $this->custom_css = $val['custom_css']; - $this->custom_translation = $val['custom_translation']; - - // Set "on behalf" id and name (user). - if (isset($_SESSION['behalf_id'])) { - $this->behalf_id = $_SESSION['behalf_id']; - $this->behalf_name = $_SESSION['behalf_name']; - - $this->behalfUser = new ttBehalfUser($this->behalf_id, $this->org_id); + $this->behalfGroup = new ttGroup($this->behalf_group_id, $this->org_id); + } } - // Set "on behalf" id and name (group). - if (isset($_SESSION['behalf_group_id'])) { - $this->behalf_group_id = $_SESSION['behalf_group_id']; - $this->behalf_group_name = $_SESSION['behalf_group_name']; - $this->behalfGroup = new ttGroup($this->behalf_group_id, $this->org_id); - } + $this->initialized = true; + } + catch (Exception $e) { + error_log("Exception raised in ttUser constructor: ".$e->getMessage()); } } diff --git a/default.css b/default.css index 7c88fc2d6..d1a77ebd8 100644 --- a/default.css +++ b/default.css @@ -148,8 +148,9 @@ div.page-hint { /* For printing large tables that do not fit into one page, we have to change the display property to "block" and also use "break-before: avoid;". This eliminates a page break between header and large table on print previews. I could not accomplish this with inline-block -because break-before is apparently ignored for inline elements. -inline-block above in itself is needed for nice horizontal centering on screen. */ +because break-before is apparently ignored for inline-block elements. +inline-block above in itself is needed for nice horizontal centering on screen. +A side effect of this is that printed tables are not horizontally centered. */ @media print { .x-scrollable-table { display: block; break-before: avoid; break-after: auto; } diff --git a/initialize.php b/initialize.php index 9f8a7a45f..e2f8a2e23 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,7 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.7.5770"); +define("APP_VERSION", "1.22.8.5771"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/login.php b/login.php index f5dd8eec1..2d9dde044 100644 --- a/login.php +++ b/login.php @@ -55,13 +55,17 @@ if ($err->no() && $loginSucceeded) { $user = new ttUser(null, $auth->getUserId()); - // Determine if we have to additionally use two-factor authentication. - $config = $user->getConfigHelper(); - $use2FA = $config->getDefinedValue('2fa'); + if ($user->initialized) { + // Determine if we have to additionally use two-factor authentication. + $config = $user->getConfigHelper(); + $use2FA = $config->getDefinedValue('2fa'); + } else { + $err->add($i18n->get('error.db')); + } } // If we have to use 2FA, email auth code to user and redirect to 2fa.php. - if ($use2FA && !$user->can('override_2fa')) { + if ($err->no() && $use2FA && !$user->can('override_2fa')) { // To keep things simple, we use the same code as for password resets. $cryptographically_strong = true; $random_bytes = openssl_random_pseudo_bytes(16, $cryptographically_strong); From 94765d3b81cbbe5feb8d0a2418e3f29d06c61740 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 6 Jan 2023 16:22:10 +0000 Subject: [PATCH 2466/2515] An attempt to better support php8.1 or greater. --- initialize.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/initialize.php b/initialize.php index e2f8a2e23..0ed4d1d7d 100644 --- a/initialize.php +++ b/initialize.php @@ -12,7 +12,13 @@ // Disable displaying errors on screen. ini_set('display_errors', 'Off'); -define("APP_VERSION", "1.22.8.5771"); +// Disable mysqli fatal error behaviour when using php8.1 or greater. +// See https://php.watch/versions/8.1/mysqli-error-mode +if (version_compare(phpversion(), '8.1', '>=')) { + mysqli_report(MYSQLI_REPORT_OFF); +} + +define("APP_VERSION", "1.22.9.5772"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 6bce8835b9b5a5c185ba44a652b9955993ff27a2 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 7 Jan 2023 18:12:18 +0000 Subject: [PATCH 2467/2515] Addressed a few more php8.0 warnings. --- dbinstall.php | 44 ++++++++++++++++++++++---------------------- initialize.php | 2 +- time.php | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dbinstall.php b/dbinstall.php index c79cd558a..2db0bebca 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -201,7 +201,7 @@ function ttGenerateKeys() { if ($_POST) { print "Processing...
\n"; - if ($_POST["crstructure"]) { + if (array_key_exists('crstructure', $_POST)) { $sqlQuery = join("\n", file("mysql.sql")); $sqlQuery = str_replace("TYPE=MyISAM","",$sqlQuery); $queries = explode(";",$sqlQuery); @@ -215,7 +215,7 @@ function ttGenerateKeys() { } } - if ($_POST["convert5to7"]) { + if (array_key_exists('convert5to7', $_POST)) { ttExecute("alter table `activity_log` CHANGE al_comment al_comment text"); ttExecute("CREATE TABLE `sysconfig` (`sysc_id` int(11) unsigned NOT NULL auto_increment,`sysc_name` varchar(32) NOT NULL default '',`sysc_value` varchar(70) default NULL, PRIMARY KEY (`sysc_id`), UNIQUE KEY `sysc_id` (`sysc_id`), UNIQUE KEY `sysc_name` (`sysc_name`))"); ttExecute("alter table `companies` add c_locktime int(4) default -1"); @@ -229,7 +229,7 @@ function ttGenerateKeys() { ttExecute("alter table users drop `u_aprojects`"); } - if ($_POST["convert7to133"]) { + if (array_key_exists('convert7to133', $_POST)) { ttExecute("ALTER TABLE users ADD COLUMN u_lang VARCHAR(20) DEFAULT NULL"); ttExecute("ALTER TABLE users ADD COLUMN u_email VARCHAR(100) DEFAULT NULL"); ttExecute("ALTER TABLE `activity_log` drop `al_proof`"); @@ -244,7 +244,7 @@ function ttGenerateKeys() { // The update_projects function updates p_activities field in the projects table so that we could // improve performance of the application by using this field instead of activity_bind table. - if ($_POST["update_projects"]) { + if (array_key_exists('update_projects', $_POST)) { $mdb2 = getConnection(); // $sql = "select p_id from projects where p_status = 1 and p_activities is NULL"; $sql = "select p_id from projects where p_status = 1"; @@ -281,15 +281,15 @@ function ttGenerateKeys() { } } - if ($_POST["convert133to1340"]) { + if (array_key_exists('convert133to1340', $_POST)) { ttExecute("ALTER TABLE companies ADD COLUMN c_show_pie smallint(2) DEFAULT 1"); ttExecute("ALTER TABLE companies ADD COLUMN c_pie_mode smallint(2) DEFAULT 1"); ttExecute("ALTER TABLE companies ADD COLUMN c_lang varchar(20) default NULL"); } // The update_companies function sets up c_show_pie, c_pie_mode, and c_lang - // fields in the companies table from the corresponding manager fields. - if ($_POST["update_companies"]) { + // fields in the companies table from the corresponding manager fields. + if (array_key_exists('update_companies', $_POST)) { $mdb2 = getConnection(); // Get all active managers. $sql = "select u_company_id, u_show_pie, u_pie_mode, u_lang from users @@ -316,7 +316,7 @@ function ttGenerateKeys() { } } - if ($_POST["convert1340to1485"]) { + if (array_key_exists('convert1340to1485', $_POST)) { ttExecute("ALTER TABLE users DROP u_show_pie"); ttExecute("ALTER TABLE users DROP u_pie_mode"); ttExecute("ALTER TABLE users DROP u_lang"); @@ -421,7 +421,7 @@ function ttGenerateKeys() { } // The update_to_team_id function sets team_id field projects, activities, and clients tables. - if ($_POST["update_to_team_id"]) { + if (array_key_exists('update_to_team_id', $_POST)) { $mdb2 = getConnection(); // Update projects. @@ -518,7 +518,7 @@ function ttGenerateKeys() { print "Updated $clients_updated clients...
\n"; } - if ($_POST["convert1485to1579"]) { + if (array_key_exists('convert1485to1579', $_POST)) { ttExecute("ALTER TABLE tt_fav_reports MODIFY id int(11) NOT NULL auto_increment"); ttExecute("RENAME TABLE clients TO tt_clients"); ttExecute("ALTER TABLE tt_clients CHANGE clnt_id id int(11) NOT NULL AUTO_INCREMENT"); @@ -625,7 +625,7 @@ function ttGenerateKeys() { ttExecute("create index invoice_idx on tt_log(invoice_id)"); } - if ($_POST["convert1579to1600"]) { + if (array_key_exists('convert1579to1600', $_POST)) { ttExecute("ALTER TABLE tt_invoices ADD COLUMN date date NOT NULL"); ttExecute("ALTER TABLE tt_teams ADD COLUMN custom_logo tinyint(4) default '0'"); ttExecute("ALTER TABLE tt_tasks ADD COLUMN description varchar(255) default NULL"); @@ -643,7 +643,7 @@ function ttGenerateKeys() { } // The update_clients function updates projects field in tt_clients table. - if ($_POST["update_clients"]) { + if (array_key_exists('update_clients', $_POST)) { $mdb2 = getConnection(); $sql = "select id from tt_clients where status = 1 or status = 0"; $res = $mdb2->query($sql); @@ -682,7 +682,7 @@ function ttGenerateKeys() { } // The update_custom_fields function updates option_id field in tt_custom_field_log table. - if ($_POST['update_custom_fields']) { + if (array_key_exists('update_custom_fields', $_POST)) { $mdb2 = getConnection(); $sql = "update tt_custom_field_log set option_id = value where option_id is null and value is not null and field_id in (select id from tt_custom_fields where type = 2)"; $affected = $mdb2->exec($sql); @@ -693,7 +693,7 @@ function ttGenerateKeys() { } // The update_tracking_mode function sets the tracking_mode field in tt_teams table to 2 (== MODE_PROJECTS_AND_TASKS). - if ($_POST['update_tracking_mode']) { + if (array_key_exists('update_tracking_mode', $_POST)) { $mdb2 = getConnection(); $sql = "update tt_teams set tracking_mode = 2 where tracking_mode = 0"; $affected = $mdb2->exec($sql); @@ -703,7 +703,7 @@ function ttGenerateKeys() { print "Updated $affected teams...
\n"; } - if ($_POST["convert1600to11400"]) { + if (array_key_exists('convert1600to11400', $_POST)) { ttExecute("DROP TABLE IF EXISTS tt_invoice_headers"); ttExecute("ALTER TABLE tt_fav_reports ADD COLUMN `client_id` int(11) default NULL"); ttExecute("ALTER TABLE tt_fav_reports ADD COLUMN `cf_1_option_id` int(11) default NULL"); @@ -751,7 +751,7 @@ function ttGenerateKeys() { ttExecute("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11744"]) { + if (array_key_exists('convert11400to11744', $_POST)) { ttExecute("ALTER TABLE `tt_teams` DROP `address`"); ttExecute("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); ttExecute("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -794,7 +794,7 @@ function ttGenerateKeys() { } // The update_role_id function assigns a role_id to users, who don't have it. - if ($_POST['update_role_id']) { + if (array_key_exists('update_role_id', $_POST)) { import('I18n'); $mdb2 = getConnection(); @@ -833,7 +833,7 @@ function ttGenerateKeys() { print "Updated $users_updated users...
\n"; } - if ($_POST["convert11744to11797"]) { + if (array_key_exists('convert11744to11797', $_POST)) { ttExecute("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.44') set rights = replace(rights, 'override_punch_mode,override_date_lock', 'override_punch_mode,override_own_punch_mode,override_date_lock')"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.17.48' where param_name = 'version_db' and param_value = '1.17.44'"); ttExecute("update `tt_users` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.48') set role_id = (select id from tt_roles where team_id = 0 and `rank` = 512) where role = 324"); @@ -938,7 +938,7 @@ function ttGenerateKeys() { } // The update_group_id function updates group_id field in tt_log and tt_expense_items tables. - if ($_POST["update_group_id"]) { + if (array_key_exists('update_group_id', $_POST)) { $mdb2 = getConnection(); $sql = "(select distinct user_id from tt_log where group_id is null) union distinct (select distinct user_id from tt_expense_items where group_id is null)"; @@ -984,7 +984,7 @@ function ttGenerateKeys() { print "Updated $tt_expense_items_updated tt_expense_items records...
\n"; } - if ($_POST["convert11797to11900"]) { + if (array_key_exists('convert11797to11900', $_POST)) { ttExecute("ALTER TABLE `tt_fav_reports` CHANGE `group_by` `group_by1` varchar(20) default NULL"); ttExecute("ALTER TABLE `tt_fav_reports` ADD `group_by2` varchar(20) default NULL AFTER `group_by1`"); ttExecute("ALTER TABLE `tt_fav_reports` ADD `group_by3` varchar(20) default NULL AFTER `group_by2`"); @@ -1151,7 +1151,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.19.0', modified = now() where param_name = 'version_db' and param_value = '1.18.61'"); } - if ($_POST["convert11900to12203"]) { + if (array_key_exists('convert11900to12203', $_POST)) { ttExecute("CREATE TABLE `tt_work_currencies` (`id` int(10) unsigned NOT NULL,`name` varchar(10) NOT NULL,PRIMARY KEY (`id`))"); ttExecute("create unique index currency_idx on tt_work_currencies(`name`)"); ttExecute("INSERT INTO `tt_work_currencies` (`id`, `name`) VALUES ('1', 'USD'), ('2', 'CAD'), ('3', 'AUD'), ('4', 'EUR'), ('5', 'NZD')"); @@ -1203,7 +1203,7 @@ function ttGenerateKeys() { ttExecute("UPDATE `tt_site_config` SET param_value = '1.22.3', modified = now() where param_name = 'version_db' and param_value = '1.21.7'"); } - if ($_POST["cleanup"]) { + if (array_key_exists('cleanup', $_POST)) { $mdb2 = getConnection(); $inactive_orgs = ttOrgHelper::getInactiveOrgs(); diff --git a/initialize.php b/initialize.php index 0ed4d1d7d..705d2db19 100644 --- a/initialize.php +++ b/initialize.php @@ -18,7 +18,7 @@ mysqli_report(MYSQLI_REPORT_OFF); } -define("APP_VERSION", "1.22.9.5772"); +define("APP_VERSION", "1.22.9.5773"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); diff --git a/time.php b/time.php index 766ee5fd1..931436fae 100644 --- a/time.php +++ b/time.php @@ -386,7 +386,7 @@ if ($showTask && $taskRequired) { if (!$cl_task) $err->add($i18n->get('error.task')); } - if (strlen($cl_duration) == 0) { + if ($cl_duration == null || strlen($cl_duration) == 0) { if ($cl_start || $cl_finish) { if (!ttTimeHelper::isValidTime($cl_start)) $err->add($i18n->get('error.field'), $i18n->get('label.start')); From 0ade9c1b7310e67ac38ee9426f27253a703a32a0 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 8 Jan 2023 15:24:49 +0000 Subject: [PATCH 2468/2515] Improved handling of a situation when mysqli_report function is not available. --- initialize.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/initialize.php b/initialize.php index 705d2db19..3c8191921 100644 --- a/initialize.php +++ b/initialize.php @@ -15,10 +15,13 @@ // Disable mysqli fatal error behaviour when using php8.1 or greater. // See https://php.watch/versions/8.1/mysqli-error-mode if (version_compare(phpversion(), '8.1', '>=')) { - mysqli_report(MYSQLI_REPORT_OFF); + if (function_exists('mysqli_report')) + mysqli_report(MYSQLI_REPORT_OFF); + else + die("mysqli_report function is not available."); // No point to continue as mysqli will not work. } -define("APP_VERSION", "1.22.9.5773"); +define("APP_VERSION", "1.22.9.5774"); define("APP_DIR", dirname(__FILE__)); define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib"); define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates"); From 88c0ea1884e59e7f1275cff94ca888962750a1e8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sun, 8 Jan 2023 20:23:12 +0000 Subject: [PATCH 2469/2515] Updated smarty for better compatibility with php8.1. --- WEB-INF/lib/smarty/Autoloader.php | 9 +- WEB-INF/lib/smarty/Smarty.class.php | 35 ++++---- WEB-INF/lib/smarty/bootstrap.php | 2 +- WEB-INF/lib/smarty/debug.tpl | 53 +++++++----- WEB-INF/lib/smarty/functions.php | 51 +++++++++++ .../plugins/function.html_select_date.php | 73 ++++++++-------- .../lib/smarty/plugins/function.mailto.php | 28 ++++--- WEB-INF/lib/smarty/plugins/function.math.php | 4 +- .../smarty/plugins/modifier.capitalize.php | 2 + WEB-INF/lib/smarty/plugins/modifier.count.php | 36 ++++++++ .../smarty/plugins/modifier.date_format.php | 3 +- .../lib/smarty/plugins/modifier.escape.php | 84 ++----------------- .../lib/smarty/plugins/modifier.explode.php | 25 ++++++ .../smarty/plugins/modifier.number_format.php | 26 ++++++ .../lib/smarty/plugins/modifier.truncate.php | 6 +- .../plugins/modifiercompiler.escape.php | 49 +++-------- .../smarty/plugins/modifiercompiler.nl2br.php | 23 +++++ .../smarty/plugins/modifiercompiler.round.php | 23 +++++ .../plugins/modifiercompiler.str_repeat.php | 23 +++++ .../plugins/modifiercompiler.strip_tags.php | 4 +- .../plugins/modifiercompiler.strlen.php | 23 +++++ .../plugins/modifiercompiler.unescape.php | 26 ++++-- .../smarty/plugins/modifiercompiler.upper.php | 4 +- .../smarty/plugins/shared.mb_str_replace.php | 36 +++++++- WEB-INF/lib/smarty/readme | 7 -- .../sysplugins/smarty_cacheresource.php | 4 +- .../smarty_cacheresource_keyvaluestore.php | 4 +- .../smarty_internal_cacheresource_file.php | 2 +- .../smarty_internal_compile_block.php | 4 +- .../smarty_internal_compile_function.php | 8 +- .../smarty_internal_compile_include.php | 4 +- .../smarty_internal_compile_insert.php | 2 +- ...nternal_compile_private_foreachsection.php | 6 +- ...arty_internal_compile_private_modifier.php | 3 + ...ernal_compile_private_print_expression.php | 2 +- ...ernal_compile_private_special_variable.php | 6 +- .../smarty_internal_config_file_compiler.php | 10 ++- .../sysplugins/smarty_internal_debug.php | 4 +- .../smarty_internal_extension_handler.php | 28 +++---- .../smarty_internal_method_loadplugin.php | 4 +- .../smarty_internal_method_mustcompile.php | 2 +- .../smarty_internal_runtime_codeframe.php | 9 +- .../smarty_internal_runtime_make_nocache.php | 2 +- .../smarty_internal_runtime_writefile.php | 15 +--- .../sysplugins/smarty_internal_template.php | 5 +- .../smarty_internal_templatebase.php | 2 +- .../smarty_internal_templatecompilerbase.php | 19 +++-- .../smarty_internal_testinstall.php | 2 +- .../lib/smarty/sysplugins/smarty_resource.php | 4 +- .../sysplugins/smarty_resource_custom.php | 15 +++- .../lib/smarty/sysplugins/smarty_security.php | 34 +------- .../lib/smarty/sysplugins/smarty_variable.php | 1 + .../sysplugins/smartycompilerexception.php | 28 +++++++ dbinstall.php | 21 +++-- initialize.php | 2 +- 55 files changed, 563 insertions(+), 344 deletions(-) create mode 100644 WEB-INF/lib/smarty/functions.php create mode 100644 WEB-INF/lib/smarty/plugins/modifier.count.php create mode 100644 WEB-INF/lib/smarty/plugins/modifier.explode.php create mode 100644 WEB-INF/lib/smarty/plugins/modifier.number_format.php create mode 100644 WEB-INF/lib/smarty/plugins/modifiercompiler.nl2br.php create mode 100644 WEB-INF/lib/smarty/plugins/modifiercompiler.round.php create mode 100644 WEB-INF/lib/smarty/plugins/modifiercompiler.str_repeat.php create mode 100644 WEB-INF/lib/smarty/plugins/modifiercompiler.strlen.php delete mode 100644 WEB-INF/lib/smarty/readme diff --git a/WEB-INF/lib/smarty/Autoloader.php b/WEB-INF/lib/smarty/Autoloader.php index 1673ce2ff..da7e32abf 100644 --- a/WEB-INF/lib/smarty/Autoloader.php +++ b/WEB-INF/lib/smarty/Autoloader.php @@ -5,6 +5,11 @@ * @package Smarty */ + +if (!defined('SMARTY_HELPER_FUNCTIONS_LOADED')) { + include __DIR__ . '/functions.php'; +} + /** * Smarty Autoloader * @@ -73,7 +78,7 @@ public static function registerBC($prepend = false) */ public static function register($prepend = false) { - self::$SMARTY_DIR = defined('SMARTY_DIR') ? SMARTY_DIR : dirname(__FILE__) . DIRECTORY_SEPARATOR; + self::$SMARTY_DIR = defined('SMARTY_DIR') ? SMARTY_DIR : __DIR__ . DIRECTORY_SEPARATOR; self::$SMARTY_SYSPLUGINS_DIR = defined('SMARTY_SYSPLUGINS_DIR') ? SMARTY_SYSPLUGINS_DIR : self::$SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR; spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend); @@ -89,7 +94,7 @@ public static function autoload($class) if ($class[ 0 ] !== 'S' || strpos($class, 'Smarty') !== 0) { return; } - $_class = strtolower($class); + $_class = smarty_strtolower_ascii($class); if (isset(self::$rootClasses[ $_class ])) { $file = self::$SMARTY_DIR . self::$rootClasses[ $_class ]; if (is_file($file)) { diff --git a/WEB-INF/lib/smarty/Smarty.class.php b/WEB-INF/lib/smarty/Smarty.class.php index 85a3d9a6e..5d2e3a4b4 100644 --- a/WEB-INF/lib/smarty/Smarty.class.php +++ b/WEB-INF/lib/smarty/Smarty.class.php @@ -36,7 +36,7 @@ /** * */ - define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR); + define('SMARTY_DIR', __DIR__ . DIRECTORY_SEPARATOR); } /** * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. @@ -61,23 +61,20 @@ define('SMARTY_MBSTRING', function_exists('mb_get_info')); } -// Note: Nik put this back in from smarty3 for php5.4 that we still support. -// See also comment around Smarty::$_CHARSET. -if (!defined('SMARTY_RESOURCE_CHAR_SET')) { - // UTF-8 can only be done properly when mbstring is available! - /** - * @deprecated in favor of Smarty::$_CHARSET - */ - define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'); +/** + * Load helper functions + */ +if (!defined('SMARTY_HELPER_FUNCTIONS_LOADED')) { + include __DIR__ . '/functions.php'; } -// End of inserted fragment by Nik. /** * Load Smarty_Autoloader */ if (!class_exists('Smarty_Autoloader')) { - include dirname(__FILE__) . '/bootstrap.php'; + include __DIR__ . '/bootstrap.php'; } + /** * Load always needed external class files */ @@ -110,7 +107,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '4.1.0'; + const SMARTY_VERSION = '4.3.0'; /** * define variable scopes */ @@ -172,9 +169,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * The character set to adhere to (e.g. "UTF-8") */ - // public static $_CHARSET = SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'; - // Note by Nik: the above assignment only works with php >= 5.6, rolling back to SMARTY_RESOURCE_CHAR_SET as in smarty3. - public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + public static $_CHARSET = SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'; /** * The date format to be used internally @@ -881,7 +876,7 @@ public function getPluginsDir() $this->plugins_dir = (array)$this->plugins_dir; } foreach ($this->plugins_dir as $k => $v) { - $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, '/\\') . DIRECTORY_SEPARATOR, true); + $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v ?? '', '/\\') . DIRECTORY_SEPARATOR, true); } $this->_cache[ 'plugin_files' ] = array(); $this->_pluginsDirNormalized = true; @@ -1359,7 +1354,7 @@ public function __set($name, $value) */ private function _normalizeDir($dirName, $dir) { - $this->{$dirName} = $this->_realpath(rtrim($dir, "/\\") . DIRECTORY_SEPARATOR, true); + $this->{$dirName} = $this->_realpath(rtrim($dir ?? '', "/\\") . DIRECTORY_SEPARATOR, true); } /** @@ -1381,7 +1376,7 @@ private function _normalizeTemplateConfig($isConfig) } foreach ($dir as $k => $v) { if (!isset($processed[ $k ])) { - $dir[ $k ] = $v = $this->_realpath(rtrim($v, "/\\") . DIRECTORY_SEPARATOR, true); + $dir[ $k ] = $v = $this->_realpath(rtrim($v ?? '', "/\\") . DIRECTORY_SEPARATOR, true); $processed[ $k ] = true; } } @@ -1396,7 +1391,7 @@ private function _normalizeTemplateConfig($isConfig) * * @void */ - public function muteUndefinedOrNullWarnings() { + public function muteUndefinedOrNullWarnings(): void { $this->isMutingUndefinedOrNullWarnings = true; } @@ -1404,7 +1399,7 @@ public function muteUndefinedOrNullWarnings() { * Indicates if PHP7 compatibility mode is set. * @bool */ - public function isMutingUndefinedOrNullWarnings() { + public function isMutingUndefinedOrNullWarnings(): bool { return $this->isMutingUndefinedOrNullWarnings; } diff --git a/WEB-INF/lib/smarty/bootstrap.php b/WEB-INF/lib/smarty/bootstrap.php index 2c830468e..a226ac04e 100644 --- a/WEB-INF/lib/smarty/bootstrap.php +++ b/WEB-INF/lib/smarty/bootstrap.php @@ -11,6 +11,6 @@ * Load and register Smarty Autoloader */ if (!class_exists('Smarty_Autoloader')) { - include dirname(__FILE__) . '/Autoloader.php'; + include __DIR__ . '/Autoloader.php'; } Smarty_Autoloader::register(true); diff --git a/WEB-INF/lib/smarty/debug.tpl b/WEB-INF/lib/smarty/debug.tpl index edc7bef98..4f82a5820 100644 --- a/WEB-INF/lib/smarty/debug.tpl +++ b/WEB-INF/lib/smarty/debug.tpl @@ -1,9 +1,9 @@ {capture name='_smarty_debug' assign=debug_output} - - + + Smarty Debug Console - @@ -112,11 +115,11 @@

included templates & config files (load time in seconds)

{foreach $template_data as $template} - {$template.name} -
   + {$template.name} +
   (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) -
+
{/foreach}
{/if} @@ -125,13 +128,22 @@ {foreach $assigned_vars as $vars} - - + + + - - {/foreach}

${$vars@key}

- {if isset($vars['nocache'])}Nocache
{/if} - {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +
+

${$vars@key}

+ {if isset($vars['nocache'])}Nocache
{/if} + {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +
+

Value

+ {$vars['value']|debug_print_var:10:80 nofilter} +
+ {if isset($vars['attributes'])} +

Attributes

+ {$vars['attributes']|debug_print_var nofilter} + {/if}

Value

{$vars['value']|debug_print_var:10:80 nofilter}
{if isset($vars['attributes'])}

Attributes

{$vars['attributes']|debug_print_var nofilter} {/if}
@@ -139,11 +151,14 @@ {foreach $config_vars as $vars} - - + + - {/foreach} diff --git a/WEB-INF/lib/smarty/functions.php b/WEB-INF/lib/smarty/functions.php new file mode 100644 index 000000000..bac00e521 --- /dev/null +++ b/WEB-INF/lib/smarty/functions.php @@ -0,0 +1,51 @@ + $_value) { switch ($_key) { case 'time': - if (!is_array($_value) && $_value !== null) { - $template->_checkPlugins( - array( - array( - 'function' => 'smarty_make_timestamp', - 'file' => SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php' - ) - ) - ); - $time = smarty_make_timestamp($_value); - } + $$_key = $_value; // we'll handle conversion below break; case 'month_names': if (is_array($_value) && count($_value) === 12) { @@ -178,43 +169,59 @@ function smarty_function_html_select_date($params, Smarty_Internal_Template $tem } // Note: date() is faster than strftime() // Note: explode(date()) is faster than date() date() date() - if (isset($params[ 'time' ]) && is_array($params[ 'time' ])) { - if (isset($params[ 'time' ][ $prefix . 'Year' ])) { + + if (isset($time) && is_array($time)) { + if (isset($time[$prefix . 'Year'])) { // $_REQUEST[$field_array] given - foreach (array( - 'Y' => 'Year', - 'm' => 'Month', - 'd' => 'Day' - ) as $_elementKey => $_elementName) { + foreach ([ + 'Y' => 'Year', + 'm' => 'Month', + 'd' => 'Day' + ] as $_elementKey => $_elementName) { $_variableName = '_' . strtolower($_elementName); $$_variableName = - isset($params[ 'time' ][ $prefix . $_elementName ]) ? $params[ 'time' ][ $prefix . $_elementName ] : + isset($time[$prefix . $_elementName]) ? $time[$prefix . $_elementName] : date($_elementKey); } - } elseif (isset($params[ 'time' ][ $field_array ][ $prefix . 'Year' ])) { + } elseif (isset($time[$field_array][$prefix . 'Year'])) { // $_REQUEST given - foreach (array( - 'Y' => 'Year', - 'm' => 'Month', - 'd' => 'Day' - ) as $_elementKey => $_elementName) { + foreach ([ + 'Y' => 'Year', + 'm' => 'Month', + 'd' => 'Day' + ] as $_elementKey => $_elementName) { $_variableName = '_' . strtolower($_elementName); - $$_variableName = isset($params[ 'time' ][ $field_array ][ $prefix . $_elementName ]) ? - $params[ 'time' ][ $field_array ][ $prefix . $_elementName ] : date($_elementKey); + $$_variableName = isset($time[$field_array][$prefix . $_elementName]) ? + $time[$field_array][$prefix . $_elementName] : date($_elementKey); } } else { // no date found, use NOW - list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d')); + [$_year, $_month, $_day] = explode('-', date('Y-m-d')); } + } elseif (isset($time) && preg_match("/(\d*)-(\d*)-(\d*)/", $time, $matches)) { + $_year = $_month = $_day = null; + if ($matches[1] > '') $_year = (int) $matches[1]; + if ($matches[2] > '') $_month = (int) $matches[2]; + if ($matches[3] > '') $_day = (int) $matches[3]; } elseif ($time === null) { if (array_key_exists('time', $params)) { - $_year = $_month = $_day = $time = null; + $_year = $_month = $_day = null; } else { - list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d')); + [$_year, $_month, $_day] = explode('-', date('Y-m-d')); } } else { - list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time)); + $template->_checkPlugins( + array( + array( + 'function' => 'smarty_make_timestamp', + 'file' => SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php' + ) + ) + ); + $time = smarty_make_timestamp($time); + [$_year, $_month, $_day] = explode('-', date('Y-m-d', $time)); } + // make syntax "+N" or "-N" work with $start_year and $end_year // Note preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match) is slower than trim+substr foreach (array( @@ -309,8 +316,8 @@ function smarty_function_html_select_date($params, Smarty_Internal_Template $tem for ($i = 1; $i <= 12; $i++) { $_val = sprintf('%02d', $i); $_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[ $i ]) : - ($month_format === '%m' ? $_val : strftime($month_format, $_month_timestamps[ $i ])); - $_value = $month_value_format === '%m' ? $_val : strftime($month_value_format, $_month_timestamps[ $i ]); + ($month_format === '%m' ? $_val : @strftime($month_format, $_month_timestamps[ $i ])); + $_value = $month_value_format === '%m' ? $_val : @strftime($month_value_format, $_month_timestamps[ $i ]); $_html_months .= '' . $option_separator; } diff --git a/WEB-INF/lib/smarty/plugins/function.mailto.php b/WEB-INF/lib/smarty/plugins/function.mailto.php index 834d0535a..671ac0694 100644 --- a/WEB-INF/lib/smarty/plugins/function.mailto.php +++ b/WEB-INF/lib/smarty/plugins/function.mailto.php @@ -48,8 +48,13 @@ */ function smarty_function_mailto($params) { - static $_allowed_encoding = - array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true); + static $_allowed_encoding = [ + 'javascript' => true, + 'javascript_charcode' => true, + 'hex' => true, + 'none' => true + ]; + $extra = ''; if (empty($params[ 'address' ])) { trigger_error("mailto: missing 'address' parameter", E_USER_WARNING); @@ -57,19 +62,19 @@ function smarty_function_mailto($params) } else { $address = $params[ 'address' ]; } + $text = $address; + // netscape and mozilla do not decode %40 (@) in BCC field (bug?) // so, don't encode it. - $search = array('%40', '%2C'); - $replace = array('@', ','); - $mail_parms = array(); + $mail_parms = []; foreach ($params as $var => $value) { switch ($var) { case 'cc': case 'bcc': case 'followupto': if (!empty($value)) { - $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value)); + $mail_parms[] = $var . '=' . str_replace(['%40', '%2C'], ['@', ','], rawurlencode($value)); } break; case 'subject': @@ -83,6 +88,7 @@ function smarty_function_mailto($params) default: } } + if ($mail_parms) { $address .= '?' . join('&', $mail_parms); } @@ -94,19 +100,21 @@ function smarty_function_mailto($params) ); return; } + + $string = '' . htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, Smarty::$_CHARSET) . ''; + if ($encode === 'javascript') { - $string = '' . $text . ''; $js_encode = ''; for ($x = 0, $_length = strlen($string); $x < $_length; $x++) { $js_encode .= '%' . bin2hex($string[ $x ]); } return ''; } elseif ($encode === 'javascript_charcode') { - $string = '' . $text . ''; for ($x = 0, $_length = strlen($string); $x < $_length; $x++) { $ord[] = ord($string[ $x ]); } - return ''; + return ''; } elseif ($encode === 'hex') { preg_match('!^(.*)(\?.*)$!', $address, $match); if (!empty($match[ 2 ])) { @@ -129,6 +137,6 @@ function smarty_function_mailto($params) return '' . $text_encode . ''; } else { // no encoding - return '' . $text . ''; + return $string; } } diff --git a/WEB-INF/lib/smarty/plugins/function.math.php b/WEB-INF/lib/smarty/plugins/function.math.php index fd5b3d166..f9cf67fe7 100644 --- a/WEB-INF/lib/smarty/plugins/function.math.php +++ b/WEB-INF/lib/smarty/plugins/function.math.php @@ -69,8 +69,8 @@ function smarty_function_math($params, $template) // Adapted from https://www.php.net/manual/en/function.eval.php#107377 $number = '(?:\d+(?:[,.]\d+)?|pi|π)'; // What is a number $functionsOrVars = '((?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))'; - $operators = '[+\/*\^%-]'; // Allowed math operators - $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)+\)|\((?1)+\)))(?:'.$operators.'(?1))?)+$/'; + $operators = '[,+\/*\^%-]'; // Allowed math operators + $regexp = '/^(('.$number.'|'.$functionsOrVars.'|('.$functionsOrVars.'\s*\((?1)*\)|\((?1)*\)))(?:'.$operators.'(?1))?)+$/'; if (!preg_match($regexp, $equation)) { trigger_error("math: illegal characters", E_USER_WARNING); diff --git a/WEB-INF/lib/smarty/plugins/modifier.capitalize.php b/WEB-INF/lib/smarty/plugins/modifier.capitalize.php index c5fc400a6..2903d61d7 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.capitalize.php +++ b/WEB-INF/lib/smarty/plugins/modifier.capitalize.php @@ -22,6 +22,8 @@ */ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = false) { + $string = (string) $string; + if (Smarty::$_MBSTRING) { if ($lc_rest) { // uppercase (including hyphenated words) diff --git a/WEB-INF/lib/smarty/plugins/modifier.count.php b/WEB-INF/lib/smarty/plugins/modifier.count.php new file mode 100644 index 000000000..ca35fc115 --- /dev/null +++ b/WEB-INF/lib/smarty/plugins/modifier.count.php @@ -0,0 +1,36 @@ + Prior to PHP 8.0.0, if the parameter was neither an array nor an object that implements the Countable interface, + * > 1 would be returned, unless value was null, in which case 0 would be returned. + */ + + if ($arrayOrObject instanceof Countable || is_array($arrayOrObject)) { + return count($arrayOrObject, (int) $mode); + } elseif ($arrayOrObject === null) { + return 0; + } + return 1; +} diff --git a/WEB-INF/lib/smarty/plugins/modifier.date_format.php b/WEB-INF/lib/smarty/plugins/modifier.date_format.php index 8e7e0b6e1..e3589fd07 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.date_format.php +++ b/WEB-INF/lib/smarty/plugins/modifier.date_format.php @@ -78,7 +78,8 @@ function smarty_modifier_date_format($string, $format = null, $default_date = '' } $format = str_replace($_win_from, $_win_to, $format); } - return strftime($format, $timestamp); + // @ to suppress deprecation errors when running in PHP8.1 or higher. + return @strftime($format, $timestamp); } else { return date($format, $timestamp); } diff --git a/WEB-INF/lib/smarty/plugins/modifier.escape.php b/WEB-INF/lib/smarty/plugins/modifier.escape.php index 47489aa98..11e44682e 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.escape.php +++ b/WEB-INF/lib/smarty/plugins/modifier.escape.php @@ -23,95 +23,25 @@ */ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true) { - static $_double_encode = true; static $is_loaded_1 = false; static $is_loaded_2 = false; if (!$char_set) { $char_set = Smarty::$_CHARSET; } + + $string = (string)$string; + switch ($esc_type) { case 'html': - if ($_double_encode) { - // php >=5.3.2 - go native - return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode); - } else { - if ($double_encode) { - // php <5.2.3 - only handle double encoding - return htmlspecialchars($string, ENT_QUOTES, $char_set); - } else { - // php <5.2.3 - prevent double encoding - $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); - $string = htmlspecialchars($string, ENT_QUOTES, $char_set); - $string = str_replace( - array( - '%%%SMARTY_START%%%', - '%%%SMARTY_END%%%' - ), - array( - '&', - ';' - ), - $string - ); - return $string; - } - } + return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode); // no break case 'htmlall': if (Smarty::$_MBSTRING) { - // mb_convert_encoding ignores htmlspecialchars() - if ($_double_encode) { - // php >=5.3.2 - go native - $string = htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode); - } else { - if ($double_encode) { - // php <5.2.3 - only handle double encoding - $string = htmlspecialchars($string, ENT_QUOTES, $char_set); - } else { - // php <5.2.3 - prevent double encoding - $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); - $string = htmlspecialchars($string, ENT_QUOTES, $char_set); - $string = - str_replace( - array( - '%%%SMARTY_START%%%', - '%%%SMARTY_END%%%' - ), - array( - '&', - ';' - ), - $string - ); - return $string; - } - } - // htmlentities() won't convert everything, so use mb_convert_encoding - return mb_convert_encoding($string, 'HTML-ENTITIES', $char_set); + $string = mb_convert_encoding($string, 'UTF-8', $char_set); + return htmlentities($string, ENT_QUOTES, 'UTF-8', $double_encode); } // no MBString fallback - if ($_double_encode) { - return htmlentities($string, ENT_QUOTES, $char_set, $double_encode); - } else { - if ($double_encode) { - return htmlentities($string, ENT_QUOTES, $char_set); - } else { - $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); - $string = htmlentities($string, ENT_QUOTES, $char_set); - $string = str_replace( - array( - '%%%SMARTY_START%%%', - '%%%SMARTY_END%%%' - ), - array( - '&', - ';' - ), - $string - ); - return $string; - } - } + return htmlentities($string, ENT_QUOTES, $char_set, $double_encode); // no break case 'url': return rawurlencode($string); diff --git a/WEB-INF/lib/smarty/plugins/modifier.explode.php b/WEB-INF/lib/smarty/plugins/modifier.explode.php new file mode 100644 index 000000000..5186fde3d --- /dev/null +++ b/WEB-INF/lib/smarty/plugins/modifier.explode.php @@ -0,0 +1,25 @@ +=8.1 + return explode($separator, $string ?? '', $limit ?? PHP_INT_MAX); +} diff --git a/WEB-INF/lib/smarty/plugins/modifier.number_format.php b/WEB-INF/lib/smarty/plugins/modifier.number_format.php new file mode 100644 index 000000000..8c612601f --- /dev/null +++ b/WEB-INF/lib/smarty/plugins/modifier.number_format.php @@ -0,0 +1,26 @@ +=8.1 + return number_format($num ?? 0.0, $decimals, $decimal_separator, $thousands_separator); +} diff --git a/WEB-INF/lib/smarty/plugins/modifier.truncate.php b/WEB-INF/lib/smarty/plugins/modifier.truncate.php index 33e7e53aa..80dcdb531 100644 --- a/WEB-INF/lib/smarty/plugins/modifier.truncate.php +++ b/WEB-INF/lib/smarty/plugins/modifier.truncate.php @@ -42,8 +42,8 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_wo if (!$middle) { return mb_substr($string, 0, $length, Smarty::$_CHARSET) . $etc; } - return mb_substr($string, 0, $length / 2, Smarty::$_CHARSET) . $etc . - mb_substr($string, -$length / 2, $length, Smarty::$_CHARSET); + return mb_substr($string, 0, intval($length / 2), Smarty::$_CHARSET) . $etc . + mb_substr($string, -intval($length / 2), $length, Smarty::$_CHARSET); } return $string; } @@ -56,7 +56,7 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_wo if (!$middle) { return substr($string, 0, $length) . $etc; } - return substr($string, 0, $length / 2) . $etc . substr($string, -$length / 2); + return substr($string, 0, intval($length / 2)) . $etc . substr($string, -intval($length / 2)); } return $string; } diff --git a/WEB-INF/lib/smarty/plugins/modifiercompiler.escape.php b/WEB-INF/lib/smarty/plugins/modifiercompiler.escape.php index 70b95cc9d..602c3dbfc 100644 --- a/WEB-INF/lib/smarty/plugins/modifiercompiler.escape.php +++ b/WEB-INF/lib/smarty/plugins/modifiercompiler.escape.php @@ -18,12 +18,10 @@ * @param Smarty_Internal_TemplateCompilerBase $compiler * * @return string with compiled code - * @throws \SmartyException + * @throws SmartyException */ function smarty_modifiercompiler_escape($params, Smarty_Internal_TemplateCompilerBase $compiler) { - static $_double_encode = true; - static $is_loaded = false; $compiler->template->_checkPlugins( array( array( @@ -41,53 +39,30 @@ function smarty_modifiercompiler_escape($params, Smarty_Internal_TemplateCompile } switch ($esc_type) { case 'html': - if ($_double_encode) { - return 'htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . - var_export($double_encode, true) . ')'; - } elseif ($double_encode) { - return 'htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ')'; - } else { - // fall back to modifier.escape.php - } + return 'htmlspecialchars((string)' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . + var_export($double_encode, true) . ')'; // no break case 'htmlall': if (Smarty::$_MBSTRING) { - if ($_double_encode) { - // php >=5.2.3 - go native - return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . - var_export($char_set, true) . ', ' . var_export($double_encode, true) . - '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')'; - } elseif ($double_encode) { - // php <5.2.3 - only handle double encoding - return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . - var_export($char_set, true) . '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')'; - } else { - // fall back to modifier.escape.php - } + return 'htmlentities(mb_convert_encoding((string)' . $params[ 0 ] . ', \'UTF-8\', ' . + var_export($char_set, true) . '), ENT_QUOTES, \'UTF-8\', ' . + var_export($double_encode, true) . ')'; } // no MBString fallback - if ($_double_encode) { - // php >=5.2.3 - go native - return 'htmlentities(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . - var_export($double_encode, true) . ')'; - } elseif ($double_encode) { - // php <5.2.3 - only handle double encoding - return 'htmlentities(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ')'; - } else { - // fall back to modifier.escape.php - } + return 'htmlentities((string)' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' . + var_export($double_encode, true) . ')'; // no break case 'url': - return 'rawurlencode(' . $params[ 0 ] . ')'; + return 'rawurlencode((string)' . $params[ 0 ] . ')'; case 'urlpathinfo': - return 'str_replace("%2F", "/", rawurlencode(' . $params[ 0 ] . '))'; + return 'str_replace("%2F", "/", rawurlencode((string)' . $params[ 0 ] . '))'; case 'quotes': // escape unescaped single quotes - return 'preg_replace("%(? "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", " "<\/", "

#{$vars@key}#

- {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +
+

#{$vars@key}#

+ {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +
+ {$vars['value']|debug_print_var:10:80 nofilter} {$vars['value']|debug_print_var:10:80 nofilter}