summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2015-02-25 17:21:49 -0800
committerczaks <marcin@6irc.net>2016-05-06 15:44:26 +0200
commit7911c374e86ef8fa69c4545867b9d9d3de12d5c6 (patch)
tree217ac7d32eff8acfaa6b08991dc792750edcedc3 /post.php
parent6dd1420f91410531bb2dac506f821d959bf74d0a (diff)
Public action logs commit (log.php)
Note: In a previous commit, I began making inc/mod/auth.php more modular with the check_login() function. Including it does NOT check mod login by default anymore like it does on vichan. You have to call check_login(). I've finally included it in inc/functions.php. If you have any custom pages that use inc/mod/auth.php, just including functions.php is enough now. =================================== Also: backports 351375185e5 (early 404)
Diffstat (limited to 'post.php')
-rw-r--r--post.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/post.php b/post.php
index 06a9dc74..0d3292bb 100644
--- a/post.php
+++ b/post.php
@@ -70,9 +70,11 @@ if (isset($_POST['delete'])) {
if (isset($_POST['file'])) {
// Delete just the file
deleteFile($id);
+ modLog("User deleted file from his own post #$id");
} else {
// Delete entire post
deletePost($id);
+ modLog("User deleted his own post #$id");
}
_syslog(LOG_INFO, 'Deleted post: ' .
@@ -233,7 +235,6 @@ if (isset($_POST['delete'])) {
checkBan($board['uri']);
if ($post['mod'] = isset($_POST['mod']) && $_POST['mod']) {
- require 'inc/mod/auth.php';
check_login(false);
if (!$mod) {
// Liar. You're not a mod.
@@ -945,7 +946,7 @@ if (isset($_POST['delete'])) {
$build_pages = range(1, $config['max_pages']);
if ($post['op'])
- clean();
+ clean($pid);
event('post-after', $post);