mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
fix adding mysql-server to customers without any prior assigned mysql-server, fixes #1123; fix issues with displaying set value if path-mode is 'dropdown'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
parent
c799235c24
commit
464f5b7bed
@ -516,7 +516,7 @@ class MysqlServer extends ApiCommand implements ResourceEntity
|
||||
`allowed_mysqlserver` = :am WHERE `customerid` = :cid
|
||||
");
|
||||
while ($customer = $sel_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$allowed_mysqls = json_decode(($customer['allowed_mysqlserver'] ?? '[]'), true);
|
||||
$allowed_mysqls = json_decode(($customer['allowed_mysqlserver'] ?: '[]'), true);
|
||||
if (!in_array($dbserver, $allowed_mysqls)) {
|
||||
$allowed_mysqls[] = $dbserver;
|
||||
$allowed_mysqls = json_encode($allowed_mysqls);
|
||||
|
@ -447,7 +447,8 @@ class FileDir
|
||||
$field = [
|
||||
'type' => 'select',
|
||||
'select_var' => $_field,
|
||||
'selected' => $value
|
||||
'selected' => $value,
|
||||
'value' => $value
|
||||
];
|
||||
} else {
|
||||
$field = [
|
||||
|
@ -57,7 +57,7 @@ return [
|
||||
'label' => lng('panel.path'),
|
||||
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? lng('panel.pathDescriptionSubdomain').(Settings::Get('system.documentroot_use_default_value') == 1 ? lng('panel.pathDescriptionEx') : '') : null),
|
||||
'type' => $pathSelect['type'],
|
||||
'select_var' => $pathSelect['value'],
|
||||
'select_var' => $pathSelect['select_var'] ?? '',
|
||||
'selected' => $pathSelect['value'],
|
||||
'value' => $pathSelect['value'],
|
||||
'note' => $pathSelect['note'] ?? '',
|
||||
|
Loading…
Reference in New Issue
Block a user