diff options
Diffstat (limited to 'templates/themes/ukko/theme.php')
| -rw-r--r-- | templates/themes/ukko/theme.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index 1d98f836..6faf7139 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -73,7 +73,7 @@ openBoard($post['board']); $thread = new Thread($post, $mod ? '?/' : $config['root'], $mod); - $posts = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `id` DESC LIMIT :limit", $post['board'])); + $posts = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `sticky` DESC, `id` DESC LIMIT :limit", $post['board'])); $posts->bindValue(':id', $post['id']); $posts->bindValue(':limit', ($post['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview']), PDO::PARAM_INT); $posts->execute() or error(db_error($posts)); |
