Code Duplication    Length = 4-4 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 7553-7556 (lines=4) @@
7550
            $item_title = stripslashes($extra_info['title']);
7551
            $item_description = stripslashes($extra_info['description']);
7552
            $item_terms = stripslashes($extra_info['terms']);
7553
            if (empty ($item_title)) {
7554
                $path_parts = pathinfo($extra_info['path']);
7555
                $item_title = stripslashes($path_parts['filename']);
7556
            }
7557
        } elseif (is_numeric($extra_info)) {
7558
            $sql_doc = "SELECT path, title FROM " . $tbl_doc . "
7559
                        WHERE
@@ 7567-7570 (lines=4) @@
7564
            $row 	= Database::fetch_array($result);
7565
            $item_title = $row['title'];
7566
            $item_title = str_replace('_', ' ', $item_title);
7567
            if (empty ($item_title)) {
7568
                $path_parts = pathinfo($row['path']);
7569
                $item_title = stripslashes($path_parts['filename']);
7570
            }
7571
        } else {
7572
            $item_title = '';
7573
            $item_description = '';