From 8a72b29d45d00af8d103ca146d99640ec42cc325 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 9 Mar 2018 10:26:47 -0500 Subject: [PATCH] more --- contrib/backends/srndv2/src/srnd/templates_impl.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/backends/srndv2/src/srnd/templates_impl.go b/contrib/backends/srndv2/src/srnd/templates_impl.go index 41a8aa9..1f7e3b9 100644 --- a/contrib/backends/srndv2/src/srnd/templates_impl.go +++ b/contrib/backends/srndv2/src/srnd/templates_impl.go @@ -274,7 +274,13 @@ func (self *templateEngine) genUkko(prefix, frontend string, wr io.Writer, datab func (self *templateEngine) genUkkoPaginated(prefix, frontend string, wr io.Writer, database Database, pages, page int, json bool, i18n *I18N, invertPagination bool) { var threads []ThreadModel - for _, article := range database.GetLastBumpedThreadsPaginated("", 10, page*10) { + var articles []ArticleEntry + if invertPagination { + articles = database.GetLastBumpedThreadsPaginated("", 10, (pages-page)*10) + } else { + articles = database.GetLastBumpedThreadsPaginated("", 10, page*10) + } + for _, article := range articles { root := article[0] thread, err := database.GetThreadModel(prefix, root) if err == nil {