More refactoring.
authorNik Okuntseff <support@anuko.com>
Sat, 14 Apr 2018 12:51:57 +0000 (12:51 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 14 Apr 2018 12:52:35 +0000 (12:52 +0000)
WEB-INF/templates/footer.tpl
reports.php

index 09a969e..3ff2dda 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.17.88.4265 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.88.4266 | 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 bc6d8fc..fcefd04 100644 (file)
@@ -194,11 +194,11 @@ $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'end_date'))
 // Add checkboxes for fields.
 if ($user->isPluginEnabled('cl'))
   $form->addInput(array('type'=>'checkbox','name'=>'chclient'));
-if (($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv'))
+if (($user->can('manage_invoices') || $user->isClient()) && $user->isPluginEnabled('iv'))
   $form->addInput(array('type'=>'checkbox','name'=>'chinvoice'));
-if ($user->canManageTeam() && $user->isPluginEnabled('ps'))
+if ($user->can('manage_invoices') && $user->isPluginEnabled('ps'))
   $form->addInput(array('type'=>'checkbox','name'=>'chpaid'));
-if ($user->canManageTeam())
+if ($user->can('view_reports') || $user->can('view_all_reports'))
   $form->addInput(array('type'=>'checkbox','name'=>'chip'));
 if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode)
   $form->addInput(array('type'=>'checkbox','name'=>'chproject'));
@@ -217,7 +217,7 @@ if ($custom_fields && $custom_fields->fields[0])
 // 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->canManageTeam() || $user->isClient())
+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');