Merge pull request #12647 from MrPetovan/bug/12607-image-user-theme

Enable profile user theme on single photo display
This commit is contained in:
Michael Vogel 2023-01-11 07:44:57 +01:00 committed by GitHub
commit f17d1f359f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ function photos_init(App $a)
Nav::setSelected('home'); Nav::setSelected('home');
if (DI::args()->getArgc() > 1) { if (DI::args()->getArgc() > 1) {
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); $owner = Profile::load(DI::app(), DI::args()->getArgv()[1], false);
if (!isset($owner['account_removed']) || $owner['account_removed']) { if (!isset($owner['account_removed']) || $owner['account_removed']) {
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
} }
@ -111,12 +111,6 @@ function photos_init(App $a)
]); ]);
} }
if (empty(DI::page()['aside'])) {
DI::page()['aside'] = '';
}
DI::page()['aside'] .= Widget\VCard::getHTML($owner);
if (!empty($photo_albums_widget)) { if (!empty($photo_albums_widget)) {
DI::page()['aside'] .= $photo_albums_widget; DI::page()['aside'] .= $photo_albums_widget;
} }