mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-17 04:03:13 -04:00
21 lines
467 B
PHP
21 lines
467 B
PHP
<?php
|
|
|
|
authorize();
|
|
|
|
$request = (new Gazelle\Manager\Request)->findByid((int)$_REQUEST['id']);
|
|
if (is_null($request)) {
|
|
error(404);
|
|
}
|
|
if ($request->fillerId() === 0
|
|
|| (
|
|
!in_array($Viewer->id(), [$request->userId(), $request->fillerId()])
|
|
&& !$Viewer->permitted('site_moderate_requests')
|
|
)
|
|
) {
|
|
error(403);
|
|
}
|
|
|
|
$request->unfill($Viewer, trim($_POST['reason']), new Gazelle\Manager\Torrent);
|
|
|
|
header('Location: ' . $request->location());
|