PluginProbe
User Access Manager / 2.3.18
User Access Manager v2.3.18
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/UserGroup/AssignedObjectsLoader.php +6 -6 trunk2.3.18 View file →
@@ -42,13 +42,13 @@
42 42 * @return array<string, array<string, AssignmentInformation[]>>
43 43 */
44 44 private function loadAssignedObjects(string $objectType, bool $ignoreDates): array
45 45 {
46 - $query = "SELECT `group_id` AS `groupId`, `group_type` AS `groupType`, `object_id` AS `id`,
47 - `object_type` AS `objectType`, `from_date` AS `fromDate`, `to_date` AS `toDate`
48 - FROM `{$this->database->getUserGroupToObjectTable()}`
49 - WHERE `object_id` != ''
50 - AND (`general_object_type` = '%s' OR `object_type` = '%s')";
46 + $query = "SELECT group_id AS groupId, group_type AS groupType, object_id AS id,
47 + object_type AS objectType, from_date AS fromDate, to_date AS toDate
48 + FROM {$this->database->getUserGroupToObjectTable()}
49 + WHERE object_id != ''
50 + AND (general_object_type = '%s' OR object_type = '%s')";
51 51
52 52 $parameters = [
53 53 $objectType,
54 54 $objectType
@@ -54,9 +54,9 @@
54 54 $objectType
55 55 ];
56 56
57 57 if ($ignoreDates === false) {
58 - $query .= " AND (`from_date` IS NULL OR `from_date` <= '%s') AND (`to_date` IS NULL OR `to_date` >= '%s')";
58 + $query .= " AND (from_date IS NULL OR from_date <= '%s') AND (to_date IS NULL OR to_date >= '%s')";
59 59 $time = $this->wordpress->currentTime('mysql');
60 60 $parameters = array_merge($parameters, [$time, $time]);
61 61 }
62 62