mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
18 lines
332 B
PHP
18 lines
332 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
if (!$Viewer->permitted('site_moderate_forums')) {
|
|
Error403::error();
|
|
}
|
|
authorize();
|
|
|
|
$comment = new Manager\Comment()->findById((int)($_REQUEST['postid'] ?? 0));
|
|
if (is_null($comment)) {
|
|
Error404::error();
|
|
}
|
|
$comment->remove();
|