|
@@ 10785-10789 (lines=5) @@
|
| 10782 |
|
public static function verify_document_size($s) |
| 10783 |
|
{ |
| 10784 |
|
$post_max = ini_get('post_max_size'); |
| 10785 |
|
if (substr($post_max, -1, 1) == 'M') { |
| 10786 |
|
$post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024; |
| 10787 |
|
} elseif (substr($post_max, -1, 1) == 'G') { |
| 10788 |
|
$post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
| 10789 |
|
} |
| 10790 |
|
$upl_max = ini_get('upload_max_filesize'); |
| 10791 |
|
if (substr($upl_max, -1, 1) == 'M') { |
| 10792 |
|
$upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
|
@@ 10791-10795 (lines=5) @@
|
| 10788 |
|
$post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024; |
| 10789 |
|
} |
| 10790 |
|
$upl_max = ini_get('upload_max_filesize'); |
| 10791 |
|
if (substr($upl_max, -1, 1) == 'M') { |
| 10792 |
|
$upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024; |
| 10793 |
|
} elseif (substr($upl_max, -1, 1) == 'G') { |
| 10794 |
|
$upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024; |
| 10795 |
|
} |
| 10796 |
|
$documents_total_space = DocumentManager::documents_total_space(); |
| 10797 |
|
$course_max_space = DocumentManager::get_course_quota(); |
| 10798 |
|
$total_size = filesize($s) + $documents_total_space; |