forked from GithubBackups/tinyib
Fixing trim threads bug
This commit is contained in:
parent
a88d0283f7
commit
b36b446d9a
@ -142,7 +142,7 @@ function deletePostByID($id) {
|
|||||||
function trimThreads() {
|
function trimThreads() {
|
||||||
global $tinyib;
|
global $tinyib;
|
||||||
if ($tinyib['maxthreads'] > 0) {
|
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)) {
|
while ($post = mysql_fetch_assoc($result)) {
|
||||||
deletePostByID($post['id']);
|
deletePostByID($post['id']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user