sadsa
This commit is contained in:
@@ -225,6 +225,15 @@ final class AccountPages
|
|||||||
'status' => 'published',
|
'status' => 'published',
|
||||||
]);
|
]);
|
||||||
$info = 'Event gespeichert.';
|
$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 {
|
} else {
|
||||||
$eventId = (int)($_POST['event_id'] ?? 0);
|
$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');
|
$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');
|
||||||
|
|||||||
Reference in New Issue
Block a user