Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 10119-10123 (lines=5) @@
10116
    public function verify_document_size($s)
10117
    {
10118
        $post_max = ini_get('post_max_size');
10119
        if (substr($post_max, -1, 1) == 'M') {
10120
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
10121
        } elseif (substr($post_max, -1, 1) == 'G') {
10122
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10123
        }
10124
        $upl_max = ini_get('upload_max_filesize');
10125
        if (substr($upl_max, -1, 1) == 'M') {
10126
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
@@ 10125-10129 (lines=5) @@
10122
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10123
        }
10124
        $upl_max = ini_get('upload_max_filesize');
10125
        if (substr($upl_max, -1, 1) == 'M') {
10126
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
10127
        } elseif (substr($upl_max, -1, 1) == 'G') {
10128
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
10129
        }
10130
        $documents_total_space = DocumentManager::documents_total_space();
10131
        $course_max_space = DocumentManager::get_course_quota();
10132
        $total_size = filesize($s) + $documents_total_space;