Code Duplication    Length = 6-10 lines in 4 locations

engine/lib/views.php 1 location

@@ 460-465 (lines=6) @@
457
	$vars = elgg_trigger_plugin_hook('output:before', 'page', null, $vars);
458
	
459
	// check for deprecated view
460
	if ($page_shell == 'default' && elgg_view_exists('pageshells/pageshell')) {
461
		elgg_deprecated_notice("pageshells/pageshell is deprecated by page/$page_shell", 1.8);
462
		$output = elgg_view('pageshells/pageshell', $vars);
463
	} else {
464
		$output = elgg_view("page/$page_shell", $vars);
465
	}
466
467
	$vars['page_shell'] = $page_shell;
468

mod/widget_manager/views/default/object/widget/elements/content.php 1 location

@@ 15-20 (lines=6) @@
12
	}
13
}
14
15
if (elgg_view_exists("widgets/$handler/content")) {
16
	$content = elgg_view("widgets/$handler/content", $vars);
17
} else {
18
	elgg_deprecated_notice("widgets use content as the display view", 1.8);
19
	$content = elgg_view("widgets/$handler/view", $vars);
20
}
21
22
$custom_more_title = $widget->widget_manager_custom_more_title;
23
$custom_more_url = $widget->widget_manager_custom_more_url;

mod/widget_manager_accessibility/views/default/object/widget.php 1 location

@@ 44-53 (lines=10) @@
41
));
42
43
// don't show content for default widgets
44
if (elgg_in_context('default_widgets')) {
45
	$content = '';
46
} else {
47
	if (elgg_view_exists("widgets/$handler/content")) {
48
		$content = elgg_view("widgets/$handler/content", $vars);
49
	} else {
50
		elgg_deprecated_notice("widgets use content as the display view", 1.8);
51
		$content = elgg_view("widgets/$handler/view", $vars);
52
	}
53
}
54
55
$widget_id = "elgg-widget-$widget->guid";
56
$widget_instance = "elgg-widget-instance-$handler";

mod/custom_index_widgets/start.php 1 location

@@ 142-147 (lines=6) @@
139
					$vars['entity'] = $widget;
140
                    
141
					$handler = $widget->handler;
142
					if (elgg_view_exists("widgets/$handler/content")) {
143
						$content = elgg_view("widgets/$handler/content", $vars);
144
					} else {
145
						elgg_deprecated_notice("widgets use content as the display view", 1.8);
146
						$content = elgg_view("widgets/$handler/view", $vars);
147
					}
148
					echo elgg_view_module('featured',  $widget->title, $content, array('class' => 'elgg-module-highlight'));
149
				}
150
				else