mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
22 lines
508 B
PHP
22 lines
508 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
/** @phpstan-var \Twig\Environment $Twig */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
$forum = new Manager\Forum()->findById((int)($_GET['forumid'] ?? 0));
|
|
if (!$forum) {
|
|
Error404::error();
|
|
}
|
|
if (!$Viewer->writeAccess($forum) || !$Viewer->createAccess($forum)) {
|
|
Error403::error();
|
|
}
|
|
|
|
echo $Twig->render('forum/new-thread.twig', [
|
|
'forum' => $forum,
|
|
'textarea' => new Util\Textarea('body', '', 90, 8),
|
|
'viewer' => $Viewer,
|
|
]);
|