From: eileen Date: Wed, 13 Jun 2018 02:07:21 +0000 (+1200) Subject: Only treat a request as a get request (and hence use GET) if it starts with get X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5c20e4c213ceca577479a7d2e654ab3ba472b58a;p=civicrm-core.git 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. --- 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