Unverified Commit f2a00858 authored by kcristiano's avatar kcristiano Committed by GitHub

Merge pull request #151 from christianwach/fix-ajax

Fix args when called via AJAX
parents f21fa430 07e71ab2
......@@ -1564,6 +1564,14 @@ class CiviCRM_For_WordPress {
$q = isset($_GET['q']) ? $_GET['q'] : '';
}
// 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 (!empty($q)) {
$argString = trim($q);
$args = explode('/', $argString);
......
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