beautification and fallback just in case
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -595,6 +595,12 @@ if ($page == 'domains'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($ssl_ipandports) == 0) {
|
||||||
|
// we need this for the serialize
|
||||||
|
// if ssl is disabled or no ssl-ip/port exists
|
||||||
|
$ssl_ipandports[] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
$aliasdomain_check_stmt = Database::prepare("
|
$aliasdomain_check_stmt = Database::prepare("
|
||||||
SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
|
SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
|
||||||
WHERE `d`.`customerid` = :customerid
|
WHERE `d`.`customerid` = :customerid
|
||||||
@@ -787,16 +793,17 @@ if ($page == 'domains'
|
|||||||
);
|
);
|
||||||
Database::pexecute($upd_stmt, array('adminid' => $adminid));
|
Database::pexecute($upd_stmt, array('adminid' => $adminid));
|
||||||
|
|
||||||
foreach ($ipandports as $ipportid) {
|
|
||||||
$ins_data = array(
|
|
||||||
'domainid' => $domainid,
|
|
||||||
'ipandportsid' => $ipportid
|
|
||||||
);
|
|
||||||
$ins_stmt = Database::prepare("
|
$ins_stmt = Database::prepare("
|
||||||
INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
|
INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
|
||||||
`id_domain` = :domainid,
|
`id_domain` = :domainid,
|
||||||
`id_ipandports` = :ipandportsid
|
`id_ipandports` = :ipandportsid
|
||||||
");
|
");
|
||||||
|
|
||||||
|
foreach ($ipandports as $ipportid) {
|
||||||
|
$ins_data = array(
|
||||||
|
'domainid' => $domainid,
|
||||||
|
'ipandportsid' => $ipportid
|
||||||
|
);
|
||||||
Database::pexecute($ins_stmt, $ins_data);
|
Database::pexecute($ins_stmt, $ins_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,11 +813,6 @@ if ($page == 'domains'
|
|||||||
'domainid' => $domainid,
|
'domainid' => $domainid,
|
||||||
'ipandportsid' => $ssl_ipportid
|
'ipandportsid' => $ssl_ipportid
|
||||||
);
|
);
|
||||||
$ins_stmt = Database::prepare("
|
|
||||||
INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
|
|
||||||
`id_domain` = :domainid,
|
|
||||||
`id_ipandports` = :ipandportsid
|
|
||||||
");
|
|
||||||
Database::pexecute($ins_stmt, $ins_data);
|
Database::pexecute($ins_stmt, $ins_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1381,6 +1383,13 @@ if ($page == 'domains'
|
|||||||
$ssl_ipandports[] = $origip['id_ipandports'];
|
$ssl_ipandports[] = $origip['id_ipandports'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($ssl_ipandports) == 0) {
|
||||||
|
// we need this for the serialize
|
||||||
|
// if ssl is disabled or no ssl-ip/port exists
|
||||||
|
$ssl_ipandports[] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
$aliasdomain_check_stmt = Database::prepare("
|
$aliasdomain_check_stmt = Database::prepare("
|
||||||
SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
|
SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
|
||||||
WHERE `d`.`customerid` = :customerid
|
WHERE `d`.`customerid` = :customerid
|
||||||
|
|||||||
Reference in New Issue
Block a user