}
fwrite($this->file, $this->indentation." </users>\n");
+ // Write user to project binds.
+ fwrite($this->file, $this->indentation." <user_project_binds>\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.' '."<user_project_bind user_id=\"".$user_id."\"";
+ $bind_part .= " project_id=\"".$project_id."\"";
+ $bind_part .= " rate=\"".$bind['rate']."\"";
+ $bind_part .= " status=\"".$bind['status']."\"";
+ $bind_part .= "></user_project_bind>\n";
+ fwrite($this->file, $bind_part);
+ }
+ fwrite($this->file, $this->indentation." </user_project_binds>\n");
+
// Call self recursively for all subgroups.
foreach ($this->subgroups as $subgroup) {
$subgroup_helper = new ttGroupExportHelper($subgroup['id'], $this->file, $this->indentation.' ');
'rate' => $attrs['RATE'],
'email' => $attrs['EMAIL'],
'status' => $attrs['STATUS']), false);
- // TODO: what about created_by and other audit info?
if ($user_id) {
// Add a mapping.
$this->currentGroupUserMap[$attrs['ID']] = $user_id;
} else $this->errors->add($i18n->get('error.db'));
}
+
+ if ($name == 'USER_PROJECT_BIND') {
+ if (!ttUserHelper::insertBind(array(
+ 'user_id' => $this->currentGroupUserMap[$attrs['USER_ID']],
+ 'project_id' => $this->currentGroupProjectMap[$attrs['PROJECT_ID']],
+ 'group_id' => $this->current_group_id,
+ 'org_id' => $this->org_id,
+ 'rate' => $attrs['RATE'],
+ 'status' => $attrs['STATUS']))) {
+ $this->errors->add($i18n->get('error.db'));
+ }
+ }
}
}
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.12.4408 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.12.4409 | Copyright © <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>