mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-22 18:45:59 +02:00
Notification system improvement
Also only registry can now approve and reject applications
This commit is contained in:
parent
edc2bdab04
commit
f942607363
5 changed files with 105 additions and 19 deletions
|
@ -1367,7 +1367,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
|
|||
} else {
|
||||
$errorLogStmt = $db->prepare("INSERT INTO error_log
|
||||
(channel, level, level_name, message, context, extra, created_at)
|
||||
VALUES ('epp', 3, 'warning', :log, :context, '{}', CURRENT_TIMESTAMP)");
|
||||
VALUES ('epp', 300, 'WARNING', :log, :context, '{}', CURRENT_TIMESTAMP)");
|
||||
$errorLogStmt->execute([
|
||||
':log' => "Domain: $domainName; hostObj: $hostObj - is duplicated",
|
||||
':context' => json_encode(['registrar_id' => $clid, 'domain' => $domainName, 'host' => $hostObj])
|
||||
|
@ -1437,7 +1437,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
|
|||
// Log duplicate mapping error
|
||||
$stmt = $db->prepare("INSERT INTO error_log
|
||||
(channel, level, level_name, message, context, extra, created_at)
|
||||
VALUES ('epp', 3, 'warning', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
VALUES ('epp', 300, 'WARNING', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
$stmt->execute([
|
||||
"Domain: $domainName; hostName: $hostName - duplicate mapping",
|
||||
json_encode(['registrar_id' => $clid, 'domain' => $domainName, 'host' => $hostName])
|
||||
|
@ -1736,7 +1736,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
|
|||
} else {
|
||||
$errorLogStmt = $db->prepare("INSERT INTO error_log
|
||||
(channel, level, level_name, message, context, extra, created_at)
|
||||
VALUES ('epp', 3, 'warning', :log, :context, '{}', CURRENT_TIMESTAMP)");
|
||||
VALUES ('epp', 300, 'WARNING', :log, :context, '{}', CURRENT_TIMESTAMP)");
|
||||
$errorLogStmt->execute([
|
||||
':log' => "Domain: $domainName; hostObj: $hostObj - is duplicated",
|
||||
':context' => json_encode(['registrar_id' => $clid, 'domain' => $domainName, 'host' => $hostObj])
|
||||
|
@ -1806,7 +1806,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans, $m
|
|||
// Log duplicate mapping error
|
||||
$stmt = $db->prepare("INSERT INTO error_log
|
||||
(channel, level, level_name, message, context, extra, created_at)
|
||||
VALUES ('epp', 3, 'warning', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
VALUES ('epp', 300, 'WARNING', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
$stmt->execute([
|
||||
"Domain: $domainName; hostName: $hostName - duplicate mapping",
|
||||
json_encode(['registrar_id' => $clid, 'domain' => $domainName, 'host' => $hostName])
|
||||
|
|
|
@ -578,7 +578,7 @@ function processDomainTransfer($conn, $db, $xml, $clid, $database_type, $trans)
|
|||
|
||||
$stmt_log = $db->prepare("INSERT INTO error_log (channel, level, level_name, message, context, extra) VALUES (?, ?, ?, ?, ?, ?)");
|
||||
$stmt_log->execute([
|
||||
'domain_transfer',
|
||||
'manual_transfer',
|
||||
250,
|
||||
'NOTICE',
|
||||
"Domain transfer manually approved: $domainName (New registrant: $newRegistrantId, Registrar: $reid)",
|
||||
|
@ -730,7 +730,7 @@ function processDomainTransfer($conn, $db, $xml, $clid, $database_type, $trans)
|
|||
|
||||
$stmt_log = $db->prepare("INSERT INTO error_log (channel, level, level_name, message, context, extra) VALUES (?, ?, ?, ?, ?, ?)");
|
||||
$stmt_log->execute([
|
||||
'domain_transfer',
|
||||
'manual_transfer',
|
||||
250,
|
||||
'NOTICE',
|
||||
"Domain transfer manually canceled: $domainName (Registrar: $reid)",
|
||||
|
@ -879,7 +879,7 @@ function processDomainTransfer($conn, $db, $xml, $clid, $database_type, $trans)
|
|||
|
||||
$stmt_log = $db->prepare("INSERT INTO error_log (channel, level, level_name, message, context, extra) VALUES (?, ?, ?, ?, ?, ?)");
|
||||
$stmt_log->execute([
|
||||
'domain_transfer',
|
||||
'manual_transfer',
|
||||
250,
|
||||
'NOTICE',
|
||||
"Domain transfer manually rejected: $domainName (Registrar: $reid)",
|
||||
|
|
|
@ -1537,7 +1537,7 @@ function processDomainUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
]);
|
||||
$stmt = $db->prepare("INSERT INTO error_log
|
||||
(channel, level, level_name, message, context, extra, created_at)
|
||||
VALUES ('epp', 3, 'warning', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
VALUES ('epp', 300, 'WARNING', ?, ?, '{}', CURRENT_TIMESTAMP)");
|
||||
$stmt->execute([$logMessage, $contextData]);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue