summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/public.php
diff options
context:
space:
mode:
authorPellaeon Lin <nfsmwlin@gmail.com>2014-02-06 12:06:16 +0800
committerPellaeon Lin <nfsmwlin@gmail.com>2014-02-06 12:06:16 +0800
commit8c56e21ced30f5e354b3a62c040a790a41548382 (patch)
tree941515bbdf82bcfd8830baa31349750aa21a5276 /apps/files_sharing/public.php
parente2a28e5d1d1e7956ab37884da7439ef56836655c (diff)
downloadnextcloud-server-8c56e21ced30f5e354b3a62c040a790a41548382.tar.gz
nextcloud-server-8c56e21ced30f5e354b3a62c040a790a41548382.zip
Move template variable assignment to correct place
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r--apps/files_sharing/public.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index b187da41324..fc716a514b4 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -143,8 +143,6 @@ 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));
@@ -164,8 +162,6 @@ if (isset($path)) {
}
$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 +222,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 +237,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);