From 2bc7c602466351cc9c856ee7d45c76d04f395a86 Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Sun, 17 Sep 2023 06:03:49 +0200 Subject: [PATCH] Fixing attribute ordering again. --- lib/BurguillosInfo/Posts.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/BurguillosInfo/Posts.pm b/lib/BurguillosInfo/Posts.pm index 1222d6b..5074cc7 100644 --- a/lib/BurguillosInfo/Posts.pm +++ b/lib/BurguillosInfo/Posts.pm @@ -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 ];