aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/object/plugin.php')
-rw-r--r--views/default/object/plugin.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php
index e9cacca35..5c7138e96 100644
--- a/views/default/object/plugin.php
+++ b/views/default/object/plugin.php
@@ -5,18 +5,16 @@
* @package Elgg.Core
* @subpackage Plugins
*
- * @todo This view really should be used to display visualization on the admin panel, \
- * rather than emitting the settings forms
*/
-// Do we want to show admin settings or user settings
-$type = elgg_extract('type', $vars, '');
-
-if ($type != 'user') {
- $type = '';
+if (!elgg_in_context('admin')) {
+ forward('/', 403);
}
-?>
-<div>
- <?php echo elgg_view_form("plugins/{$type}settings/save", array(), $vars); ?>
-</div> \ No newline at end of file
+$plugin = $vars['entity'];
+
+if (!$plugin->isValid()) {
+ echo elgg_view('object/plugin/invalid', $vars);
+} else {
+ echo elgg_view('object/plugin/full', $vars);
+}