Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,20 @@ class='js-gs-share social-gnu'>

<div class="hidden" id="oca-files-sharing-add-to-your-website-expanded">
<p style="margin: 10px 0">
<a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>"
style="padding:10px;background-color:#041e42;color:#fff;border-radius:3px;padding-left:4px;">
<span style="padding:10px;background-color:#041e42;color:#fff;border-radius:3px;padding-left:4px;">
<img src="<?php p($_['owncloud_logo_path']); ?>"
style="width:50px;position:relative;top:8px;">
<?php p($l->t('Share with me via ownCloud')); ?>
</a>
<?php p($l->t('Share with me via ownCloud')); ?>: <?php p($_['cloudId']); ?>
</span>
</p>

<p>
<?php p($l->t('HTML Code:')); ?>
<xmp><a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>"
style="padding:10px;background-color:#041e42;color:#fff;border-radius:3px;padding-left:4px;">
<img src="<?php p($_['urlGenerator']->getAbsoluteURL($_['owncloud_logo_path'])); ?>"
<xmp><span style="padding:10px;background-color:#041e42;color:#fff;border-radius:3px;padding-left:4px;">
<img src="<?php p($_['urlGenerator']->getAbsoluteURL($_['owncloud_logo_path'])); ?>"
style="width:50px;position:relative;top:8px;">
<?php p($l->t('Share with me via ownCloud')); ?>

</a></xmp>
<?php p($l->t('Share with me via ownCloud')); ?>: <?php p($_['cloudId']); ?>
</span></xmp>
</p>
</div>
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function testGetPriority() {

public function testGetPanel() {
$mockUser = $this->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);
Expand Down
8 changes: 8 additions & 0 deletions changelog/unreleased/40501
Original file line number Diff line number Diff line change
@@ -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