Code Duplication    Length = 8-12 lines in 3 locations

Themes/default/Xml.template.php 1 location

@@ 380-387 (lines=8) @@
377
	echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
378
<smf>';
379
380
	foreach ($context['jump_to'] as $category)
381
	{
382
		echo '
383
	<item type="category" id="', $category['id'], '"><![CDATA[', cleanXml($category['name']), ']]></item>';
384
385
		foreach ($category['boards'] as $board)
386
			echo '
387
	<item type="board" id="', $board['id'], '" childlevel="', $board['child_level'], '"><![CDATA[', cleanXml($board['name']), ']]></item>';
388
	}
389
	echo '
390
</smf>';

Themes/default/ManageMaintenance.template.php 2 locations

@@ 459-470 (lines=12) @@
456
						<option disabled>(', $txt['move_topics_select_board'], ')</option>';
457
458
	// From board
459
	foreach ($context['categories'] as $category)
460
	{
461
		echo '
462
						<optgroup label="', $category['name'], '">';
463
464
		foreach ($category['boards'] as $board)
465
			echo '
466
							<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
467
468
		echo '
469
						</optgroup>';
470
	}
471
472
	echo '
473
					</select>
@@ 479-490 (lines=12) @@
476
						<option disabled>(', $txt['move_topics_select_board'], ')</option>';
477
478
	// To board
479
	foreach ($context['categories'] as $category)
480
	{
481
		echo '
482
						<optgroup label="', $category['name'], '">';
483
484
		foreach ($category['boards'] as $board)
485
			echo '
486
							<option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=&gt;&nbsp;', $board['name'], '</option>';
487
488
		echo '
489
						</optgroup>';
490
	}
491
	echo '
492
					</select>
493
				</p>