@@ 217-227 (lines=11) @@ | ||
214 | $query->andWhere($query->expr()->eq('user', $query->createNamedParameter($user))); |
|
215 | } elseif ($filter === 'by') { |
|
216 | $query->andWhere($query->expr()->neq('user', $query->createNamedParameter($user))); |
|
217 | } elseif ($filter === 'all' && !$userSettings->getUserSetting($user, 'setting', 'self')) { |
|
218 | $query->andWhere($query->expr()->orX( |
|
219 | $query->expr()->neq('user', $query->createNamedParameter($user)), |
|
220 | $query->expr()->notIn('type', $query->createNamedParameter([ |
|
221 | 'file_created', |
|
222 | 'file_changed', |
|
223 | 'file_deleted', |
|
224 | 'file_restored', |
|
225 | ], IQueryBuilder::PARAM_STR_ARRAY)) |
|
226 | )); |
|
227 | } elseif ($filter === 'filter') { |
|
228 | if (!$userSettings->getUserSetting($user, 'setting', 'self')) { |
|
229 | $query->andWhere($query->expr()->orX( |
|
230 | $query->expr()->neq('user', $query->createNamedParameter($user)), |
|
@@ 228-238 (lines=11) @@ | ||
225 | ], IQueryBuilder::PARAM_STR_ARRAY)) |
|
226 | )); |
|
227 | } elseif ($filter === 'filter') { |
|
228 | if (!$userSettings->getUserSetting($user, 'setting', 'self')) { |
|
229 | $query->andWhere($query->expr()->orX( |
|
230 | $query->expr()->neq('user', $query->createNamedParameter($user)), |
|
231 | $query->expr()->notIn('type', $query->createNamedParameter([ |
|
232 | 'file_created', |
|
233 | 'file_changed', |
|
234 | 'file_deleted', |
|
235 | 'file_restored', |
|
236 | ], IQueryBuilder::PARAM_STR_ARRAY)) |
|
237 | )); |
|
238 | } |
|
239 | ||
240 | $query->andWhere($query->expr()->eq('object_type', $query->createNamedParameter($objectType))); |
|
241 | $query->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId))); |