Commit 6cdbeaba authored by mattwire's avatar mattwire
Browse files

Fix issues with 'Find Events (By Template)' not working properly.

parent 62ac6d5b
......@@ -169,6 +169,7 @@ class CRM_AdvancedEvents_Form_Search extends CRM_Core_Form_Search {
'select' => ['minimumInputLength' => 0],
'api' => [
'label_field' => 'template_title',
'search_field' => 'template_title',
'params' => [
'is_template' => 1,
],
......
......@@ -474,9 +474,11 @@ class CRM_AdvancedEvents_Selector_Search extends CRM_Core_Selector_Base implemen
// Get details of all events linked to this template
$templateParams = [
'template_id' => ['IN' => $this->getEventTemplateIDs()],
'options' => ['limit' => 0],
];
if ($this->getEventTemplateIDs()) {
$templateParams['template_id'] = ['IN' => $this->getEventTemplateIDs()];
}
$eventsLinkedtoTemplate = civicrm_api3('EventTemplate', 'get', $templateParams);
if (empty($eventsLinkedtoTemplate['count'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment