class ttFavReportHelper {
// getReports - returns an array of favorite reports for user.
- static function getReports($user_id) {
+ static function getReports() {
+ global $user;
$mdb2 = getConnection();
+ $user_id = $user->getUser();
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
+
$result = array();
- $sql = "select * from tt_fav_reports where user_id = $user_id and status = 1";
+ $sql = "select * from tt_fav_reports".
+ " where user_id = $user_id and group_id = $group_id and org_id = $org_id and status = 1";
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
while ($val = $res->fetchRow()) {
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4611 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4612 | 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>
}
// End of access checks.
-$fav_reports = ttFavReportHelper::getReports($user->getUser());
+$fav_reports = ttFavReportHelper::getReports();
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
}
// End of access checks.
-$fav_reports = ttFavReportHelper::getReports($user->getUser());
+$fav_reports = ttFavReportHelper::getReports();
if ($request->isPost()) {
$cl_cron_spec = trim($request->getParameter('cron_spec'));
$form = new Form('reportForm');
// Get saved favorite reports for user.
-$report_list = ttFavReportHelper::getReports($user->id);
+$report_list = ttFavReportHelper::getReports();
$form->addInput(array('type'=>'combobox',
'name'=>'favorite_report',
'onchange'=>'document.reportForm.fav_report_changed.value=1;document.reportForm.submit();',