Update thanks.php

This commit is contained in:
Roman Kelesidis 2025-07-29 19:28:17 +03:00
commit 28413cc9ef
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -107,13 +107,7 @@ switch ($mode) {
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']); $this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
} }
if (!$cached_thanks = CACHE('bb_cache')->get($thanks_cache_key)) { $cached_thanks = get_thanks_list($topic_id);
$cached_thanks = DB()->fetch_rowset('SELECT u.username, u.user_rank, u.user_id, thx.* FROM ' . BB_THX . ' thx, ' . BB_USERS . " u WHERE thx.topic_id = $topic_id AND thx.user_id = u.user_id");
if (!empty($cached_thanks)) {
CACHE('bb_cache')->set($thanks_cache_key, $cached_thanks, $cache_lifetime);
}
}
$user_list = []; $user_list = [];
foreach ($cached_thanks as $row) { foreach ($cached_thanks as $row) {
$user_list[] = '<b>' . profile_url($row) . ' <i>(' . bb_date($row['time']) . ')</i></b>'; $user_list[] = '<b>' . profile_url($row) . ' <i>(' . bb_date($row['time']) . ')</i></b>';