aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi')
-rw-r--r--cgi/manage.py4
-rw-r--r--cgi/templates/manage/reports.html2
-rwxr-xr-xcgi/weabot.py6
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}
<td><a href="#{report['link']}">${report['link']}</a></td>
<td><a href="#{cgi_url}manage/ipshow?ip=${report['ip']}">${report['ip']}</a></td>
<td>${report['reason']}</td>
- <td><a href="#{cgi_url}manage/ipshow?ip=${report['reporterip']}">${report['reporterip']}</a></td>
+ <td><a href="#{cgi_url}manage/ipshow?ip=${report['repip']}">${report['repip']}</a></td>
</tr>
<?py #endfor ?>
<tr>
diff --git a/cgi/weabot.py b/cgi/weabot.py
index 664fa02..c91570c 100755
--- a/cgi/weabot.py
+++ b/cgi/weabot.py
@@ -975,8 +975,10 @@ class weabot(object):
message = cgi.escape(self.formdata["reason"]).strip()[0:8000]
message = message.replace("\n", "<br />")
- UpdateDb("INSERT INTO `reports` (board, postid, parentid, link, ip, reason, reporterip, timestamp, timestamp_formatted) VALUES ('%s', '%s', '%s', '%s', INET6_ATON('%s'), '%s', INET6_ATON('%s'), '%s', '%s')" % (
- board["dir"], post['id'], post['parentid'], link, post['ip'], _mysql.escape_string(message), _mysql.escape_string(self.environ["REMOTE_ADDR"]), str(t), formatTimestamp(t)))
+ UpdateDb("INSERT INTO `reports` (board, postid, parentid, link, ip, reason, repip, timestamp, timestamp_formatted) " +
+ "VALUES ('%s', '%s', '%s', '%s', '%s', '%s', INET6_ATON('%s'), '%s', '%s')" % (
+ board["dir"], post['id'], post['parentid'], link, post['ip'], _mysql.escape_string(message),
+ _mysql.escape_string(self.environ["REMOTE_ADDR"]), str(t), formatTimestamp(t)))
self.output = renderTemplate("report.html", {'finished': True})
def stats(self):