From b3ffae870524e67bcd356beba0a5333c4b9b23d4 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Fri, 28 Apr 2017 01:12:38 +0900 Subject: Fix ukko scroll to post is too high / incorrect bug because of post_controls being display block on ukko threads. Add ordering by sticky to ukko2 and ukko3 forms for overboards --- templates/themes/ukko/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/themes/ukko/theme.php') 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)); -- cgit v1.3