forked from leftypol/leftypol
Add IPs of users deleting their own post to the mod log. See #109
This commit is contained in:
parent
cb4726e076
commit
c696ad4fa2
1 changed files with 3 additions and 2 deletions
5
post.php
5
post.php
|
@ -440,14 +440,15 @@ function handle_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 his own post #$id");
|
||||
modLog("User at $ip deleted file from his own post #$id");
|
||||
} else {
|
||||
// Delete entire post
|
||||
deletePost($id);
|
||||
modLog("User deleted his own post #$id");
|
||||
modLog("User at $ip deleted his own post #$id");
|
||||
}
|
||||
|
||||
_syslog(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue