Code Duplication    Length = 2-2 lines in 3 locations

Sources/Calendar.php 1 location

@@ 117-118 (lines=2) @@
114
	// Make sure the year and month are in valid ranges.
115
	if ($curPage['month'] < 1 || $curPage['month'] > 12)
116
		fatal_lang_error('invalid_month', false);
117
	if ($curPage['year'] < $modSettings['cal_minyear'] || $curPage['year'] > $modSettings['cal_maxyear'])
118
		fatal_lang_error('invalid_year', false);
119
	// If we have a day clean that too.
120
	if ($context['view_week'])
121
	{

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/Subs-Calendar.php 1 location

@@ 789-790 (lines=2) @@
786
			// Check the month and year...
787
			if ($_POST['month'] < 1 || $_POST['month'] > 12)
788
				fatal_lang_error('invalid_month', false);
789
			if ($_POST['year'] < $modSettings['cal_minyear'] || $_POST['year'] > $modSettings['cal_maxyear'])
790
				fatal_lang_error('invalid_year', false);
791
		}
792
	}
793