Code Duplication    Length = 21-21 lines in 3 locations

Themes/default/Profile.template.php 1 location

@@ 1641-1661 (lines=21) @@
1638
	foreach ($context['theme_options'] as $i => $setting)
1639
	{
1640
		// Just spit out separators and move on
1641
		if (empty($setting) || !is_array($setting))
1642
		{
1643
			// Insert a separator (unless this is the first item in the list)
1644
			if ($i !== $first_option_key)
1645
				echo '
1646
				</dl>
1647
				<hr>
1648
				<dl class="settings">';
1649
1650
			// Should we give a name to this section?
1651
			if (is_string($setting) && !empty($setting))
1652
			{
1653
				$titled_section = true;
1654
				echo '
1655
					<dt><b>' . $setting . '</b></dt><dd></dd>';
1656
			}
1657
			else
1658
				$titled_section = false;
1659
1660
			continue;
1661
		}
1662
1663
		// Is this disabled?
1664
		if ($setting['id'] == 'calendar_start_day' && empty($modSettings['cal_enabled']))

Themes/default/Themes.template.php 2 locations

@@ 356-376 (lines=21) @@
353
	foreach ($context['options'] as $i => $setting)
354
	{
355
		// Just spit out separators and move on
356
		if (empty($setting) || !is_array($setting))
357
		{
358
			// Insert a separator (unless this is the first item in the list)
359
			if ($i !== $first_option_key)
360
				echo '
361
				</dl>
362
				<hr>
363
				<dl class="settings">';
364
365
			// Should we give a name to this section?
366
			if (is_string($setting) && !empty($setting))
367
			{
368
				$titled_section = true;
369
				echo '
370
					<dt><b>' . $setting . '</b></dt><dd></dd>';
371
			}
372
			else
373
				$titled_section = false;
374
375
			continue;
376
		}
377
378
		echo '
379
					<dt ', $context['theme_options_reset'] ? 'style="width:50%"' : '', '>';
@@ 590-610 (lines=21) @@
587
	foreach ($context['settings'] as $i => $setting)
588
	{
589
		// Is this a separator?
590
		if (empty($setting) || !is_array($setting))
591
		{
592
			// We don't need a separator before the first list element
593
			if ($i !== $first_setting_key)
594
				echo '
595
				</dl>
596
				<hr>
597
				<dl class="settings">';
598
599
			// Add a fake heading?
600
			if (is_string($setting) && !empty($setting))
601
			{
602
				$titled_section = true;
603
				echo '
604
					<dt><b>' . $setting . '</b></dt><dd></dd>';
605
			}
606
			else
607
				$titled_section = false;
608
609
			continue;
610
		}
611
612
		echo '
613
					<dt>