Post function - check if we have a delete_token

- some board functions can create automatic posts using the post
  function, such as when you move a thread to another board and it
  replies with the new thread's id. it doesn't make sense for these
  posts to have a delete_token, since they shouldn't be in spamnoticer,
  and a user will never delete them since it is no user's post.

- save it as null if it's not present
This commit is contained in:
towards-a-new-leftypol 2023-11-21 19:47:21 -05:00
parent e92fc0ab2c
commit 291072dfd2
1 changed files with 1 additions and 1 deletions

View File

@ -1085,7 +1085,7 @@ function post(array $post) {
$query->bindValue(':slug', NULL); $query->bindValue(':slug', NULL);
} }
if ($config['spam_noticer']['enabled']) { if ($config['spam_noticer']['enabled'] && isset($post['delete_token'])) {
$query->bindValue(':delete_token', $post['delete_token']); $query->bindValue(':delete_token', $post['delete_token']);
} else { } else {
$query->bindValue(':delete_token', NULL); $query->bindValue(':delete_token', NULL);