+ if ($name == 'ROLE') {
+ // We get here when processing <role> tags for the current group.
+ $role_id = ttRoleHelper::insert(array(
+ 'group_id' => $this->current_group_id,
+ 'org_id' => $this->org_id,
+ 'name' => $attrs['NAME'],
+ 'description' => $attrs['DESCRIPTION'],
+ 'rank' => $attrs['RANK'],
+ 'rights' => $attrs['RIGHTS'],
+ 'status' => $attrs['STATUS']));
+ if ($role_id) {
+ // Add a mapping.
+ $this->currentGroupRoleMap[$attrs['ID']] = $role_id;
+ } else $this->errors->add($i18n->get('error.db'));
+ }
+
+ if ($name == 'TASKS') {
+ // If we get here, we have to recycle $currentGroupTaskMap.
+ unset($this->currentGroupTaskMap);
+ $this->currentGroupTaskMap = array();
+ // Task map is reconstructed after processing <task> elements in XML. See below.
+ }
+
+ if ($name == 'TASK') {
+ // We get here when processing <task> tags for the current group.
+ $task_id = ttTaskHelper::insert(array(
+ 'group_id' => $this->current_group_id,
+ 'org_id' => $this->org_id,
+ 'name' => $attrs['NAME'],
+ 'description' => $attrs['DESCRIPTION'],
+ 'status' => $attrs['STATUS']));
+ if ($task_id) {
+ // Add a mapping.
+ $this->currentGroupTaskMap[$attrs['ID']] = $task_id;
+ } else $this->errors->add($i18n->get('error.db'));
+ }
+
+ if ($name == 'PROJECTS') {
+ // If we get here, we have to recycle $currentGroupProjectMap.
+ unset($this->currentGroupProjectMap);
+ $this->currentGroupProjectMap = array();
+ // Project map is reconstructed after processing <project> elements in XML. See below.
+ }
+
+ if ($name == 'PROJECT') {
+ // We get here when processing <project> tags for the current group.