Code Duplication    Length = 6-8 lines in 2 locations

main/newscorm/aicc.class.php 1 location

@@ 495-502 (lines=8) @@
492
            $saved_dir = getcwd();
493
            chdir($course_sys_dir.$new_dir);
494
            $unzippingState = $zipFile->extract();
495
            for ($j = 0; $j < count($unzippingState); $j++) {
496
                $state = $unzippingState[$j];
497
498
                // TODO: Fix relative links in html files (?)
499
                $extension = strrchr($state["stored_filename"], '.');
500
                //if ($this->debug > 1) { error_log('New LP - found extension '.$extension.' in '.$state['stored_filename'], 0); }
501
502
            }
503
504
            if (!empty($new_dir)) {
505
                $new_dir = $new_dir.'/';

main/inc/lib/fileUpload.lib.php 1 location

@@ 1025-1030 (lines=6) @@
1022
            $save_dir = getcwd();
1023
            chdir($base_work_dir.$upload_path);
1024
            $unzippingState = $zip_file->extract();
1025
            for ($j=0; $j < count($unzippingState); $j++) {
1026
                $state = $unzippingState[$j];
1027
1028
                // Fix relative links in html files
1029
                $extension = strrchr($state['stored_filename'], '.');
1030
            }
1031
            if ($dir = @opendir($base_work_dir.$upload_path)) {
1032
                while ($file = readdir($dir)) {
1033
                    if ($file != '.' && $file != '..') {