Files
ops-Gazelle/sections/torrents/edit_log.php
2023-04-04 18:55:57 +02:00

22 lines
586 B
PHP

<?php
if (!$Viewer->permitted('users_mod')) {
error(403);
}
$torrent = (new Gazelle\Manager\Torrent)->findById((int)($_GET['torrentid'] ?? 0));
if (is_null($torrent)) {
error(404);
}
$tlog = (new Gazelle\Manager\TorrentLog(new Gazelle\File\RipLog, new Gazelle\File\RipLogHTML))->findById($torrent, (int)($_GET['logid'] ?? 0));
if (is_null($tlog)) {
error(404);
}
echo $Twig->render('torrent/edit-log.twig', [
'adjuster' => (new Gazelle\Manager\User)->findById($tlog->adjustedByUserId())?->link() ?? 'System',
'tlog' => $tlog,
'torrent' => $torrent,
]);