andre 2 роки тому
батько
коміт
d28656565d

+ 0 - 24
app/UI/Client/EmailAlias/Providers/DeleteEmailAliasDataProvider.php

@@ -2,11 +2,6 @@
 
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\EmailAlias\Providers;
 namespace ThurData\Servers\KerioEmail\App\UI\Client\EmailAlias\Providers;
 
 
-
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\AccountAlias;
-use ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting;
 use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
 use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
 use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
 use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
@@ -34,11 +29,6 @@ class DeleteEmailAliasDataProvider extends BaseDataProvider
 
 
     public function delete()
     public function delete()
     {
     {
-        /**
-         * hosting id
-         */
-        $hid = $this->request->get('id');
-
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
         try {
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
@@ -66,25 +56,11 @@ class DeleteEmailAliasDataProvider extends BaseDataProvider
         }
         }
         $api->logout();
         $api->logout();
 
 
-        $productManager = new ProductManager();
-        $productManager->loadByHostingId($hid);
-
         return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAliasHasBeenDeleted')->setStatusSuccess();
         return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAliasHasBeenDeleted')->setStatusSuccess();
     }
     }
 
 
     public function massDelete()
     public function massDelete()
     {
     {
-        /**
-         * hosting id
-         */
-        $hid = $this->request->get('id');
-
-        /**
-         * product manager allow to check product settings
-         */
-        $productManager = new ProductManager();
-        $productManager->loadByHostingId($hid);
-
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
         try {
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));