Code Duplication    Length = 4-4 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 7516-7519 (lines=4) @@
7513
            $item_title = stripslashes($extra_info['title']);
7514
            $item_description = stripslashes($extra_info['description']);
7515
            $item_terms = stripslashes($extra_info['terms']);
7516
            if (empty ($item_title)) {
7517
                $path_parts = pathinfo($extra_info['path']);
7518
                $item_title = stripslashes($path_parts['filename']);
7519
            }
7520
        } elseif (is_numeric($extra_info)) {
7521
            $sql_doc = "SELECT path, title FROM " . $tbl_doc . "
7522
                        WHERE
@@ 7530-7533 (lines=4) @@
7527
            $row 	= Database::fetch_array($result);
7528
            $item_title = $row['title'];
7529
            $item_title = str_replace('_', ' ', $item_title);
7530
            if (empty ($item_title)) {
7531
                $path_parts = pathinfo($row['path']);
7532
                $item_title = stripslashes($path_parts['filename']);
7533
            }
7534
        } else {
7535
            $item_title = '';
7536
            $item_description = '';