summaryrefslogtreecommitdiff
path: root/src/application/actions/viewtopic/_common.php
blob: b257237fa6b09d034ffc02ad9b1e937f598b9d06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

use mystic\forum\orm\Topic;

$formId = "addpost";
$topicId = $_GET["topic"] ?? throw new Exception(__("Missing topic id"));
$topic = new Topic();
$topic->id = $topicId;
if (!$db->fetch($topic)) {
    http_response_code(404);
    msg_error(__("No topic exists with this id"));
    exit;
}