From: Nik Okuntseff Date: Sat, 3 Nov 2018 22:10:35 +0000 (+0000) Subject: Fixed ttUser::getAssignedProjects to obtain projects in subgroups. X-Git-Tag: timetracker_1.19-1~722 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2d4eeda71b7c65a7af5359cb1ec2f29537d43d3a;p=timetracker.git Fixed ttUser::getAssignedProjects to obtain projects in subgroups. --- diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 469345b7..6bac7cb4 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -192,10 +192,11 @@ class ttUser { $result = array(); $mdb2 = getConnection(); + $group_id = $this->behalf_group_id ? $this->behalf_group_id : $this->group_id; // Do a query with inner join to get assigned projects. $sql = "select p.id, p.name, p.description, p.tasks, upb.rate from tt_projects p inner join tt_user_project_binds upb on (upb.user_id = ".$this->getActiveUser()." and upb.project_id = p.id and upb.status = 1) - where p.group_id = $this->group_id and p.status = 1 order by p.name"; + where p.group_id = $group_id and p.status = 1 order by p.name"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f29129e5..438d7d5c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.06.4354 | Copyright © Anuko | +  Anuko Time Tracker 1.18.06.4355 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}