aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin/components
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/components
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/components')
-rw-r--r--views/default/admin/components/invalid_plugin.php23
-rw-r--r--views/default/admin/components/plugin.php4
2 files changed, 25 insertions, 2 deletions
diff --git a/views/default/admin/components/invalid_plugin.php b/views/default/admin/components/invalid_plugin.php
new file mode 100644
index 000000000..91c073fac
--- /dev/null
+++ b/views/default/admin/components/invalid_plugin.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Displays an invalid plugin on the admin screen.
+ *
+ * An invalid plugin is a plugin whose isValid() method returns false.
+ * This usually means there are required files missing, unreadable or in the
+ * wrong format.
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins
+ */
+
+$plugin = elgg_get_array_value('plugin', $vars);
+$id = $plugin->getID();
+$path = htmlspecialchars($plugin->getPath());
+$message = elgg_echo('admin:plugins:warning:invalid', array($id));
+
+?>
+
+<div class="plugin_details not_active">
+ <p class="plugin-cannot-activate"><?php echo $message; ?></p>
+ <p><?php echo elgg_echo('admin:plugins:label:location') . ": " . $path; ?></p>
+</div>
diff --git a/views/default/admin/components/plugin.php b/views/default/admin/components/plugin.php
index d190e94a5..a64fa7216 100644
--- a/views/default/admin/components/plugin.php
+++ b/views/default/admin/components/plugin.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg plugin manifest class
+ * Displays a plugin on the admin screen.
*
* This file renders a plugin for the admin screen, including active/deactive,
* manifest details & display plugin settings.
@@ -12,6 +12,7 @@
$plugin = $vars['plugin'];
$priority = $plugin->getPriority();
$active = $plugin->isActive();
+
$name = $plugin->manifest->getName();
$can_activate = $plugin->canActivate();
$max_priority = elgg_get_max_plugin_priority();
@@ -108,7 +109,6 @@ if ($can_activate) {
}
// Display categories
-$categories = $plugin->manifest->getCategories();
$categories_html = '';
if ($categories) {
$categories_arr = array();