mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Fixed error while trying to delete posts by bot (#1004)
This commit is contained in:
parent
459e5e161f
commit
afab42c1f9
2 changed files with 3 additions and 0 deletions
|
@ -524,6 +524,7 @@ switch ($mode) {
|
|||
WHERE p.topic_id = $topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
AND p.post_id = pt.post_id
|
||||
AND p.poster_id != " . BOT_UID . "
|
||||
ORDER BY p.post_time ASC";
|
||||
if (!($result = DB()->sql_query($sql))) {
|
||||
bb_die('Could not get topic / post information');
|
||||
|
|
|
@ -496,6 +496,8 @@ class Post
|
|||
$post_text_values = "$post_id, '$post_text'";
|
||||
|
||||
DB()->query("INSERT INTO " . BB_POSTS_TEXT . " ($post_text_columns) VALUES ($post_text_values)");
|
||||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_posts = user_posts + 1 WHERE user_id = $poster_id");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue