Explorar el Código

bugfix UsageUpdate

andre hace 2 años
padre
commit
d71f7cd7eb
Se han modificado 1 ficheros con 9 adiciones y 10 borrados
  1. 9 10
      app/Http/Actions/UsageUpdate.php

+ 9 - 10
app/Http/Actions/UsageUpdate.php

@@ -14,7 +14,15 @@ class UsageUpdate extends AddonController
     public function execute($params = null)
     public function execute($params = null)
     {
     {
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
-        
+
+        logModuleCall(
+            'kerioEmail',
+            __FUNCTION__,
+            $params,
+            'Debug Usage',
+            $api
+        );
+
         try {
         try {
             $api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
             $api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
             $domains = $api->getDomains(['id','name']);
             $domains = $api->getDomains(['id','name']);
@@ -68,15 +76,6 @@ class UsageUpdate extends AddonController
 
 
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['bwusage' => $mailboxes]);
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['bwusage' => $mailboxes]);
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['diskusage' => $storage]);
                 Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['diskusage' => $storage]);
-
-                logModuleCall(
-                    'kerioEmail',
-                    __FUNCTION__,
-                    $storage,
-                    'Debug Usage',
-                    $mailboxes
-                );
-
                 usleep(5000);
                 usleep(5000);
             }
             }
             catch (\Exception $ex)
             catch (\Exception $ex)