Code Duplication    Length = 6-6 lines in 2 locations

Sources/MessageIndex.php 1 location

@@ 250-255 (lines=6) @@
247
		$ascending = isset($_REQUEST['asc']);
248
	}
249
	// Otherwise default to ascending.
250
	else
251
	{
252
		$context['sort_by'] = $_REQUEST['sort'];
253
		$_REQUEST['sort'] = $sort_methods[$_REQUEST['sort']];
254
		$ascending = !isset($_REQUEST['desc']);
255
	}
256
257
	$context['sort_direction'] = $ascending ? 'up' : 'down';
258
	$txt['starter'] = $txt['started_by'];

Sources/PersonalMessage.php 1 location

@@ 519-524 (lines=6) @@
516
		$descending = !empty($options['view_newest_pm_first']);
517
	}
518
	// Otherwise use the defaults: ascending, by date.
519
	else
520
	{
521
		$context['sort_by'] = $_GET['sort'];
522
		$_GET['sort'] = $sort_methods[$_GET['sort']];
523
		$descending = isset($_GET['desc']);
524
	}
525
526
	$context['sort_direction'] = $descending ? 'down' : 'up';
527