diff options
author | Pellaeon Lin <nfsmwlin@gmail.com> | 2014-02-06 08:06:16 +0400 |
---|---|---|
committer | Pellaeon Lin <nfsmwlin@gmail.com> | 2014-02-06 08:06:16 +0400 |
commit | 8c56e21ced30f5e354b3a62c040a790a41548382 (patch) | |
tree | 941515bbdf82bcfd8830baa31349750aa21a5276 /apps/files_sharing/public.php | |
parent | e2a28e5d1d1e7956ab37884da7439ef56836655c (diff) |
Move template variable assignment to correct place
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r-- | apps/files_sharing/public.php | 9 |
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); |