mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-27 17:00:52 +01:00
logic for preventing deletion of old posts
This commit is contained in:
parent
fe9573a385
commit
d057c6d660
4
post.php
4
post.php
@ -227,6 +227,10 @@ if (isset($_POST['delete'])) {
|
|||||||
$thread = $thread_query->fetch(PDO::FETCH_ASSOC);
|
$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))
|
if ($password != '' && $post['password'] != $password && (!$thread || $thread['password'] != $password))
|
||||||
error($config['error']['invalidpassword']);
|
error($config['error']['invalidpassword']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user