add id to url

This commit is contained in:
Bjoern Schiessle 2015-06-18 13:00:50 +02:00
parent b43bfaf132
commit f9093466bf
2 changed files with 7 additions and 7 deletions

View File

@ -27,13 +27,13 @@ $l = \OC::$server->getL10N('files_sharing');
$uid = \OC::$server->getUserSession()->getUser()->getUID();
$server = \OC::$server->getURLGenerator()->getAbsoluteURL('/');
$cloudID = $uid . '@' . rtrim(\OCA\Files_Sharing\Helper::removeProtocolFromUrl($server), '/');
$url = 'https://owncloud.org/federation';
$url = 'https://owncloud.org/federation#' . $cloudID;
$ownCloudLogoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg');
$tmpl = new OCP\Template('files_sharing', 'settings-personal');
$tmpl->assign('outgoingServer2serverShareEnabled', \OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled());
$tmpl->assign('message_with_URL', $l->t('Share with me through my #ownCloud Federated Cloud ID %s see %s', [$cloudID, $url]));
$tmpl->assign('message_without_URL', $l->t('Share with me through my #ownCloud Federated Cloud ID %s', [$cloudID]));
$tmpl->assign('message_with_URL', $l->t('Share with me through my #ownCloud Federated Cloud ID, see %s', [$url]));
$tmpl->assign('message_without_URL', $l->t('Share with me through my #ownCloud Federated Cloud ID', [$cloudID]));
$tmpl->assign('owncloud_logo_path', $ownCloudLogoPath);
$tmpl->assign('reference', $url);
$tmpl->assign('cloudId', $cloudID);

View File

@ -21,14 +21,14 @@ style('files_sharing', '3rdparty/gs-share/style');
<p>
<?php p($l->t('Share it:')); ?>
<div class="gs-share">
<button data-url="<?php p($_['reference']); ?>"
<button data-url="<?php p(urlencode($_['reference'])); ?>"
data-title='<?php p(urlencode($_['message_without_URL'])); ?>'
class='js-gs-share social-gnu'>
GNU Social
</button>
</div>
<button class="social-diaspora pop-up"
data-url='http://sharetodiaspora.github.io/?title=<?php p($_['message_without_URL']); ?>&url=<?php p($_['reference']); ?>'>
data-url='http://sharetodiaspora.github.io/?title=<?php p($_['message_without_URL']); ?>&url=<?php p(urlencode($_['reference'])); ?>'>
Diaspora
</button>
<button class="social-twitter pop-up"
@ -36,11 +36,11 @@ style('files_sharing', '3rdparty/gs-share/style');
Twitter
</button>
<button class="social-facebook pop-up"
data-url='https://www.facebook.com/sharer/sharer.php?u=<?php p($_['reference']); ?>'>
data-url='https://www.facebook.com/sharer/sharer.php?u=<?php p(urlencode($_['reference'])); ?>'>
Facebook
</button>
<button class="social-googleplus pop-up"
data-url='https://plus.google.com/share?url=<?php p($_['reference']); ?>'/>
data-url='https://plus.google.com/share?url=<?php p(urlencode($_['reference'])); ?>'/>
Google+
</button>
</p>