From: Nik Okuntseff Date: Sat, 17 Mar 2018 21:36:21 +0000 (+0000) Subject: Fixed export and import. Now teams should be imported with roles. X-Git-Tag: timetracker_1.19-1~1016 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=21682f141034f82653bc41b56eaabdf490d5a9dc;p=timetracker.git Fixed export and import. Now teams should be imported with roles. --- diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index bbca70e8..bbd188fc 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -139,6 +139,24 @@ class ttTeamHelper { return false; } + // The getAllUsers obtains all users in a given team. + static function getAllUsers($team_id, $all_fields = false) { + $mdb2 = getConnection(); + if ($all_fields) + $sql = "select * from tt_users where team_id = $team_id order by upper(name)"; + else + $sql = "select id, name from tt_users where team_id = $team_id order by upper(name)"; + $res = $mdb2->query($sql); + $result = array(); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + $result[] = $val; + } + return $result; + } + return false; + } + // getActiveProjects - returns an array of active projects for team. static function getActiveProjects($team_id) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index bdd8e576..8f6d687b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.51.4095 | Copyright © Anuko | +  Anuko Time Tracker 1.17.52.4096 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}