|
|
@@ -133,14 +133,6 @@ class EditRessourceDataProvider extends BaseDataProvider
|
|
|
'managert'
|
|
|
];
|
|
|
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $this->formData,
|
|
|
- 'Debug Error',
|
|
|
- $this->actionElementId
|
|
|
- );
|
|
|
-
|
|
|
foreach ($this->formData as $field => &$value)
|
|
|
{
|
|
|
$value = in_array($field, $fieldToProtection) ? htmlentities($value) : $value;
|
|
|
@@ -191,47 +183,14 @@ class EditRessourceDataProvider extends BaseDataProvider
|
|
|
*/
|
|
|
public function updateStatus()
|
|
|
{
|
|
|
- /**
|
|
|
- * hosting id
|
|
|
- */
|
|
|
- $hid = $this->request->get('id');
|
|
|
-
|
|
|
- /**
|
|
|
- * product manager allow to check product settings
|
|
|
- */
|
|
|
- $productManager = new ProductManager();
|
|
|
- $productManager->loadByHostingId($hid);
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- * get soap create domain service
|
|
|
- */
|
|
|
- $service =(new KerioManager())
|
|
|
- ->getApiByHosting($hid)
|
|
|
- ->soap
|
|
|
- ->service()
|
|
|
- ->updateRessourceStatus()
|
|
|
- ->setProductManager($productManager)
|
|
|
- ;
|
|
|
- /**
|
|
|
- *
|
|
|
- * set product manager & form data to service
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * run service for each id
|
|
|
- */
|
|
|
- $service->setFormData($this->formData);
|
|
|
- $result = $service->run();
|
|
|
-
|
|
|
- if(!$result)
|
|
|
- {
|
|
|
- return (new HtmlDataJsonResponse())->setMessageAndTranslate($service->getError())->setStatusError();
|
|
|
- }
|
|
|
|
|
|
- /**
|
|
|
- * return success
|
|
|
- */
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $this->formData,
|
|
|
+ 'Debug Error',
|
|
|
+ $this->data
|
|
|
+ );
|
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('ressourceStatusHasBeenUpdated')->setStatusSuccess();
|
|
|
|
|
|
}
|
|
|
@@ -241,44 +200,6 @@ class EditRessourceDataProvider extends BaseDataProvider
|
|
|
*/
|
|
|
public function changePassword()
|
|
|
{
|
|
|
- /**
|
|
|
- * hosting id
|
|
|
- */
|
|
|
- $hid = $this->request->get('id');
|
|
|
-
|
|
|
- /**
|
|
|
- * product manager allow to check product settings
|
|
|
- */
|
|
|
- $productManager = new ProductManager();
|
|
|
- $productManager->loadByHostingId($hid);
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- * get soap create domain service
|
|
|
- */
|
|
|
- $service =(new KerioManager())
|
|
|
- ->getApiByHosting($hid)
|
|
|
- ->soap
|
|
|
- ->service()
|
|
|
- ->updateRessourcePassword()
|
|
|
- ->setProductManager($productManager)
|
|
|
- ;
|
|
|
- /**
|
|
|
- *
|
|
|
- * set product manager & form data to service
|
|
|
- */
|
|
|
-
|
|
|
- /**
|
|
|
- * run service for each id
|
|
|
- */
|
|
|
- $service->setFormData($this->formData);
|
|
|
- $result = $service->run();
|
|
|
-
|
|
|
- if(!$result)
|
|
|
- {
|
|
|
- return (new HtmlDataJsonResponse())->setMessageAndTranslate($service->getError())->setStatusError();
|
|
|
- }
|
|
|
|
|
|
- return (new HtmlDataJsonResponse())->setMessageAndTranslate('passwordChangedSuccessfully')->setStatusSuccess();
|
|
|
}
|
|
|
}
|