Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 9987-9991 (lines=5) @@
9984
    public function verify_document_size($s)
9985
    {
9986
        $post_max = ini_get('post_max_size');
9987
        if (substr($post_max, -1, 1) == 'M') {
9988
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
9989
        } elseif (substr($post_max, -1, 1) == 'G') {
9990
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
9991
        }
9992
        $upl_max = ini_get('upload_max_filesize');
9993
        if (substr($upl_max, -1, 1) == 'M') {
9994
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
@@ 9993-9997 (lines=5) @@
9990
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
9991
        }
9992
        $upl_max = ini_get('upload_max_filesize');
9993
        if (substr($upl_max, -1, 1) == 'M') {
9994
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
9995
        } elseif (substr($upl_max, -1, 1) == 'G') {
9996
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
9997
        }
9998
        $documents_total_space = DocumentManager::documents_total_space();
9999
        $course_max_space = DocumentManager::get_course_quota();
10000
        $total_size = filesize($s) + $documents_total_space;