mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Typo (#1168)
This commit is contained in:
parent
9973931004
commit
4c0a9c0bc6
3 changed files with 7 additions and 5 deletions
|
@ -394,11 +394,13 @@ class Torrent
|
||||||
foreach ($info['files'] as $fn => $f) {
|
foreach ($info['files'] as $fn => $f) {
|
||||||
// Exclude padding files
|
// Exclude padding files
|
||||||
if (($f['attr'] ?? null) !== 'p') {
|
if (($f['attr'] ?? null) !== 'p') {
|
||||||
$totallen += (isset($f['length']) && is_numeric($f['length'])) ? (float)$f['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']);
|
$totallen += (isset($f['length']) && is_numeric($f['length'])) ? $f['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$totallen = (float)$totallen;
|
||||||
} elseif (isset($bt_v2)) {
|
} elseif (isset($bt_v2)) {
|
||||||
$fileTreeSize = function (array $array, string $name = '') use (&$fileTreeSize) {
|
$fileTreeSize = function (array $array, string $name = '') use (&$fileTreeSize) {
|
||||||
|
|
||||||
global $lang;
|
global $lang;
|
||||||
|
|
||||||
$size = 0;
|
$size = 0;
|
||||||
|
@ -406,7 +408,7 @@ class Torrent
|
||||||
if (!isset($value[''])) {
|
if (!isset($value[''])) {
|
||||||
$size += $fileTreeSize($value);
|
$size += $fileTreeSize($value);
|
||||||
} else {
|
} else {
|
||||||
$size += (isset($value['']['length']) && is_numeric($value['']['length'])) ? (float)$value['']['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']);
|
$size += (isset($value['']['length']) && is_numeric($value['']['length'])) ? $value['']['length'] : self::torrent_error_exit($lang['TORFILE_INVALID']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ class TorrentFileList
|
||||||
$html_v2 = $this->fileTreeList($value);
|
$html_v2 = $this->fileTreeList($value);
|
||||||
$allItems .= "<li><span class=\"b\">$key</span><ul>$html_v2</ul></li>";
|
$allItems .= "<li><span class=\"b\">$key</span><ul>$html_v2</ul></li>";
|
||||||
} else {
|
} else {
|
||||||
$length = (float)$value['']['length'];
|
$length = $value['']['length'];
|
||||||
$root = bin2hex($value['']['pieces root'] ?? '');
|
$root = bin2hex($value['']['pieces root'] ?? '');
|
||||||
$allItems .= "<li><span>$key<i>$length</i><p>$root</p></span></li>";
|
$allItems .= "<li><span>$key<i>$length</i><p>$root</p></span></li>";
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ class TorrentFileList
|
||||||
if (!isset($value[''])) {
|
if (!isset($value[''])) {
|
||||||
$this->fileTreeTable($value, $current);
|
$this->fileTreeTable($value, $current);
|
||||||
} else {
|
} else {
|
||||||
$length = (float)$value['']['length'];
|
$length = $value['']['length'];
|
||||||
$root = bin2hex($value['']['pieces root'] ?? '');
|
$root = bin2hex($value['']['pieces root'] ?? '');
|
||||||
$filesList['list'] .= '<tr><td>' . $current . '</td><td>' . humn_size($length, 2) . '</td><td>' . $root . '</td></tr><tr>';
|
$filesList['list'] .= '<tr><td>' . $current . '</td><td>' . humn_size($length, 2) . '</td><td>' . $root . '</td></tr><tr>';
|
||||||
$filesList['count']++;
|
$filesList['count']++;
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
<p class="small">{postrow.attach.tor_reged.FILESIZE}</p>
|
<p class="small">{postrow.attach.tor_reged.FILESIZE}</p>
|
||||||
<p style="padding-top: 6px;"><input id="tor-filelist-btn" type="button" class="lite" value="{L_FILELIST}" /></p>
|
<p style="padding-top: 6px;"><input id="tor-filelist-btn" type="button" class="lite" value="{L_FILELIST}" /></p>
|
||||||
<!-- IF postrow.attach.tor_reged.HASH_V2 -->
|
<!-- IF postrow.attach.tor_reged.HASH_V2 -->
|
||||||
<p><a href="{FULL_URL}viewtopic.php?filelist&topic={TOPIC_ID}" title = "File hashes | Detailed .torrent meta info" target="_blank">...</a></p>
|
<p><a href="{FULL_URL}viewtopic.php?filelist&topic={TOPIC_ID}" title = "File hashes | .torrent meta-info" target="_blank">...</a></p>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue