Skip to content
Snippets Groups Projects
Commit 8e553ccf authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Merge pull request #1707 from lcdservices/CRM-13455

CRM-13455 improve getEvents query to account for empty end_date
parents e1d05017 b093546a
Branches
Tags
No related merge requests found
......@@ -279,7 +279,12 @@ WHERE ( civicrm_event.is_template IS NULL OR civicrm_event.is_template = 0 )";
elseif ($all == 0) {
// find only events ending in the future
$endDate = date('YmdHis');
$query .= " AND ( `end_date` >= {$endDate} OR end_date IS NULL )";
$query .= "
AND ( `end_date` >= {$endDate} OR
(
( end_date IS NULL OR end_date = '' ) AND start_date >= {$endDate}
)
)";
}
elseif ($all == 2) {
// find only events starting in the last 3 months
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment