mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-19 10:59:18 +02:00
Fixed #17
This commit is contained in:
parent
0705897a60
commit
42fd21e7a5
2 changed files with 18 additions and 15 deletions
|
@ -130,10 +130,11 @@ function processDomainRenew($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$from = $stmt->fetchColumn();
|
$from = $stmt->fetchColumn();
|
||||||
|
|
||||||
$rgpstatus = 'renewPeriod';
|
$rgpstatus = 'renewPeriod';
|
||||||
$stmt = $db->prepare("UPDATE domain SET exdate = DATE_ADD(exdate, INTERVAL :date_add MONTH), rgpstatus = :rgpstatus, renewPeriod = :renewPeriod, renewedDate = CURRENT_TIMESTAMP(3) WHERE id = :domain_id");
|
$stmt = $db->prepare("UPDATE domain SET exdate = DATE_ADD(exdate, INTERVAL :date_add MONTH), rgpstatus = :rgpstatus, renewPeriod = :renewPeriod, lastupdate = CURRENT_TIMESTAMP(3), upid = :upid, renewedDate = CURRENT_TIMESTAMP(3) WHERE id = :domain_id");
|
||||||
$stmt->bindParam(':date_add', $date_add, PDO::PARAM_INT);
|
$stmt->bindParam(':date_add', $date_add, PDO::PARAM_INT);
|
||||||
$stmt->bindParam(':rgpstatus', $rgpstatus, PDO::PARAM_STR);
|
$stmt->bindParam(':rgpstatus', $rgpstatus, PDO::PARAM_STR);
|
||||||
$stmt->bindParam(':renewPeriod', $date_add, PDO::PARAM_INT);
|
$stmt->bindParam(':renewPeriod', $date_add, PDO::PARAM_INT);
|
||||||
|
$stmt->bindParam(':upid', $clid['id'], PDO::PARAM_INT);
|
||||||
$stmt->bindParam(':domain_id', $domainData['id'], PDO::PARAM_INT);
|
$stmt->bindParam(':domain_id', $domainData['id'], PDO::PARAM_INT);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
|
|
|
@ -504,7 +504,7 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$e_authInfo_ext = (string)($xml->xpath("//contact:authInfo/contact:ext")[0] ?? "");
|
$e_authInfo_ext = (string)($xml->xpath("//contact:authInfo/contact:ext")[0] ?? "");
|
||||||
|
|
||||||
// Update contact
|
// Update contact
|
||||||
$query = "UPDATE contact SET voice = ?, voice_x = ?, fax = ?, fax_x = ?, email = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?";
|
$query = "UPDATE contact SET voice = ?, voice_x = ?, fax = ?, fax_x = ?, email = ?, upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?";
|
||||||
$stmt = $db->prepare($query);
|
$stmt = $db->prepare($query);
|
||||||
$stmt->execute([
|
$stmt->execute([
|
||||||
$e_voice ?: null,
|
$e_voice ?: null,
|
||||||
|
@ -512,6 +512,7 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$e_fax ?: null,
|
$e_fax ?: null,
|
||||||
$e_fax_x ?: null,
|
$e_fax_x ?: null,
|
||||||
$e_email,
|
$e_email,
|
||||||
|
$clid,
|
||||||
$contact_id
|
$contact_id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -573,7 +574,7 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($identica_update) {
|
if ($identica_update) {
|
||||||
$query = "UPDATE contact SET nin = ?, nin_type = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?";
|
$query = "UPDATE contact SET nin = ?, nin_type = ?, upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?";
|
||||||
$stmt = $db->prepare($query);
|
$stmt = $db->prepare($query);
|
||||||
|
|
||||||
if (!$stmt) {
|
if (!$stmt) {
|
||||||
|
@ -584,6 +585,7 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$result = $stmt->execute([
|
$result = $stmt->execute([
|
||||||
$nin ?: null,
|
$nin ?: null,
|
||||||
$nin_type ?: null,
|
$nin_type ?: null,
|
||||||
|
$clid,
|
||||||
$contact_id
|
$contact_id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -896,10 +898,10 @@ function processHostUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
if (isset($hostChg)) {
|
if (isset($hostChg)) {
|
||||||
$chg_name = strtoupper($xml->xpath('//host:name[1]')[0]);
|
$chg_name = strtoupper($xml->xpath('//host:name[1]')[0]);
|
||||||
|
|
||||||
$query = "UPDATE host SET name = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE name = ?";
|
$query = "UPDATE host SET name = ?, upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE name = ?";
|
||||||
|
|
||||||
$stmt = $db->prepare($query);
|
$stmt = $db->prepare($query);
|
||||||
$stmt->execute([$chg_name, $name]);
|
$stmt->execute([$chg_name, $clid, $name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$svTRID = generateSvTRID();
|
$svTRID = generateSvTRID();
|
||||||
|
@ -1577,14 +1579,14 @@ function processDomainUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$sth->execute([$registrant]);
|
$sth->execute([$registrant]);
|
||||||
$registrant_id = $sth->fetchColumn();
|
$registrant_id = $sth->fetchColumn();
|
||||||
|
|
||||||
$sth = $db->prepare("UPDATE domain SET registrant = ?, update = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
$sth = $db->prepare("UPDATE domain SET registrant = ?, upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
||||||
if (!$sth->execute([$registrant_id, $domain_id])) {
|
if (!$sth->execute([$registrant_id, $clid, $domain_id])) {
|
||||||
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sth = $db->prepare("UPDATE domain SET registrant = NULL, update = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
$sth = $db->prepare("UPDATE domain SET registrant = NULL, upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
||||||
if (!$sth->execute([$domain_id])) {
|
if (!$sth->execute([$clid, $domain_id])) {
|
||||||
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1634,8 +1636,8 @@ function processDomainUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$temp_id = $sth->fetchColumn();
|
$temp_id = $sth->fetchColumn();
|
||||||
|
|
||||||
if ($temp_id == 1) {
|
if ($temp_id == 1) {
|
||||||
$sth = $db->prepare("UPDATE domain SET rgpstatus = 'pendingRestore', resTime = CURRENT_TIMESTAMP(3), lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
$sth = $db->prepare("UPDATE domain SET rgpstatus = 'pendingRestore', resTime = CURRENT_TIMESTAMP(3), upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
||||||
if (!$sth->execute([$domain_id])) {
|
if (!$sth->execute([$clid, $domain_id])) {
|
||||||
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
sendEppError($conn, $db, 2400, 'Database error', $clTRID, $trans);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1670,9 +1672,9 @@ function processDomainUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
||||||
$sth->execute([$domain_id]);
|
$sth->execute([$domain_id]);
|
||||||
$from = $sth->fetchColumn();
|
$from = $sth->fetchColumn();
|
||||||
|
|
||||||
$sth = $db->prepare("UPDATE domain SET exdate = DATE_ADD(exdate, INTERVAL 12 MONTH), rgpstatus = NULL, rgpresTime = CURRENT_TIMESTAMP(3), lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
$sth = $db->prepare("UPDATE domain SET exdate = DATE_ADD(exdate, INTERVAL 12 MONTH), rgpstatus = NULL, rgpresTime = CURRENT_TIMESTAMP(3), upid = ?, lastupdate = CURRENT_TIMESTAMP(3) WHERE id = ?");
|
||||||
|
|
||||||
if (!$sth->execute([$domain_id])) {
|
if (!$sth->execute([$clid, $domain_id])) {
|
||||||
sendEppError($conn, $db, 2400, 'It was not renewed successfully, something is wrong', $clTRID, $trans);
|
sendEppError($conn, $db, 2400, 'It was not renewed successfully, something is wrong', $clTRID, $trans);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue