From b36b446d9a7ba9d1886765049ee8c28e844ea99c Mon Sep 17 00:00:00 2001 From: tslocum Date: Mon, 29 Nov 2010 16:26:34 -0800 Subject: [PATCH] Fixing trim threads bug --- inc/database_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/database_mysql.php b/inc/database_mysql.php index 9d6802c..c46c8c5 100644 --- a/inc/database_mysql.php +++ b/inc/database_mysql.php @@ -142,7 +142,7 @@ function deletePostByID($id) { function trimThreads() { global $tinyib; if ($tinyib['maxthreads'] > 0) { - $result = mysql_query("SELECT `id` FROM `b_posts` WHERE `parent` = 0 ORDER BY `bumped` DESC LIMIT " . $tinyib['maxthreads']. ", 10"); + $result = mysql_query("SELECT `id` FROM `" . $GLOBALS['mysql_posts_table'] . "` WHERE `parent` = 0 ORDER BY `bumped` DESC LIMIT " . $tinyib['maxthreads']. ", 10"); while ($post = mysql_fetch_assoc($result)) { deletePostByID($post['id']); }