Commit 8f08a8c0 authored by Charl's avatar Charl
Browse files

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

parent 80498069
......@@ -1223,10 +1223,13 @@ function cozaepp_TransferSync($params) {
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
$msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;
# 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";
return $values;
}
}
# Check if we can get a status back
if ($doc->getElementsByTagName('status')->item(0)) {
......@@ -1302,7 +1305,12 @@ function cozaepp_Sync($params) {
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
$msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;
# 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 (
$doc->getElementsByTagName('infData') &&
$doc->getElementsByTagName('infData')->item(0)->getElementsByTagName('ns')->item(0) &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment