mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Update thanks.php
This commit is contained in:
parent
d78305d6af
commit
ba31815594
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ switch ($mode) {
|
||||||
DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)");
|
DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)");
|
||||||
|
|
||||||
// Limit voters per topic
|
// Limit voters per topic
|
||||||
$thanks_count = DB()->fetch_row('SELECT COUNT(*) FROM ' . BB_THX . " WHERE topic_id = $topic_id");
|
$thanks_count = DB()->fetch_row('SELECT COUNT(*) as thx FROM ' . BB_THX . " WHERE topic_id = $topic_id")['thx'];
|
||||||
if ($thanks_count > (int)$bb_cfg['tor_thank_limit_per_topic']) {
|
if ($thanks_count > (int)$bb_cfg['tor_thank_limit_per_topic']) {
|
||||||
DB()->query('DELETE FROM ' . BB_THX . " WHERE topic_id = $topic_id ORDER BY time ASC LIMIT 1");
|
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