Fixing attribute ordering again.

This commit is contained in:
Sergiotarxz 2023-09-17 06:03:49 +02:00
parent d011f605d2
commit 2bc7c60246

View File

@ -185,7 +185,7 @@ sub RetrieveAllPostsForCategory ( $self, $category_name ) {
sub shufflePostsIfRequired ( $self, $category, $posts ) {
my $pinned_posts = [
sort { $b->{pinned} <=> $b->{pinned} }
sort { $b->{pinned} <=> $a->{pinned} }
grep { defined $_->{pinned} } @$posts
];
$posts = [ grep { !exists $_->{pinned} } @$posts ];