Code Duplication    Length = 3-4 lines in 2 locations

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

@@ 2428-2430 (lines=3) @@
2425
                $name = trim($regs[3][$i]);
2426
                $check = trim($regs[0][$i]);
2427
                $value = trim($regs[10][$i]);
2428
                if (empty($value) and !empty($regs[13][$i])) {
2429
                    $value = $regs[13][$i];
2430
                }
2431
                if (empty($name) && !empty($regs[16][$i])) {
2432
                    $name = '@import';
2433
                    $value = trim($regs[16][$i]);
@@ 2431-2434 (lines=4) @@
2428
                if (empty($value) and !empty($regs[13][$i])) {
2429
                    $value = $regs[13][$i];
2430
                }
2431
                if (empty($name) && !empty($regs[16][$i])) {
2432
                    $name = '@import';
2433
                    $value = trim($regs[16][$i]);
2434
                }
2435
                if (!empty($name)) {
2436
                    if (!$reduced OR in_array(strtolower($name), $wanted)) {
2437
                        if ($name == $check) {