From 109634fcea1a558be5da5bb607a2d5d5083d2b4f Mon Sep 17 00:00:00 2001 From: Choom Date: Sat, 17 Dec 2022 19:03:51 -0300 Subject: Trim basural --- cgi/post.py | 4 ++-- cgi/templates/trash.html | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cgi/post.py b/cgi/post.py index e3ab27f..ff5596f 100644 --- a/cgi/post.py +++ b/cgi/post.py @@ -1116,7 +1116,7 @@ def regenerateNews(): f.close() def regenerateTrash(): - posts = FetchAll("SELECT posts.id AS id, timestamp_formatted, posts.message AS message, boards.name AS board FROM `posts` INNER JOIN `boards` ON boardid = boards.id WHERE IS_DELETED = 2 ORDER BY `timestamp` DESC") + posts = FetchAll("SELECT posts.id AS id, timestamp_formatted, posts.message AS message, boards.name AS board FROM `posts` INNER JOIN `boards` ON boardid = boards.id WHERE IS_DELETED = 2 AND timestamp > %s ORDER BY `timestamp` DESC", (int(time.time()) - 31557600*3) ) for i in range(len(posts)): posts[i]["timestamp_formatted"] = posts[i]["timestamp_formatted"].split()[0] @@ -1186,7 +1186,7 @@ def regenerateAccess(): def regenerateKako(): board = Settings._.BOARD - threads = FetchAll("SELECT * FROM archive WHERE boardid = %s ORDER BY timestamp DESC" % board['id']) + threads = FetchAll("SELECT * FROM archive WHERE boardid = %s ORDER BY timestamp DESC", board['id']) page = renderTemplate('kako.html', {'threads': threads}) with open(Settings.ROOT_DIR + board["dir"] + "/kako/index.html", "w") as f: f.write(page) diff --git a/cgi/templates/trash.html b/cgi/templates/trash.html index 0bd5d8e..9659ca7 100644 --- a/cgi/templates/trash.html +++ b/cgi/templates/trash.html @@ -32,12 +32,14 @@ hr { } table { border-spacing: 8px; + line-height: 1.2em; } th, td { border-right: 1px solid #8a1f1f; border-bottom: 1px solid #8a1f1f; padding: 6px; + vertical-align: top; } th { background: #668800; -- cgit v1.2.1-18-gbd029