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
511f2d545e
commit
ef2c6b42cd
1 changed files with 8 additions and 2 deletions
|
@ -64,9 +64,15 @@ switch ($mode) {
|
|||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
|
||||
if (!$cached_thanks = CACHE('bb_cache')->get($thanks_cache_key)) {
|
||||
$cached_thanks = DB()->fetch_rowset('SELECT u.username, u.user_rank, u.user_id, t.* FROM ' . BB_THX . ' t, ' . BB_USERS . " u WHERE t.topic_id = $topic_id AND t.user_id = u.user_id");
|
||||
if (!empty($cached_thanks)) {
|
||||
CACHE('bb_cache')->set($thanks_cache_key, $cached_thanks, $cache_lifetime);
|
||||
}
|
||||
}
|
||||
|
||||
$user_list = [];
|
||||
$sql = DB()->fetch_rowset('SELECT u.username, u.user_rank, u.user_id, t.* FROM ' . BB_THX . ' t, ' . BB_USERS . " u WHERE t.topic_id = $topic_id AND t.user_id = u.user_id");
|
||||
foreach ($sql as $row) {
|
||||
foreach ($cached_thanks as $row) {
|
||||
$user_list[] = '<b>' . profile_url($row) . ' <i>(' . bb_date($row['time']) . ')</i></b>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue