Code Duplication    Length = 2-2 lines in 2 locations

Sources/Calendar.php 2 locations

@@ 209-210 (lines=2) @@
206
	$context['calendar_grid_current'] = getCalendarGrid($curPage['month'], $curPage['year'], $calendarOptions);
207
208
	// Only show previous month if it isn't pre-January of the min-year
209
	if ($context['calendar_grid_current']['previous_calendar']['year'] > $modSettings['cal_minyear'] || $curPage['month'] != 1)
210
		$context['calendar_grid_prev'] = getCalendarGrid($context['calendar_grid_current']['previous_calendar']['month'], $context['calendar_grid_current']['previous_calendar']['year'], $calendarOptions, true);
211
212
	// Only show next month if it isn't post-December of the max-year
213
	if ($context['calendar_grid_current']['next_calendar']['year'] < $modSettings['cal_maxyear'] || $curPage['month'] != 12)
@@ 213-214 (lines=2) @@
210
		$context['calendar_grid_prev'] = getCalendarGrid($context['calendar_grid_current']['previous_calendar']['month'], $context['calendar_grid_current']['previous_calendar']['year'], $calendarOptions, true);
211
212
	// Only show next month if it isn't post-December of the max-year
213
	if ($context['calendar_grid_current']['next_calendar']['year'] < $modSettings['cal_maxyear'] || $curPage['month'] != 12)
214
		$context['calendar_grid_next'] = getCalendarGrid($context['calendar_grid_current']['next_calendar']['month'], $context['calendar_grid_current']['next_calendar']['year'], $calendarOptions);
215
216
	// Basic template stuff.
217
	$context['allow_calendar_event'] = allowedTo('calendar_post');