Move template variable assignment to correct place
This commit is contained in:
parent
e2a28e5d1d
commit
8c56e21ced
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue