Code Duplication    Length = 7-7 lines in 2 locations

Sources/Poll.php 1 location

@@ 694-700 (lines=7) @@
691
	$_POST['poll_guest_vote'] = isset($_POST['poll_guest_vote']) ? 1 : 0;
692
693
	// Make sure guests are actually allowed to vote generally.
694
	if ($_POST['poll_guest_vote'])
695
	{
696
		require_once($sourcedir . '/Subs-Members.php');
697
		$allowedGroups = groupsAllowedTo('poll_vote', $board);
698
		if (!in_array(-1, $allowedGroups['allowed']))
699
			$_POST['poll_guest_vote'] = 0;
700
	}
701
702
	// Ensure that the number options allowed makes sense, and the expiration date is valid.
703
	if (!$isEdit || allowedTo('moderate_board'))

Sources/Post.php 1 location

@@ 1867-1873 (lines=7) @@
1864
1865
		$_POST['poll_guest_vote'] = isset($_POST['poll_guest_vote']) ? 1 : 0;
1866
		// Make sure guests are actually allowed to vote generally.
1867
		if ($_POST['poll_guest_vote'])
1868
		{
1869
			require_once($sourcedir . '/Subs-Members.php');
1870
			$allowedVoteGroups = groupsAllowedTo('poll_vote', $board);
1871
			if (!in_array(-1, $allowedVoteGroups['allowed']))
1872
				$_POST['poll_guest_vote'] = 0;
1873
		}
1874
1875
		// If the user tries to set the poll too far in advance, don't let them.
1876
		if (!empty($_POST['poll_expire']) && $_POST['poll_expire'] < 1)