Calendar: Fix get events by date (not using $end date properly)

Author: @fabiowoj
pull/4453/head^2^2
fabiowoj 3 years ago committed by GitHub
parent b8c78b9758
commit edf162c0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      main/inc/lib/agenda.lib.php

@ -1764,7 +1764,7 @@ class Agenda
$startDate = api_get_utc_datetime($start, true, true); $startDate = api_get_utc_datetime($start, true, true);
$startCondition = "AND date >= '".$startDate->format('Y-m-d H:i:s')."'"; $startCondition = "AND date >= '".$startDate->format('Y-m-d H:i:s')."'";
} }
if ($start !== 0) { if ($end !== 0) {
$endDate = api_get_utc_datetime($end, false, true); $endDate = api_get_utc_datetime($end, false, true);
$endCondition = "AND (enddate <= '".$endDate->format('Y-m-d H:i:s')."' OR enddate IS NULL)"; $endCondition = "AND (enddate <= '".$endDate->format('Y-m-d H:i:s')."' OR enddate IS NULL)";
} }

Loading…
Cancel
Save