Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 10011-10015 (lines=5) @@
10008
    public function verify_document_size($s)
10009
    {
10010
        $post_max = ini_get('post_max_size');
10011
        if (substr($post_max, -1, 1) == 'M') {
10012
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
10013
        } elseif (substr($post_max, -1, 1) == 'G') {
10014
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10015
        }
10016
        $upl_max = ini_get('upload_max_filesize');
10017
        if (substr($upl_max, -1, 1) == 'M') {
10018
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
@@ 10017-10021 (lines=5) @@
10014
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10015
        }
10016
        $upl_max = ini_get('upload_max_filesize');
10017
        if (substr($upl_max, -1, 1) == 'M') {
10018
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
10019
        } elseif (substr($upl_max, -1, 1) == 'G') {
10020
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
10021
        }
10022
        $documents_total_space = DocumentManager::documents_total_space();
10023
        $course_max_space = DocumentManager::get_course_quota();
10024
        $total_size = filesize($s) + $documents_total_space;