From: jitendrapurohit Date: Wed, 30 Mar 2016 11:49:57 +0000 (+0530) Subject: minor fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=10d005d99c4ede5da9323eb1e40977b844dac3ea;p=civicrm-core.git minor fix --- diff --git a/CRM/Event/Page/ManageEvent.php b/CRM/Event/Page/ManageEvent.php index 1746505ae4..1a6277e773 100644 --- a/CRM/Event/Page/ManageEvent.php +++ b/CRM/Event/Page/ManageEvent.php @@ -467,22 +467,16 @@ ORDER BY start_date desc $eventsByDates = $this->get('eventsByDates'); if ($this->_searchResult) { if ($eventsByDates) { + $from = $this->get('start_date'); - $to = $this->get('end_date'); - $start = $end = ''; if (!CRM_Utils_System::isNull($from)) { - $start = 'end_date >= %3 AND'; - if (!CRM_Utils_System::isNull($to)) { - $end = ' AND start_date <= %4 '; - } - // CRM-18250 - search end_date greater than $from or start_date should be - // greater than $from in case end_date is NULL to get proper event result. - $clauses[] = "( (end_date >= %3 $end ) OR (start_date >= %3 AND end_date IS NULL) )"; + $clauses[] = '( end_date >= %3 OR end_date IS NULL )'; $params[3] = array($from, 'String'); } + $to = $this->get('end_date'); if (!CRM_Utils_System::isNull($to)) { - $clauses[] = "(($start start_date <= %4))"; + $clauses[] = '( start_date <= %4 OR start_date IS NULL )'; $params[4] = array($to, 'String'); } }