summaryrefslogtreecommitdiff
path: root/templates/themes/catalog/theme.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-07-31 20:51:43 -0400
committerMichael Foster <savetheinternet@tinyboard.org>2013-07-31 20:51:43 -0400
commit328484bee7cab9ce354121413cc8d96c3e227aea (patch)
tree7adf01c48cbe1970c159da182292b5c7ed48d958 /templates/themes/catalog/theme.php
parent6bbe407e18681f2812db4345036bb5ae639f5973 (diff)
SQL cleanup
Diffstat (limited to 'templates/themes/catalog/theme.php')
-rw-r--r--templates/themes/catalog/theme.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php
index e585cf17..5c9f6769 100644
--- a/templates/themes/catalog/theme.php
+++ b/templates/themes/catalog/theme.php
@@ -39,7 +39,7 @@
$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()) {
+ 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']));
$post['board_name'] = $board['name'];
$post['file'] = $config['uri_thumb'] . $post['thumb'];