Code Duplication    Length = 14-18 lines in 2 locations

mod/gccollab_theme/start.php 1 location

@@ 174-191 (lines=18) @@
171
172
// function that handles moving jobs marketplace and micro missions into drop down menu
173
function career_menu_hander($hook, $type, $menu, $params){
174
    foreach ($menu as $key => $item){
175
176
        switch ($item->getName()) {
177
            case 'career':
178
                //$item->addChild(elgg_get_menu_item('subSite', 'Jobs Marketplace'));
179
                
180
                if(elgg_is_active_plugin('missions')){
181
                    $item->addChild(elgg_get_menu_item('site', 'mission_main'));
182
                }
183
                /*if(elgg_is_active_plugin('gcforums')){
184
                    $item->addChild(elgg_get_menu_item('subSite', 'Forum'));
185
                }*/
186
187
                $item->addChild(elgg_get_menu_item('subSite', 'jobs'));
188
                $item->setLinkClass('item');
189
                break;
190
        }
191
    }
192
}
193
194
function collab_menu_block_handler($hook, $type, $menu, $params){

mod/gcconnex_theme/start.php 1 location

@@ 44-57 (lines=14) @@
41
		return;
42
	}
43
44
	foreach ($menu as $key => $item) {
45
		if ($item->getName() === 'career') {
46
			if (elgg_is_active_plugin('missions')) {
47
				$item->addChild(elgg_get_menu_item('site', 'mission_main'));
48
			}
49
50
			//if (elgg_is_active_plugin('gcforums')) {
51
				//$item->addChild(elgg_get_menu_item('subSite', 'Forum'));
52
			//}
53
54
			$item->addChild(elgg_get_menu_item('subSite', 'jobs'));
55
			$item->setLinkClass('item');
56
		}
57
	}
58
}
59
60
/**