mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-03 07:13:09 -04:00
16 lines
342 B
PHP
16 lines
342 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
if (!$Viewer->permitted('site_moderate_forums')) {
|
|
error(403);
|
|
}
|
|
authorize();
|
|
|
|
$post = (new Gazelle\Manager\ForumPost())->findById((int)($_GET['postid'] ?? 0));
|
|
if (is_null($post)) {
|
|
error(404);
|
|
}
|
|
$post->pin($Viewer, empty($_GET['remove']));
|
|
|
|
header('Location: ' . $post->location());
|