mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-09-29 04:13:19 -04:00
19 lines
507 B
PHP
19 lines
507 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
/** @phpstan-var \Twig\Environment $Twig */
|
|
|
|
$forum = (new Gazelle\Manager\Forum())->findById((int)($_GET['forumid'] ?? 0));
|
|
if (!$forum) {
|
|
error(404);
|
|
}
|
|
if (!$Viewer->writeAccess($forum) || !$Viewer->createAccess($forum)) {
|
|
error(403);
|
|
}
|
|
|
|
echo $Twig->render('forum/new-thread.twig', [
|
|
'id' => $forum->id(),
|
|
'name' => $forum->name(),
|
|
'textarea' => new Gazelle\Util\Textarea('body', '', 90, 8),
|
|
'viewer' => $Viewer,
|
|
]);
|