From c9646ddc4c23faebcd729b6d7061dbadaf475a10 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 21 Nov 2013 12:02:09 +0100 Subject: [PATCH] fix undefined index errors if public share view --- apps/files/templates/index.php | 5 +++-- apps/files_sharing/public.php | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 6dd28532cc..bf57790684 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -25,7 +25,7 @@ data-url="" /> - + >
@@ -111,8 +111,9 @@ + - +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,10 @@ 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('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)