From 6ba5f9b8e037b744f91eb1dd3e64995b45270cc7 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Fri, 18 Feb 2011 00:44:01 +1100 Subject: [PATCH] Seperated threads and posts in the IP page --- mod.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod.php b/mod.php index bc162a9a..4b4046a9 100644 --- a/mod.php +++ b/mod.php @@ -656,9 +656,14 @@ $query->execute() or error(db_error($query)); while($post = $query->fetch()) { - $po = new Post($post['id'], $post['thread'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $mod ? '?/' : $config['root'], $mod); + if(!$post['thread']) { + $po = new Thread($post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['sticky'], $post['locked'], $mod ? '?/' : $config['root'], $mod); + } else { + $po = new Post($post['id'], $post['thread'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $mod ? '?/' : $config['root'], $mod); + } $temp .= $po->build(); } + if(!empty($temp)) $body .= '
Last ' . $query->rowCount() . ' posts on