From 4f9fcbb31e782b129adfabfbd5a821833fc30ac1 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 12 May 2020 19:52:53 +0200 Subject: weblog: Fixed article sorting --- plugins/weblog/weblog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/weblog/weblog.cpp b/plugins/weblog/weblog.cpp index eb02bb2..c18f120 100644 --- a/plugins/weblog/weblog.cpp +++ b/plugins/weblog/weblog.cpp @@ -134,7 +134,7 @@ namespace { size_t index0{std::min(number_of_articles_on_front_page * (page), result.size())}; size_t index1{std::min(number_of_articles_on_front_page * (page + 1), result.size())}; // sort backwards - std::partial_sort(result.begin(), result.begin() + index1, result.end(), [](const ArticleInfo& a0, const ArticleInfo& a1){ return a0.date > a1.date;}); + std::partial_sort(result.begin(), result.begin() + index1, result.end(), [](const ArticleInfo& a0, const ArticleInfo& a1){ return a0.path.string() > a1.path.string();}); return {result.begin() + index0, result.begin() + index1}; } -- cgit v1.2.3