Removes ability to delete own threads.

This commit is contained in:
nonmakina 2021-01-09 19:24:53 -06:00
parent f9a6b584e1
commit 3f1ef0e0fe
3 changed files with 11 additions and 0 deletions

View file

@ -230,6 +230,11 @@ function handle_delete(){
$thread = $thread_query->fetch(PDO::FETCH_ASSOC);
}
if (isset($config['allow_thread_deletion']) && !$config['allow_thread_deletion'] && !$post['thread']) {
error($config['error']['nodeletethread']);
}
if ($password != '' && $post['password'] != $password && (!$thread || $thread['password'] != $password))
error($config['error']['invalidpassword']);