Code Duplication    Length = 5-5 lines in 2 locations

Sources/Calendar.php 1 location

@@ 387-391 (lines=5) @@
384
	unset($context['all_timezones']['']);
385
386
	// If the event's timezone is not in SMF's standard list of time zones, prepend it to the list
387
	if (!in_array($context['event']['tz'], array_keys($context['all_timezones'])))
388
	{
389
		$d = date_create($context['event']['tz']);
390
		$context['all_timezones'] = array($context['event']['tz'] => date_format($d, 'T') . ' - ' . $context['event']['tz'] . ' [UTC' . date_format($d, 'P') . ']') + $context['all_timezones'];
391
	}
392
393
	// Get list of boards that can be posted in.
394
	$boards = boardsAllowedTo('post_new');

Sources/Post.php 1 location

@@ 333-337 (lines=5) @@
330
		unset($context['all_timezones']['']);
331
332
		// If the event's timezone is not in SMF's standard list of time zones, prepend it to the list
333
		if (!in_array($context['event']['tz'], array_keys($context['all_timezones'])))
334
		{
335
			$d = date_create($context['event']['tz']);
336
			$context['all_timezones'] = array($context['event']['tz'] => date_format($d, 'T') . ' - ' . $context['event']['tz'] . ' [UTC' . date_format($d, 'P') . ']') + $context['all_timezones'];
337
		}
338
339
		loadCSSFile('jquery-ui.datepicker.css', array('defer' => false), 'smf_datepicker');
340
		loadCSSFile('jquery.timepicker.css', array('defer' => false), 'smf_timepicker');