소스 검색

edit mailinglists

andre 2 년 전
부모
커밋
58aab1c46e
1개의 변경된 파일10개의 추가작업 그리고 29개의 파일을 삭제
  1. 10 29
      app/UI/Client/DistributionList/Providers/EditListDataProvider.php

+ 10 - 29
app/UI/Client/DistributionList/Providers/EditListDataProvider.php

@@ -204,6 +204,16 @@ class EditListDataProvider extends AddListDataProvider
     public function update()
     {
         // prepare data
+        // get settings
+        $paramsSet['name'] = $this->formData['listmail'];
+        $paramsSet['description'] = $this->formData['description'];
+        $paramsSet['languageId'] = $this->formData['lang'];
+        $paramsSet['subscription']['type'] = $this->formData['subscriptionRequest'];
+        $paramsSet['subscription']['moderatorNotification'] = $this->formData['subscriptionNotify'] === 'on' ? true : false;
+        $paramsSet['replyTo'] = $this->formData['replyEmailAddress'];
+        $paramsSet['posting']['memberPosting'] = $this->formData['memberPosting'];
+        $paramsSet['posting']['nonMemberPosting'] = $this->formData['nonMemberPosting'];
+        $paramsSet['posting']['sendErrorsToModerator'] = $this->formData['sendErrorsToModerator'] === 'on' ? true : false;
         // find new internal members to add
         foreach($this->formData['memberList'] as $intMember) {
             if(!in_array($intMember, $this->formData['memberListActually'])) {
@@ -271,24 +281,6 @@ class EditListDataProvider extends AddListDataProvider
             }
         }
 
-        $paramsSet['name'] = $this->formData['listmail'];
-        $paramsSet['description'] = $this->formData['description'];
-        $paramsSet['languageId'] = $this->formData['lang'];
-        $paramsSet['subscription']['type'] = $this->formData['subscriptionRequest'];
-        $paramsSet['subscription']['moderatorNotification'] = $this->formData['subscriptionNotify'] === 'on' ? true : false;
-        $paramsSet['replyTo'] = $this->formData['replyEmailAddress'];
-        $paramsSet['posting']['memberPosting'] = $this->formData['memberPosting'];
-        $paramsSet['posting']['nonMemberPosting'] = $this->formData['nonMemberPosting'];
-        $paramsSet['posting']['sendErrorsToModerator'] = $this->formData['sendErrorsToModerator'] === 'on' ? true : false;
-
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $this->formData,
-            'Debug Formdata',
-            $paramsSet . $paramsDel . $paramsAdd
-        );
-
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
@@ -345,17 +337,6 @@ class EditListDataProvider extends AddListDataProvider
                 return ['error' => $error->getMessage()];
             }
         }
-        $api->logout();
-        /**
-         * hosting id
-         */
-        $hid = $this->request->get('id');
-
-        /**
-         * get product manager
-         */
-        $productManager = new ProductManager();
-        $productManager->loadByHostingId($hid);
 
         return (new HtmlDataJsonResponse())->setMessageAndTranslate('distributionListHasBeenUpdated')->setStatusSuccess();