mirror of
https://github.com/itflow-org/itflow
synced 2026-03-28 08:15:38 +00:00
Add better error handling for dodgy whois results
This commit is contained in:
@@ -90,11 +90,14 @@ if (isset($_POST['add_client'])) {
|
|||||||
$mx = sanitizeInput($records['mx']);
|
$mx = sanitizeInput($records['mx']);
|
||||||
$whois = sanitizeInput($records['whois']);
|
$whois = sanitizeInput($records['whois']);
|
||||||
|
|
||||||
// Add domain record
|
// Add domain record info using whois, or not
|
||||||
mysqli_query($mysqli, "INSERT INTO domains SET domain_name = '$website', domain_registrar = 0, domain_webhost = 0, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_raw_whois = '$whois', domain_client_id = $client_id");
|
try {
|
||||||
|
mysqli_query($mysqli, "INSERT INTO domains SET domain_name = '$website', domain_registrar = 0, domain_webhost = 0, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_raw_whois = '$whois', domain_client_id = $client_id");
|
||||||
//Extended Logging
|
$extended_log_description .= ", domain $website added"; //Extended Logging
|
||||||
$extended_log_description .= ", domain $website added";
|
} catch (Exception $e) {
|
||||||
|
$extended_log_description .= ", domain not added"; //Extended Logging
|
||||||
|
logApp("Client", "warning", "Failed to add domain $website during client creation (usually a whois result error)");
|
||||||
|
}
|
||||||
|
|
||||||
// Get inserted ID (for linking certificate, if exists)
|
// Get inserted ID (for linking certificate, if exists)
|
||||||
$domain_id = mysqli_insert_id($mysqli);
|
$domain_id = mysqli_insert_id($mysqli);
|
||||||
|
|||||||
Reference in New Issue
Block a user