| @@ -14,11 +14,12 @@ | ||
| 14 | 14 | global $wpdb; |
| 15 | 15 | $tablename = $wpdb->prefix . 'bitforms_reports'; |
| 16 | 16 | |
| 17 | 17 | // $latestIds = $wpdb->get_results("SELECT MAX(`id`) as latest_id FROM $tablename GROUP BY `context`"); |
| 18 | + // Direct query: table name from $wpdb->prefix concatenation (no user input). $wpdb->prepare() cannot parameterize table names. | |
| 18 | 19 | $wpdb->query( |
| 19 | 20 | $wpdb->prepare( |
| 20 | - "SELECT MAX(`id`) as latest_id FROM $tablename GROUP BY `context`" | |
| 21 | + "SELECT MAX(`id`) as latest_id FROM `{$tablename}` GROUP BY `context`" | |
| 21 | 22 | ) |
| 22 | 23 | ); |
| 23 | 24 | $latestIds = $wpdb->last_result; |
| 24 | 25 | |
| @@ -37,9 +38,9 @@ | ||
| 37 | 38 | ['id'] |
| 38 | 39 | ); |
| 39 | 40 | |
| 40 | 41 | $details = [ |
| 41 | - 'report_name' => 'All Entries', | |
| 42 | + 'report_name' => __('All Entries', 'bit-form'), | |
| 42 | 43 | 'hiddenColumns' => [], |
| 43 | 44 | 'pageSize' => 10, |
| 44 | 45 | 'sortBy' => [], |
| 45 | 46 | 'filters' => [], |