use new directory-validator 'confdir'; fix if last ssl-ipport got deactivated and a security question is being asked

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-10-16 16:23:10 +02:00
parent 6b93b973e2
commit 03ba127fab
4 changed files with 7 additions and 5 deletions

View File

@@ -1065,6 +1065,8 @@ if($page == 'domains'
if (isset($_POST['ssl_ipandport']) && is_array($_POST['ssl_ipandport'])) {
foreach ($_POST['ssl_ipandport'] as $ssl_ipandport) {
if (trim($ssl_ipandport) == "") continue;
// fix if ip/port got de-checked and it was the last one
if (trim($ssl_ipandport) < 1) continue;
$ssl_ipandport = intval($ssl_ipandport);
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' ");
if (!isset($ssl_ipandport_check['id'])