Code Duplication    Length = 3-3 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 9633-9635 (lines=3) @@
9630
                    // ../../.. to return from inc/lib/flv_player to the document/main path.
9631
                    if (substr($old_new['dest'], -3) == 'flv' && substr($old_new['dest'], 0, 5) == 'main/') {
9632
                        $old_new['dest'] = str_replace('main/', '../../../', $old_new['dest']);
9633
                    } elseif (substr($old_new['dest'], -3) == 'flv' && substr($old_new['dest'], 0, 6) == 'video/') {
9634
                        $old_new['dest'] = str_replace('video/', '../../../../video/', $old_new['dest']);
9635
                    }
9636
                    //Fix to avoid problems with default_course_document
9637
                    if (strpos("main/default_course_document", $old_new['dest'] === false)) {
9638
                        //$newDestination = str_replace('document/', $mult.'document/', $old_new['dest']);
@@ 9676-9678 (lines=3) @@
9673
                    // will be added in document/main/inc/lib/flv_player/flv_player.swf and that needs
9674
                    // to find the flv to play in document/main/, so we replace main/ in the flv path by
9675
                    // ../../.. to return from inc/lib/flv_player to the document/main path.
9676
                    if (substr($old_new['dest'], -3) == 'flv' && substr($old_new['dest'], 0, 5) == 'main/') {
9677
                        $old_new['dest'] = str_replace('main/', '../../../', $old_new['dest']);
9678
                    }
9679
                    $string = str_replace($old_new['orig'], $old_new['dest'], $string);
9680
                }
9681
                file_put_contents($dest_file, $string);