← All changes
|
WPDataAccess/Utilities/WPDA_Restore_Repository.php
+5
-5
5.5.76
→
5.5.84
View file →
| @@ -15,14 +15,14 @@ | ||
| 15 | 15 | $this->repository_tables = array(); |
| 16 | 16 | |
| 17 | 17 | $suppress = $wpdb->suppress_errors( true ); |
| 18 | 18 | foreach ( WPDA_Repository::CREATE_TABLE as $key => $value ) { |
| 19 | - if ( isset( $_REQUEST[ $key ] ) ) { | |
| 20 | - if ( 'replace' === $_REQUEST[ $key ] || 'add' === $_REQUEST[ $key ] ) { | |
| 19 | + if ( isset( $_REQUEST[ $key ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- already verified | |
| 20 | + if ( 'replace' === $_REQUEST[ $key ] || 'add' === $_REQUEST[ $key ] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- already verified | |
| 21 | 21 | $this->restore_table( |
| 22 | 22 | $wpdb->prefix . $key, |
| 23 | 23 | $wpdb->prefix . $key . self::BACKUP_TABLE_EXTENSION . $restore_date, |
| 24 | - sanitize_text_field( wp_unslash( $_REQUEST[ $key ] ) ) | |
| 24 | + sanitize_text_field( wp_unslash( $_REQUEST[ $key ] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- already verified | |
| 25 | 25 | ); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | // Use backticks to prevent SQL injection |
| 38 | 38 | $table_name = WPDA::remove_backticks( $arg_table_name ); |
| 39 | 39 | $bck_table_name = WPDA::remove_backticks( $arg_bck_table_name ); |
| 40 | 40 | |
| 41 | - $same_cols = $wpdb->get_results( | |
| 41 | + $same_cols = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- plugin table | |
| 42 | 42 | $wpdb->prepare( |
| 43 | 43 | ' |
| 44 | 44 | select c1.column_name as column_name |
| 45 | 45 | from information_schema.columns c1 |
| @@ -81,9 +81,9 @@ | ||
| 81 | 81 | ); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Restore data |
| 85 | - $result = $wpdb->query( | |
| 85 | + $result = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- plugin table | |
| 86 | 86 | $wpdb->prepare( |
| 87 | 87 | 'insert into `%1s` (%1s) select %1s from `%1s`', // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders |
| 88 | 88 | array( |
| 89 | 89 | WPDA::remove_backticks( $table_name ), |