return FALSE;
}
if ($entityID) {
- $query = ' SELECT ps.extends FROM civicrm_price_set ps %3 WHERE %1.id = %2';
+ $query = ' SELECT ps.extends FROM civicrm_price_set ps';
$params = array(
1 => array('ps', 'Text'),
2 => array($entityID, 'Integer'),
);
if ($entity == 'PriceField') {
$params[1] = array('pf', 'Text');
- $params[3] = array(
- ' INNER JOIN civicrm_price_field pf ON pf.price_set_id = ps.id ',
- 'Text',
- );
+ $query .= ' INNER JOIN civicrm_price_field pf ON pf.price_set_id = ps.id ';
}
+ $query .= ' WHERE %1.id = %2';
$extends = CRM_Core_DAO::singleValueQuery($query, $params);
$extends = explode('\ 1', $extends);
if (!(in_array(CRM_Core_Component::getComponentID('CiviEvent'), $extends)