Files
ops-Gazelle/sections/torrents/log_ajax.php
2025-08-27 16:44:44 +02:00

24 lines
565 B
PHP

<?php
/** @phpstan-var \Gazelle\User $Viewer */
/** @phpstan-var \Twig\Environment $Twig */
declare(strict_types=1);
namespace Gazelle;
$torMan = new Manager\Torrent();
$torrent = $torMan->findById((int)$_GET['torrentid']);
if (is_null($torrent)) {
$torrent = $torMan->findDeletedById((int)$_GET['torrentid']);
}
if (is_null($torrent)) {
Error404::error();
}
echo $Twig->render('torrent/riplog.twig', [
'id' => $torrent->id,
'list' => $torrent->logfileList(),
'log_score' => $torrent->logScore(),
'viewer' => $Viewer,
]);