mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-14 08:37:00 +02:00
Final fix for domain contact privacy disclose
This commit is contained in:
parent
9ca1c7f6c9
commit
df76bd3665
1 changed files with 36 additions and 36 deletions
|
@ -354,31 +354,31 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
foreach ($xml->xpath('//contact:disclose') as $node_disclose) {
|
||||
$flag = (string)$node_disclose['flag'];
|
||||
|
||||
if ($node_disclose->xpath('contact:voice')) {
|
||||
if ($node_disclose->xpath('//contact:voice')) {
|
||||
$disclose['voice'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:fax')) {
|
||||
if ($node_disclose->xpath('//contact:fax')) {
|
||||
$disclose['fax'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:email')) {
|
||||
if ($node_disclose->xpath('//contact:email')) {
|
||||
$disclose['email'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:name[@type="int"]')) {
|
||||
if ($node_disclose->xpath('//contact:name[@type="int"]')) {
|
||||
$disclose['name_int'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:name[@type="loc"]')) {
|
||||
if ($node_disclose->xpath('//contact:name[@type="loc"]')) {
|
||||
$disclose['name_loc'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:org[@type="int"]')) {
|
||||
if ($node_disclose->xpath('//contact:org[@type="int"]')) {
|
||||
$disclose['org_int'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:org[@type="loc"]')) {
|
||||
if ($node_disclose->xpath('//contact:org[@type="loc"]')) {
|
||||
$disclose['org_loc'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:addr[@type="int"]')) {
|
||||
if ($node_disclose->xpath('//contact:addr[@type="int"]')) {
|
||||
$disclose['addr_int'] = $flag;
|
||||
}
|
||||
if ($node_disclose->xpath('contact:addr[@type="loc"]')) {
|
||||
if ($node_disclose->xpath('//contact:addr[@type="loc"]')) {
|
||||
$disclose['addr_loc'] = $flag;
|
||||
}
|
||||
}
|
||||
|
@ -554,20 +554,6 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$contact_id,
|
||||
'int'
|
||||
]);
|
||||
|
||||
if (isset($disclose['name_int']) || isset($disclose['org_int']) || isset($disclose['addr_int'])) {
|
||||
$query = "UPDATE contact_postalInfo SET disclose_name_int = ?, disclose_org_int = ?, disclose_addr_int = ? WHERE contact_id = ? AND type = ?";
|
||||
$stmt = $db->prepare($query);
|
||||
|
||||
// Use the disclose array if set, otherwise fall back to the extracted values
|
||||
$stmt->execute([
|
||||
isset($disclose['name_int']) ? $disclose['name_int'] : $disclose_name_int, // Use disclose array if set, otherwise use the extracted value
|
||||
isset($disclose['org_int']) ? $disclose['org_int'] : $disclose_org_int, // Same logic for org
|
||||
isset($disclose['addr_int']) ? $disclose['addr_int'] : $disclose_addr_int, // Same logic for address
|
||||
$contact_id,
|
||||
'int'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($postalInfoLoc) {
|
||||
|
@ -589,20 +575,34 @@ function processContactUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$contact_id,
|
||||
'loc'
|
||||
]);
|
||||
}
|
||||
|
||||
if (isset($disclose['name_loc']) || isset($disclose['org_loc']) || isset($disclose['addr_loc'])) {
|
||||
$query = "UPDATE contact_postalInfo SET disclose_name_loc = ?, disclose_org_loc = ?, disclose_addr_loc = ? WHERE contact_id = ? AND type = ?";
|
||||
$stmt = $db->prepare($query);
|
||||
if (isset($disclose['name_int']) || isset($disclose['org_int']) || isset($disclose['addr_int'])) {
|
||||
$query = "UPDATE contact_postalInfo SET disclose_name_int = ?, disclose_org_int = ?, disclose_addr_int = ? WHERE contact_id = ? AND type = ?";
|
||||
$stmt = $db->prepare($query);
|
||||
|
||||
// Use the disclose array if set, otherwise fall back to the extracted values
|
||||
$stmt->execute([
|
||||
isset($disclose['name_loc']) ? $disclose['name_loc'] : $disclose_name_loc, // Use disclose array if set, otherwise use the extracted value
|
||||
isset($disclose['org_loc']) ? $disclose['org_loc'] : $disclose_org_loc, // Same logic for org
|
||||
isset($disclose['addr_loc']) ? $disclose['addr_loc'] : $disclose_addr_loc, // Same logic for address
|
||||
$contact_id,
|
||||
'int'
|
||||
]);
|
||||
}
|
||||
// Use the disclose array if set, otherwise fall back to the extracted values
|
||||
$stmt->execute([
|
||||
isset($disclose['name_int']) ? $disclose['name_int'] : $disclose_name_int, // Use disclose array if set, otherwise use the extracted value
|
||||
isset($disclose['org_int']) ? $disclose['org_int'] : $disclose_org_int, // Same logic for org
|
||||
isset($disclose['addr_int']) ? $disclose['addr_int'] : $disclose_addr_int, // Same logic for address
|
||||
$contact_id,
|
||||
'int'
|
||||
]);
|
||||
}
|
||||
|
||||
if (isset($disclose['name_loc']) || isset($disclose['org_loc']) || isset($disclose['addr_loc'])) {
|
||||
$query = "UPDATE contact_postalInfo SET disclose_name_loc = ?, disclose_org_loc = ?, disclose_addr_loc = ? WHERE contact_id = ? AND type = ?";
|
||||
$stmt = $db->prepare($query);
|
||||
|
||||
// Use the disclose array if set, otherwise fall back to the extracted values
|
||||
$stmt->execute([
|
||||
isset($disclose['name_loc']) ? $disclose['name_loc'] : $disclose_name_loc, // Use disclose array if set, otherwise use the extracted value
|
||||
isset($disclose['org_loc']) ? $disclose['org_loc'] : $disclose_org_loc, // Same logic for org
|
||||
isset($disclose['addr_loc']) ? $disclose['addr_loc'] : $disclose_addr_loc, // Same logic for address
|
||||
$contact_id,
|
||||
'int'
|
||||
]);
|
||||
}
|
||||
|
||||
// Update contact_authInfo for 'pw'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue