diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-27 15:39:03 +0300 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-30 11:28:57 +0300 |
commit | 388245c9a55ad34464f125166bb07c7639701559 (patch) | |
tree | d615a16020bc35d626660b14e18c2ac78c2de7b1 /lib/ContactsMenu | |
parent | cbcd13d3f9bef27b167624200ee2f4c13df8f3b6 (diff) |
Add dedicated direct route and fix old contacts route
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/ContactsMenu')
-rw-r--r-- | lib/ContactsMenu/Providers/DetailsProvider.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ContactsMenu/Providers/DetailsProvider.php b/lib/ContactsMenu/Providers/DetailsProvider.php index 1cc7fdc9..cb8ac217 100644 --- a/lib/ContactsMenu/Providers/DetailsProvider.php +++ b/lib/ContactsMenu/Providers/DetailsProvider.php @@ -117,10 +117,12 @@ class DetailsProvider implements IProvider { $addressBookUri = $this->getAddressBookUri($entry->getProperty('addressbook-key')); $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/info.svg')); - $url = $this->l10n->t('All contacts') . '/' . $uid . '~' . $addressBookUri; - $frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'); - $contactsUrl = $this->urlGenerator->getAbsoluteURL(($frontControllerActive ? '' : '/index.php') . '/apps/contacts/' . $url); + $contactsUrl = $this->urlGenerator->getAbsoluteURL( + $this->urlGenerator->linkToRoute('contacts.contacts.direct', [ + 'contact' => $uid . '~' . $addressBookUri + ]) + ); $action = $this->actionFactory->newLinkAction($iconUrl, $this->l10n->t('Details'), $contactsUrl); $action->setPriority(0); |