0
1
Fork 0

edi/update fixes

This commit is contained in:
Juan Ferrer 2020-06-30 16:47:44 +02:00
parent d72ab8cefe
commit c8c629cdf8
3 changed files with 5 additions and 5 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.407.20) stable; urgency=low hedera-web (1.407.21) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -1,6 +1,6 @@
{ {
"name": "hedera-web", "name": "hedera-web",
"version": "1.407.20", "version": "1.407.21",
"description": "Verdnatura web page", "description": "Verdnatura web page",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {

View File

@ -74,14 +74,14 @@ class Update extends Vn\Lib\Method {
foreach (glob("$ucDir/$baseName*.txt") as $fileName) foreach (glob("$ucDir/$baseName*.txt") as $fileName)
break; break;
if (!$fileName) if (empty($fileName))
throw new Exception("Import file for table $table does not exist"); throw new Exception("Import file for table $table does not exist");
// If data is updated, omits the table // If data is updated, omits the table
$lastUpdated = substr($fileName, -10, 6); $lastUpdated = substr($fileName, -10, 6);
$lastUpdated = DateTime::createFromFormat('dmy', $lastUpdated); $lastUpdated = DateTime::createFromFormat('dmy', $lastUpdated);
$lastUpdated->setTime(0, 0, 0, 0); $lastUpdated->setTime(0, 0, 0);
if (isset($updated) && $lastUpdated <= $updated) { if (isset($updated) && $lastUpdated <= $updated) {
echo "Table $table is updated, omitted\n"; echo "Table $table is updated, omitted\n";