From a44be363a67881b1e3655aa80cadf57ee2bc1d33 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 31 Oct 2016 10:53:18 +0100 Subject: [PATCH] set domain, letsencrypt-flag and loginname for froxlor-hostname in ssl-overview because the certificate will get removed as invalid otherwise, thx to Tbyte Signed-off-by: Michael Kaufmann (d00p) --- ssl_certificates.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ssl_certificates.php b/ssl_certificates.php index 8c59c63b..0d4f9c03 100644 --- a/ssl_certificates.php +++ b/ssl_certificates.php @@ -86,11 +86,21 @@ if (count($all_certs) == 0) { foreach ($all_certs as $idx => $cert) { if ($paging->checkDisplay($idx)) { + // respect froxlor-hostname + if ($cert['domainid'] == 0) { + $cert['domain'] = Settings::Get('system.hostname'); + $cert['letsencrypt'] = Settings::Get('system.le_froxlor_enabled'); + $cert['loginname'] = 'froxlor.panel'; + } + if (empty($cert['domain']) || empty($cert['ssl_cert_file'])) { // no domain found to the entry or empty entry - safely delete it from the DB + /* Database::pexecute($del_stmt, array( 'id' => $cert['id'] )); + */ + echo "no domain found to the entry or empty entry - safely delete it from the DB"; continue; } @@ -99,7 +109,7 @@ if (count($all_certs) == 0) { $cert['domain'] = $idna_convert->decode($cert['domain']); $adminCustomerLink = ""; - if (AREA == 'admin') { + if (AREA == 'admin' && $cert['domainid'] > 0) { if (! empty($cert['loginname'])) { $adminCustomerLink = ' (