← All changes
|
WPDataAccess/Data_Dictionary/WPDA_Dictionary_Access.php
+4
-8
5.5.76
→
5.5.84
View file →
| @@ -201,12 +201,10 @@ | ||
| 201 | 201 | * @since 2.7.2 |
| 202 | 202 | */ |
| 203 | 203 | public static function can_create_db() { |
| 204 | 204 | global $wpdb; |
| 205 | - $wpdb->get_results( | |
| 206 | - "select * from information_schema.user_privileges | |
| 207 | - where privilege_type = 'CREATE' | |
| 208 | - and replace(grantee, '\'', '') = current_user()" | |
| 205 | + $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching | |
| 206 | + "select * from information_schema.user_privileges where privilege_type = 'CREATE' and replace(grantee, '\'', '') = current_user()" // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange | |
| 209 | 207 | ); |
| 210 | 208 | |
| 211 | 209 | return $wpdb->num_rows > 0; |
| 212 | 210 | } |
| @@ -218,12 +216,10 @@ | ||
| 218 | 216 | * @since 2.7.2 |
| 219 | 217 | */ |
| 220 | 218 | public static function can_drop_db() { |
| 221 | 219 | global $wpdb; |
| 222 | - $wpdb->get_results( | |
| 223 | - "select * from information_schema.user_privileges | |
| 224 | - where privilege_type = 'DROP' | |
| 225 | - and replace(grantee, '\'', '') = current_user()" | |
| 220 | + $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching | |
| 221 | + "select * from information_schema.user_privileges where privilege_type = 'DROP' and replace(grantee, '\'', '') = current_user()" // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange | |
| 226 | 222 | ); |
| 227 | 223 | |
| 228 | 224 | return $wpdb->num_rows > 0; |
| 229 | 225 | } |