PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 2.11.8
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v2.11.8
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | includes/class-database-backup.php +6 -2 2.9.62.11.8 View file →
@@ -11,10 +11,8 @@
11 11 if ( ! defined( 'ABSPATH' ) ) {
12 12 exit;
13 13 }
14 14
15 -// phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
16 -
17 15 /**
18 16 * Class Vigilante_Database_Backup
19 17 *
20 18 * Creates downloadable database backups
@@ -73,8 +71,9 @@
73 71 'other' => array(),
74 72 );
75 73
76 74 // Get all tables that match the current prefix
75 + // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- %i placeholder requires WP 6.2+, and the sniff reports inside the multiline prepare().
77 76 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
78 77 $all_tables = $this->wpdb->get_results(
79 78 $this->wpdb->prepare(
80 79 'SHOW TABLE STATUS LIKE %s',
@@ -80,8 +79,9 @@
80 79 'SHOW TABLE STATUS LIKE %s',
81 80 $this->wpdb->esc_like( $prefix ) . '%'
82 81 )
83 82 );
83 + // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
84 84
85 85 if ( ! $all_tables ) {
86 86 return $tables;
87 87 }
@@ -290,8 +290,9 @@
290 290 * @param string $table_name Full table name.
291 291 * @return string|WP_Error SQL for the table.
292 292 */
293 293 private function dump_table( $table_name ) {
294 + // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- %i placeholder requires WP 6.2+, and the sniff reports inside the multiline prepare().
294 295 $sql = '';
295 296 $sql .= "-- ----------------------------------------------------------\n";
296 297 $sql .= '-- Table: ' . $table_name . "\n";
297 298 $sql .= "-- ----------------------------------------------------------\n\n";
@@ -374,8 +375,9 @@
374 375 }
375 376
376 377 $sql .= "UNLOCK TABLES;\n";
377 378 }
379 + // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
378 380
379 381 $sql .= "\n";
380 382
381 383 return $sql;
@@ -388,8 +390,9 @@
388 390 */
389 391 private function get_valid_table_names() {
390 392 $prefix = $this->wpdb->prefix;
391 393
394 + // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- %i placeholder requires WP 6.2+, and the sniff reports inside the multiline prepare().
392 395 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
393 396 $results = $this->wpdb->get_col(
394 397 $this->wpdb->prepare(
395 398 'SHOW TABLES LIKE %s',
@@ -395,8 +398,9 @@
395 398 'SHOW TABLES LIKE %s',
396 399 $this->wpdb->esc_like( $prefix ) . '%'
397 400 )
398 401 );
402 + // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
399 403
400 404 return $results ? $results : array();
401 405 }
402 406