Skip to content
Snippets Groups Projects
Commit b093546a authored by lcdweb's avatar lcdweb
Browse files

CRM-13455 improve getEvents query to account for empty end_date

parent 43e603ea
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