Code Duplication    Length = 14-14 lines in 2 locations

mod/etherpad/lib/pages.php 1 location

@@ 52-65 (lines=14) @@
49
 *
50
 * @param ElggObject $page Page entity
51
 */
52
function pages_prepare_parent_breadcrumbs($page) {
53
	if ($page && $page->parent_guid) {
54
		$parents = array();
55
		$parent = get_entity($page->parent_guid);
56
		while ($parent) {
57
			array_push($parents, $parent);
58
			$parent = get_entity($parent->parent_guid);
59
		}
60
		while ($parents) {
61
			$parent = array_pop($parents);
62
			elgg_push_breadcrumb($parent->title, $parent->getURL());
63
		}
64
	}
65
}
66
67
/**
68
 * Register the navigation menu

mod/tasks/lib/tasks.php 1 location

@@ 63-76 (lines=14) @@
60
 *
61
 * @param ElggObject $task Page entity
62
 */
63
function tasks_prepare_parent_breadcrumbs($task) {
64
	if ($task && $task->parent_guid) {
65
		$parents = array();
66
		$parent = get_entity($task->parent_guid);
67
		while ($parent) {
68
			array_push($parents, $parent);
69
			$parent = get_entity($parent->parent_guid);
70
		}
71
		while ($parents) {
72
			$parent = array_pop($parents);
73
			elgg_push_breadcrumb($parent->title, $parent->getURL());
74
		}
75
	}
76
}
77
78
/**
79
 * Register the navigation menu