mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
fix(filelist): Undefined property: FileTree::$length
when v2 torrent only
This commit is contained in:
parent
a0fc2a9da9
commit
2897aedab7
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
|
// Get torrent files
|
||||||
$files = $torrent->$t_version_field()->$t_files_field();
|
$files = $torrent->$t_version_field()->$t_files_field();
|
||||||
if ($meta_v1 && $meta_v2) {
|
if ($meta_v2) {
|
||||||
$files = new \RecursiveIteratorIterator($files); // Flatten the list
|
$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_name = !empty($t_name = $torrent->getName()) ? str_short(htmlCHR($t_name), 200) : $lang['UNKNOWN'];
|
||||||
$torrent_size = humn_size($row['size'], 2);
|
$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
|
// Output page
|
||||||
$template->assign_vars([
|
$template->assign_vars([
|
||||||
'PAGE_TITLE' => "$torrent_name (" . $torrent_size . ")",
|
'PAGE_TITLE' => "$torrent_name (" . $torrent_size . ")",
|
||||||
|
|
|
@ -6,30 +6,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<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>
|
<h1 class="pagetitle">{L_BT_FLIST}</h1>
|
||||||
<table class="forumline">
|
<table class="forumline">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue