cluster renamed to storage

This commit is contained in:
Juan Ferrer 2019-09-10 12:00:56 +02:00
parent 6cb13727a7
commit 0477449c46
4 changed files with 8 additions and 6 deletions

2
debian/changelog vendored
View File

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

View File

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

View File

@ -56,7 +56,7 @@ class AccessVersion extends Vn\Web\JsonRequest {
$appName = $_REQUEST['appName']; $appName = $_REQUEST['appName'];
$newVersion = $_REQUEST['newVersion']; $newVersion = $_REQUEST['newVersion'];
$uploadDir = '/mnt/cluster/vn-access'; $uploadDir = '/mnt/storage/vn-access';
$uploadFile = "$uploadDir/$appName.7z"; $uploadFile = "$uploadDir/$appName.7z";
$archiveDir = "$uploadDir/.archive/$appName"; $archiveDir = "$uploadDir/.archive/$appName";
$archiveFile = "$archiveDir/$newVersion.7z"; $archiveFile = "$archiveDir/$newVersion.7z";

View File

@ -8,12 +8,14 @@ class Mail extends Vn\Lib\Method {
$mailer = new Vn\Web\Mailer($db); $mailer = new Vn\Web\Mailer($db);
$res = $db->query( $res = $db->query(
'SELECT * FROM vn.mail WHERE sent = 0 'SELECT * FROM vn.mail WHERE `sent` = 0
ORDER BY creationDate ORDER BY creationDate
LIMIT 20 LIMIT 20
FOR UPDATE' FOR UPDATE'
); );
$pdfsDir = $db->getValue('SELECT pdfsDir FROM config');
$count = 0; $count = 0;
while ($row = $res->fetch_object()) { while ($row = $res->fetch_object()) {
@ -25,7 +27,7 @@ class Mail extends Vn\Lib\Method {
$mail->AddReplyTo($row->replyTo, $row->replyTo); $mail->AddReplyTo($row->replyTo, $row->replyTo);
if (!empty($row->attachment)) { if (!empty($row->attachment)) {
$attachment = '/mnt/cluster/pdfs/'. $row->attachment; $attachment = "$pdfsDir/{$row->attachment}";
if (file_exists($attachment)) if (file_exists($attachment))
$mail->AddAttachment($attachment, ''); $mail->AddAttachment($attachment, '');
@ -62,7 +64,7 @@ class Mail extends Vn\Lib\Method {
} }
} }
$db->query('UPDATE vn.mail SET sent = #, status = # WHERE id = #', $db->query('UPDATE vn.mail SET `sent` = #, status = # WHERE id = #',
[$sent, $status, $row->id]); [$sent, $status, $row->id]);
} }