mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Don't create empty announce-list dict, if ann_urls are empty (#334)
Co-authored-by: Cønstantine Kovalensky <45331093+kovalensky@users.noreply.github.com>
This commit is contained in:
parent
17736a7d5d
commit
6889832aab
@ -506,7 +506,7 @@ function send_torrent_with_passkey ($filename)
|
|||||||
{
|
{
|
||||||
unset($tor['announce-list']);
|
unset($tor['announce-list']);
|
||||||
}
|
}
|
||||||
else
|
else if (!empty($announce_urls_add))
|
||||||
{
|
{
|
||||||
$tor['announce-list'] = array_merge((isset($tor['announce-list']) ? $tor['announce-list'] : array()), $announce_urls_add);
|
$tor['announce-list'] = array_merge((isset($tor['announce-list']) ? $tor['announce-list'] : array()), $announce_urls_add);
|
||||||
}
|
}
|
||||||
@ -516,7 +516,7 @@ function send_torrent_with_passkey ($filename)
|
|||||||
{
|
{
|
||||||
if (bf($userdata['user_opt'], 'user_opt', 'user_retracker') || IS_GUEST)
|
if (bf($userdata['user_opt'], 'user_opt', 'user_retracker') || IS_GUEST)
|
||||||
{
|
{
|
||||||
$tor['announce-list'] = array_merge((isset($tor['announce-list']) ? $tor['announce-list'] : array()), [$bb_cfg['tracker']['retracker_host']]);
|
$tor['announce-list'] = array_merge((isset($tor['announce-list']) ? $tor['announce-list'] : array()), array(array($bb_cfg['tracker']['retracker_host'])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user