aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Choom 2022-12-17 19:03:51 -0300
committerLibravatar Choom 2022-12-17 20:07:41 -0300
commit109634fcea1a558be5da5bb607a2d5d5083d2b4f (patch)
tree92869c51bf97aed1a93d3f9a76df99d4ad4b28d0
parenta1cd85b48b2e61fe21ad48c93365696454401266 (diff)
downloadweabot-109634fcea1a558be5da5bb607a2d5d5083d2b4f.tar.gz
weabot-109634fcea1a558be5da5bb607a2d5d5083d2b4f.tar.xz
weabot-109634fcea1a558be5da5bb607a2d5d5083d2b4f.zip
Trim basural
-rw-r--r--cgi/post.py4
-rw-r--r--cgi/templates/trash.html2
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;