diff options
author | Renard | 2020-07-31 19:06:40 -0400 |
---|---|---|
committer | Renard | 2020-07-31 19:06:40 -0400 |
commit | 1a000661337bfc373f9d099af91c871550329d5c (patch) | |
tree | 1e47c0a2fd11f91ae96fb6351130c186f4953f99 | |
parent | ab7907ae8adf2f6bcbb969ed959f5c8324cb9e8b (diff) | |
download | weabot-1a000661337bfc373f9d099af91c871550329d5c.tar.gz weabot-1a000661337bfc373f9d099af91c871550329d5c.tar.xz weabot-1a000661337bfc373f9d099af91c871550329d5c.zip |
Query test
-rw-r--r-- | cgi/modapi.py | 7 |
1 files changed, 6 insertions, 1 deletions
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': |