From 1a000661337bfc373f9d099af91c871550329d5c Mon Sep 17 00:00:00 2001 From: Renard Date: Fri, 31 Jul 2020 19:06:40 -0400 Subject: Query test --- cgi/modapi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cgi') diff --git a/cgi/modapi.py b/cgi/modapi.py index abefdc9..65c7320 100644 --- a/cgi/modapi.py +++ b/cgi/modapi.py @@ -82,10 +82,15 @@ def api_process(self, path_split): _mysql.escape_string(id) + "'") values['post'] = post if 'parentid' in formdata.keys(): - id = formdata.get('id') + id = formdata.get('parentid') post = FetchAll("SELECT * FROM `posts` WHERE `parentid` = '" + _mysql.escape_string(id) + "'") values['posts'] = post + if 'test' in formdata.keys(): + id = formdata.get('test') + post = FetchAll("SELECT `id`, `boardid`, `parentid`,`timestamp`, `name`, `tripcode`, `email` ,`subject`,`message`,`file`,`thumb`, IPV6_NTOA(`ip`) as ip,`IS_DELETED` AS `deleted`, `bumped`, `last`, `locked` FROM `posts` WHERE `parentid` = '" + + _mysql.escape_string(id) + "'") + values['posts'] = post elif method == 'reports': # /cgi/manage/reports/ignore if len(path_split) > 3: if path_split[3] == 'ignore': -- cgit v1.2.1-18-gbd029