Línea 238... |
Línea 238... |
238 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($record['user_id'], $currentUser->id);
|
238 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($record['user_id'], $currentUser->id);
|
Línea 239... |
Línea 239... |
239 |
|
239 |
|
240 |
array_push($members, [
|
240 |
array_push($members, [
|
241 |
'name' => trim($record['first_name'] . ' ' . $record['last_name']),
|
241 |
'name' => trim($record['first_name'] . ' ' . $record['last_name']),
|
242 |
'image' => $storage->getUserImageForCodeAndFilename($record['user_uuid'], $record['image']),
|
242 |
'image' => $storage->getUserImageForCodeAndFilename($record['user_uuid'], $record['image']),
|
Línea 243... |
Línea 243... |
243 |
'link_profile' => $userBlocked ? '' : $this->url()->fromRoute('profile/view', ['id' => $record['user_profile_uuid']])
|
243 |
'link_profile' => $userBlocked ? '' : $this->url()->fromRoute('profile/view', ['id' => $record['user_profile_uuid'], ['force_canonical' => true]])
|
244 |
|
244 |
|
Línea 245... |
Línea 245... |
245 |
]);
|
245 |
]);
|
Línea 263... |
Línea 263... |
263 |
'image' => $storage->getGroupImage($group),
|
263 |
'image' => $storage->getGroupImage($group),
|
264 |
'cover' => $storage->getGroupCover($group),
|
264 |
'cover' => $storage->getGroupCover($group),
|
265 |
'overview' => $group->description,
|
265 |
'overview' => $group->description,
|
266 |
'website' => $group->website,
|
266 |
'website' => $group->website,
|
267 |
'members' => $members,
|
267 |
'members' => $members,
|
268 |
'link_inmail' => $ownerGroup->id != $currentUser->id ? $this->url()->fromRoute('inmail', ['id' => $ownerGroup->uuid]) : '',
|
268 |
'link_inmail' => $ownerGroup->id != $currentUser->id ? $this->url()->fromRoute('inmail', ['id' => $ownerGroup->uuid], ['force_canonical' => true]) : '',
|
269 |
'link_request' => '',
|
269 |
'link_request' => '',
|
270 |
'link_accept' => '',
|
270 |
'link_accept' => '',
|
271 |
'link_cancel' => '',
|
271 |
'link_cancel' => '',
|
272 |
'link_leave' => '',
|
272 |
'link_leave' => '',
|
273 |
'link_timeline' => '',
|
273 |
'link_timeline' => '',
|
Línea 275... |
Línea 275... |
275 |
|
275 |
|
276 |
|
276 |
|
277 |
|
277 |
|
278 |
if ($groupMember) {
|
278 |
if ($groupMember) {
|
279 |
if ($ownerGroup->id != $groupMember->user_id && $groupMember->status == GroupMember::STATUS_ACCEPTED || $groupMember->status == GroupMember::STATUS_AUTO_JOIN) {
|
279 |
if ($ownerGroup->id != $groupMember->user_id && $groupMember->status == GroupMember::STATUS_ACCEPTED || $groupMember->status == GroupMember::STATUS_AUTO_JOIN) {
|
280 |
$data['link_leave'] = $this->url()->fromRoute('group/leave', ['id' => $group->uuid]);
|
280 |
$data['link_leave'] = $this->url()->fromRoute('group/leave', ['id' => $group->uuid], ['force_canonical' => true]);
|
281 |
$data['link_timeline'] = $this->url()->fromRoute('feed/timeline', ['id' => $group->uuid, 'type' => 'group']);
|
281 |
$data['link_timeline'] = $this->url()->fromRoute('feed/timeline', ['id' => $group->uuid, 'type' => 'group'], ['force_canonical' => true]);
|
282 |
}
|
282 |
}
|
283 |
if ($groupMember->status == GroupMember::STATUS_ADDED_BY_ADMIN) {
|
283 |
if ($groupMember->status == GroupMember::STATUS_ADDED_BY_ADMIN) {
|
284 |
$data['link_accept'] = $this->url()->fromRoute('group/accept', ['id' => $group->uuid]);
|
284 |
$data['link_accept'] = $this->url()->fromRoute('group/accept', ['id' => $group->uuid], ['force_canonical' => true]);
|
285 |
$data['link_cancel'] = $this->url()->fromRoute('group/cancel', ['id' => $group->uuid]);
|
285 |
$data['link_cancel'] = $this->url()->fromRoute('group/cancel', ['id' => $group->uuid], ['force_canonical' => true]);
|
286 |
}
|
286 |
}
|
287 |
if ($groupMember->status == GroupMember::STATUS_JOINING_REQUESTED) {
|
287 |
if ($groupMember->status == GroupMember::STATUS_JOINING_REQUESTED) {
|
Línea 288... |
Línea 288... |
288 |
$data['link_cancel'] = $this->url()->fromRoute('group/cancel', ['id' => $group->uuid]);
|
288 |
$data['link_cancel'] = $this->url()->fromRoute('group/cancel', ['id' => $group->uuid], ['force_canonical' => true]);
|
289 |
}
|
289 |
}
|
Línea 290... |
Línea 290... |
290 |
if (in_array($group->accessibility, [Group::ACCESSIBILITY_AUTO_JOIN, Group::ACCESSIBILITY_REQUEST_TO_JOIN]) && $groupMember->status == GroupMember::STATUS_CANCELLED) {
|
290 |
if (in_array($group->accessibility, [Group::ACCESSIBILITY_AUTO_JOIN, Group::ACCESSIBILITY_REQUEST_TO_JOIN]) && $groupMember->status == GroupMember::STATUS_CANCELLED) {
|
291 |
|
291 |
|
292 |
$userBlockedMapper = UserBlockedMapper::getInstance($this->adapter);
|
292 |
$userBlockedMapper = UserBlockedMapper::getInstance($this->adapter);
|
293 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($group->id, $currentUser->id);
|
293 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($group->id, $currentUser->id);
|
294 |
|
294 |
|
Línea 295... |
Línea 295... |
295 |
if (!$userBlocked) {
|
295 |
if (!$userBlocked) {
|
Línea 296... |
Línea 296... |
296 |
$data['link_request'] = $this->url()->fromRoute('group/request', ['id' => $group->uuid]);;
|
296 |
$data['link_request'] = $this->url()->fromRoute('group/request', ['id' => $group->uuid], ['force_canonical' => true]);
|
297 |
}
|
297 |
}
|
Línea 298... |
Línea 298... |
298 |
}
|
298 |
}
|
299 |
} else {
|
299 |
} else {
|
300 |
|
300 |
|
301 |
if (in_array($group->accessibility, [Group::ACCESSIBILITY_AUTO_JOIN, Group::ACCESSIBILITY_REQUEST_TO_JOIN])) {
|
301 |
if (in_array($group->accessibility, [Group::ACCESSIBILITY_AUTO_JOIN, Group::ACCESSIBILITY_REQUEST_TO_JOIN])) {
|
302 |
|
302 |
|
Línea 784... |
Línea 784... |
784 |
$notification->type = Notification::TYPE_RECEIVE_REQUEST_JOIN_MY_GROUP;
|
784 |
$notification->type = Notification::TYPE_RECEIVE_REQUEST_JOIN_MY_GROUP;
|
785 |
$notification->read = Notification::NO;
|
785 |
$notification->read = Notification::NO;
|
786 |
$notification->user_id = $userOwnerGroup->id;
|
786 |
$notification->user_id = $userOwnerGroup->id;
|
787 |
$notification->group_id = $group->id;
|
787 |
$notification->group_id = $group->id;
|
788 |
$notification->message = 'LABEL_NOTIFICATION_RECEIVE_REQUEST_JOIN_MY_GROUP';
|
788 |
$notification->message = 'LABEL_NOTIFICATION_RECEIVE_REQUEST_JOIN_MY_GROUP';
|
789 |
$notification->url = $this->url()->fromRoute('group/view', ['id' => $group->uuid]);
|
789 |
$notification->url = $this->url()->fromRoute('group/view', ['id' => $group->uuid], ['force_canonical' => true]);
|
Línea 790... |
Línea 790... |
790 |
|
790 |
|
791 |
$notificationMapper = NotificationMapper::getInstance($this->adapter);
|
791 |
$notificationMapper = NotificationMapper::getInstance($this->adapter);
|
Línea 916... |
Línea 916... |
916 |
|
916 |
|
917 |
$item = [
|
917 |
$item = [
|
918 |
'name' => $record['name'],
|
918 |
'name' => $record['name'],
|
919 |
'privacy' => $values[$record['privacy']],
|
919 |
'privacy' => $values[$record['privacy']],
|
920 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
920 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
921 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
921 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']], ['force_canonical' => true]),
|
922 |
'link_leave' => $this->url()->fromRoute('group/leave', ['id' => $record['uuid']]),
|
922 |
'link_leave' => $this->url()->fromRoute('group/leave', ['id' => $record['uuid']], ['force_canonical' => true]),
|
Línea 923... |
Línea 923... |
923 |
];
|
923 |
];
|
924 |
|
924 |
|
Línea 977... |
Línea 977... |
977 |
$items = [];
|
977 |
$items = [];
|
978 |
foreach ($records as $record) {
|
978 |
foreach ($records as $record) {
|
979 |
$item = [
|
979 |
$item = [
|
980 |
'name' => $record['name'],
|
980 |
'name' => $record['name'],
|
981 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
981 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
982 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
982 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']], ['force_canonical' => true]),
|
983 |
'link_accept' => $this->url()->fromRoute('group/accept', ['id' => $record['uuid']]),
|
983 |
'link_accept' => $this->url()->fromRoute('group/accept', ['id' => $record['uuid']], ['force_canonical' => true]),
|
984 |
'link_reject' => $this->url()->fromRoute('group/reject', ['id' => $record['uuid']]),
|
984 |
'link_reject' => $this->url()->fromRoute('group/reject', ['id' => $record['uuid']], ['force_canonical' => true]),
|
985 |
];
|
985 |
];
|
Línea 986... |
Línea 986... |
986 |
|
986 |
|
987 |
|
987 |
|
Línea 1041... |
Línea 1041... |
1041 |
$items = [];
|
1041 |
$items = [];
|
1042 |
foreach ($records as $record) {
|
1042 |
foreach ($records as $record) {
|
1043 |
$item = [
|
1043 |
$item = [
|
1044 |
'name' => $record['name'],
|
1044 |
'name' => $record['name'],
|
1045 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
1045 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
1046 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
1046 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']], ['force_canonical' => true]),
|
1047 |
'link_cancel' => $this->url()->fromRoute('group/cancel', ['id' => $record['uuid']]),
|
1047 |
'link_cancel' => $this->url()->fromRoute('group/cancel', ['id' => $record['uuid']], ['force_canonical' => true]),
|
1048 |
];
|
1048 |
];
|
Línea 1049... |
Línea 1049... |
1049 |
|
1049 |
|
1050 |
|
1050 |
|