Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 10076-10080 (lines=5) @@
10073
    public function verify_document_size($s)
10074
    {
10075
        $post_max = ini_get('post_max_size');
10076
        if (substr($post_max, -1, 1) == 'M') {
10077
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024;
10078
        } elseif (substr($post_max, -1, 1) == 'G') {
10079
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10080
        }
10081
        $upl_max = ini_get('upload_max_filesize');
10082
        if (substr($upl_max, -1, 1) == 'M') {
10083
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
@@ 10082-10086 (lines=5) @@
10079
            $post_max = intval(substr($post_max, 0, -1)) * 1024 * 1024 * 1024;
10080
        }
10081
        $upl_max = ini_get('upload_max_filesize');
10082
        if (substr($upl_max, -1, 1) == 'M') {
10083
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024;
10084
        } elseif (substr($upl_max, -1, 1) == 'G') {
10085
            $upl_max = intval(substr($upl_max, 0, -1)) * 1024 * 1024 * 1024;
10086
        }
10087
        $documents_total_space = DocumentManager::documents_total_space();
10088
        $course_max_space = DocumentManager::get_course_quota();
10089
        $total_size = filesize($s) + $documents_total_space;