Code Duplication    Length = 21-21 lines in 3 locations

Themes/default/Profile.template.php 1 location

@@ 1726-1746 (lines=21) @@
1723
	foreach ($context['theme_options'] as $i => $setting)
1724
	{
1725
		// Just spit out separators and move on
1726
		if (empty($setting) || !is_array($setting))
1727
		{
1728
			// Insert a separator (unless this is the first item in the list)
1729
			if ($i !== $first_option_key)
1730
				echo '
1731
				</dl>
1732
				<hr>
1733
				<dl class="settings">';
1734
1735
			// Should we give a name to this section?
1736
			if (is_string($setting) && !empty($setting))
1737
			{
1738
				$titled_section = true;
1739
				echo '
1740
					<dt><strong>' . $setting . '</strong></dt>
1741
					<dd></dd>';
1742
			}
1743
			else
1744
				$titled_section = false;
1745
1746
			continue;
1747
		}
1748
1749
		// Is this disabled?

Themes/default/Themes.template.php 2 locations

@@ 344-364 (lines=21) @@
341
	foreach ($context['options'] as $i => $setting)
342
	{
343
		// Just spit out separators and move on
344
		if (empty($setting) || !is_array($setting))
345
		{
346
			// Insert a separator (unless this is the first item in the list)
347
			if ($i !== $first_option_key)
348
				echo '
349
				</dl>
350
				<hr>
351
				<dl class="settings">';
352
353
			// Should we give a name to this section?
354
			if (is_string($setting) && !empty($setting))
355
			{
356
				$titled_section = true;
357
				echo '
358
					<dt><strong>' . $setting . '</strong></dt>
359
					<dd></dd>';
360
			}
361
			else
362
				$titled_section = false;
363
364
			continue;
365
		}
366
367
		echo '
@@ 571-591 (lines=21) @@
568
	foreach ($context['settings'] as $i => $setting)
569
	{
570
		// Is this a separator?
571
		if (empty($setting) || !is_array($setting))
572
		{
573
			// We don't need a separator before the first list element
574
			if ($i !== $first_setting_key)
575
				echo '
576
				</dl>
577
				<hr>
578
				<dl class="settings">';
579
580
			// Add a fake heading?
581
			if (is_string($setting) && !empty($setting))
582
			{
583
				$titled_section = true;
584
				echo '
585
					<dt><strong>' . $setting . '</strong></dt>
586
					<dd></dd>';
587
			}
588
			else
589
				$titled_section = false;
590
591
			continue;
592
		}
593
594
		echo '