From a1d3d5c5d92eed842325de1c62295cb01d070228 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 8 Nov 2018 20:57:44 +0000 Subject: [PATCH] Improved new export to include roles in output. --- WEB-INF/lib/ttGroupExportHelper.class.php | 14 ++++++++++++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index d643ed9d..af49e19e 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -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."\n"); + foreach ($roles as $role) { + $role_part = $this->indentation.' '."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 .= ">\n"; + fwrite($this->file, $role_part); + } + fwrite($this->file, $this->indentation."\n"); + // Write users. fwrite($this->file, $this->indentation."\n"); foreach ($users as $user_item) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b0b2e53f..6e4cc743 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.12.4391 | Copyright © Anuko | +  Anuko Time Tracker 1.18.12.4392 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1