From 925594c7b196a877438b403db02efad530e1f279 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sat, 1 May 2021 09:21:22 -0700 Subject: [PATCH] Include details in moderation log when deleting a post --- imgboard.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/imgboard.php b/imgboard.php index 7875889..9600930 100644 --- a/imgboard.php +++ b/imgboard.php @@ -1001,7 +1001,15 @@ EOF; rebuildThread($post['parent']); } - manageLogAction(__('Deleted') . ' >>' . $post['id']); + $action = sprintf(__('Deleted %s'),'>>' . $post['id']) . ' - ' . hashData($post['ip']); + if ($post['text'] != '') { + $stripped = strip_tags($post['text']); + $action .= ' - ' . htmlentities(substr($stripped, 0, 32)); + if (strlen($stripped) > 32) { + $action .= '...'; + } + } + manageLogAction($action); } rebuildIndexes(); if (count($post_ids) == 1) {