Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 1611-1615 (lines=5) @@
1608
            $fileGray = $fileInfo['filename'].'_na.'.$fileInfo['extension'];
1609
            $fileGray = self::getCustomSysIconPath().$fileGray;
1610
1611
            if (file_exists($file) && is_file($file)) {
1612
                if (Security::check_abs_path($file, self::getCustomSysIconPath())) {
1613
                    unlink($file);
1614
                }
1615
            }
1616
1617
            if (file_exists($fileGray) && is_file($fileGray)) {
1618
                if (Security::check_abs_path($fileGray, self::getCustomSysIconPath())) {
@@ 1617-1621 (lines=5) @@
1614
                }
1615
            }
1616
1617
            if (file_exists($fileGray) && is_file($fileGray)) {
1618
                if (Security::check_abs_path($fileGray, self::getCustomSysIconPath())) {
1619
                    unlink($fileGray);
1620
                }
1621
            }
1622
1623
            $params = [
1624
                'custom_icon' => ''