forked from verdnatura/hedera-web
edi/update fixes
This commit is contained in:
parent
d72ab8cefe
commit
c8c629cdf8
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.407.20) stable; urgency=low
|
||||
hedera-web (1.407.21) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.407.20",
|
||||
"version": "1.407.21",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -74,14 +74,14 @@ 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";
|
||||
|
|
Loading…
Reference in New Issue