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

@@ 1684-1711 (lines=28) @@
1681
 * wet4_dashboard_page_handler
1682
 * Override page handler for wet4 theme - dashboard
1683
 */
1684
function wet4_dashboard_page_handler()
1685
{
1686
	// Ensure that only logged-in users can see this page
1687
	elgg_gatekeeper();
1688
1689
	// Set context and title
1690
	elgg_set_context('dashboard');
1691
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
1692
	$title = elgg_echo('dashboard');
1693
1694
	// wrap intro message in a div
1695
	$intro_message = elgg_view('dashboard/blurb', array());
1696
1697
	$params = array(
1698
		'content' => $intro_message,
1699
		'num_columns' => 2,
1700
		'show_access' => false,
1701
	);
1702
	//use our own layouts for dashboard and stuff
1703
	$widgets = elgg_view_layout('db_widgets', $params);
1704
1705
	$body = elgg_view_layout('dashboard', array(
1706
		'title' => false,
1707
		'content' => $widgets
1708
	));
1709
1710
	echo elgg_view_page($title, $body);
1711
	return true;
1712
}
1713
1714
/*