aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/core/settings/tools.php10
-rw-r--r--views/default/core/settings/tools/plugin.php25
-rw-r--r--views/default/object/plugin.php6
3 files changed, 19 insertions, 22 deletions
diff --git a/views/default/core/settings/tools.php b/views/default/core/settings/tools.php
index 42b2227ff..e280e0d8e 100644
--- a/views/default/core/settings/tools.php
+++ b/views/default/core/settings/tools.php
@@ -7,7 +7,9 @@
*/
// Description of what's going on
-echo "<div class='user-settings margin-top'>".elgg_view('output/longtext', array('value' => elgg_echo("usersettings:plugins:description")))."</div>";
+echo "<div class='user-settings margin-top'>"
+ . elgg_view('output/longtext', array('value' => elgg_echo("usersettings:plugins:description")))
+ . "</div>";
$limit = get_input('limit', 10);
$offset = get_input('offset', 0);
@@ -18,8 +20,8 @@ $count = count($installed_plugins);
// Display list of plugins
$n = 0;
-foreach ($installed_plugins as $plugin => $data) {
- if (elgg_is_active_plugin($plugin)) {
- echo elgg_view("core/settings/tools/plugin", array('plugin' => $plugin, 'details' => $data));
+foreach ($installed_plugins as $plugin) {
+ if ($plugin->isActive()) {
+ echo elgg_view("core/settings/tools/plugin", array('plugin' => $plugin));
}
} \ No newline at end of file
diff --git a/views/default/core/settings/tools/plugin.php b/views/default/core/settings/tools/plugin.php
index d89e93c2f..ab25e7fb8 100644
--- a/views/default/core/settings/tools/plugin.php
+++ b/views/default/core/settings/tools/plugin.php
@@ -1,42 +1,35 @@
<?php
/**
- * Elgg plugin manifest class
+ * This displays a plugin's user settings.
*
- * This file renders a plugin for the admin screen, including active/deactive, manifest details & display plugin
- * settings.
- *
- * @package Elgg
- * @subpackage Core
+ * @package Elgg.Plugin
+ * @subpackage Settings
*/
$plugin = $vars['plugin'];
-$details = $vars['details'];
-
-$active = $details['active'];
-$manifest = $details['manifest'];
-
+$plugin_id = $plugin->getID();
$user_guid = $details['user_guid'];
-if ($user_guid) {
+if (!$user_guid) {
$user_guid = elgg_get_logged_in_user_guid();
}
-if (elgg_view("usersettings/{$plugin}/edit")) {
+if (elgg_view("usersettings/$plugin_id/edit")) {
?>
<div class="elgg-module elgg-module-info">
<div class="elgg-head">
- <h3><?php echo elgg_echo($plugin); ?></h3>
+ <h3><?php echo $plugin->manifest->getName(); ?></h3>
</div>
<div class="elgg-body">
<div id="<?php echo $plugin; ?>_settings">
<?php echo elgg_view("object/plugin", array(
'plugin' => $plugin,
- 'entity' => find_plugin_usersettings($plugin, $user_guid),
+ 'entity' => find_plugin_usersettings($plugin_id, $user_guid),
'prefix' => 'user'
));
?>
</div>
</div>
-</div>
+</div>
<?php
} \ No newline at end of file
diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php
index aef9a9bbd..054931a38 100644
--- a/views/default/object/plugin.php
+++ b/views/default/object/plugin.php
@@ -8,10 +8,12 @@
$entity = $vars['entity'];
$plugin = $vars['plugin'];
+$plugin_id = $plugin->getID();
$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings
-$form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars);
-$form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
+$form_body = elgg_view("{$prefix}settings/{$plugin_id}/edit", $vars)
+ . "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin_id))
+ . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
?>
<div>