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

@@ 1901-1907 (lines=7) @@
1898
1899
		$_POST['poll_guest_vote'] = isset($_POST['poll_guest_vote']) ? 1 : 0;
1900
		// Make sure guests are actually allowed to vote generally.
1901
		if ($_POST['poll_guest_vote'])
1902
		{
1903
			require_once($sourcedir . '/Subs-Members.php');
1904
			$allowedVoteGroups = groupsAllowedTo('poll_vote', $board);
1905
			if (!in_array(-1, $allowedVoteGroups['allowed']))
1906
				$_POST['poll_guest_vote'] = 0;
1907
		}
1908
1909
		// If the user tries to set the poll too far in advance, don't let them.
1910
		if (!empty($_POST['poll_expire']) && $_POST['poll_expire'] < 1)