|
@@ -56,6 +56,12 @@ 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();
|
|
|
|
|
+ if($response['status'] == 'OK') {
|
|
|
|
|
+ return array(
|
|
|
|
|
+ 'success' => true,
|
|
|
|
|
+ 'error' => '',
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
logModuleCall(
|
|
logModuleCall(
|
|
|
'cwp7',
|
|
'cwp7',
|
|
|
__FUNCTION__,
|
|
__FUNCTION__,
|
|
@@ -63,12 +69,6 @@ function cwp7_Testconnection($params) {
|
|
|
'debug',
|
|
'debug',
|
|
|
$response
|
|
$response
|
|
|
);
|
|
);
|
|
|
- if($response['status'] == 'OK') {
|
|
|
|
|
- return array(
|
|
|
|
|
- 'success' => true,
|
|
|
|
|
- 'error' => '',
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
return array(
|
|
return array(
|
|
|
'success' => false,
|
|
'success' => false,
|
|
|
'error' => $response['error_msg'] ? $response['error_msg'] : $response['msj'],
|
|
'error' => $response['error_msg'] ? $response['error_msg'] : $response['msj'],
|