From 5c20e4c213ceca577479a7d2e654ab3ba472b58a Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 13 Jun 2018 14:07:21 +1200 Subject: [PATCH] Only treat a request as a get request (and hence use GET) if it starts with get Current code looks for the word 'get' anywhere in the action so the action 'forget' is also picked up. Further down we explicitly look for 0 so we should here too. --- js/crm.ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 9cb5eb601e..e1742da8fd 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -68,7 +68,7 @@ url: CRM.url('civicrm/ajax/rest'), dataType: 'json', data: params, - type: params.action.indexOf('get') < 0 ? 'POST' : 'GET' + type: params.action.indexOf('get') === 0 ? 'GET' : 'POST' }); if (status) { // Default status messages -- 2.25.1