Improved new export to include roles in output.
authorNik Okuntseff <support@anuko.com>
Thu, 8 Nov 2018 20:57:44 +0000 (20:57 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 8 Nov 2018 20:57:44 +0000 (20:57 +0000)
WEB-INF/lib/ttGroupExportHelper.class.php
WEB-INF/templates/footer.tpl

index d643ed9..af49e19 100644 (file)
@@ -143,6 +143,20 @@ class ttGroupExportHelper {
     foreach ($clients as $key=>$client_item)
       $this->clientMap[$client_item['id']] = $key + 1;
 
+    // Write roles.
+    fwrite($this->file, $this->indentation."<roles>\n");
+    foreach ($roles as $role) {
+      $role_part = $this->indentation.'  '."<role id=\"".$this->roleMap[$role['id']]."\"";
+      $role_part .= " name=\"".htmlentities($role['name'])."\"";
+      $role_part .= " description=\"".htmlentities($role['description'])."\"";
+      $role_part .= " rank=\"".$role['rank']."\"";
+      $role_part .= " rights=\"".htmlentities($role['rights'])."\"";
+      $role_part .= " status=\"".$role['status']."\"";
+      $role_part .= "></role>\n";
+      fwrite($this->file, $role_part);
+    }
+    fwrite($this->file, $this->indentation."</roles>\n");
+
     // Write users.
     fwrite($this->file, $this->indentation."<users>\n");
     foreach ($users as $user_item) {
index b0b2e53..6e4cc74 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.18.12.4391 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.12.4392 | 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>