Browse files

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
  • Loading branch information...
1 parent 346d082 commit 90939d9d06fe043ca2315bfb5b241619a0008586 @cash cash committed Mar 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 views/default/page/layouts/widgets.php
View
6 views/default/page/layouts/widgets.php
@@ -16,6 +16,8 @@
$owner = elgg_get_page_owner_entity();
+$widget_types = elgg_get_widget_types();
+
$context = elgg_get_context();
elgg_push_context('widgets');
@@ -42,7 +44,9 @@
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>';

0 comments on commit 90939d9

Please sign in to comment.