|
|
@@ -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();
|
|
|
|