1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/15512] Avoid reparsing non-existent polls

PHPBB3-15512
This commit is contained in:
JoshyPHP
2018-01-12 16:28:37 +01:00
parent 7f6ececf95
commit 5878d66ebf
2 changed files with 12 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ class poll_title extends \phpbb\textreparser\row_based_plugin
$sql = 'SELECT t.topic_id AS id, t.poll_title AS text, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.bbcode_uid
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
WHERE t.topic_id BETWEEN ' . $min_id . ' AND ' . $max_id .'
AND t.poll_max_options > 0
AND t.poll_start > 0
AND p.post_id = t.topic_first_post_id';
return $sql;