Code Duplication    Length = 3-3 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

@@ 677-679 (lines=3) @@
674
        $suf = $this->config['friendly_url_suffix'];
675
        $pre = preg_quote($pre, '/');
676
        $suf = preg_quote($suf, '/');
677
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
678
            $q = $_[1];
679
        }
680
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
681
            $q = $_[1];
682
        }
@@ 680-682 (lines=3) @@
677
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
678
            $q = $_[1];
679
        }
680
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
681
            $q = $_[1];
682
        }
683
684
        /* First remove any / before or after */
685
        $q = trim($q, '/');