From d3af8d8c537980dc03662a45c00b2310b82ce20c Mon Sep 17 00:00:00 2001 From: Albert S Date: Fri, 16 Nov 2018 16:50:39 +0100 Subject: [PATCH] revisiondaosqlite: fix sorting --- database/revisiondaosqlite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/revisiondaosqlite.cpp b/database/revisiondaosqlite.cpp index 909a029..58994d8 100644 --- a/database/revisiondaosqlite.cpp +++ b/database/revisiondaosqlite.cpp @@ -53,7 +53,7 @@ std::vector RevisionDaoSqlite::getAllRevisions(QueryOption &options) SqliteQueryOption queryOption{options}; std::string queryOptionSql = queryOption.setPrependWhere(true) .setVisibleColumnName("page.visible") - .setOrderByColumn("revisionid") + .setOrderByColumn("creationtime") .build(); auto query = *db @@ -92,7 +92,7 @@ std::vector RevisionDaoSqlite::getAllRevisionsForPage(std::string page SqliteQueryOption queryOption{option}; std::string queryOptionSql = queryOption.setPrependWhere(false) .setVisibleColumnName("page.visible") - .setOrderByColumn("revisionid") + .setOrderByColumn("creationtime") .build(); auto query = *db << "SELECT (SELECT username FROM user WHERE id = author), comment, content, " "strftime('%s',creationtime), page.name, revisionid FROM revision INNER JOIN page ON "