Add $freeSpace and $uploadLimit to files_sharing

This commit is contained in:
Pellaeon Lin 2014-01-17 17:10:42 +08:00
parent 6ec50e4b0c
commit 4726a2021b
2 changed files with 6 additions and 0 deletions

View File

@ -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']:'')

View File

@ -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']) ?>" />