From: Eileen McNaughton Date: Mon, 15 Sep 2014 04:26:51 +0000 (+1200) Subject: CRM-15299 use buildClause function as often as possible so same params are supported X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=59de5a509b16110c25b94b7f2bf56dcbe4c89356;p=civicrm-core.git CRM-15299 use buildClause function as often as possible so same params are supported --- diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index 3e4873a602..771631b717 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -417,7 +417,11 @@ class CRM_Event_BAO_Query { return; case 'participant_id': - $query->_where[$grouping][] = "civicrm_participant.id $op $value"; + $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_participant.id", + $op, + $value, + "Integer" + ); $query->_tables['civicrm_participant'] = $query->_whereTables['civicrm_participant'] = 1; return; diff --git a/CRM/Pledge/BAO/Query.php b/CRM/Pledge/BAO/Query.php index d1c0464c0a..1b08edb121 100644 --- a/CRM/Pledge/BAO/Query.php +++ b/CRM/Pledge/BAO/Query.php @@ -390,7 +390,11 @@ class CRM_Pledge_BAO_Query { return; case 'pledge_id': - $query->_where[$grouping][] = "civicrm_pledge.id $op $value"; + $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_pledge.id", + $op, + $value, + "Integer" + ); $query->_tables['civicrm_pledge'] = $query->_whereTables['civicrm_pledge'] = 1; return;