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

@@ 1592-1619 (lines=28) @@
1589
 * wet4_dashboard_page_handler
1590
 * Override page handler for wet4 theme - dashboard
1591
 */
1592
function wet4_dashboard_page_handler()
1593
{
1594
	// Ensure that only logged-in users can see this page
1595
	elgg_gatekeeper();
1596
1597
	// Set context and title
1598
	elgg_set_context('dashboard');
1599
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
1600
	$title = elgg_echo('dashboard');
1601
1602
	// wrap intro message in a div
1603
	$intro_message = elgg_view('dashboard/blurb', array());
1604
1605
	$params = array(
1606
		'content' => $intro_message,
1607
		'num_columns' => 2,
1608
		'show_access' => false,
1609
	);
1610
	//use our own layouts for dashboard and stuff
1611
	$widgets = elgg_view_layout('db_widgets', $params);
1612
1613
	$body = elgg_view_layout('dashboard', array(
1614
		'title' => false,
1615
		'content' => $widgets
1616
	));
1617
1618
	echo elgg_view_page($title, $body);
1619
	return true;
1620
}
1621
1622
/*