summaryrefslogtreecommitdiff
path: root/templates/themes/ukko2/theme.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/themes/ukko2/theme.php')
-rw-r--r--templates/themes/ukko2/theme.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/themes/ukko2/theme.php b/templates/themes/ukko2/theme.php
index 42074d69..76a78caf 100644
--- a/templates/themes/ukko2/theme.php
+++ b/templates/themes/ukko2/theme.php
@@ -53,7 +53,7 @@
array_push($boardsforukko2,$_board);
}
}
- $query = preg_replace('/UNION ALL $/', 'ORDER BY `bump` DESC', $query);
+ $query = preg_replace('/UNION ALL $/', 'ORDER BY `sticky` DESC ,`bump` DESC', $query);
$query = query($query) or error(db_error());
$count = 0;
@@ -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));