Code Duplication    Length = 10-10 lines in 2 locations

Sources/ScheduledTasks.php 2 locations

@@ 658-667 (lines=10) @@
655
		{
656
			$titled = false;
657
			foreach ($types['topic'] as $id => $board)
658
				foreach ($board['lines'] as $topic)
659
					if (in_array($mid, $topic['members']))
660
					{
661
						if (!$titled)
662
						{
663
							$email['body'] .= "\n" . $langtxt[$lang]['new_topics'] . ':' . "\n" . '-----------------------------------------------';
664
							$titled = true;
665
						}
666
						$email['body'] .= "\n" . sprintf($langtxt[$lang]['topic_lines'], $topic['subject'], $board['name']);
667
					}
668
			if ($titled)
669
				$email['body'] .= "\n";
670
		}
@@ 702-711 (lines=10) @@
699
					continue;
700
701
				foreach ($type as $id => $board)
702
					foreach ($board['lines'] as $topic)
703
						if (in_array($mid, $topic['members']))
704
						{
705
							if (!$titled)
706
							{
707
								$email['body'] .= "\n" . $langtxt[$lang]['mod_actions'] . ':' . "\n" . '-----------------------------------------------';
708
								$titled = true;
709
							}
710
							$email['body'] .= "\n" . sprintf($langtxt[$lang][$note_type], $topic['subject']);
711
						}
712
			}
713
		}
714
		if ($titled)