mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
19 lines
514 B
PHP
19 lines
514 B
PHP
<?php
|
|
|
|
authorize();
|
|
if (!$Viewer->permitted('users_mod')) {
|
|
error(403);
|
|
}
|
|
|
|
$torrent = (new Gazelle\Manager\Torrent)->findById((int)$_GET['torrentid']);
|
|
$logId = (int)$_GET['logid'];
|
|
if (is_null($torrent) || !$logId) {
|
|
error(404);
|
|
}
|
|
|
|
(new Gazelle\File\RipLog)->remove([$torrent->id(), $logId]);
|
|
(new Gazelle\Log)->torrent($torrent->groupId(), $torrent->id(), $Viewer->id(), "Riplog ID $logId removed from torrent {$torrent->id()}");
|
|
$torrent->clearLog($logId);
|
|
|
|
header('Location: ' . $torrent->location());
|