X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/d79a4bb229f2ce666fdb8d663e51e55e39a91827..b06601362567c117bdc889277d554c8c58f0efdc:/WEB-INF/lib/ttGroupExportHelper.class.php diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index 054c4354..125df0ff 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -71,7 +71,7 @@ class ttGroupExportHelper { global $user; $mdb2 = getConnection(); - $sql = "select name, currency, lang from tt_groups". + $sql = "select * from tt_groups". " where status = 1 and id = $this->group_id and org_id = $user->org_id"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { @@ -177,8 +177,23 @@ class ttGroupExportHelper { $group = $this->getGroupData(); $group_part = "file, $this->indentation." \n"); + // Write user to project binds. + fwrite($this->file, $this->indentation." \n"); + $user_binds = ttTeamHelper::getUserToProjectBinds($this->group_id); + foreach ($user_binds as $bind) { + $user_id = $this->userMap[$bind['user_id']]; + $project_id = $this->projectMap[$bind['project_id']]; + $bind_part = $this->indentation.' '."file, $bind_part); + } + fwrite($this->file, $this->indentation." \n"); + // Call self recursively for all subgroups. foreach ($this->subgroups as $subgroup) { $subgroup_helper = new ttGroupExportHelper($subgroup['id'], $this->file, $this->indentation.' ');