diff --git a/apps/federatedfilesharing/lib/Panels/GeneralPersonalPanel.php b/apps/federatedfilesharing/lib/Panels/GeneralPersonalPanel.php index 8a48dc24781e..68c35cf5b1d0 100644 --- a/apps/federatedfilesharing/lib/Panels/GeneralPersonalPanel.php +++ b/apps/federatedfilesharing/lib/Panels/GeneralPersonalPanel.php @@ -69,14 +69,13 @@ public function getPanel() { $isIE8 = true; } $cloudID = $this->userSession->getUser()->getCloudId(); - $url = 'https://owncloud.com/federation#' . $cloudID; $ownCloudLogoPath = $this->urlGenerator->imagePath('core', 'logo-icon.svg'); $tmpl = new Template('federatedfilesharing', 'settings-personal-general'); $tmpl->assign('outgoingServer2serverShareEnabled', $this->shareProvider->isOutgoingServer2serverShareEnabled()); - $tmpl->assign('message_with_URL', $this->l->t('Share with me through my #ownCloud Federated Cloud ID, see %s', [$url])); + $tmpl->assign('message_with_URL', $this->l->t('Share with me through my #ownCloud Federated Cloud ID, see %s', [$cloudID])); $tmpl->assign('message_without_URL', $this->l->t('Share with me through my #ownCloud Federated Cloud ID', [$cloudID])); $tmpl->assign('owncloud_logo_path', $ownCloudLogoPath); - $tmpl->assign('reference', $url); + $tmpl->assign('reference', $cloudID); $tmpl->assign('cloudId', $cloudID); $tmpl->assign('showShareIT', !$isIE8); $tmpl->assign('urlGenerator', $this->urlGenerator); diff --git a/apps/federatedfilesharing/templates/settings-personal-general.php b/apps/federatedfilesharing/templates/settings-personal-general.php index 934d0bd85624..e308276d9f8d 100644 --- a/apps/federatedfilesharing/templates/settings-personal-general.php +++ b/apps/federatedfilesharing/templates/settings-personal-general.php @@ -50,23 +50,20 @@ class='js-gs-share social-gnu'> getMockBuilder(IUser::class)->getMock(); + $mockUser->method('getCloudId')->willReturn('user@cloud.example.com'); $agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12'; $this->request->expects($this->once())->method('getHeader')->with('User-Agent')->willReturn($agent); $this->userSession->expects($this->once())->method('getUser')->willReturn($mockUser); diff --git a/changelog/unreleased/40501 b/changelog/unreleased/40501 new file mode 100644 index 000000000000..1ae23fdfbf4d --- /dev/null +++ b/changelog/unreleased/40501 @@ -0,0 +1,8 @@ +Bugfix: Remove owncloud.com/federation link from federated cloud settings + +The "Add to your website" feature in the personal federation settings was generating +a link to https://owncloud.com/federation# which no longer works after owncloud.com +was restructured. The federation Cloud ID is now displayed directly without linking +to the defunct external page. + +https://github.com/owncloud/core/pull/41608