From: jitendrapurohit Date: Fri, 26 Feb 2016 13:16:41 +0000 (+0530) Subject: minor fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=10b3cbde4306c7e8576f3def55c8018bf564de2c;p=civicrm-core.git minor fix --- diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index c40c084c11..cddba764ad 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -283,13 +283,13 @@ class CRM_Event_BAO_Query { $exEventId = $val; $extractEventId = explode(" ", $val); $value = $extractEventId[2]; - unset($query->_where[$grouping][$key]); + $where = $query->_where[$grouping][$key]; } else if (strstr($val, 'civicrm_event.id IN')) { //extract the first event id if multiple events are selected preg_match('/civicrm_event.id IN \(\"(\d+)/', $val, $matches); $value = $matches[1]; - unset($query->_where[$grouping][$key]); + $where = $query->_where[$grouping][$key]; } } if ($exEventId) { @@ -299,7 +299,7 @@ class CRM_Event_BAO_Query { else if(!empty($matches[1])) { $value = $matches[1]; } - unset($query->_where[$grouping][$key]); + $where = $query->_where[$grouping][$key]; } $thisEventHasParent = CRM_Core_BAO_RecurringEntity::getParentFor($value, 'civicrm_event'); if ($thisEventHasParent) { @@ -313,7 +313,7 @@ class CRM_Event_BAO_Query { $value = "(" . implode(",", $allEventIds) . ")"; } } - $query->_where[$grouping][] = "civicrm_event.id $op {$value}"; + $query->_where[$grouping][] = "{$where} OR civicrm_event.id $op {$value}"; $query->_qill[$grouping][] = ts('Include Repeating Events'); $query->_tables['civicrm_event'] = $query->_whereTables['civicrm_event'] = 1; return; diff --git a/templates/CRM/Event/Form/Search/Common.tpl b/templates/CRM/Event/Form/Search/Common.tpl index 0b16f48066..f714ee2a38 100644 --- a/templates/CRM/Event/Form/Search/Common.tpl +++ b/templates/CRM/Event/Form/Search/Common.tpl @@ -98,7 +98,8 @@ CRM.$(function($) { if (!$(this).data('select2')) { $(this).crmEntityRef(); } - if (!$.isEmptyObject($(this).select2('data')[0].extra)) { + // allow repeat checkbox to be shown for first event selected + if (!$.isEmptyObject($(this).select2('data')[0])) { isRepeating = $(this).select2('data')[0].extra.is_recur; } }