From 19e9b9abac0144d500df9fe1d4ce555a30b4c676 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 19 Dec 2018 15:00:15 +0000 Subject: [PATCH] Improved handlng of import. --- WEB-INF/lib/ttOrgImportHelper.class.php | 5 +++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttOrgImportHelper.class.php b/WEB-INF/lib/ttOrgImportHelper.class.php index 626408f2..e95b836d 100644 --- a/WEB-INF/lib/ttOrgImportHelper.class.php +++ b/WEB-INF/lib/ttOrgImportHelper.class.php @@ -499,6 +499,11 @@ class ttOrgImportHelper { function importXml() { global $i18n; + if (!$_FILES['xmlfile']['name']) { + $this->errors->add($i18n->get('error.upload')); + return; // There is nothing to do if we don't have a file. + } + // Do we have a compressed file? $compressed = false; $file_ext = substr($_FILES['xmlfile']['name'], strrpos($_FILES['xmlfile']['name'], '.') + 1); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 176d7142..c8933865 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.32.4663 | Copyright © Anuko | +  Anuko Time Tracker 1.18.32.4664 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1