Code Duplication    Length = 2-2 lines in 3 locations

Sources/News.php 3 locations

@@ 107-108 (lines=2) @@
104
			$query_this_board = 'b.id_board IN (' . implode(', ', $boards) . ')';
105
106
		// Try to limit the number of messages we look through.
107
		if ($total_cat_posts > 100 && $total_cat_posts > $modSettings['totalMessages'] / 15)
108
			$context['optimize_msg']['lowest'] = 'm.id_msg >= ' . max(0, $modSettings['maxMsgID'] - 400 - $_GET['limit'] * 5);
109
	}
110
	elseif (!empty($_REQUEST['boards']))
111
	{
@@ 149-150 (lines=2) @@
146
			$query_this_board = 'b.id_board IN (' . implode(', ', $boards) . ')';
147
148
		// The more boards, the more we're going to look through...
149
		if ($total_posts > 100 && $total_posts > $modSettings['totalMessages'] / 12)
150
			$context['optimize_msg']['lowest'] = 'm.id_msg >= ' . max(0, $modSettings['maxMsgID'] - 500 - $_GET['limit'] * 5);
151
	}
152
	elseif (!empty($board))
153
	{
@@ 171-172 (lines=2) @@
168
		$query_this_board = 'b.id_board = ' . $board;
169
170
		// Try to look through just a few messages, if at all possible.
171
		if ($total_posts > 80 && $total_posts > $modSettings['totalMessages'] / 10)
172
			$context['optimize_msg']['lowest'] = 'm.id_msg >= ' . max(0, $modSettings['maxMsgID'] - 600 - $_GET['limit'] * 5);
173
	}
174
	else
175
	{