summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-10 17:43:09 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-10 17:44:21 +0200
commit41640b4b91c7f8d407fb17e085f83d95ca900311 (patch)
treeb56c5946bb5e98f92ef9b5dc2b61e75ab7d24f88 /apps/files_sharing
parentfe5b4d2fbab18a9cf2bc690ce68ad3ba6ee7c787 (diff)
downloadnextcloud-server-41640b4b91c7f8d407fb17e085f83d95ca900311.tar.gz
nextcloud-server-41640b4b91c7f8d407fb17e085f83d95ca900311.zip
don't show the share action in the file view for publically shared files.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/share.js2
-rw-r--r--apps/files_sharing/public.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index bc94d78fb76..72663c068c9 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,6 +1,6 @@
$(document).ready(function() {
- if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined') {
+ if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !publicListView) {
OC.Share.loadIcons('file');
FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) {
// Return the correct sharing icon
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 34340102a9e..5119086ce0d 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -138,6 +138,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
}
$list = new OCP\Template('files', 'part.list', '');
$list->assign('files', $files, false);
+ $list->assign('publicListView', true);
$list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false);
$list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path=', false);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' );