diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 4450dfa9af..3b0d8461e1 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -9814,7 +9814,17 @@ EOD; public function verify_document_size($s) { $post_max = ini_get('post_max_size'); + if (substr($post_max, -1, 1) == 'M') { + $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024; + } elseif (substr($post_max, -1, 1) == 'G') { + $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; + } $upl_max = ini_get('upload_max_filesize'); + if (substr($upl_max, -1, 1) == 'M') { + $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; + } elseif (substr($upl_max, -1, 1) == 'G') { + $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024; + } $documents_total_space = DocumentManager::documents_total_space(); $course_max_space = DocumentManager::get_course_quota(); $total_size = filesize($s) + $documents_total_space;