1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

Merge pull request #695 from Zankaria/post-delete-ip-modlog

Report in the modlog the IP that deleted their own post
This commit is contained in:
Lorenzo Yario 2024-03-15 13:23:08 -07:00 committed by GitHub
commit 70410e5e61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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