| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
if (CRM_Utils_Array::value('participant_test', $this->_formValues) == '1' || CRM_Utils_Array::value('participant_test', $this->_formValues) == '0') {
$seatClause[] = "( participant.is_test = {$this->_formValues['participant_test']} )";
}
if (!empty($this->_formValues['participant_status_id'])) {
if (CRM_Utils_Array::value('participant_test', $this->_formValues) == '1' || CRM_Utils_Array::value('participant_test', $this->_formValues) == '0') {
$seatClause[] = "( participant.is_test = {$this->_formValues['participant_test']} )";
}
if (!empty($this->_formValues['participant_status_id'])) {
- $statuses = array_keys($this->_formValues['participant_status_id']);
- $seatClause[] = '( participant.status_id IN ( ' . implode(' , ', $statuses) . ' ) )';
+ $seatClause[] = '( participant.status_id IN ( ' . implode(' , ', (array) $this->_formValues['participant_status_id']) . ' ) )';
- $roles = array_keys($this->_formValues['participant_role_id']);
- $seatClause[] = '( participant.role_id IN ( ' . implode(' , ', $roles) . ' ) )';
+ $seatClause[] = '( participant.role_id IN ( ' . implode(' , ', (array) $this->_formValues['participant_role_id']) . ' ) )';
// CRM-15379
if (!empty($this->_formValues['participant_fee_id'])) {
$participant_fee_id = $this->_formValues['participant_fee_id'];
// CRM-15379
if (!empty($this->_formValues['participant_fee_id'])) {
$participant_fee_id = $this->_formValues['participant_fee_id'];
$feeLabel = CRM_Core_DAO::escapeString(trim($feeLabel));
$seatClause[] = "( participant.fee_level LIKE '%$feeLabel%' )";
}
$feeLabel = CRM_Core_DAO::escapeString(trim($feeLabel));
$seatClause[] = "( participant.fee_level LIKE '%$feeLabel%' )";
}
- $participantCount = CRM_Event_BAO_Event::eventTotalSeats(array_pop($eventIds), $clause);
+ $seatClause = implode(' AND ', $seatClause);
+ $participantCount = CRM_Event_BAO_Event::eventTotalSeats(array_pop($eventIds), $seatClause);
}
$this->assign('participantCount', $participantCount);
$this->assign('lineItems', $lineItems);
}
$this->assign('participantCount', $participantCount);
$this->assign('lineItems', $lineItems);
$statusTypes = CRM_Event_PseudoConstant::participantStatus(NULL, "is_counted = 0");
}
elseif (is_numeric($status)) {
$statusTypes = CRM_Event_PseudoConstant::participantStatus(NULL, "is_counted = 0");
}
elseif (is_numeric($status)) {
$roleTypes = CRM_Event_PseudoConstant::participantRole(NULL, "filter = 0");
}
elseif (is_numeric($role)) {
$roleTypes = CRM_Event_PseudoConstant::participantRole(NULL, "filter = 0");
}
elseif (is_numeric($role)) {