Code Duplication    Length = 2-2 lines in 2 locations

Sources/ManageAttachments.php 1 location

@@ 1713-1714 (lines=2) @@
1710
	// Change these two if more steps are added!
1711
	if (empty($max_substep))
1712
		$context['continue_percent'] = round(($_GET['step'] * 100) / 25);
1713
	else
1714
		$context['continue_percent'] = round(($_GET['step'] * 100 + ($_GET['substep'] * 100) / $max_substep) / 25);
1715
1716
	// Never more than 100%!
1717
	$context['continue_percent'] = min($context['continue_percent'], 100);

Sources/RepairBoards.php 1 location

@@ 157-158 (lines=2) @@
154
	// Change these two if more steps are added!
155
	if (empty($max_substep))
156
		$context['continue_percent'] = round(($_GET['step'] * 100) / $context['total_steps']);
157
	else
158
		$context['continue_percent'] = round((($_GET['step'] + ($_GET['substep'] / $max_substep)) * 100) / $context['total_steps']);
159
160
	// Never more than 100%!
161
	$context['continue_percent'] = min($context['continue_percent'], 100);