X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/ebcf3daac421df8e3925e5fff52b26d4bb789286..1ad0313b11df884c04ca0354abcbc18e4b334537:/WEB-INF/lib/ttImportHelper.class.php diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 9b1aad2a..b6c7b8b3 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -36,6 +36,7 @@ import('ttClientHelper'); import('ttCustomFieldHelper'); import('ttFavReportHelper'); import('ttExpenseHelper'); +import('ttRoleHelper'); // ttImportHelper - this class is used to import team data from a file. class ttImportHelper { @@ -83,7 +84,8 @@ class ttImportHelper { || $name == 'INVOICE_HEADER' || $name == 'USER_PROJECT_BIND' || $name == 'EXPENSE_ITEM' - || $name == 'FAV_REPORT') { + || $name == 'FAV_REPORT' + || $name == 'ROLE') { $this->currentElement = $attrs; } $this->currentTag = $name; @@ -310,6 +312,15 @@ class ttImportHelper { 'group_by' => $this->currentElement['GROUP_BY'], 'chtotalsonly' => (int) $this->currentElement['SHOW_TOTALS_ONLY'])); } + + if ($name == 'ROLE' && $this->canImport) { + ttRoleHelper::insert(array( + 'team_id' => $this->team_id, + 'name' => $this->currentElement['NAME'], + 'rank' => $this->currentElement['RANK'], + 'rights' => $this->currentElement['RIGHTS'], + 'status' => $this->currentElement['STATUS'])); + } $this->currentTag = ''; }