aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin/plugins/advanced.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 21:17:59 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-07 21:17:59 +0000
commit537bf91a71bcd2a9e8b632a1d863c03621a8281b (patch)
treeba90af39d3a2e4be4cd66e6d062ff90e7720b590 /views/default/admin/plugins/advanced.php
parent1dbc7da3345384f323d16920682b549f14871409 (diff)
downloadelgg-537bf91a71bcd2a9e8b632a1d863c03621a8281b.tar.gz
elgg-537bf91a71bcd2a9e8b632a1d863c03621a8281b.tar.bz2
Refs #2782: Fixed WSOD for invalid plugins on admin screen. Needs better CSS, but holding off until admin area CSS revamp.
git-svn-id: http://code.elgg.org/elgg/trunk@7857 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/admin/plugins/advanced.php')
-rw-r--r--views/default/admin/plugins/advanced.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php
index 1138ace4f..1a308df73 100644
--- a/views/default/admin/plugins/advanced.php
+++ b/views/default/admin/plugins/advanced.php
@@ -18,6 +18,10 @@ $show_category = get_input('category', null);
$categories = array();
foreach ($installed_plugins as $plugin) {
+ if (!$plugin->isValid()) {
+ continue;
+ }
+
$plugin_categories = $plugin->manifest->getCategories();
// handle plugins that don't declare categories
@@ -82,9 +86,9 @@ $buttons .= $category_form;
// Display list of plugins
foreach ($installed_plugins as $plugin) {
- echo elgg_view('admin/components/plugin', array(
- 'plugin' => $plugin,
- 'max_priority' => $max_priority
+ $view = ($plugin->isValid()) ? 'admin/components/plugin' : 'admin/components/invalid_plugin';
+ echo elgg_view($view, array(
+ 'plugin' => $plugin
));
}
?>