unify bonus calculation

This commit is contained in:
xiaomlove
2022-04-20 00:52:12 +08:00
parent 63e894abda
commit b96e248083
6 changed files with 142 additions and 77 deletions
+5
View File
@@ -511,6 +511,11 @@ else
}
if (isset($event) && !empty($event)) {
$updateset[] = 'seeders = ' . count_peer("torrent = $torrentid and to_go = 0");
$updateset[] = 'leechers = ' . count_peer("torrent = $torrentid and to_go > 0");
}
if (count($updateset)) // Update only when there is change in peer counts
{
$updateset[] = "visible = 'yes'";