From c8c629cdf8a318cec5552b1769f5c29aa35185d6 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 30 Jun 2020 16:47:44 +0200 Subject: [PATCH] edi/update fixes --- debian/changelog | 2 +- package.json | 2 +- rest/edi/update.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index d834b678..793b66b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.407.20) stable; urgency=low +hedera-web (1.407.21) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index f83ee108..7fe0737b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.407.20", + "version": "1.407.21", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { diff --git a/rest/edi/update.php b/rest/edi/update.php index 03500d4e..b8d5b34e 100644 --- a/rest/edi/update.php +++ b/rest/edi/update.php @@ -73,15 +73,15 @@ class Update extends Vn\Lib\Method { foreach (glob("$ucDir/$baseName*.txt") as $fileName) break; - - if (!$fileName) + + if (empty($fileName)) throw new Exception("Import file for table $table does not exist"); // If data is updated, omits the table $lastUpdated = substr($fileName, -10, 6); $lastUpdated = DateTime::createFromFormat('dmy', $lastUpdated); - $lastUpdated->setTime(0, 0, 0, 0); + $lastUpdated->setTime(0, 0, 0); if (isset($updated) && $lastUpdated <= $updated) { echo "Table $table is updated, omitted\n";