diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 04:01:14 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 04:01:14 -0800 |
commit | bd50ed0dedbb2b7f94e26ad0f9e6cefef631f542 (patch) | |
tree | cc3352cce4cf5caf9656654a25fb6ad9cbb65cb0 | |
parent | 391f267d380f0d098d730d3bc74633192cc13570 (diff) | |
parent | 9d16353e094a3567eb09f9626d8768890fe57cbc (diff) | |
download | nextcloud-server-bd50ed0dedbb2b7f94e26ad0f9e6cefef631f542.tar.gz nextcloud-server-bd50ed0dedbb2b7f94e26ad0f9e6cefef631f542.zip |
Merge pull request #5980 from owncloud/public_view_fixes
Public view fixes
-rw-r--r-- | apps/files/templates/index.php | 5 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 6dd28532ccb..4f8623573cb 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -25,7 +25,7 @@ data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" /> <a href="#" class="svg"></a> </div> - <?php if ($_['trash'] ): ?> + <?php if ($_['trash']): ?> <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input> <?php endif; ?> <div id="uploadprogresswrapper"> @@ -111,8 +111,9 @@ <input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" /> <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" /> <input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" /> +<?php if (!$_['isPublic']) :?> <input type="hidden" name="encryptedFiles" id="encryptedFiles" value="<?php $_['encryptedFiles'] ? p('1') : p('0'); ?>" /> <input type="hidden" name="encryptedInitStatus" id="encryptionInitStatus" value="<?php p($_['encryptionInitStatus']) ?>" /> <input type="hidden" name="mailNotificationEnabled" id="mailNotificationEnabled" value="<?php p($_['mailNotificationEnabled']) ?>" /> <input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" /> - +<?php endif; diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index d59f9b7401a..3c902ea9a3a 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -221,6 +221,8 @@ if (isset($path)) { $breadcrumbNav->assign('breadcrumb', $breadcrumb); $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path='); $maxUploadFilesize=OCP\Util::maxUploadFilesize($path); + $fileHeader = (!isset($files) or count($files) > 0); + $emptyContent = ($allowPublicUploadEnabled and !$fileHeader); $folder = new OCP\Template('files', 'index', ''); $folder->assign('fileList', $list->fetchPage()); $folder->assign('breadcrumb', $breadcrumbNav->fetchPage()); @@ -234,6 +236,11 @@ if (isset($path)) { $folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $folder->assign('usedSpacePercent', 0); + $folder->assign('fileHeader', $fileHeader); + $folder->assign('disableSharing', true); + $folder->assign('trash', false); + $folder->assign('emptyContent', $emptyContent); + $folder->assign('ajaxLoad', false); $tmpl->assign('folder', $folder->fetchPage()); $maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB')); $allowZip = OCP\Config::getSystemValue('allowZipDownload', true) |