mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-08 20:13:24 +02:00
Optimized EPP contact info; fixed #170
This commit is contained in:
parent
32d1e9dbbd
commit
621976f11a
2 changed files with 86 additions and 51 deletions
|
@ -569,7 +569,7 @@ class EppWriter {
|
|||
$trDateFormatted = $trDate->format('Y-m-d\TH:i:s.v\Z');
|
||||
$writer->writeElement('contact:trDate', $trDateFormatted);
|
||||
}
|
||||
|
||||
|
||||
// Handling 'contact:authInfo'
|
||||
if ($resp['authInfo'] === 'valid') {
|
||||
$writer->startElement('contact:authInfo');
|
||||
|
@ -581,6 +581,18 @@ class EppWriter {
|
|||
$writer->endElement(); // End of 'contact:authInfo'
|
||||
}
|
||||
|
||||
if (isset($resp['disclose'])) {
|
||||
$writer->startElement('contact:disclose');
|
||||
$writer->writeAttribute('flag', $resp['disclose']['flag']); // 1 = disclose, 0 = restrict
|
||||
|
||||
foreach ($resp['disclose']['fields'] as $field) {
|
||||
$writer->startElement('contact:' . $field);
|
||||
$writer->endElement();
|
||||
}
|
||||
|
||||
$writer->endElement(); // End of contact:disclose
|
||||
}
|
||||
|
||||
$writer->endElement(); // End of 'contact:infData'
|
||||
$writer->endElement(); // End of 'resData'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue