Code Duplication    Length = 3-3 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 943-945 (lines=3) @@
940
        $suf = $this->config['friendly_url_suffix'];
941
        $pre = preg_quote($pre, '/');
942
        $suf = preg_quote($suf, '/');
943
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
944
            $q = $_[1];
945
        }
946
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
947
            $q = $_[1];
948
        }
@@ 946-948 (lines=3) @@
943
        if ($pre && preg_match('@^' . $pre . '(.*)$@', $q, $_)) {
944
            $q = $_[1];
945
        }
946
        if ($suf && preg_match('@(.*)' . $suf . '$@', $q, $_)) {
947
            $q = $_[1];
948
        }
949
950
        /* First remove any / before or after */
951
        $q = trim($q, '/');