Archived
1
0
This commit is contained in:
Jeff Becker 2018-03-09 10:26:47 -05:00
parent fcd5a97225
commit 8a72b29d45
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -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) { func (self *templateEngine) genUkkoPaginated(prefix, frontend string, wr io.Writer, database Database, pages, page int, json bool, i18n *I18N, invertPagination bool) {
var threads []ThreadModel 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] root := article[0]
thread, err := database.GetThreadModel(prefix, root) thread, err := database.GetThreadModel(prefix, root)
if err == nil { if err == nil {