[Pkg-owncloud-commits] [owncloud] 12/74: Hiding add to your own cloud if server2server sharing is not enabled

David Prévot taffit at moszumanska.debian.org
Tue Dec 2 22:04:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 4fbd6023f0339b718ec13975cd996a5f57e6e6c7
Author: Clark Tomlinson <fallen013 at gmail.com>
Date:   Wed Sep 3 10:00:01 2014 -0400

    Hiding add to your own cloud if server2server sharing is not enabled
---
 apps/files_sharing/public.php           | 3 +++
 apps/files_sharing/templates/public.php | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 2b84cd3..8794e4a 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -1,5 +1,7 @@
 <?php
 // Load other apps for file previews
+use OCA\Files_Sharing\Helper;
+
 OC_App::loadApps();
 
 $appConfig = \OC::$server->getAppConfig();
@@ -132,6 +134,7 @@ if (isset($path)) {
 		$tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path));
 		$tmpl->assign('dirToken', $linkItem['token']);
 		$tmpl->assign('sharingToken', $token);
+		$tmpl->assign('server2serversharing', Helper::isOutgoingServer2serverShareEnabled());
 		$tmpl->assign('protected', isset($linkItem['share_with']) ? 'true' : 'false');
 
 		$urlLinkIdentifiers= (isset($token)?'&t='.$token:'')
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 21fb611..46bf90b 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -30,13 +30,18 @@ $previewSupported = OC\Preview::isMimeSupported($_['mimetype']) ? 'true' : 'fals
 		<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
 		<div class="header-right">
 			<span id="details">
-				<span id="save" data-protected="<?php p($_['protected'])?>" data-owner="<?php p($_['displayName'])?>" data-name="<?php p($_['filename'])?>">
+				<?php
+				if ($_['server2serversharing']) {
+					?>
+					<span id="save" data-protected="<?php p($_['protected']) ?>"
+						  data-owner="<?php p($_['displayName']) ?>" data-name="<?php p($_['filename']) ?>">
 					<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
 					<form class="save-form hidden" action="#">
 						<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
 						<button id="save-button-confirm" class="icon-confirm svg"></button>
 					</form>
 				</span>
+				<?php } ?>
 				<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
 					<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
 					<span id="download-text"><?php p($l->t('Download'))?></span>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list