From b738bea9ca03c7c05e8c159b9c2f48fb40e58ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 22 Jul 2014 16:37:13 +0200 Subject: [PATCH 1/2] Fix #776 --- themes/baggy/config.twig | 2 +- themes/default/config.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index 46735f0..e45c321 100755 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig @@ -111,7 +111,7 @@
- +
diff --git a/themes/default/config.twig b/themes/default/config.twig index 160f604..8f047ae 100755 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -110,7 +110,7 @@
- +
From dc764892213e8d1cb458621910aa8d0ce0a3eb7e Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Fri, 15 Aug 2014 19:22:55 +0300 Subject: [PATCH 2/2] minimum of control on server side added --- inc/poche/Poche.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 09a9f5f..bcf2dde 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -906,7 +906,7 @@ class Poche */ public function import() { - if ( isset($_FILES['file']) ) { + if ( isset($_FILES['file']) && $_FILES['file']['tmp_name'] ) { Tools::logm('Import stated: parsing file'); // assume, that file is in json format @@ -976,6 +976,9 @@ class Poche } Tools::logm('Import of articles finished: '.$i.' articles added (w/o content if not provided).'); } + else { + $this->messages->add('s', _('Did you forget to select a file?')); + } //file parsing finished here //now download article contents if any