forked from leftypol/leftypol
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)
This commit is contained in:
parent
6dd1420f91
commit
7911c374e8
10 changed files with 119 additions and 16 deletions
5
post.php
5
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue