1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

Add IPs of users deleting their own post to the mod log

This commit is contained in:
Zankaria 2024-03-15 10:48:56 +01:00
parent 3ac86a074a
commit caa05e41a2

View File

@ -402,14 +402,15 @@ if (isset($_POST['delete'])) {
error(sprintf($config['error']['delete_too_soon'], until($post['time'] + $config['delete_time']))); error(sprintf($config['error']['delete_too_soon'], until($post['time'] + $config['delete_time'])));
} }
$ip = $_SERVER['REMOTE_ADDR'];
if (isset($_POST['file'])) { if (isset($_POST['file'])) {
// Delete just the file // Delete just the file
deleteFile($id); deleteFile($id);
modLog("User deleted file from their own post #$id"); modLog("User at $ip deleted file from his own post #$id");
} else { } else {
// Delete entire post // Delete entire post
deletePost($id); deletePost($id);
modLog("User deleted their own post #$id"); modLog("User at $ip deleted their own post #$id");
} }
_syslog(LOG_INFO, 'Deleted post: ' . _syslog(LOG_INFO, 'Deleted post: ' .