Просмотр исходного кода

test using namespace for kerio api

andre 2 лет назад
Родитель
Сommit
1e4d25a1d4
2 измененных файлов с 8 добавлено и 7 удалено
  1. 8 0
      api/class/KerioApi.php
  2. 0 7
      app/Http/Actions/TestConnection.php

+ 8 - 0
api/class/KerioApi.php

@@ -478,6 +478,14 @@ class KerioApi implements KerioApiInterface {
 		/* Send data to server */
 		$json_response = $this->send('POST', $json_request);
 
+		logModuleCall(
+			'kerioEmail',
+			__FUNCTION__,
+			$params,
+			'Debug Kerio Api 1',
+			$json_response
+		);
+
 		/* Return */
 		$response = json_decode($json_response, TRUE);
 		return $response['result'];

+ 0 - 7
app/Http/Actions/TestConnection.php

@@ -35,13 +35,6 @@ class TestConnection extends AddonController
         $api = new KerioConnectApi('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
             $api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
-            logModuleCall(
-                'kerioEmail',
-                __FUNCTION__,
-                $params,
-                'Debug Kerio Api 1',
-                $api
-            );
             $serverInfo = $api->sendRequest('Server.getProductInfo');
             $api->logout();
         } catch (KerioApiException $error) {