Minor - Added comments

1.9.x
Yannick Warnier 12 years ago
parent cedaa03f66
commit fe1a9e5b32
  1. 19
      main/inc/lib/fileUpload.lib.php

@ -411,19 +411,20 @@ function handle_uploaded_document(
*
* @see - enough_size() uses dir_total_space() function
*/
function enough_size($file_size, $dir, $max_dir_space) {
//if dir is archive ignore
function enough_size($file_size, $dir, $max_dir_space)
{
// If the directory is the archive directory, safely ignore the size limit
if (api_get_path(SYS_ARCHIVE_PATH) == $dir) {
return true;
}
if ($max_dir_space) {
$already_filled_space = dir_total_space($dir);
if (($file_size + $already_filled_space) > $max_dir_space) {
return false;
}
}
return true;
if ($max_dir_space) {
$already_filled_space = dir_total_space($dir);
if (($file_size + $already_filled_space) > $max_dir_space) {
return false;
}
}
return true;
}

Loading…
Cancel
Save