Code Duplication    Length = 2-2 lines in 3 locations

Sources/Post.php 1 location

@@ 292-293 (lines=2) @@
289
			// Make sure the year and month are in the valid range.
290
			if ($context['event']['month'] < 1 || $context['event']['month'] > 12)
291
				fatal_lang_error('invalid_month', false);
292
			if ($context['event']['year'] < $modSettings['cal_minyear'] || $context['event']['year'] > $modSettings['cal_maxyear'])
293
				fatal_lang_error('invalid_year', false);
294
295
			// Get a list of boards they can post in.
296
			$boards = boardsAllowedTo('post_new');

Sources/Calendar.php 1 location

@@ 179-180 (lines=2) @@
176
	// Make sure the year and month are in valid ranges.
177
	if ($curPage['month'] < 1 || $curPage['month'] > 12)
178
		fatal_lang_error('invalid_month', false);
179
	if ($curPage['year'] < $modSettings['cal_minyear'] || $curPage['year'] > $modSettings['cal_maxyear'])
180
		fatal_lang_error('invalid_year', false);
181
	// If we have a day clean that too.
182
	if ($context['calendar_view'] != 'view_month')
183
	{

Sources/Subs-Calendar.php 1 location

@@ 897-898 (lines=2) @@
894
			// Check the month and year...
895
			if ($_POST['month'] < 1 || $_POST['month'] > 12)
896
				fatal_lang_error('invalid_month', false);
897
			if ($_POST['year'] < $modSettings['cal_minyear'] || $_POST['year'] > $modSettings['cal_maxyear'])
898
				fatal_lang_error('invalid_year', false);
899
		}
900
	}
901