mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Merge 86c8567aae
into 3bd7c1024b
This commit is contained in:
commit
241001e3b3
2 changed files with 8 additions and 3 deletions
|
@ -93,6 +93,8 @@ if ($tr_cfg['update_dlstat'])
|
||||||
");
|
");
|
||||||
|
|
||||||
// Update TOTAL user's dlstat
|
// Update TOTAL user's dlstat
|
||||||
|
// This is not needed if ocelot enabled. It's important.
|
||||||
|
if(!$bb_cfg['ocelot']['enabled']){
|
||||||
DB()->query("
|
DB()->query("
|
||||||
UPDATE
|
UPDATE
|
||||||
". BB_BT_USERS ." u,
|
". BB_BT_USERS ." u,
|
||||||
|
@ -108,7 +110,7 @@ if ($tr_cfg['update_dlstat'])
|
||||||
u.up_bonus_today = u.up_bonus_today + ub.bonus_add
|
u.up_bonus_today = u.up_bonus_today + ub.bonus_add
|
||||||
WHERE u.user_id = ub.user_id
|
WHERE u.user_id = ub.user_id
|
||||||
");
|
");
|
||||||
|
}
|
||||||
// Delete from dl_list what exists in BUF but not exsits in NEW
|
// Delete from dl_list what exists in BUF but not exsits in NEW
|
||||||
DB()->query("
|
DB()->query("
|
||||||
DELETE dl
|
DELETE dl
|
||||||
|
|
|
@ -2560,6 +2560,9 @@ function create_magnet ($infohash, $auth_key, $logged_in)
|
||||||
global $bb_cfg, $_GET, $userdata, $images;
|
global $bb_cfg, $_GET, $userdata, $images;
|
||||||
|
|
||||||
$passkey_url = ((!$logged_in || isset($_GET['no_passkey'])) && $bb_cfg['bt_tor_browse_only_reg']) ? '' : "?{$bb_cfg['passkey_key']}=$auth_key";
|
$passkey_url = ((!$logged_in || isset($_GET['no_passkey'])) && $bb_cfg['bt_tor_browse_only_reg']) ? '' : "?{$bb_cfg['passkey_key']}=$auth_key";
|
||||||
|
if($bb_cfg['ocelot']['enabled']){
|
||||||
|
return '<a href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['ocelot']['url'] .$auth_key. "/announce") .'"><img src="'. $images['icon_magnet'] .'" width="12" height="12" border="0" /></a>';
|
||||||
|
}
|
||||||
return '<a href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['bt_announce_url'] . $passkey_url) .'"><img src="'. $images['icon_magnet'] .'" width="12" height="12" border="0" /></a>';
|
return '<a href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['bt_announce_url'] . $passkey_url) .'"><img src="'. $images['icon_magnet'] .'" width="12" height="12" border="0" /></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue