Commit 8b6ee6b1 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols Committed by Evan Goldenberg
Browse files

Consider quota when determining the 'maxuploadsize' for My Files.

If a user has a quota which is lower than post_max_size or
upload_max_filesize, then this should be shown as the maximum upload size.

The actual checking of this is already handled by the upload function for
the pieform.
(cherry picked from commit af0facaa676e716a29163c79e112fda0e54817fb)

Signed-off-by: default avatarEvan Goldenberg <>
parent a0bcc414
......@@ -103,7 +103,7 @@ function pieform_element_filebrowser(Pieform $form, $element) {
if ($config['upload']) {
$maxuploadsize = display_size(min(get_real_size(ini_get('post_max_size')), get_real_size(ini_get('upload_max_filesize'))));
$maxuploadsize = display_size(min(get_real_size(ini_get('post_max_size')), get_real_size(ini_get('upload_max_filesize')),$USER->get('quota')-$USER->get('quotaused')));
$smarty->assign('maxuploadsize', $maxuploadsize);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment