Merge branch 'master' into test
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
a474f9df05
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (23.30.2) stable; urgency=low
|
hedera-web (23.30.5) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
usr/share/hedera-web/hedera-web.php usr/bin/hedera-web.php
|
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/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
|
etc/hedera-web/php.ini etc/php/8.2/apache2/conf.d/99-hedera-web.ini
|
|
@ -85,8 +85,8 @@ module.exports = new Class({
|
||||||
const config = {
|
const config = {
|
||||||
headers: {'Authorization': token}
|
headers: {'Authorization': token}
|
||||||
};
|
};
|
||||||
|
await this.send('user/logout', null, config);
|
||||||
await this.post('Accounts/logout', null, config);
|
await this.post('Accounts/logout', null, config);
|
||||||
await this.send('user/logout');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -140,15 +140,16 @@ module.exports = new Class({
|
||||||
/*
|
/*
|
||||||
* Called when REST response is received.
|
* Called when REST response is received.
|
||||||
*/
|
*/
|
||||||
async sendWithUrl(method, url, params) {
|
async sendWithUrl(method, url, params, config) {
|
||||||
return this.request({
|
config = Object.assign({}, config, {
|
||||||
method,
|
method,
|
||||||
url,
|
url,
|
||||||
data: Vn.Url.makeUri(params),
|
data: Vn.Url.makeUri(params)
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
config.headers = Object.assign({}, config.headers, {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
});
|
||||||
|
return this.request(config);
|
||||||
},
|
},
|
||||||
|
|
||||||
async get(url, config) {
|
async get(url, config) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "23.30.2",
|
"version": "23.30.5",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"front": "webpack serve --open",
|
"front": "webpack serve --open",
|
||||||
"back": "cd ../salix && gulp backOnly",
|
"back": "cd ../salix && gulp backOnly",
|
||||||
"db": "cd ../vn-database && myvc run",
|
"db": "cd ../vn-database && myt run",
|
||||||
"build": "rm -rf build/ ; webpack",
|
"build": "rm -rf build/ ; webpack",
|
||||||
"clean": "rm -rf build/"
|
"clean": "rm -rf build/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Vn\Lib;
|
use Vn\Lib;
|
||||||
|
use Vn\Lib\Locale;
|
||||||
use Vn\Web\Security;
|
use Vn\Web\Security;
|
||||||
use Vn\Lib\Type;
|
use Vn\Lib\Type;
|
||||||
|
|
||||||
|
@ -37,12 +38,16 @@ class Query extends Vn\Web\JsonRequest {
|
||||||
|
|
||||||
if ($db->checkWarnings()
|
if ($db->checkWarnings()
|
||||||
&& ($result = $db->query('SHOW WARNINGS'))) {
|
&& ($result = $db->query('SHOW WARNINGS'))) {
|
||||||
$sql = 'SELECT `description`, @warn `code`
|
$sql =
|
||||||
FROM `message` WHERE `code` = @warn';
|
'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()) {
|
while ($row = $result->fetch_object()) {
|
||||||
if ($row->Code == 1265
|
if ($row->Code == 1265
|
||||||
&&($warning = $db->getObject($sql)))
|
&& ($warning = $db->getObject($sql, [Locale::get()])))
|
||||||
trigger_error("{$warning->code}: {$warning->description}", E_USER_WARNING);
|
trigger_error("{$warning->code}: {$warning->description}", E_USER_WARNING);
|
||||||
else
|
else
|
||||||
trigger_error("{$row->Code}: {$row->Message}", E_USER_WARNING);
|
trigger_error("{$row->Code}: {$row->Message}", E_USER_WARNING);
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Vn\Web;
|
||||||
require_once 'libphp-phpmailer/autoload.php';
|
require_once 'libphp-phpmailer/autoload.php';
|
||||||
|
|
||||||
use Vn\Lib\UserException;
|
use Vn\Lib\UserException;
|
||||||
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
|
||||||
class Mailer {
|
class Mailer {
|
||||||
private $conf;
|
private $conf;
|
||||||
|
@ -19,7 +20,7 @@ class Mailer {
|
||||||
function createObject($mailTo, $body, $subject) {
|
function createObject($mailTo, $body, $subject) {
|
||||||
$conf = $this->conf;
|
$conf = $this->conf;
|
||||||
|
|
||||||
$mail = new \PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->isSMTP();
|
$mail->isSMTP();
|
||||||
$mail->Host = $conf->host;
|
$mail->Host = $conf->host;
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,12 @@ class RestService extends Service {
|
||||||
if ($e->getCode() == 1644) {
|
if ($e->getCode() == 1644) {
|
||||||
$eMessage = $e->getMessage();
|
$eMessage = $e->getMessage();
|
||||||
$tMessage = $db->getValue(
|
$tMessage = $db->getValue(
|
||||||
'SELECT `description` FROM `messageL10n` WHERE `code` = #',
|
'SELECT IFNULL(i.`description`, m.`description`) `description`
|
||||||
[$eMessage]
|
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;
|
if (!$tMessage) $tMessage = $eMessage;
|
||||||
throw new Lib\UserException($tMessage, $eMessage);
|
throw new Lib\UserException($tMessage, $eMessage);
|
||||||
|
|
Loading…
Reference in New Issue