diff options
author | Pellaeon Lin <nfsmwlin@gmail.com> | 2014-01-17 17:10:42 +0800 |
---|---|---|
committer | Pellaeon Lin <nfsmwlin@gmail.com> | 2014-01-17 17:10:42 +0800 |
commit | 4726a2021b70f2ee70b4cb8817fd89a8532b848b (patch) | |
tree | f0fdf04bc887a5119d2a5515f830ffefdc4f3dc1 /apps/files_sharing | |
parent | 6ec50e4b0c435789732186eb3c6839883061e5a8 (diff) | |
download | nextcloud-server-4726a2021b70f2ee70b4cb8817fd89a8532b848b.tar.gz nextcloud-server-4726a2021b70f2ee70b4cb8817fd89a8532b848b.zip |
Add $freeSpace and $uploadLimit to files_sharing
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/public.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index f4042f65248..540f2b004c6 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -141,6 +141,8 @@ 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)); @@ -161,6 +163,8 @@ if (isset($path)) { $tmpl->assign('allowPublicUploadEnabled', $allowPublicUploadEnabled); $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']:'') diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 1d527dca8eb..124b4a1ae9f 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -34,6 +34,8 @@ <input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> <input type="hidden" id="dirToken" name="dirToken" value="<?php p($_['dirToken']) ?>" /> + <input type="hidden" id="upload_limit" value="<?php p($_['uploadLimit']) ?>"> + <input type="hidden" id="free_space" value="<?php p($_['freeSpace']) ?>"> <input type="hidden" id="uploadMaxFilesize" name="uploadMaxFilesize" value="<?php p($_['uploadMaxFilesize']) ?>" /> <input type="hidden" id="uploadMaxHumanFilesize" name="uploadMaxHumanFilesize" value="<?php p($_['uploadMaxHumanFilesize']) ?>" /> <input type="hidden" id="directory_path" name="directory_path" value="<?php p($_['directory_path']) ?>" /> |