Fixed & updated

This commit is contained in:
David Saez 2018-05-03 19:55:22 +02:00
parent 7691a8beb9
commit 846006e1e2

View file

@ -34,31 +34,32 @@ class ie_handler
{ {
function parse($data_str, $query) function parse($data_str, $query)
{ {
$translate = array( $translate = [
'nic-hdl' => 'handle', 'nic-hdl' => 'handle',
'person' => 'name', 'person' => 'name',
'renewal' => 'expires' 'renewal' => 'expires',
); 'registration' => 'created',
'ren-status' => 'status'
];
$contacts = array( $contacts = [
'admin-c' => 'admin', 'admin-c' => 'admin',
'tech-c' => 'tech', 'tech-c' => 'tech',
); ];
$reg = generic_parser_a($data_str['rawdata'], $translate, $contacts, 'domain', 'Ymd'); $reg = generic_parser_a($data_str['rawdata'], $translate, $contacts, 'domain', 'Ymd');
if (isset($reg['domain']['descr'])) if (isset($reg['domain']['descr']))
{ {
$reg['owner']['organization'] = $reg['domain']['descr'][0]; $reg['owner']['organization'] = $reg['domain']['descr'];
unset($reg['domain']['descr']); unset($reg['domain']['descr']);
} }
$r['regrinfo'] = $reg; $r['regrinfo'] = $reg;
$r['regyinfo'] = array( $r['regyinfo'] = [
'referrer' => 'http://www.domainregistry.ie', 'referrer' => 'http://www.domainregistry.ie',
'registrar' => 'IE Domain Registry' 'registrar' => 'IE Domain Registry'
); ];
return $r; return $r;
} }
} }
?>