parent::buildQuickForm();
$this->addSortNameField();
+ if (CRM_Core_Permission::check('access deleted contacts') and Civi::settings()->get('contact_undelete')) {
+ $this->addElement('checkbox', 'deleted_contacts', ts('Search in Trash') . '<br />' . ts('(deleted contacts)'));
+ }
+
CRM_Event_BAO_Query::buildSearchForm($this);
$rows = $this->get('rows');
}
}
if (!empty($this->_formValues['participant_role_id'])) {
- $seatClause[] = '( participant.role_id IN ( ' . implode(' , ', (array) $this->_formValues['participant_role_id']) . ' ) )';
+ $escapedRoles = array();
+ foreach ((array) $this->_formValues['participant_role_id'] as $participantRole) {
+ $escapedRoles[] = CRM_Utils_Type::escape($participantRole, 'String');
+ }
+ $seatClause[] = "( participant.role_id IN ( '" . implode("' , '", $escapedRoles) . "' ) )";
}
// CRM-15379