$mdb2 = getConnection();
// Determine these once as they are used in multiple places in this function.
- $canViewReports = $user->can('view_reports');
+ $canViewReports = $user->can('view_reports') || $user->can('view_all_reports');
$isClient = $user->isClient();
$group_by_option = $options['group_by'];
$sort_part .= 'date';
else
$sort_part .= $group_by_option.', date';
-
-// TODO: refactoring in progress down from here... The above is identical to getFavItems and is ready to merge.
-// Note: this sort part below is different in getFavItems. Need to figure out why and fix properly.
- if (($canViewReports || $isClient) && is_array($bean->getAttribute('users')) && 'user' != $group_by_option)
+ if (($canViewReports || $isClient) && $options['users'] && 'user' != $group_by_option)
$sort_part .= ', user, type';
- if ($bean->getAttribute('chstart'))
+ if ($options['show_start'])
$sort_part .= ', unformatted_start';
$sort_part .= ', id';
$mdb2 = getConnection();
// Determine these once as they are used in multiple places in this function.
- $canViewReports = $user->can('view_reports');
+ $canViewReports = $user->can('view_reports') || $user->can('view_all_reports');
$isClient = $user->isClient();
$group_by_option = $options['group_by'];
$sort_part .= 'date';
else
$sort_part .= $group_by_option.', date';
- if (($canViewReports || $isClient) /*&& is_array($bean->getAttribute('users'))*/ && 'user' != $group_by_option)
+ if (($canViewReports || $isClient) && $options['users'] && 'user' != $group_by_option)
$sort_part .= ', user, type';
if ($options['show_start'])
$sort_part .= ', unformatted_start';
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.97.4311 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.97.4312 | Copyright © <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>