summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2014-02-06 11:02:06 +0100
committerMorris Jobke <morris.jobke@gmail.com>2014-02-06 11:02:06 +0100
commit8f7b99d2e5b63ac0030a674ea261cea4deac1737 (patch)
treef6eaaf358436a7ad63908cd7d19bf8a3cb896710
parente2a28e5d1d1e7956ab37884da7439ef56836655c (diff)
parent946fccc0dd5b7e51203d51fd2c60161cad7050ba (diff)
downloadnextcloud-server-8f7b99d2e5b63ac0030a674ea261cea4deac1737.tar.gz
nextcloud-server-8f7b99d2e5b63ac0030a674ea261cea4deac1737.zip
Merge pull request #7105 from NCTU-NBA/pr-7098
Fix #7098
-rw-r--r--apps/files_sharing/public.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index b187da41324..f03ac7205a3 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -143,18 +143,13 @@ if (isset($path)) {
OCP\Util::addScript('files', 'jquery.iframe-transport');
OCP\Util::addScript('files', 'jquery.fileupload');
$maxUploadFilesize=OCP\Util::maxUploadFilesize($path);
- $freeSpace=OCP\Util::freeSpace($dir);
- $uploadLimit=OCP\Util::uploadLimit();
$tmpl = new OCP\Template('files_sharing', 'public', 'base');
- $tmpl->assign('uidOwner', $shareOwner);
$tmpl->assign('displayName', \OCP\User::getDisplayName($shareOwner));
$tmpl->assign('filename', $file);
$tmpl->assign('directory_path', $linkItem['file_target']);
$tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path));
- $tmpl->assign('fileTarget', basename($linkItem['file_target']));
$tmpl->assign('dirToken', $linkItem['token']);
$tmpl->assign('sharingToken', $token);
- $tmpl->assign('disableSharing', true);
$allowPublicUploadEnabled = (bool) ($linkItem['permissions'] & OCP\PERMISSION_CREATE);
if (OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
$allowPublicUploadEnabled = false;
@@ -162,10 +157,6 @@ if (isset($path)) {
if ($linkItem['item_type'] !== 'folder') {
$allowPublicUploadEnabled = false;
}
- $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
- $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
- $tmpl->assign('freeSpace', $freeSpace);
- $tmpl->assign('uploadLimit', $uploadLimit); // PHP upload limit
$urlLinkIdentifiers= (isset($token)?'&t='.$token:'')
.(isset($_GET['dir'])?'&dir='.$_GET['dir']:'')
@@ -226,6 +217,9 @@ if (isset($path)) {
$maxUploadFilesize=OCP\Util::maxUploadFilesize($path);
$fileHeader = (!isset($files) or count($files) > 0);
$emptyContent = ($allowPublicUploadEnabled and !$fileHeader);
+
+ $freeSpace=OCP\Util::freeSpace($path);
+ $uploadLimit=OCP\Util::uploadLimit();
$folder = new OCP\Template('files', 'index', '');
$folder->assign('fileList', $list->fetchPage());
$folder->assign('breadcrumb', $breadcrumbNav->fetchPage());
@@ -238,6 +232,8 @@ if (isset($path)) {
$folder->assign('files', $files);
$folder->assign('uploadMaxFilesize', $maxUploadFilesize);
$folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
+ $folder->assign('freeSpace', $freeSpace);
+ $folder->assign('uploadLimit', $uploadLimit); // PHP upload limit
$folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$folder->assign('usedSpacePercent', 0);
$folder->assign('fileHeader', $fileHeader);