Commit 2a89418a authored by haystack's avatar haystack

Fix args when called via AJAX

parent f21fa430
......@@ -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 (stristr($q, 'civicrm/civicrm') !== false) {
$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