Fixed export and import. Now teams should be imported with roles.
authorNik Okuntseff <support@anuko.com>
Sat, 17 Mar 2018 21:36:21 +0000 (21:36 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 17 Mar 2018 21:36:21 +0000 (21:36 +0000)
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl

index bbca70e..bbd188f 100644 (file)
@@ -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)
   {
index bdd8e57..8f6d687 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.51.4095 | 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.52.4096 | 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>