diff --git a/debian/changelog b/debian/changelog index b3201897..2c343e73 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.407.03) stable; urgency=low +hedera-web (1.407.04) stable; urgency=low * Initial Release. diff --git a/docker-compose.yml b/docker-compose.yml index 9bff5a65..621bd83b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: target: /etc/hedera-web/config.test.php volumes: - /mnt/storage/image:/var/lib/hedera-web/image-db - - /mnt/storage/vn-access:/mnt/storage/vn-access + - /mnt/storage/vn-access:/var/lib/hedera-web/vn-access deploy: replicas: 3 cron: diff --git a/package.json b/package.json index ce94e6af..989a0ce7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.407.03", + "version": "1.407.04", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { diff --git a/rest/misc/access-version.php b/rest/misc/access-version.php index 7d561168..e5848cd6 100644 --- a/rest/misc/access-version.php +++ b/rest/misc/access-version.php @@ -56,16 +56,18 @@ class AccessVersion extends Vn\Web\JsonRequest { $appName = $_REQUEST['appName']; $newVersion = $_REQUEST['newVersion']; - $uploadDir = '/mnt/storage/vn-access'; - $uploadFile = "$uploadDir/$appName.7z"; - $archiveDir = "$uploadDir/.archive/$appName"; - $archiveFile = "$archiveDir/$newVersion.7z"; + $accessDir = _DATA_DIR .'/'. $this->app->getName() .'/vn-access'; + $headFile = "$accessDir/$appName.7z"; + $archiveRelPath = ".archive/$appName/$newVersion.7z"; + $archiveFullPath = "$accessDir/$archiveRelPath"; // Updates the application - copy($moduleFile['tmp_name'], $archiveFile); - rename($moduleFile['tmp_name'], $uploadFile); - chmod($archiveFile, 0644); + rename($moduleFile['tmp_name'], $archiveFullPath); + chmod($archiveFullPath, 0644); + + @unlink ($headFile); + symlink($headFile, $archiveRelPath); return TRUE; }