mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Update tr_cleanup_and_dlstat.php
Double stat fix for ocelot enabled trackers.
This commit is contained in:
parent
220c658891
commit
86c8567aae
1 changed files with 4 additions and 2 deletions
|
@ -93,6 +93,8 @@ if ($tr_cfg['update_dlstat'])
|
|||
");
|
||||
|
||||
// Update TOTAL user's dlstat
|
||||
// This is not needed if ocelot enabled. It's important.
|
||||
if(!$bb_cfg['ocelot']['enabled']){
|
||||
DB()->query("
|
||||
UPDATE
|
||||
". BB_BT_USERS ." u,
|
||||
|
@ -108,7 +110,7 @@ if ($tr_cfg['update_dlstat'])
|
|||
u.up_bonus_today = u.up_bonus_today + ub.bonus_add
|
||||
WHERE u.user_id = ub.user_id
|
||||
");
|
||||
|
||||
}
|
||||
// Delete from dl_list what exists in BUF but not exsits in NEW
|
||||
DB()->query("
|
||||
DELETE dl
|
||||
|
@ -150,4 +152,4 @@ DB()->query("
|
|||
". BB_BT_LAST_USERSTAT ." TO ". OLD_BB_BT_LAST_USERSTAT .",
|
||||
". NEW_BB_BT_LAST_USERSTAT ." TO ". BB_BT_LAST_USERSTAT ."
|
||||
");
|
||||
DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_LAST_USERSTAT .", ". OLD_BB_BT_LAST_USERSTAT);
|
||||
DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_LAST_USERSTAT .", ". OLD_BB_BT_LAST_USERSTAT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue