|
@@ -30,16 +30,15 @@ function cwp7_MetaData() {
|
|
|
function cwp7_Testconnection($params) {
|
|
function cwp7_Testconnection($params) {
|
|
|
$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
|
|
$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
|
|
|
$response = $cwp7->getServerType();
|
|
$response = $cwp7->getServerType();
|
|
|
- logModuleCall(
|
|
|
|
|
- 'cwp7',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $params,
|
|
|
|
|
- 'Debug',
|
|
|
|
|
- $response
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ if($response['status'] == 'OK') {
|
|
|
|
|
+ return array(
|
|
|
|
|
+ 'success' => true,
|
|
|
|
|
+ 'error' => '',
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
return array(
|
|
return array(
|
|
|
- 'success' => true,
|
|
|
|
|
- 'error' => '',
|
|
|
|
|
|
|
+ 'success' => false,
|
|
|
|
|
+ 'error' => $response['msj'],
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|