Skip to content
Snippets Groups Projects
Commit 8f08a8c0 authored by Charl Mert's avatar Charl Mert
Browse files

performing check for code 2303, domain does not exist closes issue #10

parent 80498069
No related branches found
No related tags found
No related merge requests found
...@@ -1223,10 +1223,13 @@ function cozaepp_TransferSync($params) { ...@@ -1223,10 +1223,13 @@ function cozaepp_TransferSync($params) {
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code'); $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
$msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue; $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;
# Check result # Check result
if ($coderes != '1000') { if ($coderes == '2303') {
$values['error'] = "TransferSync/domain-info($domain): Domain not found";
return $values;
} else if ($coderes != '1000') {
$values['error'] = "TransferSync/domain-info($domain): Code("._cozaepp_message($coderes).") $msg"; $values['error'] = "TransferSync/domain-info($domain): Code("._cozaepp_message($coderes).") $msg";
return $values; return $values;
} }
# Check if we can get a status back # Check if we can get a status back
if ($doc->getElementsByTagName('status')->item(0)) { if ($doc->getElementsByTagName('status')->item(0)) {
...@@ -1302,7 +1305,12 @@ function cozaepp_Sync($params) { ...@@ -1302,7 +1305,12 @@ function cozaepp_Sync($params) {
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code'); $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
$msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue; $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;
# Check result # Check result
if ($coderes == '1000') { if ($coderes == '2303') {
# code 2303, domain not found
$values['error'] = "TransferSync/domain-info($domain): Domain not found";
return $values;
} else if ($coderes == '1000') {
# code 1000, success
if ( if (
$doc->getElementsByTagName('infData') && $doc->getElementsByTagName('infData') &&
$doc->getElementsByTagName('infData')->item(0)->getElementsByTagName('ns')->item(0) && $doc->getElementsByTagName('infData')->item(0)->getElementsByTagName('ns')->item(0) &&
......
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