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/Classes/ConditionClass.php +11 -3 10.11.1 → 11.1.0 View file →
@@ -41,9 +41,9 @@
41 41 continue;
42 42 }
43 43
44 44 if ($oneAttribute !== 'conditions') {
45 - $element->$oneAttribute = is_array($value) ? json_encode($value) : strip_tags($value);
45 + $element->$oneAttribute = is_array($value) ? json_encode($value) : acym_stripTags($value);
46 46 }
47 47 }
48 48
49 49 return parent::save($element);
@@ -50,9 +50,17 @@
50 50 }
51 51
52 52 public function getConditionsByStepId(int $id): array
53 53 {
54 - $query = 'SELECT acycondition.* FROM #__acym_condition as acycondition LEFT JOIN #__acym_step AS step ON step.id = acycondition.step_id WHERE step.id = '.intval($id);
54 + $conditions = acym_loadObjectList(
55 + 'SELECT *
56 + FROM #__acym_condition
57 + WHERE `step_id` = '.intval($id)
58 + );
55 59
56 - return acym_loadObjectList($query);
60 + foreach ($conditions as $condition) {
61 + $condition->conditions = empty($condition->conditions) ? [] : json_decode($condition->conditions, true);
62 + }
63 +
64 + return $conditions;
57 65 }
58 66 }