mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 09:07:00 +02:00
EPP domain create fixes
This commit is contained in:
parent
8cae312a6a
commit
a11a0ecc14
1 changed files with 314 additions and 300 deletions
|
@ -673,9 +673,18 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
}
|
||||
|
||||
$ns = $xml->xpath('//domain:ns')[0];
|
||||
$hostObj_list = null;
|
||||
$hostAttr_list = null;
|
||||
|
||||
if ($ns && count($ns) > 0) {
|
||||
$hostObj_list = $ns->xpath('//domain:hostObj');
|
||||
$hostAttr_list = $ns->xpath('//domain:hostAttr');
|
||||
}
|
||||
|
||||
if (
|
||||
($hostObj_list !== null && is_array($hostObj_list)) ||
|
||||
($hostAttr_list !== null && is_array($hostAttr_list))
|
||||
) {
|
||||
if (count($hostObj_list) > 0 && count($hostAttr_list) > 0) {
|
||||
sendEppError($conn, $db, 2001, 'It cannot be hostObj and hostAttr at the same time, either one or the other', $clTRID, $trans);
|
||||
return;
|
||||
|
@ -930,6 +939,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Registrant
|
||||
$registrant = $xml->xpath('//domain:registrant[1]');
|
||||
|
@ -1168,6 +1178,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
':price' => $price
|
||||
]);
|
||||
|
||||
if ($hostObj_list !== null && is_array($hostObj_list)) {
|
||||
foreach ($hostObj_list as $node) {
|
||||
$hostObj = strtoupper((string)$node);
|
||||
|
||||
|
@ -1222,7 +1233,9 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($hostAttr_list !== null && is_array($hostAttr_list)) {
|
||||
foreach ($hostAttr_list as $element) {
|
||||
foreach ($element->children() as $node) {
|
||||
$hostName = strtoupper($node->xpath('//domain:hostName')[0]);
|
||||
|
@ -1266,6 +1279,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$contact_admin_list = $xml->xpath("//domain:contact[@type='admin']");
|
||||
$contact_billing_list = $xml->xpath("//domain:contact[@type='billing']");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue