]> wagnertech.de Git - timetracker.git/commitdiff
Started to use shorter functions of the Errors class
authorNik Okuntseff <support@anuko.com>
Tue, 22 Mar 2016 00:00:09 +0000 (17:00 -0700)
committerNik Okuntseff <support@anuko.com>
Tue, 22 Mar 2016 00:00:09 +0000 (17:00 -0700)
WEB-INF/templates/footer.tpl
WEB-INF/templates/mobile/header.tpl
admin_team_add.php
cf_custom_field_add.php
cf_custom_field_delete.php
cf_custom_field_edit.php

index 67cb9391e5a503a1a59a3281799cf0b7372c703f..f9543921425294777eafb28284f6fd0c5970e24a 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.9.16.3429 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.9.16.3430 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 5b4d1fd4410fcb35709afa82a0f92d4c21d4911b..a2b231167b73fcc1ec64d85716b7620cbee25f2f 100644 (file)
@@ -55,7 +55,7 @@
       <!-- End of top image -->
 
       <!-- Output errors -->
-{if !$errors->isEmpty()}
+{if $errors->yes()}
       <table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
         <tr>
           <td class="error">
index 3ce0e662a7874e67dcd1353a5e8f3c0c74ef9e5c..5ece36dc22496b7ed11c103e292480c289c118fd 100644 (file)
@@ -71,7 +71,7 @@ if ($request->getMethod() == 'POST') {
   }
   if (!ttValidEmail($cl_manager_email, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.email'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     if (!ttUserHelper::getUserByLogin($cl_manager_login)) {
       // Create a new team.
       if (!defined('CURRENCY_DEFAULT')) define('CURRENCY_DEFAULT', '$');
index 056ce531abe9910b92d2e7cad0a3478fc09838e6..a5053054191a57e7cdf5e83f0e6f4d0608fb3f11 100644 (file)
@@ -57,7 +57,7 @@ if ($request->getMethod() == 'POST') {
   // Validate user input.
   if (!ttValidString($cl_field_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $res = CustomFields::insertField($cl_field_name, $cl_field_type, $cl_required);
     if ($res) {
       header('Location: cf_custom_fields.php');
index 78cd380bb404d3bcdb4c763f3dba89623a890ef0..139253d485ba7cfee08b5af2505a99ea3c24b9f3 100644 (file)
@@ -60,7 +60,7 @@ if ($request->getMethod() == 'POST') {
   if (false === $field)
     $errors->add($i18n->getKey('error.db'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$id));
     $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
     $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
index 15146db67b00db3665c2a6b5d6320455bb87cbef..b6a1f461378a72ebf18f1c6f8b0079f143af3b50 100644 (file)
@@ -42,7 +42,7 @@ if (false === $field)
   $errors->add($i18n->getKey('error.db'));
 
 $form = new Form('fieldForm');
-if ($errors->isEmpty()) {
+if ($errors->no()) {
   $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$field['label']));
   $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
   $form->addInput(array('type'=>'checkbox','name'=>'required','data'=>1,'value'=>$field['required']));
@@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') {
   // Validate user input.
   if (!ttValidString($cl_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $res = CustomFields::updateField($cl_id, $cl_name, $cl_type, $cl_required);
     if ($res) {
       header('Location: cf_custom_fields.php');