Code Duplication    Length = 3-3 lines in 2 locations

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

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