From b15fdfd40e4bf96b53f7afcf0e4dce359158cf1c Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Wed, 13 Nov 2024 09:42:26 +0100 Subject: chore(profile): move profile app from core to apps Signed-off-by: skjnldsv --- lib/private/AppFramework/Routing/RouteConfig.php | 1 + lib/private/AppFramework/Routing/RouteParser.php | 1 + lib/private/Contacts/ContactsMenu/ContactsStore.php | 2 +- lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php | 2 +- lib/private/NavigationManager.php | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/private') diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php index bdeae93c7c8..2b7f21a8ba5 100644 --- a/lib/private/AppFramework/Routing/RouteConfig.php +++ b/lib/private/AppFramework/Routing/RouteConfig.php @@ -36,6 +36,7 @@ class RouteConfig { 'core', 'files_sharing', 'files', + 'profile', 'settings', 'spreed', ]; diff --git a/lib/private/AppFramework/Routing/RouteParser.php b/lib/private/AppFramework/Routing/RouteParser.php index 49a50852bf3..894a74c727b 100644 --- a/lib/private/AppFramework/Routing/RouteParser.php +++ b/lib/private/AppFramework/Routing/RouteParser.php @@ -20,6 +20,7 @@ class RouteParser { 'core', 'files_sharing', 'files', + 'profile', 'settings', 'spreed', ]; diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index a502a58366d..5fa25512c97 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -366,7 +366,7 @@ class ContactsStore implements IContactsStore { if (!empty($targetUser)) { if ($this->profileManager->isProfileEnabled($targetUser)) { $entry->setProfileTitle($this->l10nFactory->get('lib')->t('View profile')); - $entry->setProfileUrl($this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId])); + $entry->setProfileUrl($this->urlGenerator->linkToRouteAbsolute('profile.ProfilePage.index', ['targetUserId' => $targetUserId])); } } } diff --git a/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php index d099e2c620d..d00573aaa96 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php @@ -32,7 +32,7 @@ class ProfileProvider implements IProvider { if ($this->profileManager->isProfileEnabled($targetUser)) { $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/profile.svg')); $profileActionText = $this->l10nFactory->get('lib')->t('View profile'); - $profileUrl = $this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]); + $profileUrl = $this->urlGenerator->linkToRouteAbsolute('profile.ProfilePage.index', ['targetUserId' => $targetUserId]); $action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl, 'profile'); // Set highest priority (by descending order), other actions have the default priority 10 as defined in lib/private/Contacts/ContactsMenu/Actions/LinkAction.php $action->setPriority(20); diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 12bef7daaf9..f341c6d3094 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -233,7 +233,7 @@ class NavigationManager implements INavigationManager { 'id' => 'profile', 'order' => 1, 'href' => $this->urlGenerator->linkToRoute( - 'core.ProfilePage.index', + 'profile.ProfilePage.index', ['targetUserId' => $this->userSession->getUser()->getUID()], ), 'name' => $l->t('View profile'), -- cgit v1.2.3