Code Duplication    Length = 7-7 lines in 2 locations

Sources/Printpage.php 1 location

@@ 117-123 (lines=7) @@
114
		$pollOptions = array();
115
		$realtotal = 0;
116
		$pollinfo['has_voted'] = false;
117
		while ($row = $smcFunc['db_fetch_assoc']($request))
118
		{
119
			censorText($row['label']);
120
			$pollOptions[$row['id_choice']] = $row;
121
			$realtotal += $row['votes'];
122
			$pollinfo['has_voted'] |= $row['voted_this'] != -1;
123
		}
124
		$smcFunc['db_free_result']($request);
125
126
		// If this is a guest we need to do our best to work out if they have voted, and what they voted for.

Sources/Display.php 1 location

@@ 672-678 (lines=7) @@
669
		$pollOptions = array();
670
		$realtotal = 0;
671
		$pollinfo['has_voted'] = false;
672
		while ($row = $smcFunc['db_fetch_assoc']($request))
673
		{
674
			censorText($row['label']);
675
			$pollOptions[$row['id_choice']] = $row;
676
			$realtotal += $row['votes'];
677
			$pollinfo['has_voted'] |= $row['voted_this'] != -1;
678
		}
679
		$smcFunc['db_free_result']($request);
680
681
		// If this is a guest we need to do our best to work out if they have voted, and what they voted for.