fix missing domainname parameter when manually adding ssl-certificates for a domain, fixes #700

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-06-10 11:36:05 +02:00
parent f266bb05c9
commit 1ac304e5ac
2 changed files with 17 additions and 0 deletions

View File

@@ -480,6 +480,17 @@ if ($page == 'overview') {
} elseif ($page == 'domainssleditor') {
if ($action == '' || $action == 'view') {
// get domain
try {
$json_result = SubDomains::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result_domain = json_decode($json_result, true)['data'];
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
try {

View File

@@ -23,6 +23,12 @@ return array(
'title' => 'SSL certificates',
'image' => 'icons/ssl.png',
'fields' => array(
'domainname' => array(
'label' => $lng['domains']['domainname'],
'type' => 'hidden',
'value' => $result_domain['domain'],
'display' => $result_domain['domain']
),
'ssl_cert_file' => array(
'style' => 'align-top',
'label' => $lng['admin']['ipsandports']['ssl_cert_file_content'],