Skip to content

Commit

Permalink
Merge pull request #1783 from nextcloud/backport/stable26/artonge/fix…
Browse files Browse the repository at this point in the history
…/use_display_name

[stable26]  Use display name instead of id for shared albums
  • Loading branch information
artonge authored May 15, 2023
2 parents bc7a460 + 2282b19 commit 311132e
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_AlbumContent_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_AlbumContent_vue.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Album/AlbumMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public function getSharedAlbumsForCollaboratorWithFiles(string $collaboratorId,
// Suffix album name with the album owner to prevent duplicates.
// Not done for public link as it would like owner's uid.
if ($collaboratorType !== self::TYPE_LINK) {
$albumName = $row['album_name'].' ('.$row['album_user'].')';
$albumName = $row['album_name'].' ('.$this->userManager->get($row['album_user'])->getDisplayName().')';
}
$albumsById[$albumId] = new AlbumInfo($albumId, $row['album_user'], $albumName, $row['location'], (int)$row['created'], (int)$row['last_added_photo']);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Albums/CollaboratorsSelectionForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<li v-for="collaboratorKey of searchResults" :key="collaboratorKey">
<NcListItemIcon :id="availableCollaborators[collaboratorKey].id"
class="manage-collaborators__form__list__result"
:title="availableCollaborators[collaboratorKey].id"
:title="availableCollaborators[collaboratorKey].label"
:search="searchText"
:user="availableCollaborators[collaboratorKey].id"
:display-name="availableCollaborators[collaboratorKey].label"
Expand All @@ -75,7 +75,7 @@
class="manage-collaborators__selection__item">
<NcListItemIcon :id="availableCollaborators[collaboratorKey].id"
:display-name="availableCollaborators[collaboratorKey].label"
:title="availableCollaborators[collaboratorKey].id"
:title="availableCollaborators[collaboratorKey].label"
:user="availableCollaborators[collaboratorKey].id">
<NcButton type="tertiary"
:aria-label="t('photos', 'Remove {collaboratorLabel} from the collaborators list', {collaboratorLabel: availableCollaborators[collaboratorKey].label})"
Expand Down

0 comments on commit 311132e

Please sign in to comment.