Code Duplication    Length = 3-4 lines in 2 locations

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

@@ 2454-2456 (lines=3) @@
2451
                $name = trim($regs[3][$i]);
2452
                $check = trim($regs[0][$i]);
2453
                $value = trim($regs[10][$i]);
2454
                if (empty($value) and !empty($regs[13][$i])) {
2455
                    $value = $regs[13][$i];
2456
                }
2457
                if (empty($name) && !empty($regs[16][$i])) {
2458
                    $name = '@import';
2459
                    $value = trim($regs[16][$i]);
@@ 2457-2460 (lines=4) @@
2454
                if (empty($value) and !empty($regs[13][$i])) {
2455
                    $value = $regs[13][$i];
2456
                }
2457
                if (empty($name) && !empty($regs[16][$i])) {
2458
                    $name = '@import';
2459
                    $value = trim($regs[16][$i]);
2460
                }
2461
                if (!empty($name)) {
2462
                    if (!$reduced OR in_array(strtolower($name), $wanted)) {
2463
                        if ($name == $check) {