Files
ops-Gazelle/sections/forums/sticky_post.php
T
2023-09-19 13:20:47 +02:00

15 lines
298 B
PHP

<?php
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());