PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.16.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.16.2
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
← All changes | includes/Core/Database/FormEntryLogModel.php +4 -15 3.1.22.16.2 View file →
@@ -30,9 +30,9 @@
30 30
31 31 if (isset($integrations->errors['result_empty'])) {
32 32 $integrations = [];
33 33 } else {
34 - foreach ($logs as $key => $log) {
34 + foreach ($logs as $key => $log) {
35 35 foreach ($integrations as $integration) {
36 36 if ($integration->log_id === $log->id) {
37 37 $logs[$key]->integration = true;
38 38 }
@@ -48,13 +48,9 @@
48 48 {
49 49 if (is_null($entry_id)) {
50 50 return new WP_Error('empty_data', __('Form data is empty', 'bit-form'));
51 51 }
52 - $sql = $this->app_db->prepare(
53 - "SELECT api_type, response_obj FROM `{$this->app_db->prefix}bitforms_form_entry_log` as el JOIN `{$this->app_db->prefix}bitforms_form_log_details` as ld ON ld.log_id = el.id WHERE form_entry_id = %d AND integration_id = %d AND ld.response_type = 'success' ORDER BY el.id DESC LIMIT 1",
54 - $entry_id,
55 - $integ_id
56 - );
52 + $sql = "SELECT api_type, response_obj FROM `{$this->app_db->prefix}bitforms_form_entry_log` as el JOIN `{$this->app_db->prefix}bitforms_form_log_details` as ld ON ld.log_id = el.id WHERE form_entry_id = {$entry_id} AND integration_id = {$integ_id} AND ld.response_type = 'success' ORDER BY el.id DESC LIMIT 1";
57 53
58 54 return $this->app_db->get_results($sql);
59 55 }
60 56
@@ -83,12 +79,9 @@
83 79 }
84 80
85 81 public function get_form_value($form_id = '')
86 82 {
87 - $sql = $this->app_db->prepare(
88 - "SELECT `meta_key`,`meta_value` FROM `{$this->app_db->prefix}bitforms_form_entrymeta` WHERE bitforms_form_entry_id=%d",
89 - $form_id
90 - );
83 + $sql = "SELECT `meta_key`,`meta_value` FROM `{$this->app_db->prefix}bitforms_form_entrymeta` where bitforms_form_entry_id=$form_id";
91 84 return $this->execute($sql)->getResult();
92 85 }
93 86
94 87 public function logUpdate($updateValue, $logID)
@@ -95,12 +88,8 @@
95 88 {
96 89 if (empty($logID)) {
97 90 return false;
98 91 }
99 - $sql = $this->app_db->prepare(
100 - "UPDATE `{$this->app_db->prefix}bitforms_form_entry_log` SET content=%s WHERE id=%d",
101 - $updateValue,
102 - $logID
103 - );
92 + $sql = "UPDATE `{$this->app_db->prefix}bitforms_form_entry_log` SET content='$updateValue' WHERE id=$logID";
104 93 return $this->execute($sql)->getResult();
105 94 }
106 95 }