Skip to content
Snippets Groups Projects
Commit fc187a54 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Revert "setting to active when transfer is in clientApproved state closes issue #5"

This reverts commit 4eccb3ef.
parent 03459ff1
No related branches found
No related tags found
No related merge requests found
...@@ -112,43 +112,11 @@ try { ...@@ -112,43 +112,11 @@ try {
continue; continue;
} }
# Checking for transfer status if transfer in progress
$output = $client->request($xml = '
<epp:epp xmlns:epp="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<epp:command>
<epp:transfer op="query">
<domain:transfer>
<domain:name>'.$domain.'</domain:name>
</domain:transfer>
</epp:transfer>
</epp:command>
</epp:epp>');
$transferstatus = '';
# parsing for transfer status
$doc= new DOMDocument();
$doc->loadXML($output);
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
if($coderes == '1000') {
if( $doc->getElementsByTagName('trnData')) {
if($doc->getElementsByTagName('trnData')->item(0)->getElementsByTagName('trStatus')->item(0)) {
$transferstatus = $doc->getElementsByTagName('trnData')->item(0)->getElementsByTagName('trStatus')->item(0)->nodeValue;
} else {
$transferstatus = "Domain $domain not being transfered!";
continue;
}
}
} else {
echo "Domain check on $domain not successful: "._cozaepp_message($coderes)." (File a bug report here: http://devlabs.linuxassist.net/projects/whmcs-coza-epp/issues/new)";
continue;
}
# This is the template we going to use below for our updates # This is the template we going to use below for our updates
$querytemplate = "UPDATE tbldomains SET status = '%s', registrationdate = '%s', expirydate = '%s', nextduedate = '%s' WHERE domain = '%s'"; $querytemplate = "UPDATE tbldomains SET status = '%s', registrationdate = '%s', expirydate = '%s', nextduedate = '%s' WHERE domain = '%s'";
# Check status and update # Check status and update
if ($statusres == "ok" || $transferstatus == "clientApproved") { if ($statusres == "ok") {
mysql_query(sprintf($querytemplate,"Active", mysql_query(sprintf($querytemplate,"Active",
mysql_real_escape_string($createdate), mysql_real_escape_string($createdate),
mysql_real_escape_string($nextduedate), mysql_real_escape_string($nextduedate),
...@@ -157,14 +125,14 @@ try { ...@@ -157,14 +125,14 @@ try {
)); ));
echo "Updated $domain expiry to $nextduedate\n"; echo "Updated $domain expiry to $nextduedate\n";
} elseif ($statusres == "serverHold" || $transferstatus == "pending") { } elseif ($statusres == "serverHold") {
mysql_query(sprintf($querytemplate,"Pending", mysql_query(sprintf($querytemplate,"Active",
mysql_real_escape_string($createdate), mysql_real_escape_string($createdate),
mysql_real_escape_string($nextduedate), mysql_real_escape_string($nextduedate),
mysql_real_escape_string($nextduedate), mysql_real_escape_string($nextduedate),
mysql_real_escape_string($domain) mysql_real_escape_string($domain)
)); ));
echo "Domain $domain is PENDING (Registration: $createdate, Expiry: $nextduedate)\n"; echo "Updated $domain expiry to $nextduedate\n";
} elseif ($statusres == "expired" || $statusres == "pendingDelete" || $statusres == "inactive") { } elseif ($statusres == "expired" || $statusres == "pendingDelete" || $statusres == "inactive") {
mysql_query(sprintf($querytemplate,"Expired", mysql_query(sprintf($querytemplate,"Expired",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment