mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Update thanks.php
This commit is contained in:
parent
28413cc9ef
commit
b3b811f889
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ switch ($mode) {
|
|||
// Limit voters per topic
|
||||
$tor_thank_limit_per_topic = (int)$bb_cfg['tor_thank_limit_per_topic'];
|
||||
if ($tor_thank_limit_per_topic > 0) {
|
||||
$thanks_count = DB()->fetch_row('SELECT COUNT(*) as thx FROM ' . BB_THX . " WHERE topic_id = $topic_id")['thx'];
|
||||
$thanks_count = count($cached_thanks);
|
||||
if ($thanks_count > $tor_thank_limit_per_topic) {
|
||||
DB()->query('DELETE FROM ' . BB_THX . " WHERE topic_id = $topic_id ORDER BY time ASC LIMIT 1");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue