Compare commits

..

1 Commits

Author SHA1 Message Date
Jürgen Mummert ba321fdc23 Map: show event markers only for future events 2026-02-26 21:16:36 +01:00
-25
View File
@@ -103,31 +103,6 @@ class MapModuleDataProvider
} }
if ($includeEvents) { if ($includeEvents) {
foreach ($this->fetchLocationRows($locationTable, $locationGeoColumns) as $row) {
$id = (int) ($row['id'] ?? 0);
if ($id <= 0 || isset($seen['location'][$id])) {
continue;
}
$coords = $this->extractCoordinates($row['latitude'] ?? null, $row['longitude'] ?? null);
if (null === $coords) {
continue;
}
$seen['location'][$id] = true;
$items[] = [
'type' => 'location',
'markerType' => 'location',
'id' => $id,
'title' => trim((string) ($row['title'] ?? '')),
'latitude' => $coords['latitude'],
'longitude' => $coords['longitude'],
'extra' => [],
];
}
foreach ($this->fetchEventRows($locationTable, $locationGeoColumns) as $row) { foreach ($this->fetchEventRows($locationTable, $locationGeoColumns) as $row) {
$id = (int) ($row['event_id'] ?? 0); $id = (int) ($row['event_id'] ?? 0);