Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 9971-9975 (lines=5) @@
9968
    public function verify_document_size($s)
9969
    {
9970
        $post_max = ini_get('post_max_size');
9971
        if (substr($post_max, -1, 1) == 'M') {
9972
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
9973
        } elseif (substr($post_max, -1, 1) == 'G') {
9974
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
9975
        }
9976
        $upl_max = ini_get('upload_max_filesize');
9977
        if (substr($upl_max, -1, 1) == 'M') {
9978
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
@@ 9977-9981 (lines=5) @@
9974
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
9975
        }
9976
        $upl_max = ini_get('upload_max_filesize');
9977
        if (substr($upl_max, -1, 1) == 'M') {
9978
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
9979
        } elseif (substr($upl_max, -1, 1) == 'G') {
9980
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
9981
        }
9982
        $documents_total_space = DocumentManager::documents_total_space();
9983
        $course_max_space = DocumentManager::get_course_quota();
9984
        $total_size = filesize($s) + $documents_total_space;