mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
255fc3e2bb
commit
1bbc340795
@ -575,7 +575,7 @@ INSERT INTO `bb_cron` VALUES ('', '1', 'DS update stats', 'ds_update_stats.php',
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Flash topic view', 'flash_topic_view.php', 'interval', '', '', '255', '', '', '00:10:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Clean search results', 'clean_search_results.php', 'interval', '', '', '255', '', '', '00:10:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', '', '', '20', '', '', '00:15:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Accrual seedbonus', 'tr_seed_bonus.php', 'interval', '', '', '25', '', '', '00:15:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Accrual seedbonus', 'tr_seed_bonus.php', 'interval', '', '', '25', '', '', '00:10:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', '', '', '10', '', '', '00:10:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', '', '', '255', '', '', '01:00:00', '1', '', '0', '1', '0');
|
||||
INSERT INTO `bb_cron` VALUES ('', '1', 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', '', '', '255', '', '', '06:00:00', '1', '', '0', '1', '0');
|
||||
|
@ -27,11 +27,20 @@ if ($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['se
|
||||
$seed_bonus = unserialize($bb_cfg['seed_bonus_points']);
|
||||
$seed_release = unserialize($bb_cfg['seed_bonus_release']);
|
||||
|
||||
// ------- Fix: https://torrentpier.com/threads/nedostacha-sidbonusov.41139/post-94240 ------- //
|
||||
$sql = "SELECT last_run
|
||||
FROM " . BB_CRON . "
|
||||
WHERE cron_script = '" . basename(__FILE__) . "'
|
||||
LIMIT 1";
|
||||
$cron_runs = DB()->fetch_row($sql);
|
||||
$cron_job_last_run = (TIMENOW - strtotime($cron_runs['last_run'])); // сколько сек прошло с прошлого запуска задачи
|
||||
|
||||
foreach($seed_bonus as $i => $points)
|
||||
{
|
||||
if (!$points || !$seed_release[$i]) continue;
|
||||
|
||||
$user_points = ((float) $points / 4);
|
||||
// ------- Fix: https://torrentpier.com/threads/nedostacha-sidbonusov.41139/post-94240 ------- //
|
||||
$user_points = ($cron_job_last_run < 3600) ? round((float)$points * ($cron_job_last_run / 3600), 2) : 0; // сколько сидбонусов заработали за эти секи
|
||||
$release = (int) $seed_release[$i];
|
||||
$user_regdate = (TIMENOW - $bb_cfg['seed_bonus_user_regdate'] * 86400);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user