Commit 01d0dd66 authored by kaiyou's avatar kaiyou

Display older public articles

parent bd99044e
Pipeline #349 passed with stage
in 2 minutes and 37 seconds
......@@ -71,7 +71,7 @@ func (app *App) FetchPublicPosts() (interface{}, error) {
FROM collections c
LEFT JOIN posts p ON p.collection_id = c.id
LEFT JOIN users u ON u.id = p.owner_id
WHERE c.privacy = 1 AND (p.created >= ` + app.db.dateSub(3, "month") + ` AND p.created <= ` + app.db.now() + ` AND pinned_position IS NULL) AND u.status = 0
WHERE c.privacy = 1 AND (p.created >= ` + app.db.dateSub(36, "month") + ` AND p.created <= ` + app.db.now() + ` AND pinned_position IS NULL) AND u.status = 0
ORDER BY p.created DESC`)
if err != nil {
log.Error("Failed selecting from posts: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment