X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttImportHelper.class.php;h=b6c7b8b3ae8e9ac1080e74171fa8261c39a277ee;hb=f8202dca930de9e3cc70cbc8084e10a0f346f389;hp=9b1aad2ac771a637e6114cc58dab603f20e4531e;hpb=e3ed046e205a14772a8157def21fea9a14acdde8;p=timetracker.git 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 = ''; }