PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.24
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.24
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/class-form-entry.php +9 -4 1.6.141.6.24 View file →
@@ -109,11 +109,16 @@
109 109 $grid_css = '<style>.wpufTable {display: table; width: 100%; } .wpufTableRow {display: table-row; } .wpufTableRow:nth-child(even) {background-color: #f5f5f5; } .wpufTableHeading {background-color: #eee; display: table-header-group; font-weight: bold; } .wpufTableCell, .wpufTableHead {border: none; display: table-cell; padding: 3px 10px; } .wpufTableFoot {background-color: #eee; display: table-footer-group; font-weight: bold; } .wpufTableBody {display: table-row-group; }</style>';
110 110
111 111 $values = [];
112 112
113 - $query = "SELECT * FROM {$wpdb->weforms_entries} as entry
114 - LEFT JOIN {$wpdb->weforms_entrymeta} AS meta ON entry.id = meta.weforms_entry_id
115 - WHERE entry.id = {$this->id}";
113 + $query = $wpdb->prepare(
114 + "
115 + SELECT * FROM {$wpdb->weforms_entries} as entry
116 + LEFT JOIN {$wpdb->weforms_entrymeta} AS meta ON entry.id = meta.weforms_entry_id
117 + WHERE entry.id = %d
118 + ",
119 + $this->id
120 + );
116 121
117 122 $results = $wpdb->get_results( $query );
118 123
119 124 if ( $results ) {
@@ -446,9 +451,9 @@
446 451 */
447 452 public static function get_form_id( $entry_id ) {
448 453 global $wpdb;
449 454
450 - $results = $wpdb->get_results( "SELECT form_id FROM {$wpdb->prefix}weforms_entries WHERE id = {$entry_id} " );
455 + $results = $wpdb->get_results( $wpdb->prepare( "SELECT form_id FROM {$wpdb->prefix}weforms_entries WHERE id = %d ", $entry_id ) );
451 456
452 457 return ! empty( $results[0]->form_id ) ? $results[0]->form_id : null;
453 458 }
454 459 }