diff options
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index c14cde21d4..77f8aa720d 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -412,9 +412,9 @@ if ($user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == { $sql = 'SELECT draft_id FROM ' . DRAFTS_TABLE . ' - WHERE (forum_id IN (' . $forum_id . ', 0)' . (($topic_id) ? " OR topic_id = $topic_id" : '') . ') - AND (forum_id <> 0 AND topic_id <> 0) - AND user_id = ' . $user->data['user_id'] . + WHERE user_id = ' . $user->data['user_id'] . + (($forum_id) ? ' AND forum_id = ' . (int) $forum_id : '') . + (($topic_id) ? ' AND topic_id = ' . (int) $topic_id : '') . (($draft_id) ? " AND draft_id <> $draft_id" : ''); $result = $db->sql_query_limit($sql, 1); |