Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 702-704 (lines=3) @@
699
        $suf = $this->config['friendly_url_suffix'];
700
        $pre = preg_quote($pre, '/');
701
        $suf = preg_quote($suf, '/');
702
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
703
            $q = $_[1];
704
        }
705
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
706
            $q = $_[1];
707
        }
@@ 705-707 (lines=3) @@
702
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
703
            $q = $_[1];
704
        }
705
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
706
            $q = $_[1];
707
        }
708
709
        /* First remove any / before or after */
710
        $q = trim($q, '/');