Code Duplication    Length = 8-8 lines in 2 locations

Sources/Post.php 2 locations

@@ 205-212 (lines=8) @@
202
	if (isset($_REQUEST['poll']) && $modSettings['pollMode'] == '1')
203
	{
204
		// New topic, new poll.
205
		if (empty($topic))
206
			isAllowedTo('poll_post');
207
		// This is an old topic - but it is yours!  Can you add to it?
208
		elseif ($user_info['id'] == $id_member_poster && !allowedTo('poll_add_any'))
209
			isAllowedTo('poll_add_own');
210
		// If you're not the owner, can you add to any poll?
211
		else
212
			isAllowedTo('poll_add_any');
213
214
		require_once($sourcedir . '/Subs-Members.php');
215
		$allowedVoteGroups = groupsAllowedTo('poll_vote', $board);
@@ 1761-1768 (lines=8) @@
1758
			fatal_lang_error('no_access', false);
1759
1760
		// This is a new topic... so it's a new poll.
1761
		if (empty($topic))
1762
			isAllowedTo('poll_post');
1763
		// Can you add to your own topics?
1764
		elseif ($user_info['id'] == $topic_info['id_member_started'] && !allowedTo('poll_add_any'))
1765
			isAllowedTo('poll_add_own');
1766
		// Can you add polls to any topic, then?
1767
		else
1768
			isAllowedTo('poll_add_any');
1769
1770
		if (!isset($_POST['question']) || trim($_POST['question']) == '')
1771
			$post_errors[] = 'no_question';