CRM-15299 use buildClause function as often as possible so same params are supported
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 15 Sep 2014 04:26:51 +0000 (16:26 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Mon, 29 Sep 2014 02:57:29 +0000 (15:57 +1300)
CRM/Event/BAO/Query.php
CRM/Pledge/BAO/Query.php

index 3e4873a60288104c4af1b55732dd770b71e3b564..771631b7179fba95028ed71e052db8be37a8ca37 100644 (file)
@@ -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;
 
index d1c0464c0aef7cb9185372cf296a2eda7522f9b8..1b08edb1217b2c2b928ddca9d456c3f83ffeb242 100644 (file)
@@ -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;