diff options
| author | czaks <marcin@6irc.net> | 2013-08-01 00:47:33 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-01 00:47:33 -0400 |
| commit | 168a4d73cc2c47cd9039ff466b03fb6812fbb677 (patch) | |
| tree | 418a3d3ba99739fcb4765f914de44b6ecc3f104a /templates/themes/catalog/theme.php | |
| parent | cefd5517ac1a532214ac2f47485f63958c87ce25 (diff) | |
| parent | 5bf0e7f7e76cd3610e0aa692e0c433aca594ee51 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'templates/themes/catalog/theme.php')
| -rw-r--r-- | templates/themes/catalog/theme.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index 5c9f6769..4e2d40db 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -37,7 +37,7 @@ $recent_posts = array(); $stats = array(); - $query = query(sprintf("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM `posts_%s` WHERE `thread` = `thread_id`) AS `reply_count`, '%s' AS `board` FROM `posts_%s` WHERE `thread` IS NULL ORDER BY `bump` DESC", $board_name, $board_name, $board_name)) or error(db_error()); + $query = query(sprintf("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM ``posts_%s`` WHERE `thread` = `thread_id`) AS `reply_count`, '%s' AS `board` FROM ``posts_%s`` WHERE `thread` IS NULL ORDER BY `bump` DESC", $board_name, $board_name, $board_name)) or error(db_error()); while ($post = $query->fetch(PDO::FETCH_ASSOC)) { $post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id'])); |
