Code Duplication    Length = 4-4 lines in 2 locations

main/newscorm/learnpath.class.php 2 locations

@@ 7485-7488 (lines=4) @@
7482
            $item_title = stripslashes($extra_info['title']);
7483
            $item_description = stripslashes($extra_info['description']);
7484
            $item_terms = stripslashes($extra_info['terms']);
7485
            if (empty ($item_title)) {
7486
                $path_parts = pathinfo($extra_info['path']);
7487
                $item_title = stripslashes($path_parts['filename']);
7488
            }
7489
        } elseif (is_numeric($extra_info)) {
7490
            $sql_doc = "SELECT path, title FROM " . $tbl_doc . "
7491
                        WHERE
@@ 7499-7502 (lines=4) @@
7496
            $row 	= Database::fetch_array($result);
7497
            $item_title = $row['title'];
7498
            $item_title = str_replace('_', ' ', $item_title);
7499
            if (empty ($item_title)) {
7500
                $path_parts = pathinfo($row['path']);
7501
                $item_title = stripslashes($path_parts['filename']);
7502
            }
7503
        } else {
7504
            $item_title = '';
7505
            $item_description = '';