From 2d4df4eae0300022466acc0030a3c47a89cf2918 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sat, 3 Jan 2026 03:20:15 +0100 Subject: [PATCH] sadsa --- src/App/AccountPages.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/App/AccountPages.php b/src/App/AccountPages.php index cf3b0a5..24c173a 100644 --- a/src/App/AccountPages.php +++ b/src/App/AccountPages.php @@ -225,6 +225,15 @@ final class AccountPages 'status' => 'published', ]); $info = 'Event gespeichert.'; + // Punkte für Event-Erstellung vergeben + try { + $cfgPath = dirname(__DIR__, 2) . '/config/community.php'; + $communityCfg = file_exists($cfgPath) ? require $cfgPath : []; + $community = new Community($pdo, $communityCfg); + $community->addPoints($userId, 'event', 'create', ['event_id' => $pdo?->lastInsertId()]); + } catch (\Throwable) { + // still continue, points optional + } } else { $eventId = (int)($_POST['event_id'] ?? 0); $stmt = $pdo?->prepare('UPDATE events SET title=:title, teaser_public=:teaser, description=:descr, location_label=:loc, street=:street, zip=:zip, city=:city, region=:region, lat=:lat, lng=:lng, starts_at=:start, allow_kids=:allow, visibility=:vis, updated_at=NOW() WHERE id=:id AND created_by=:uid');