← All changes
|
WPDataAccess/Data_Dictionary/WPDA_Dictionary_Lists.php
+14
-14
5.5.75
→
5.5.85
View file →
| @@ -59,9 +59,9 @@ | ||
| 59 | 59 | $wpdadb->dbname, |
| 60 | 60 | ) |
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | - return $wpdadb->get_results( $query, 'ARRAY_A' ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 63 | + return $wpdadb->get_results( $query, 'ARRAY_A' ); | |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public static function get_table_row_count_ajax() { |
| 67 | 67 | if ( |
| @@ -68,11 +68,11 @@ | ||
| 68 | 68 | isset( $_POST['wpda_wpnonce'] ) && |
| 69 | 69 | isset( $_POST['wpdaschema_name'] ) && |
| 70 | 70 | isset( $_POST['wpdatable_name'] ) |
| 71 | 71 | ) { |
| 72 | - $wpnonce = sanitize_text_field( wp_unslash( $_REQUEST['wpda_wpnonce'] ) ); // input var okay. | |
| 73 | - $schema_name = sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ); // input var okay. | |
| 74 | - $table_name = sanitize_text_field( wp_unslash( $_REQUEST['wpdatable_name'] ) ); // input var okay. | |
| 72 | + $wpnonce = sanitize_text_field( wp_unslash( $_REQUEST['wpda_wpnonce'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated | |
| 73 | + $schema_name = sanitize_text_field( wp_unslash( $_REQUEST['wpdaschema_name'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated | |
| 74 | + $table_name = sanitize_text_field( wp_unslash( $_REQUEST['wpdatable_name'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated | |
| 75 | 75 | |
| 76 | 76 | if ( ! wp_verify_nonce( $wpnonce, "wpda-get-row-count-{$table_name}" ) ) { |
| 77 | 77 | echo json_encode( array() ); |
| 78 | 78 | } else { |
| @@ -81,9 +81,9 @@ | ||
| 81 | 81 | if ( $wpdadb === null ) { |
| 82 | 82 | echo json_encode( array() ); |
| 83 | 83 | } else { |
| 84 | 84 | $query = 'select count(*) as row_count from `' . str_replace( '`', '', $table_name ) . '`'; |
| 85 | - echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 85 | + echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); | |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | } else { |
| 89 | 89 | echo json_encode( array() ); |
| @@ -132,9 +132,9 @@ | ||
| 132 | 132 | if ( false === $tables ) { |
| 133 | 133 | $tables = array(); |
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | - if ( count( $tables ) > 0 ) {//phpcs:ignore - 8.1 proof | |
| 136 | + if ( count( $tables ) > 0 ) { // phpcs:ignore -- 8.1 proof | |
| 137 | 137 | $and = " and `table_name` in ('" . implode( "','", $tables ) . "') "; |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| @@ -155,9 +155,9 @@ | ||
| 155 | 155 | $wpdadb->dbname, |
| 156 | 156 | ) |
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | - echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 159 | + echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); | |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | } else { |
| 163 | 163 | echo json_encode( array() ); |
| @@ -198,9 +198,9 @@ | ||
| 198 | 198 | $table_name, |
| 199 | 199 | ) |
| 200 | 200 | ); |
| 201 | 201 | |
| 202 | - echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 202 | + echo json_encode( $wpdadb->get_results( $query, 'ARRAY_A' ) ); | |
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | } else { |
| 206 | 206 | echo json_encode( array() ); |
| @@ -250,9 +250,9 @@ | ||
| 250 | 250 | ); |
| 251 | 251 | |
| 252 | 252 | $indexes = array(); |
| 253 | 253 | foreach ($indexes_dbs as $index_dbs) { |
| 254 | - $indexes[] = array_change_key_case((array)$index_dbs); //phpcs:ignore - 8.1 proof | |
| 254 | + $indexes[] = array_change_key_case((array)$index_dbs); // phpcs:ignore -- 8.1 proof | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | return array( |
| 258 | 258 | 'columns' => $columns, |
| @@ -288,9 +288,9 @@ | ||
| 288 | 288 | $table_name, |
| 289 | 289 | ) |
| 290 | 290 | ); |
| 291 | 291 | |
| 292 | - return $wpdadb->get_results( $query, 'ARRAY_A' ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 292 | + return $wpdadb->get_results( $query, 'ARRAY_A' ); | |
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | /** |
| @@ -303,9 +303,9 @@ | ||
| 303 | 303 | * @since 1.6.0 |
| 304 | 304 | */ |
| 305 | 305 | public static function get_db_schemas( $incl_remote_dbs = true ) { |
| 306 | 306 | global $wpdb; |
| 307 | - $schemas = $wpdb->get_results( | |
| 307 | + $schemas = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching | |
| 308 | 308 | 'SELECT schema_name AS schema_name |
| 309 | 309 | FROM information_schema.schemata |
| 310 | 310 | ORDER BY schema_name', |
| 311 | 311 | 'ARRAY_A' |
| @@ -318,12 +318,12 @@ | ||
| 318 | 318 | $remote[] = array( |
| 319 | 319 | 'schema_name' => $key, |
| 320 | 320 | ); |
| 321 | 321 | } |
| 322 | - asort( $remote );//phpcs:ignore - 8.1 proof | |
| 322 | + asort( $remote ); // phpcs:ignore -- 8.1 proof | |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - return array_merge( $schemas, $remote );//phpcs:ignore - 8.1 proof | |
| 325 | + return array_merge( $schemas, $remote ); // phpcs:ignore -- 8.1 proof | |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | 329 | * List of available engines |
| @@ -421,9 +421,9 @@ | ||
| 421 | 421 | ) |
| 422 | 422 | ), |
| 423 | 423 | 'ARRAY_A' |
| 424 | 424 | ); |
| 425 | - if ( 1 === count( $row ) ) {//phpcs:ignore - 8.1 proof | |
| 425 | + if ( 1 === count( $row ) ) { // phpcs:ignore -- 8.1 proof | |
| 426 | 426 | return $row[0]['engine']; |
| 427 | 427 | } else { |
| 428 | 428 | return null; |
| 429 | 429 | } |