revert commit that modified getRecurDetails()
[civicrm-core.git] / CRM / Price / BAO / PriceSet.php
index 554cfc09ade9eaa0b91006851f9a2f8d21b132ea..b001f964c89d37a1be20ef51d1fe25b7088794a7 100644 (file)
@@ -1292,18 +1292,13 @@ GROUP BY     mt.member_of_contact_id ";
    * @return array
    *   associate array of frequency interval and unit
    */
-  public static function getRecurDetails($priceSetId, $priceFieldValueIds) {
-    // Escape the array of ids.
-    foreach ($priceFieldValueIds as $index => $id) {
-      $priceFieldValueIds[$index] = CRM_Utils_Type::escape($id, 'Integer');
-    }
+  public static function getRecurDetails($priceSetId) {
 
     $query = 'SELECT mt.duration_interval, mt.duration_unit
             FROM civicrm_price_field_value pfv
             INNER JOIN civicrm_membership_type mt ON pfv.membership_type_id = mt.id
             INNER JOIN civicrm_price_field pf ON pfv.price_field_id = pf.id
-            WHERE pf.price_set_id = %1 AND pfv.id IN ('
-      . implode(',', $priceFieldValueIds) . ') LIMIT 1';
+            WHERE pf.price_set_id = %1 LIMIT 1';
 
     $params = [1 => [$priceSetId, 'Integer']];
     $dao = CRM_Core_DAO::executeQuery($query, $params);