aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar neptune 2020-11-10 04:02:41 -0300
committerLibravatar neptune 2020-11-10 04:02:41 -0300
commit0313477c29f101f332b51b2c1ea361320e22bd85 (patch)
treefb7004573767e2cbf67e7d53dfbc66d672a49edb
parent2c7f1346f618f2b6d77aaf5ab763313f7d51cdbe (diff)
downloadweabot-0313477c29f101f332b51b2c1ea361320e22bd85.tar.gz
weabot-0313477c29f101f332b51b2c1ea361320e22bd85.tar.xz
weabot-0313477c29f101f332b51b2c1ea361320e22bd85.zip
Modbrowse usa path_split
-rw-r--r--cgi/manage.py4
-rw-r--r--cgi/templates/manage/mod.html4
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 @@
<tr>
<td>#{i}</td>
<td>#{thread['id']}</td>
- <td><a href="?thread=#{thread['id']}"><b>#{thread['subject']}</b></a></td>
+ <td><a href="#{cgi_url}manage/mod/#{dir}/#{thread['id']}"><b>#{thread['subject']}</b></a></td>
<td class="date" data-unix="${thread['timestamp']}">#{thread['timestamp_formatted'][:21]}</td>
<td>${thread['message'][:200]}</td>
<td>#{thread['length']}</td>
@@ -93,4 +93,4 @@
<?py #endif ?>
</center>
<hr />
-<?py include('templates/base_bottom.html') ?> \ No newline at end of file
+<?py include('templates/base_bottom.html') ?>