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) <d00p@froxlor.org>
This commit is contained in:
@@ -86,11 +86,21 @@ if (count($all_certs) == 0) {
|
|||||||
foreach ($all_certs as $idx => $cert) {
|
foreach ($all_certs as $idx => $cert) {
|
||||||
if ($paging->checkDisplay($idx)) {
|
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'])) {
|
if (empty($cert['domain']) || empty($cert['ssl_cert_file'])) {
|
||||||
// no domain found to the entry or empty entry - safely delete it from the DB
|
// no domain found to the entry or empty entry - safely delete it from the DB
|
||||||
|
/*
|
||||||
Database::pexecute($del_stmt, array(
|
Database::pexecute($del_stmt, array(
|
||||||
'id' => $cert['id']
|
'id' => $cert['id']
|
||||||
));
|
));
|
||||||
|
*/
|
||||||
|
echo "no domain found to the entry or empty entry - safely delete it from the DB";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +109,7 @@ if (count($all_certs) == 0) {
|
|||||||
$cert['domain'] = $idna_convert->decode($cert['domain']);
|
$cert['domain'] = $idna_convert->decode($cert['domain']);
|
||||||
|
|
||||||
$adminCustomerLink = "";
|
$adminCustomerLink = "";
|
||||||
if (AREA == 'admin') {
|
if (AREA == 'admin' && $cert['domainid'] > 0) {
|
||||||
if (! empty($cert['loginname'])) {
|
if (! empty($cert['loginname'])) {
|
||||||
$adminCustomerLink = ' (<a href="' . $linker->getLink(array(
|
$adminCustomerLink = ' (<a href="' . $linker->getLink(array(
|
||||||
'section' => 'customers',
|
'section' => 'customers',
|
||||||
|
|||||||
Reference in New Issue
Block a user