Commit c7769390 authored by haystack's avatar haystack

Only check path when using Clean URLs

parent 89da0a0a
......@@ -1566,10 +1566,12 @@ class CiviCRM_For_WordPress {
// Fix 'civicrm/civicrm' elements derived from CRM:url()
// @see https://lab.civicrm.org/dev/rc/issues/5#note_16205
if (substr($q, 0, 16) === 'civicrm/civicrm/') {
$q = str_replace('civicrm/civicrm/', 'civicrm/', $q);
$_REQUEST['q'] = $_GET['q'] = $q;
set_query_var( 'q', $q );
if (defined('CIVICRM_CLEANURL') && CIVICRM_CLEANURL) {
if (substr($q, 0, 16) === 'civicrm/civicrm/') {
$q = str_replace('civicrm/civicrm/', 'civicrm/', $q);
$_REQUEST['q'] = $_GET['q'] = $q;
set_query_var( 'q', $q );
}
}
if (!empty($q)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment