access-version fixes
gitea/hedera-web/master This commit looks good
Details
gitea/hedera-web/master This commit looks good
Details
This commit is contained in:
parent
54dd5a21cf
commit
5a8b0447dd
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.407.03) stable; urgency=low
|
||||
hedera-web (1.407.04) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.407.03",
|
||||
"version": "1.407.04",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue