diff options
author | Jonas Kohl | 2024-12-26 20:18:57 +0100 |
---|---|---|
committer | Jonas Kohl | 2024-12-26 20:18:57 +0100 |
commit | 8945dff16e2e6208051bae25617c9f76d62a8e0b (patch) | |
tree | 2591cca0eaa28eb45abe2bd2b7e0f6100b376fd5 /src/application/actions | |
parent | 686fff945e0b4697aa74da404ce90534bb7b121d (diff) |
Diffstat (limited to 'src/application/actions')
-rw-r--r-- | src/application/actions/newtopic/post.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/application/actions/newtopic/post.php b/src/application/actions/newtopic/post.php index ca79599..79110eb 100644 --- a/src/application/actions/newtopic/post.php +++ b/src/application/actions/newtopic/post.php @@ -2,6 +2,7 @@ use mystic\forum\orm\Attachment; use mystic\forum\orm\Post; +use mystic\forum\orm\Subscription; use mystic\forum\orm\Topic; use mystic\forum\utils\RequestUtils; @@ -65,4 +66,10 @@ foreach ($attachments as $att) { $db->insert($attachment); } +$subscription = new Subscription(); +$subscription->id = $db->generateId(); +$subscription->userId = $currentUser->id; +$subscription->topicId = $topic->id; +$db->insert($subscription); + header("Location: ?_action=viewtopic&topic=" . urlencode($topic->id)); |