From 0313477c29f101f332b51b2c1ea361320e22bd85 Mon Sep 17 00:00:00 2001 From: neptune Date: Tue, 10 Nov 2020 04:02:41 -0300 Subject: Modbrowse usa path_split --- cgi/manage.py | 4 ++-- cgi/templates/manage/mod.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cgi/manage.py b/cgi/manage.py index 5def5c5..f30674a 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -176,8 +176,8 @@ def manage(self, path_split): if not board: template_filename = "mod.html" template_values = {"mode": 1, 'boards': boardlist()} - elif self.formdata.get("thread"): - parentid = int(self.formdata["thread"]) + elif len(path_split) > 4: + parentid = int(path_split[4]) posts = FetchAll('SELECT id, timestamp, timestamp_formatted, name, message, file, thumb, IS_DELETED, locked, subject, length, INET6_NTOA(ip) AS ip FROM `posts` WHERE (parentid = %d OR id = %d) AND boardid = %s ORDER BY `id` ASC' % ( parentid, parentid, board['id'])) template_filename = "mod.html" diff --git a/cgi/templates/manage/mod.html b/cgi/templates/manage/mod.html index ddc688f..1cbaddf 100644 --- a/cgi/templates/manage/mod.html +++ b/cgi/templates/manage/mod.html @@ -25,7 +25,7 @@ #{i} #{thread['id']} - #{thread['subject']} + #{thread['subject']} #{thread['timestamp_formatted'][:21]} ${thread['message'][:200]} #{thread['length']} @@ -93,4 +93,4 @@
- \ No newline at end of file + -- cgit v1.2.1-18-gbd029