Code Duplication    Length = 3-3 lines in 2 locations

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

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