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

@@ 1552-1579 (lines=28) @@
1549
 * wet4_dashboard_page_handler
1550
 * Override page handler for wet4 theme - dashboard
1551
 */
1552
function wet4_dashboard_page_handler()
1553
{
1554
	// Ensure that only logged-in users can see this page
1555
	elgg_gatekeeper();
1556
1557
	// Set context and title
1558
	elgg_set_context('dashboard');
1559
	elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
1560
	$title = elgg_echo('dashboard');
1561
1562
	// wrap intro message in a div
1563
	$intro_message = elgg_view('dashboard/blurb', array());
1564
1565
	$params = array(
1566
		'content' => $intro_message,
1567
		'num_columns' => 2,
1568
		'show_access' => false,
1569
	);
1570
	//use our own layouts for dashboard and stuff
1571
	$widgets = elgg_view_layout('db_widgets', $params);
1572
1573
	$body = elgg_view_layout('dashboard', array(
1574
		'title' => false,
1575
		'content' => $widgets
1576
	));
1577
1578
	echo elgg_view_page($title, $body);
1579
	return true;
1580
}
1581
1582
/*