From 0f3ddb1a99fd0b52b5f0f871359e7feaae6a0def Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Jul 2023 10:16:28 +0200 Subject: [PATCH 1/5] hotFix(logout): correct order --- js/vn/json-connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/vn/json-connection.js b/js/vn/json-connection.js index e06a0c4e..cd15c8ef 100644 --- a/js/vn/json-connection.js +++ b/js/vn/json-connection.js @@ -85,8 +85,8 @@ module.exports = new Class({ const config = { headers: {'Authorization': token} }; - await this.post('Accounts/logout', null, config); await this.send('user/logout'); + await this.post('Accounts/logout', null, config); } }, From d37493b081dddfaeb26f1a0395ce3af4ae22eb87 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 28 Jul 2023 13:11:33 +0200 Subject: [PATCH 2/5] ticket #097414 Fix: Use client language --- debian/changelog | 2 +- package.json | 2 +- rest/core/query.php | 13 +++++++++---- web/rest-service.php | 8 ++++++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 755bef2a..ad8892e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.30.1) stable; urgency=low +hedera-web (23.30.2) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index e982d0b0..d8689b05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.30.1", + "version": "23.30.2", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { diff --git a/rest/core/query.php b/rest/core/query.php index 4d398e93..cbd056dd 100644 --- a/rest/core/query.php +++ b/rest/core/query.php @@ -1,6 +1,7 @@ moreResults() && $db->nextResult()); if ($db->checkWarnings() - &&($result = $db->query('SHOW WARNINGS'))) { - $sql = 'SELECT `description`, @warn `code` - FROM `message` WHERE `code` = @warn'; + && ($result = $db->query('SHOW WARNINGS'))) { + $sql = + 'SELECT IFNULL(i.`description`, m.`description`) `description`, @warn `code` + FROM `message` m + LEFT JOIN `messageI18n` i + ON i.`code` = m.`code` AND i.lang = # + WHERE m.`code` = @warn'; while ($row = $result->fetch_object()) { if ($row->Code == 1265 - &&($warning = $db->getObject($sql))) + && ($warning = $db->getObject($sql, [Locale::get()]))) trigger_error("{$warning->code}: {$warning->description}", E_USER_WARNING); else trigger_error("{$row->Code}: {$row->Message}", E_USER_WARNING); diff --git a/web/rest-service.php b/web/rest-service.php index ded4fd94..bb10717c 100644 --- a/web/rest-service.php +++ b/web/rest-service.php @@ -54,8 +54,12 @@ class RestService extends Service { if ($e->getCode() == 1644) { $eMessage = $e->getMessage(); $tMessage = $db->getValue( - 'SELECT `description` FROM `messageL10n` WHERE `code` = #', - [$eMessage] + 'SELECT IFNULL(i.`description`, m.`description`) `description` + FROM `message` m + LEFT JOIN `messageI18n` i + ON i.`code` = m.`code` AND i.lang = # + WHERE m.`code` = #', + [Locale::get(), $eMessage] ); if (!$tMessage) $tMessage = $eMessage; throw new Lib\UserException($tMessage, $eMessage); From a59c44fb3aca5acb84e8b1bf52aa84963d378475 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 2 Aug 2023 08:49:49 +0200 Subject: [PATCH 3/5] refs #5863 Version increased --- debian/changelog | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ad8892e6..d3d8e3f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.30.2) stable; urgency=low +hedera-web (23.30.3) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index d8689b05..4de0696a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.30.2", + "version": "23.30.3", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { From 8f98597ea24947d43dc852231d967bc8500dbf4d Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 21 Aug 2023 11:41:51 +0200 Subject: [PATCH 4/5] refs #5863 Fixes: Mailer, logout & run db --- debian/changelog | 2 +- js/vn/json-connection.js | 15 ++++++++------- package.json | 4 ++-- web/mailer.php | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index d3d8e3f7..96c0943d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.30.3) stable; urgency=low +hedera-web (23.30.4) stable; urgency=low * Initial Release. diff --git a/js/vn/json-connection.js b/js/vn/json-connection.js index cd15c8ef..9d6c7deb 100644 --- a/js/vn/json-connection.js +++ b/js/vn/json-connection.js @@ -85,7 +85,7 @@ module.exports = new Class({ const config = { headers: {'Authorization': token} }; - await this.send('user/logout'); + await this.send('user/logout', null, config); await this.post('Accounts/logout', null, config); } }, @@ -140,15 +140,16 @@ module.exports = new Class({ /* * Called when REST response is received. */ - async sendWithUrl(method, url, params) { - return this.request({ + async sendWithUrl(method, url, params, config) { + config = Object.assign({}, config, { method, url, - data: Vn.Url.makeUri(params), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - } + data: Vn.Url.makeUri(params) }); + config.headers = Object.assign({}, config.headers, { + 'Content-Type': 'application/x-www-form-urlencoded' + }); + return this.request(config); }, async get(url, config) { diff --git a/package.json b/package.json index 4de0696a..9bc75f5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.30.3", + "version": "23.30.4", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { @@ -42,7 +42,7 @@ "scripts": { "front": "webpack serve --open", "back": "cd ../salix && gulp backOnly", - "db": "cd ../vn-database && myvc run", + "db": "cd ../vn-database && myt run", "build": "rm -rf build/ ; webpack", "clean": "rm -rf build/" } diff --git a/web/mailer.php b/web/mailer.php index 88c56c32..e388b6ab 100644 --- a/web/mailer.php +++ b/web/mailer.php @@ -5,6 +5,7 @@ namespace Vn\Web; require_once 'libphp-phpmailer/autoload.php'; use Vn\Lib\UserException; +use PHPMailer\PHPMailer\PHPMailer; class Mailer { private $conf; @@ -19,7 +20,7 @@ class Mailer { function createObject($mailTo, $body, $subject) { $conf = $this->conf; - $mail = new \PHPMailer(); + $mail = new PHPMailer(); $mail->isSMTP(); $mail->Host = $conf->host; From 620bd53262c777de135ee3af33254abaa611fd3e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 30 Aug 2023 17:48:23 +0200 Subject: [PATCH 5/5] refs #5879 Fixes: PHP max upload filesize --- debian/changelog | 2 +- debian/links | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 96c0943d..54f83ad0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.30.4) stable; urgency=low +hedera-web (23.30.5) stable; urgency=low * Initial Release. diff --git a/debian/links b/debian/links index ba27c5f5..41972147 100644 --- a/debian/links +++ b/debian/links @@ -1,3 +1,3 @@ usr/share/hedera-web/hedera-web.php usr/bin/hedera-web.php etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf -etc/hedera-web/php.ini etc/php/7.0/apache2/conf.d/99-hedera-web.ini \ No newline at end of file +etc/hedera-web/php.ini etc/php/8.2/apache2/conf.d/99-hedera-web.ini \ No newline at end of file diff --git a/package.json b/package.json index 9bc75f5b..b5051590 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.30.4", + "version": "23.30.5", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {