X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/23925086e3efb3a08402c619e1b800ca15b138d5..2e5d329bb88d0cda3515cccaea70575867b482fd:/WEB-INF/lib/ttImportHelper.class.php diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 26cdfac1..5e2d40a5 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -127,6 +127,7 @@ class ttImportHelper { 'week_start' => $this->teamData['WEEK_START'], 'plugins' => $this->teamData['PLUGINS'], 'tracking_mode' => $this->teamData['TRACKING_MODE'], + 'task_required' => $this->teamData['TASK_REQUIRED'], 'record_type' => $this->teamData['RECORD_TYPE'])); if ($team_id) { $this->team_id = $team_id; @@ -328,6 +329,8 @@ class ttImportHelper { // startElement, endElement, and dataElement functions are called as many times as necessary. // Actual import occurs in the endElement handler. function importXml() { + global $i18n; + // Do we have a compressed file? $compressed = false; $file_ext = substr($_FILES['xmlfile']['name'], strrpos($_FILES['xmlfile']['name'], '.') + 1); @@ -342,13 +345,13 @@ class ttImportHelper { // If the file is compressed - uncompress it. if ($compressed) { if (!$this->uncompress($_FILES['xmlfile']['tmp_name'], $filename)) { - $this->errors->add($GLOBALS['I18N']->getKey('error.sys')); + $this->errors->add($i18n->getKey('error.sys')); return; } unlink($_FILES['xmlfile']['tmp_name']); } else { if (!move_uploaded_file($_FILES['xmlfile']['tmp_name'], $filename)) { - $this->errors->add($GLOBALS['I18N']->getKey('error.upload')); + $this->errors->add($i18n->getKey('error.upload')); return; } } @@ -368,7 +371,7 @@ class ttImportHelper { xml_get_current_line_number($parser))); } if (!$this->canImport) { - $this->errors->add($GLOBALS['I18N']->getKey('error.user_exists')); + $this->errors->add($i18n->getKey('error.user_exists')); break; } }