← All changes
|
includes/Admin/Product/Data/Services/VideoService.php
+3
-0
1.8.8
→
1.10.19
View file →
| @@ -97,8 +97,9 @@ | ||
| 97 | 97 | { |
| 98 | 98 | global $wpdb; |
| 99 | 99 | $tableName = $wpdb->prefix . 'sync_basalam_uploaded_media'; |
| 100 | 100 | |
| 101 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Custom plugin table; identifier from $wpdb->prefix, not user input. | |
| 101 | 102 | $result = $wpdb->get_row($wpdb->prepare( |
| 102 | 103 | "SELECT media_id AS file_id, media_url AS url, created_at |
| 103 | 104 | FROM $tableName |
| 104 | 105 | WHERE type = %s AND source_identity = %s", |
| @@ -112,8 +113,9 @@ | ||
| 112 | 113 | $now = current_time('timestamp'); |
| 113 | 114 | $fourteenDays = 14 * DAY_IN_SECONDS; |
| 114 | 115 | |
| 115 | 116 | if (($now - $createdAt) >= $fourteenDays) { |
| 117 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Custom plugin table; no object cache for these operational queries. | |
| 116 | 118 | $wpdb->delete( |
| 117 | 119 | $tableName, |
| 118 | 120 | ['type' => 'video', 'source_identity' => $sourceIdentity], |
| 119 | 121 | ['%s', '%s'] |
| @@ -128,8 +130,9 @@ | ||
| 128 | 130 | { |
| 129 | 131 | global $wpdb; |
| 130 | 132 | $tableName = $wpdb->prefix . 'sync_basalam_uploaded_media'; |
| 131 | 133 | |
| 134 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Custom plugin table; no object cache for these operational queries. | |
| 132 | 135 | $wpdb->replace( |
| 133 | 136 | $tableName, |
| 134 | 137 | [ |
| 135 | 138 | 'type' => 'video', |