mirror of
https://github.com/myvesta/vesta
synced 2025-07-14 00:53:30 -07:00
Fixed Multiple bugs in WHMCS module
Added module debug logging Fixed simple bugs in function result codes returns
This commit is contained in:
parent
2e78f1e3c9
commit
63e3728999
1 changed files with 21 additions and 4 deletions
|
@ -43,6 +43,8 @@ function vesta_CreateAccount($params) {
|
|||
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
|
||||
$answer = curl_exec($curl);
|
||||
|
||||
logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
// Enable ssh access
|
||||
if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
|
||||
$postvars = array(
|
||||
|
@ -62,6 +64,8 @@ function vesta_CreateAccount($params) {
|
|||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
|
||||
$answer = curl_exec($curl);
|
||||
|
||||
logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
}
|
||||
|
||||
// Add domain
|
||||
|
@ -84,6 +88,8 @@ function vesta_CreateAccount($params) {
|
|||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
|
||||
$answer = curl_exec($curl);
|
||||
|
||||
logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,8 +98,8 @@ function vesta_CreateAccount($params) {
|
|||
} else {
|
||||
$result = $answer;
|
||||
}
|
||||
return $result;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function vesta_TerminateAccount($params) {
|
||||
|
@ -122,6 +128,8 @@ function vesta_TerminateAccount($params) {
|
|||
$answer = curl_exec($curl);
|
||||
}
|
||||
|
||||
logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
if($answer == 'OK') {
|
||||
$result = "success";
|
||||
} else {
|
||||
|
@ -129,7 +137,6 @@ function vesta_TerminateAccount($params) {
|
|||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
function vesta_SuspendAccount($params) {
|
||||
|
@ -158,12 +165,15 @@ function vesta_SuspendAccount($params) {
|
|||
$answer = curl_exec($curl);
|
||||
}
|
||||
|
||||
logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
if($answer == 'OK') {
|
||||
$result = "success";
|
||||
} else {
|
||||
$result = $answer;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function vesta_UnsuspendAccount($params) {
|
||||
|
@ -192,12 +202,15 @@ function vesta_UnsuspendAccount($params) {
|
|||
$answer = curl_exec($curl);
|
||||
}
|
||||
|
||||
logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
if($answer == 'OK') {
|
||||
$result = "success";
|
||||
} else {
|
||||
$result = $answer;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function vesta_ChangePassword($params) {
|
||||
|
@ -227,13 +240,15 @@ function vesta_ChangePassword($params) {
|
|||
$answer = curl_exec($curl);
|
||||
}
|
||||
|
||||
logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
if($answer == 'OK') {
|
||||
$result = "success";
|
||||
} else {
|
||||
$result = $answer;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
function vesta_ChangePackage($params) {
|
||||
|
@ -263,13 +278,15 @@ function vesta_ChangePackage($params) {
|
|||
$answer = curl_exec($curl);
|
||||
}
|
||||
|
||||
logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'$postdata,$answer);
|
||||
|
||||
if($answer == 'OK') {
|
||||
$result = "success";
|
||||
} else {
|
||||
$result = $answer;
|
||||
}
|
||||
return $result;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function vesta_ClientArea($params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue