X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttImportHelper.class.php;h=99b35e4119605bad815879c85a6113428573bb7c;hb=e732e1dd5c8a5cfaa24f5690ede39be2a90d0e3d;hp=f7be431f6a89dac44cb420f9e1955049279a7f5e;hpb=08fce9c0cac0bbd8596632f3a3fc1f5f3da20992;p=timetracker.git diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index f7be431f..99b35e41 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -116,7 +116,6 @@ class ttImportHelper { if ($this->canImport) { $team_id = ttTeamHelper::insert(array( 'name' => $this->teamData['NAME'], - 'address' => $this->teamData['ADDRESS'], 'currency' => $this->teamData['CURRENCY'], 'lock_spec' => $this->teamData['LOCK_SPEC'], 'workday_hours' => $this->teamData['WORKDAY_HOURS'], @@ -315,9 +314,7 @@ class ttImportHelper { || $this->currentTag == 'LABEL' || $this->currentTag == 'VALUE' || $this->currentTag == 'COMMENT' - || $this->currentTag == 'ADDRESS' - || $this->currentTag == 'CLIENT_NAME' - || $this->currentTag == 'CLIENT_ADDRESS') { + || $this->currentTag == 'ADDRESS') { if (isset($this->currentElement[$this->currentTag])) $this->currentElement[$this->currentTag] .= trim($data); else @@ -329,6 +326,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); @@ -343,13 +342,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; } } @@ -369,7 +368,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; } }