Code Duplication    Length = 2-2 lines in 3 locations

Sources/Post.php 1 location

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

Sources/Subs-Calendar.php 1 location

@@ 914-915 (lines=2) @@
911
			// Check the month and year...
912
			if ($_POST['month'] < 1 || $_POST['month'] > 12)
913
				fatal_lang_error('invalid_month', false);
914
			if ($_POST['year'] < $modSettings['cal_minyear'] || $_POST['year'] > $modSettings['cal_maxyear'])
915
				fatal_lang_error('invalid_year', false);
916
		}
917
	}
918

Sources/Calendar.php 1 location

@@ 169-170 (lines=2) @@
166
	// Make sure the year and month are in valid ranges.
167
	if ($curPage['month'] < 1 || $curPage['month'] > 12)
168
		fatal_lang_error('invalid_month', false);
169
	if ($curPage['year'] < $modSettings['cal_minyear'] || $curPage['year'] > $modSettings['cal_maxyear'])
170
		fatal_lang_error('invalid_year', false);
171
	// If we have a day clean that too.
172
	if ($context['calendar_view'] != 'viewmonth')
173
	{