mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-05 20:41:41 -07:00
fix(filelist): Undefined property: FileTree::$length
when v2 torrent only (#2004)
This commit is contained in:
parent
896cf6c3d6
commit
8c161ceae0
2 changed files with 1 additions and 38 deletions
15
filelist.php
15
filelist.php
|
@ -82,7 +82,7 @@ if (IS_GUEST && $torrent->isPrivate()) {
|
|||
|
||||
// Get torrent files
|
||||
$files = $torrent->$t_version_field()->$t_files_field();
|
||||
if ($meta_v1 && $meta_v2) {
|
||||
if ($meta_v2) {
|
||||
$files = new \RecursiveIteratorIterator($files); // Flatten the list
|
||||
}
|
||||
|
||||
|
@ -102,19 +102,6 @@ foreach ($files as $file) {
|
|||
$torrent_name = !empty($t_name = $torrent->getName()) ? str_short(htmlCHR($t_name), 200) : $lang['UNKNOWN'];
|
||||
$torrent_size = humn_size($row['size'], 2);
|
||||
|
||||
// Get announcers list
|
||||
$announcers_list = $torrent->getAnnounceList()->toArray();
|
||||
$announcers_count = 0;
|
||||
foreach ($announcers_list as $announcer) {
|
||||
$announcers_count++;
|
||||
$row_class = ($announcers_count % 2) ? 'row1' : 'row2';
|
||||
$template->assign_block_vars('announcers', [
|
||||
'ROW_NUMBER' => $announcers_count,
|
||||
'ROW_CLASS' => $row_class,
|
||||
'ANNOUNCER' => $announcer[0]
|
||||
]);
|
||||
}
|
||||
|
||||
// Output page
|
||||
$template->assign_vars([
|
||||
'PAGE_TITLE' => "$torrent_name (" . $torrent_size . ")",
|
||||
|
|
|
@ -6,30 +6,6 @@
|
|||
</ul>
|
||||
<br/>
|
||||
|
||||
<h1 class="pagetitle">{L_BT_FLIST_ANNOUNCERS_LIST}</h1>
|
||||
<table class="forumline">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{L_BT_FLIST_ANNOUNCERS}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- BEGIN announcers -->
|
||||
<tbody>
|
||||
<tr class="{announcers.ROW_CLASS} tCenter">
|
||||
<td>{announcers.ROW_NUMBER}</td>
|
||||
<td>{announcers.ANNOUNCER}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<!-- END announcers -->
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="catBottom warnColor1" colspan="2">{L_BT_FLIST_ANNOUNCERS_NOTICE}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
<h1 class="pagetitle">{L_BT_FLIST}</h1>
|
||||
<table class="forumline">
|
||||
<thead>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue