PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Controllers/Forms/Edition.php +6 -8 10.1.4 → 11.1.0 View file →
@@ -45,12 +45,12 @@
45 45 acym_setVar('layout', 'edit');
46 46 $formClass = new FormClass();
47 47 $id = acym_getVar('int', 'id', 0);
48 48 $type = acym_getVar('string', 'type', ACYM_CMS === 'wordpress' ? FormClass::SUB_FORM_TYPE_SHORTCODE : FormClass::SUB_FORM_TYPE_POPUP);
49 - if (!acym_level(ACYM_ENTERPRISE) && in_array(
50 - $type,
51 - [FormClass::SUB_FORM_TYPE_POPUP, FormClass::SUB_FORM_TYPE_HEADER, FormClass::SUB_FORM_TYPE_FOOTER]
52 - )) {
49 + if (
50 + !acym_level(ACYM_ENTERPRISE)
51 + && in_array($type, [FormClass::SUB_FORM_TYPE_POPUP, FormClass::SUB_FORM_TYPE_HEADER, FormClass::SUB_FORM_TYPE_FOOTER])
52 + ) {
53 53 acym_enqueueMessage(acym_translation('ACYM_NOT_ALLOWED_CREATE_TYPE_FORM'), 'info');
54 54 $this->listing();
55 55
56 56 return;
@@ -60,9 +60,9 @@
60 60 $form = $formClass->initEmptyForm($type);
61 61 $this->breadcrumb[acym_translation('ACYM_NEW_FORM')] = acym_completeLink('forms&task=edit&id=0&type='.$type);
62 62 } else {
63 63 $form = $formClass->getOneById($id);
64 - $form = $formClass->getFormWithMissingParams($form);
64 + $form = $formClass->getFormWithMissingParams(get_object_vars($form));
65 65 $this->breadcrumb[$form->name] = acym_completeLink('forms&task=edit&id='.$id);
66 66 }
67 67
68 68 if (empty($form)) {
@@ -83,10 +83,8 @@
83 83 $data = [
84 84 'all_languages' => $languagesName,
85 85 'form' => $form,
86 86 'all_pages' => $allPagesCMS,
87 - 'menu_render_settings' => $formClass->prepareMenuHtml($form, 'options'),
88 - 'menu_render_style' => $formClass->prepareMenuHtml($form, 'styles'),
89 87 ];
90 88
91 89 parent::display($data);
92 90 }
@@ -113,9 +111,9 @@
113 111 }
114 112
115 113 public function saveAjax(): void
116 114 {
117 - acym_checkToken();
115 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
118 116 $formArray = acym_getVar('array', 'form');
119 117 if (empty($formArray)) {
120 118 acym_sendAjaxResponse(acym_translation('ACYM_COULD_NOT_GET_FORM_INFORMATION'), [], false);
121 119 }