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/dynamics/subscriber/plugin.php +17 -6 10.11.1 → 11.1.0 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +defined('ABSPATH') || die('Restricted Access');
2 3
3 4 use AcyMailing\Helpers\ExportHelper;
4 5 use AcyMailing\Core\AcymPlugin;
5 6 use AcyMailing\Classes\UserClass;
@@ -75,21 +76,31 @@
75 76
76 77 public function onBeforeSaveConfigFields(&$newConfig)
77 78 {
78 79 $fieldToExportOnChange = $this->config->get('export_data_changes_fields', []);
79 - if (empty($fieldToExportOnChange)) return;
80 + if (empty($fieldToExportOnChange)) {
81 + return;
82 + }
80 83
81 - if (!is_array($fieldToExportOnChange)) $fieldToExportOnChange = explode(',', $fieldToExportOnChange);
84 + if (!is_array($fieldToExportOnChange)) {
85 + $fieldToExportOnChange = explode(',', $fieldToExportOnChange);
86 + }
82 87
83 - if (empty($newConfig['export_data_changes_fields'])) $newConfig['export_data_changes_fields'] = [];
88 + if (empty($newConfig['export_data_changes_fields'])) {
89 + $newConfig['export_data_changes_fields'] = [];
90 + }
84 91
85 - if ($fieldToExportOnChange == $newConfig['export_data_changes_fields']) return;
92 + if ($fieldToExportOnChange == $newConfig['export_data_changes_fields']) {
93 + return;
94 + }
86 95
87 96 $exportHelper = new ExportHelper();
88 97 $fileExportPath = $exportHelper->getExportChangesFilePath();
89 98
90 - if (!file_exists($fileExportPath)) return;
99 + if (!file_exists($fileExportPath)) {
100 + return;
101 + }
91 102
92 103 $newFilename = $exportHelper->generateExportChangesFilePathConfigChanges();
93 - @rename($fileExportPath, $newFilename);
104 + acym_moveFile($fileExportPath, $newFilename);
94 105 }
95 106 }