PluginProbe
User Access Manager / trunk
User Access Manager vtrunk
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/AbstractUserGroup.php +11 -11 2.3.18trunk View file →
@@ -184,9 +184,9 @@
184 184 if ($generalObjectType === null) {
185 185 return false;
186 186 }
187 187
188 - $objectTypeQuery = " AND object_type = '%s' ";
188 + $objectTypeQuery = " AND `object_type` = '%s' ";
189 189 $values = [
190 190 $this->id,
191 191 $this->type,
192 192 $objectType
@@ -192,19 +192,19 @@
192 192 $objectType
193 193 ];
194 194
195 195 if ($ignoreGeneralType === false) {
196 - $objectTypeQuery = " AND (object_type = '%s' OR general_object_type = '%s') ";
196 + $objectTypeQuery = " AND (`object_type` = '%s' OR `general_object_type` = '%s') ";
197 197 $values[] = $generalObjectType;
198 198 }
199 199
200 - $query = "DELETE FROM {$this->database->getUserGroupToObjectTable()}
201 - WHERE group_id = %d
202 - AND group_type = '%s'
200 + $query = "DELETE FROM `{$this->database->getUserGroupToObjectTable()}`
201 + WHERE `group_id` = %d
202 + AND `group_type` = '%s'
203 203 $objectTypeQuery";
204 204
205 205 if ($objectId !== null) {
206 - $query .= ' AND object_id = %d';
206 + $query .= ' AND `object_id` = %d';
207 207 $values[] = $objectId;
208 208 }
209 209
210 210 $success = $this->database->query($this->database->prepare($query, $values)) !== false;
@@ -265,13 +265,13 @@
265 265 */
266 266 private function loadDefaultGroupForObjectTypes(): array
267 267 {
268 268 $query = $this->database->prepare(
269 - "SELECT object_type AS objectType, from_date AS fromDate, to_date AS toDate
270 - FROM {$this->database->getUserGroupToObjectTable()}
271 - WHERE group_id = '%s'
272 - AND group_type = '%s'
273 - AND object_id = ''",
269 + "SELECT `object_type` AS `objectType`, `from_date` AS `fromDate`, `to_date` AS `toDate`
270 + FROM `{$this->database->getUserGroupToObjectTable()}`
271 + WHERE `group_id` = '%s'
272 + AND `group_type` = '%s'
273 + AND `object_id` = ''",
274 274 [
275 275 $this->id,
276 276 $this->type
277 277 ]