@@ -20,7 +20,7 @@ public function handle(Event $event): void {
2020 }
2121
2222 // Get all shared albums for this group:
23- $ albums_group = $ this ->albumMapper ->getSharedAlbumsForCollaboratorWithFiles ($ event ->getGroup ()->getGID (), AlbumMapper::TYPE_GROUP );
23+ $ albums_group = $ this ->albumMapper ->getSharedAlbumsForCollaborator ($ event ->getGroup ()->getGID (), AlbumMapper::TYPE_GROUP );
2424
2525 // Get all users of this group:
2626 $ users = $ event ->getGroup ()->getUsers ();
@@ -29,20 +29,19 @@ public function handle(Event $event): void {
2929 $ uid = $ user ->getUID ();
3030
3131 // Get all albums shared with this specific user:
32- $ albums_user = $ this ->albumMapper ->getSharedAlbumsForCollaboratorWithFiles ($ user ->getUID (), AlbumMapper::TYPE_USER );
32+ $ albums_user = $ this ->albumMapper ->getSharedAlbumsForCollaborator ($ user ->getUID (), AlbumMapper::TYPE_USER );
3333
3434 // Get all group-shared albums that are not directly shared with the removed user in addition
35- $ albums = array_udiff ($ albums_group , $ albums_user , fn ($ a , $ b ) => ($ a ->getAlbum ()->getId () - $ b ->getAlbum ()->getId ()));
36-
35+ $ albums = array_udiff ($ albums_group , $ albums_user , fn ($ a , $ b ) => ($ a ->getId () - $ b ->getId ()));
3736
3837 // Remove their photos from theses albums:
3938 foreach ($ albums as $ album ) {
40- $ this ->albumMapper ->removeFilesForUser ($ album ->getAlbum ()-> getId (), $ user ->getUID ());
39+ $ this ->albumMapper ->removeFilesForUser ($ album ->getId (), $ user ->getUID ());
4140 }
4241 }
4342
4443 foreach ($ albums_group as $ album ) {
45- $ this ->albumMapper ->deleteGroupFromAlbumCollaboratorsList ($ event ->getGroup ()->getGID (), $ album ->getAlbum ()-> getId ());
44+ $ this ->albumMapper ->deleteGroupFromAlbumCollaboratorsList ($ event ->getGroup ()->getGID (), $ album ->getId ());
4645 }
4746 }
4847}
0 commit comments