aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/layouts
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-21 00:22:15 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-21 00:22:15 +0000
commit90939d9d06fe043ca2315bfb5b241619a0008586 (patch)
tree836d6e5fd0fcc508e8609ae14870e79eac13433c /views/default/page/layouts
parent346d082dae4da3908f7c7a6b8b9946768e19f5d6 (diff)
downloadelgg-90939d9d06fe043ca2315bfb5b241619a0008586.tar.gz
elgg-90939d9d06fe043ca2315bfb5b241619a0008586.tar.bz2
Fixes #3168 not displaying a widget when handler is not available
git-svn-id: http://code.elgg.org/elgg/trunk@8796 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page/layouts')
-rw-r--r--views/default/page/layouts/widgets.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php
index 342150f70..b2c54e854 100644
--- a/views/default/page/layouts/widgets.php
+++ b/views/default/page/layouts/widgets.php
@@ -16,6 +16,8 @@ $show_access = elgg_extract('show_access', $vars, true);
$owner = elgg_get_page_owner_entity();
+$widget_types = elgg_get_widget_types();
+
$context = elgg_get_context();
elgg_push_context('widgets');
@@ -42,7 +44,9 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
if (is_array($column_widgets) && sizeof($column_widgets) > 0) {
foreach ($column_widgets as $widget) {
- echo elgg_view_entity($widget, array('show_access' => $show_access));
+ if (array_key_exists($widget->handler, $widget_types)) {
+ echo elgg_view_entity($widget, array('show_access' => $show_access));
+ }
}
}
echo '</div>';