1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

logic for preventing deletion of old posts

This commit is contained in:
RealAngeleno 2023-10-31 22:03:09 -07:00 committed by GitHub
parent fe9573a385
commit d057c6d660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,6 +227,10 @@ if (isset($_POST['delete'])) {
$thread = $thread_query->fetch(PDO::FETCH_ASSOC);
}
if ($post['time'] < time() - $config['max_delete_time'] && $config['max_delete_time'] != false) {
error(sprintf($config['error']['delete_too_late'], until($post['time'] + $config['max_delete_time'])));
}
if ($password != '' && $post['password'] != $password && (!$thread || $thread['password'] != $password))
error($config['error']['invalidpassword']);