|
@@ -249,7 +249,7 @@ class cwp7_Admin {
|
|
|
'user' => $params['user'],
|
|
'user' => $params['user'],
|
|
|
'type' => $params['type'],
|
|
'type' => $params['type'],
|
|
|
'name' => $params['name'],
|
|
'name' => $params['name'],
|
|
|
- 'path' => 'domains/' . $params['name'],
|
|
|
|
|
|
|
+ 'path' => '/domains/' . $params['name'],
|
|
|
'autossl' => 0,
|
|
'autossl' => 0,
|
|
|
);
|
|
);
|
|
|
return $this->doRequest('admindomains', 'add', $data);
|
|
return $this->doRequest('admindomains', 'add', $data);
|
|
@@ -398,6 +398,19 @@ class cwp7_Admin {
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
|
$response = curl_exec($ch);
|
|
$response = curl_exec($ch);
|
|
|
|
|
+ if(curl_getinfo($ch, CURLINFO_RESPONSE_CODE) != 200) {
|
|
|
|
|
+ curl_close($ch);
|
|
|
|
|
+
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'cwp7',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $data,
|
|
|
|
|
+ 'debug addDomain',
|
|
|
|
|
+ $response
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ return array('status' => 'Error', 'err_msg' => curl_error($ch));
|
|
|
|
|
+ };
|
|
|
curl_close($ch);
|
|
curl_close($ch);
|
|
|
return json_decode($response, true);
|
|
return json_decode($response, true);
|
|
|
}
|
|
}
|