Code Duplication    Length = 27-28 lines in 2 locations

mod/dashboard/start.php 1 location

@@ 29-55 (lines=27) @@
26
 * Dashboard page handler
27
 * @return bool
28
 */
29
function dashboard_page_handler() {
30
	// Ensure that only logged-in users can see this page
31
	elgg_gatekeeper();
32
33
	// Set context and title
34
	elgg_set_context('dashboard');
35
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
36
	$title = elgg_echo('dashboard');
37
38
	// wrap intro message in a div
39
	$intro_message = elgg_view('dashboard/blurb');
40
41
	$params = array(
42
		'content' => $intro_message,
43
		'num_columns' => 3,
44
		'show_access' => false,
45
	);
46
	$widgets = elgg_view_layout('widgets', $params);
47
48
	$body = elgg_view_layout('one_column', array(
49
		'title' => false,
50
		'content' => $widgets
51
	));
52
53
	echo elgg_view_page($title, $body);
54
	return true;
55
}
56
57
58
/**

mod/wet4/start.php 1 location

@@ 1512-1539 (lines=28) @@
1509
 * wet4_dashboard_page_handler
1510
 * Override page handler for wet4 theme - dashboard
1511
 */
1512
function wet4_dashboard_page_handler()
1513
{
1514
	// Ensure that only logged-in users can see this page
1515
	elgg_gatekeeper();
1516
1517
	// Set context and title
1518
	elgg_set_context('dashboard');
1519
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
1520
	$title = elgg_echo('dashboard');
1521
1522
	// wrap intro message in a div
1523
	$intro_message = elgg_view('dashboard/blurb', array());
1524
1525
	$params = array(
1526
		'content' => $intro_message,
1527
		'num_columns' => 2,
1528
		'show_access' => false,
1529
	);
1530
	//use our own layouts for dashboard and stuff
1531
	$widgets = elgg_view_layout('db_widgets', $params);
1532
1533
	$body = elgg_view_layout('dashboard', array(
1534
		'title' => false,
1535
		'content' => $widgets
1536
	));
1537
1538
	echo elgg_view_page($title, $body);
1539
	return true;
1540
}
1541
1542
/*