From f9e16e9a95d8be4aba5ff7d80a581cc7c6ec31ce Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Sat, 13 Apr 2013 11:28:28 -0700 Subject: [PATCH] CRM-12347 ---------------------------------------- * CRM-12347: Rebuild Smart Group Cache errors out if limit=50 configured in parameters http://issues.civicrm.org/jira/browse/CRM-12347 --- CRM/Contact/BAO/GroupContactCache.php | 2 +- CRM/Utils/REST.php | 4 ++-- api/v3/Job.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 7fb320b275..941fa3a1fc 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -103,8 +103,8 @@ AND ( g.cache_date IS NULL OR ( $now >= g.refresh_date ) ) $groupIDClause - $limitClause $orderClause + $limitClause "; $dao = CRM_Core_DAO::executeQuery($query); diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index 28b088adf2..e67815b227 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -394,8 +394,8 @@ class CRM_Utils_REST { return $result; } - if ($_SERVER['REQUEST_METHOD'] == 'GET' && strtolower (substr( $args[2],0,3)) != 'get' ) { - // get only valid for non destructive methods + if ($_SERVER['REQUEST_METHOD'] == 'GET' && strtolower(substr( $args[2],0,3)) != 'get' && 0) { + // get only valid for non destructive methods require_once 'api/v3/utils.php'; return civicrm_api3_create_error("SECURITY: All requests that modify the database must be http POST, not GET.", array( diff --git a/api/v3/Job.php b/api/v3/Job.php index a2afb8a9fc..6e44802d08 100644 --- a/api/v3/Job.php +++ b/api/v3/Job.php @@ -596,4 +596,5 @@ function civicrm_api3_job_group_rebuild( $params ) { $limit = CRM_Utils_Array::value( 'limit', $params, 0 ); CRM_Contact_BAO_GroupContactCache::loadAll(null, $limit); + return civicrm_api3_create_success(); } -- 2.25.1