|
@@ -478,13 +478,13 @@ function cwp7_delSubdomain($params) {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
$domains = $response['result']['domains'];
|
|
$domains = $response['result']['domains'];
|
|
|
- $clientdomains = array();
|
|
|
|
|
- foreach($domains as $domain){
|
|
|
|
|
- if($domain['domain'] != $params['domain']) {
|
|
|
|
|
- array_push($clientdomains, $domain['domain']);
|
|
|
|
|
|
|
+ $clientsubdomains = array();
|
|
|
|
|
+ foreach($subdomains as $subdomain){
|
|
|
|
|
+ if($subdomain['domain'] != $params['domain']) {
|
|
|
|
|
+ array_push($clientsubdomains, $subdomain['subdomain'] . "." . $subdomain['domain']);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(!in_array($_POST['d'], $clientdomains)) {
|
|
|
|
|
|
|
+ if(!in_array($_POST['d'], $clientsubdomains)) {
|
|
|
return 'Error: ' . $_POST['d'] . ' not in client domains';
|
|
return 'Error: ' . $_POST['d'] . ' not in client domains';
|
|
|
}
|
|
}
|
|
|
|
|
|