andre 2 лет назад
Родитель
Сommit
10741944fd
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      cwp7.php

+ 6 - 6
cwp7.php

@@ -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'],