From 8b7427763f8ec4cf76e69d26d4ff3d105a42dd41 Mon Sep 17 00:00:00 2001 From: bai Date: Tue, 21 Jul 2020 07:06:15 -0400 Subject: Arreglados reportes con IPv6 --- cgi/manage.py | 4 ++-- cgi/templates/manage/reports.html | 2 +- cgi/weabot.py | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cgi/manage.py b/cgi/manage.py index 2aa8a5e..4ece445 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -1871,10 +1871,10 @@ def manage(self, path_split): # Tabla if 'board' in self.formdata.keys() and self.formdata['board'] != 'all': - reports = FetchAll("SELECT id, timestamp, timestamp_formatted, postid, parentid, link, board, INET6_NTOA(ip) AS ip, reason, reporterip FROM `reports` WHERE `board` = '%s' ORDER BY `timestamp` DESC LIMIT %d, %d" % ( + reports = FetchAll("SELECT id, timestamp, timestamp_formatted, postid, parentid, link, board, INET6_NTOA(ip) AS ip, reason, INET6_NTOA(repip) AS repip FROM `reports` WHERE `board` = '%s' ORDER BY `timestamp` DESC LIMIT %d, %d" % ( _mysql.escape_string(self.formdata['board']), currentpage*pagesize, pagesize)) else: - reports = FetchAll("SELECT id, timestamp, timestamp_formatted, postid, parentid, link, board, INET6_NTOA(ip) AS ip, reason, reporterip FROM `reports` ORDER BY `timestamp` DESC LIMIT %d, %d" % ( + reports = FetchAll("SELECT id, timestamp, timestamp_formatted, postid, parentid, link, board, INET6_NTOA(ip) AS ip, reason, INET6_NTOA(repip) AS repip FROM `reports` ORDER BY `timestamp` DESC LIMIT %d, %d" % ( currentpage*pagesize, pagesize)) if 'board' in self.formdata.keys(): diff --git a/cgi/templates/manage/reports.html b/cgi/templates/manage/reports.html index f47ec38..6095d50 100644 --- a/cgi/templates/manage/reports.html +++ b/cgi/templates/manage/reports.html @@ -45,7 +45,7 @@ ${message}