diff options
Diffstat (limited to 'apps/files_sharing/lib/Controllers/ShareController.php')
-rw-r--r-- | apps/files_sharing/lib/Controllers/ShareController.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controllers/ShareController.php b/apps/files_sharing/lib/Controllers/ShareController.php index 96c0a0ca556..baf2fc9ed11 100644 --- a/apps/files_sharing/lib/Controllers/ShareController.php +++ b/apps/files_sharing/lib/Controllers/ShareController.php @@ -49,7 +49,6 @@ use OCP\ILogger; 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 @@ class ShareController extends Controller { $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 @@ class ShareController extends Controller { $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,8 @@ class ShareController extends Controller { $shareTmpl['folder'] = $folder->fetchPage(); } + $shareTmpl['hideFileList'] = $hideFileList; + $shareTmpl['shareOwner'] = $this->userManager->get($share->getShareOwner())->getDisplayName(); $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); |