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

@@ 1619-1646 (lines=28) @@
1616
 * wet4_dashboard_page_handler
1617
 * Override page handler for wet4 theme - dashboard
1618
 */
1619
function wet4_dashboard_page_handler()
1620
{
1621
	// Ensure that only logged-in users can see this page
1622
	elgg_gatekeeper();
1623
1624
	// Set context and title
1625
	elgg_set_context('dashboard');
1626
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
1627
	$title = elgg_echo('dashboard');
1628
1629
	// wrap intro message in a div
1630
	$intro_message = elgg_view('dashboard/blurb', array());
1631
1632
	$params = array(
1633
		'content' => $intro_message,
1634
		'num_columns' => 2,
1635
		'show_access' => false,
1636
	);
1637
	//use our own layouts for dashboard and stuff
1638
	$widgets = elgg_view_layout('db_widgets', $params);
1639
1640
	$body = elgg_view_layout('dashboard', array(
1641
		'title' => false,
1642
		'content' => $widgets
1643
	));
1644
1645
	echo elgg_view_page($title, $body);
1646
	return true;
1647
}
1648
1649
/*