Code Duplication    Length = 6-6 lines in 2 locations

manager/includes/functions/actions/import.php 2 locations

@@ 310-315 (lines=6) @@
307
308
        $src = mb_convert_encoding($src, $modx->config['modx_charset'], 'UTF-8,SJIS-win,eucJP-win,SJIS,EUC-JP,ASCII');
309
310
        if (preg_match("@<title>(.*)</title>@i", $src, $matches)) {
311
            $pagetitle = ($matches[1] !== '') ? $matches[1] : $filename;
312
            $pagetitle = str_replace('[*pagetitle*]', '', $pagetitle);
313
        } else {
314
            $pagetitle = $alias;
315
        }
316
        if (!$pagetitle) {
317
            $pagetitle = $alias;
318
        }
@@ 320-325 (lines=6) @@
317
            $pagetitle = $alias;
318
        }
319
320
        if (preg_match('@<meta[^>]+"description"[^>]+content=[\'"](.*)[\'"].+>@i', $src, $matches)) {
321
            $description = ($matches[1] !== '') ? $matches[1] : $filename;
322
            $description = str_replace('[*description*]', '', $description);
323
        } else {
324
            $description = '';
325
        }
326
327
        if ((preg_match("@<body[^>]*>(.*)[^<]+</body>@is", $src, $matches)) && $_POST['object'] == 'body') {
328
            $content = $matches[1];