diff options
Diffstat (limited to 'cgi/api.py')
-rw-r--r-- | cgi/api.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -336,6 +336,7 @@ def api_process(self, path_split): post['thumb_height'] = post['thumb_height'] post['message'] = post['message'] values['posts'].append(post) + elif method == 'delete': data_board = formdata.get('dir') data_postid = formdata.get('id') @@ -357,6 +358,7 @@ def api_process(self, path_split): imageonly = True deletePosts(board['dir'], postid, imageonly, data_password) + elif method == 'post': boarddir = formdata.get('board') @@ -385,6 +387,13 @@ def api_process(self, path_split): values['post_url'] = post_url values['time_taken'] = ttaken values['post_id'] = postid + + elif method == 'styles': + values['bbs_styles'] = Settings.TXT_STYLES + values['ib_styles'] = Settings.STYLES + values['bbs_styles_default'] = Settings.TXT_STYLES_DEFAULT + values['ib_styles_default'] = Settings.STYLES_DEFAULT + elif method == 'newThreads': data_limit = formdata.get('limit') limit = 30 @@ -399,9 +408,11 @@ def api_process(self, path_split): threads = getNewThreads(limit) values['threads'] = threads + elif method == "blotter": latest_news = FetchAll("SELECT `timestamp`, `message`, `timestamp_formatted` FROM `news` WHERE `type` = '2' ORDER BY `timestamp` DESC LIMIT %s", (Settings.HOME_NEWS,)) values["news"] = latest_news + elif method == 'boardsExtra': boards = FetchAll('SELECT dir, name, longname, subname, postarea_desc, postarea_extra, anonymous, subject, message, disable_name, disable_subject, allow_spoilers, allow_oekaki, numthreads, board_type, allow_images, allow_image_replies, maxsize FROM `boards` WHERE `secret`=0 ORDER BY `sort` ASC') values['boards'] = boards |