Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 710-712 (lines=3) @@
707
        $suf = $this->config['friendly_url_suffix'];
708
        $pre = preg_quote($pre, '/');
709
        $suf = preg_quote($suf, '/');
710
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
711
            $q = $_[1];
712
        }
713
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
714
            $q = $_[1];
715
        }
@@ 713-715 (lines=3) @@
710
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
711
            $q = $_[1];
712
        }
713
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
714
            $q = $_[1];
715
        }
716
717
        /* First remove any / before or after */
718
        $q = trim($q, '/');