diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-11 01:42:59 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-11 01:42:59 +0000 |
commit | 426efeaf514a04fa00eb38747a0d09167402ea0f (patch) | |
tree | 36025707444ac935e1aff42d510e5babd96be197 | |
parent | 3c1bcd36ca6a6cf57b46142524d63d381ca92088 (diff) | |
download | elgg-426efeaf514a04fa00eb38747a0d09167402ea0f.tar.gz elgg-426efeaf514a04fa00eb38747a0d09167402ea0f.tar.bz2 |
Fixes #2872 - returned plugin settings menu to working order
git-svn-id: http://code.elgg.org/elgg/trunk@8107 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/admin.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 0ec02cded..77dcb5bd0 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -16,22 +16,19 @@ * @return void */ function elgg_admin_add_plugin_settings_menu() { - global $CONFIG; - if (!$installed_plugins = elgg_get_plugins()) { + $active_plugins = elgg_get_plugins('active'); + if (!$active_plugins) { // nothing added because no items return FALSE; } elgg_add_admin_menu_item('plugin_settings', elgg_echo('admin:plugin_settings')); - foreach ($installed_plugins as $plugin_id => $info) { - if (!$info['active']) { - continue; - } - - if (elgg_view_exists("settings/{$plugin_id}/edit")) { - elgg_add_admin_menu_item($plugin_id, $info['manifest']['name'], 'plugin_settings'); + foreach ($active_plugins as $plugin) { + $plugin_id = $plugin->getID(); + if (elgg_view_exists("settings/$plugin_id/edit")) { + elgg_add_admin_menu_item($plugin_id, $plugin->manifest->getName(), 'plugin_settings'); } } } |