mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 10:37:30 -07:00
Minor improvements (#868)
* Minor improvements * Update viewforum.php * Updated
This commit is contained in:
parent
87b497e32a
commit
9b43d144a4
13 changed files with 20 additions and 90 deletions
|
@ -799,10 +799,6 @@ function generate_user_info($row, bool $group_mod = false): array
|
|||
|
||||
function get_bt_userdata($user_id)
|
||||
{
|
||||
if (!\TorrentPier\Legacy\Torrent::getPasskey($user_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$btu = CACHE('bb_cache')->get('btu_' . $user_id)) {
|
||||
$btu = DB()->fetch_row("
|
||||
SELECT bt.*, SUM(tr.speed_up) AS speed_up, SUM(tr.speed_down) AS speed_down
|
||||
|
@ -1761,11 +1757,11 @@ function decode_text_match($txt)
|
|||
*
|
||||
* @param string $infohash
|
||||
* @param string $infohash_v2
|
||||
* @param string|bool $auth_key
|
||||
* @param string $auth_key
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function create_magnet(string $infohash, string $infohash_v2, $auth_key): string
|
||||
function create_magnet(string $infohash, string $infohash_v2, string $auth_key): string
|
||||
{
|
||||
global $bb_cfg, $images;
|
||||
|
||||
|
@ -1774,11 +1770,6 @@ function create_magnet(string $infohash, string $infohash_v2, $auth_key): string
|
|||
return false;
|
||||
}
|
||||
|
||||
// Hasn't passkey
|
||||
if (!$auth_key) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return '<a href="magnet:?xt=urn:btih:' . bin2hex($infohash) . (!empty($infohash_v2) ? '&xt=urn:btmh:1220' . bin2hex($infohash_v2) : '') . '&tr=' . urlencode($bb_cfg['bt_announce_url'] . "?{$bb_cfg['passkey_key']}=$auth_key") . '"><img src="' . $images['icon_magnet'] . '" width="12" height="12" border="0" /></a>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue