summaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-12 19:52:53 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-12 19:52:53 +0200
commit4f9fcbb31e782b129adfabfbd5a821833fc30ac1 (patch)
tree60a4874350f48c9de41b4e2955232d454ee0d832 /plugins
parent0a4b9218017db3d058f5e215f855bc3f97bd161b (diff)
weblog: Fixed article sorting
Diffstat (limited to 'plugins')
-rw-r--r--plugins/weblog/weblog.cpp2
1 files changed, 1 insertions, 1 deletions
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};
}