@@ 10065-10069 (lines=5) @@ | ||
10062 | public function verify_document_size($s) |
|
10063 | { |
|
10064 | $post_max = ini_get('post_max_size'); |
|
10065 | if (substr($post_max, -1, 1) == 'M') { |
|
10066 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024; |
|
10067 | } elseif (substr($post_max, -1, 1) == 'G') { |
|
10068 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
|
10069 | } |
|
10070 | $upl_max = ini_get('upload_max_filesize'); |
|
10071 | if (substr($upl_max, -1, 1) == 'M') { |
|
10072 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
|
@@ 10071-10075 (lines=5) @@ | ||
10068 | $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
|
10069 | } |
|
10070 | $upl_max = ini_get('upload_max_filesize'); |
|
10071 | if (substr($upl_max, -1, 1) == 'M') { |
|
10072 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
|
10073 | } elseif (substr($upl_max, -1, 1) == 'G') { |
|
10074 | $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024; |
|
10075 | } |
|
10076 | $documents_total_space = DocumentManager::documents_total_space(); |
|
10077 | $course_max_space = DocumentManager::get_course_quota(); |
|
10078 | $total_size = filesize($s) + $documents_total_space; |