@@ 9979-9983 (lines=5) @@ | ||
9976 | public function verify_document_size($s) |
|
9977 | { |
|
9978 | $post_max = ini_get('post_max_size'); |
|
9979 | if (substr($post_max, -1, 1) == 'M') { |
|
9980 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024; |
|
9981 | } elseif (substr($post_max, -1, 1) == 'G') { |
|
9982 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
|
9983 | } |
|
9984 | $upl_max = ini_get('upload_max_filesize'); |
|
9985 | if (substr($upl_max, -1, 1) == 'M') { |
|
9986 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
|
@@ 9985-9989 (lines=5) @@ | ||
9982 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
|
9983 | } |
|
9984 | $upl_max = ini_get('upload_max_filesize'); |
|
9985 | if (substr($upl_max, -1, 1) == 'M') { |
|
9986 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
|
9987 | } elseif (substr($upl_max, -1, 1) == 'G') { |
|
9988 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024; |
|
9989 | } |
|
9990 | $documents_total_space = DocumentManager::documents_total_space(); |
|
9991 | $course_max_space = DocumentManager::get_course_quota(); |
|
9992 | $total_size = filesize($s) + $documents_total_space; |