Code Duplication    Length = 5-5 lines in 2 locations

main/inc/lib/document.lib.php 2 locations

@@ 2651-2655 (lines=5) @@
2648
     */
2649
    function replace_urls_inside_content_html_when_moving_file($file_name, $original_path, $destiny_path)
2650
    {
2651
        if (substr($original_path, strlen($original_path) - 1, strlen($original_path)) == '/') {
2652
            $original = $original_path . $file_name;
2653
        } else {
2654
            $original = $original_path . '/' . $file_name;
2655
        }
2656
        if (substr($destiny_path, strlen($destiny_path) - 1, strlen($destiny_path)) == '/') {
2657
            $destination = $destiny_path . $file_name;
2658
        } else {
@@ 2656-2660 (lines=5) @@
2653
        } else {
2654
            $original = $original_path . '/' . $file_name;
2655
        }
2656
        if (substr($destiny_path, strlen($destiny_path) - 1, strlen($destiny_path)) == '/') {
2657
            $destination = $destiny_path . $file_name;
2658
        } else {
2659
            $destination = $destiny_path . '/' . $file_name;
2660
        }
2661
        $original_count = count(explode('/', $original));
2662
        $destination_count = count(explode('/', $destination));
2663
        if ($original_count == $destination_count) {