Merge pull request #5964 from AJ0070/web-review-followups

fix: montagereview StartDateTime swap and duplicate events from Filter::Events
This commit is contained in:
Isaac Connor authored and GitHub committed 2026-11-15 11:31:58 -05:00
commit 8af76cd18a
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -895,7 +895,11 @@ class Filter extends ZM_Object {
$query = dbQuery($sql);
if (!$query) return $events;
// The tag joins give one row per tag, so an event with several tags comes back more than once
$seen = array();
while ($row = dbFetchNext($query)) {
if (isset($seen[$row['Id']])) continue;
$seen[$row['Id']] = true;
$event = new Event($row);
$event->remove_from_cache();
if (!$this->test_post_sql_conditions($event)) {
+1 -1
View File
@@ -293,7 +293,7 @@ if (isset($minTime) && isset($maxTime)) {
$maxTime = $temp;
$terms = $filter->terms();
foreach ($terms as &$term) {
if ($term['attr'] != 'DateTime') continue;
if ($term['attr'] != 'DateTime' and $term['attr'] != 'StartDateTime') continue;
if ($term['op'] == '>=' or $term['op'] == '>') $term['val'] = $minTime;
else if ($term['op'] == '<=' or $term['op'] == '<') $term['val'] = $maxTime;
}