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:
commit
70410e5e61
5
post.php
5
post.php
@ -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: ' .
|
||||
|
Loading…
Reference in New Issue
Block a user