Further transfer fixes

This commit is contained in:
Pinga 2023-12-07 16:12:08 +02:00
parent e086f001ef
commit d03e85b3cb
3 changed files with 20 additions and 46 deletions

View file

@ -475,6 +475,10 @@ function processDomainTransfer($conn, $db, $xml, $clid, $database_type, $trans)
return;
}
}
$stmt = $db->prepare("SELECT `exdate` FROM `domain` WHERE `id` = :domain_id LIMIT 1");
$stmt->execute(['domain_id' => $domain_id]);
$from = $stmt->fetchColumn();
$stmt = $db->prepare("UPDATE `domain` SET `exdate` = DATE_ADD(`exdate`, INTERVAL ? MONTH), `update` = CURRENT_TIMESTAMP(3), `clid` = ?, `upid` = ?, `trdate` = CURRENT_TIMESTAMP(3), `trstatus` = 'clientApproved', `acdate` = CURRENT_TIMESTAMP(3), `transfer_exdate` = NULL, `rgpstatus` = 'transferPeriod', `transferPeriod` = ? WHERE `id` = ?");
$stmt->execute([$date_add, $row["reid"], $clid, $date_add, $domain_id]);