diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index dda7a1814a07a..56eae4b210da9 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -37,8 +37,7 @@

t('No entries found in this folder')); ?>

- - +
-
+
getNode()->unlock(ILockingProvider::LOCK_SHARED); return new \OC_OCS_Result(null, 400, $this->l->t('Can\'t change permissions for public share links')); diff --git a/apps/files_sharing/lib/Controllers/ShareController.php b/apps/files_sharing/lib/Controllers/ShareController.php index 96c0a0ca55695..8c779599743d3 100644 --- a/apps/files_sharing/lib/Controllers/ShareController.php +++ b/apps/files_sharing/lib/Controllers/ShareController.php @@ -49,7 +49,6 @@ use OCP\IUserManager; use OCP\ISession; use OCP\IPreview; -use OCA\Files_Sharing\Helper; use OCP\Util; use OCA\Files_Sharing\Activity; use \OCP\Files\NotFoundException; @@ -314,6 +313,7 @@ public function showShare($token, $path = '') { $shareTmpl['fileSize'] = \OCP\Util::humanFileSize($share->getNode()->getSize()); // Show file list + $hideFileList = false; if ($share->getNode() instanceof \OCP\Files\Folder) { $shareTmpl['dir'] = $rootFolder->getRelativePath($path->getPath()); @@ -329,12 +329,14 @@ public function showShare($token, $path = '') { $uploadLimit = Util::uploadLimit(); $maxUploadFilesize = min($freeSpace, $uploadLimit); + $hideFileList = $share->getPermissions() & \OCP\Constants::PERMISSION_READ ? false : true; $folder = new Template('files', 'list', ''); $folder->assign('dir', $rootFolder->getRelativePath($path->getPath())); $folder->assign('dirToken', $token); $folder->assign('permissions', \OCP\Constants::PERMISSION_READ); $folder->assign('isPublic', true); + $folder->assign('hideFileList', $hideFileList); $folder->assign('publicUploadEnabled', 'no'); $folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); @@ -345,6 +347,7 @@ public function showShare($token, $path = '') { $shareTmpl['folder'] = $folder->fetchPage(); } + $shareTmpl['hideFileList'] = $hideFileList; $shareTmpl['downloadURL'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.downloadShare', array('token' => $token)); $shareTmpl['maxSizeAnimateGif'] = $this->config->getSystemValue('max_filesize_animated_gifs_public_sharing', 10); $shareTmpl['previewEnabled'] = $this->config->getSystemValue('enable_previews', true); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index e39d1b0807654..fe28be7751728 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -66,26 +66,28 @@
- - - - + if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { + if ($_['server2serversharing']) { + ?> + + + + + + + "/> + t('Download'))?> + - - "/> - t('Download'))?> -
-
-
-
+
+
> +
@@ -112,7 +114,20 @@
+ +
+
+ +
+ +
+ + +
+
+