Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 1407-1411 (lines=5) @@
1404
            $fileGray = $fileInfo['filename'].'_na.'.$fileInfo['extension'];
1405
            $fileGray = self::getCustomSysIconPath().$fileGray;
1406
1407
            if (file_exists($file) && is_file($file)) {
1408
                if (Security::check_abs_path($file, self::getCustomSysIconPath())) {
1409
                    unlink($file);
1410
                }
1411
            }
1412
1413
            if (file_exists($fileGray) && is_file($fileGray)) {
1414
                if (Security::check_abs_path($fileGray, self::getCustomSysIconPath())) {
@@ 1413-1417 (lines=5) @@
1410
                }
1411
            }
1412
1413
            if (file_exists($fileGray) && is_file($fileGray)) {
1414
                if (Security::check_abs_path($fileGray, self::getCustomSysIconPath())) {
1415
                    unlink($fileGray);
1416
                }
1417
            }
1418
1419
            $params = [
1420
                'custom_icon' => '',