PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.7.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.7.0
3.3.1 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 All 138 releases
← All changes | includes/Core/Database/ReportsModel.php +1 -21 3.2.12.7.0 View file →
@@ -1,6 +1,5 @@
1 1 <?php
2 -
3 2 /**
4 3 * Provides Report Model Class
5 4 */
6 5
@@ -14,30 +13,11 @@
14 13 class ReportsModel extends Model
15 14 {
16 15 protected static $table = 'bitforms_reports';
17 16
18 - /**
19 - * Whether a report payload carries enough to validate.
20 - *
21 - * The save path feeds this the request's `currentReport`, and the React `$reportSelector` atom
22 - * yields `{}` whenever the report list has not resolved — an empty stdClass, which PHP's
23 - * empty() reports as non-empty. Callers must therefore ask before acting on it.
24 - *
25 - * @param mixed $reportData
26 - *
27 - * @return bool
28 - */
29 - public static function isValidatableReport($reportData)
30 - {
31 - return \is_object($reportData) && !empty($reportData->type) && isset($reportData->details);
32 - }
33 -
34 17 public function validateReportFields($reportData, $fieldNames)
35 18 {
36 19 $reportDetails = [];
37 - if (!self::isValidatableReport($reportData)) {
38 - return $reportDetails;
39 - }
40 20 switch ($reportData->type) {
41 21 case 'table':
42 22 $tableAction = 'table_ac';
43 23 $reportDetails = !is_string($reportData->details) ? $reportData->details : json_decode($reportData->details);
@@ -104,9 +84,9 @@
104 84 );
105 85 }
106 86 $result = $this->app_db->query(
107 87 $this->app_db->prepare(
108 - "DELETE FROM `{$this->table_name}` $condition_to_check",
88 + "DELETE FROM $this->table_name $condition_to_check",
109 89 $all_values
110 90 )
111 91 );
112 92 return $this->getResult($result);