diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-04 03:12:48 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-04 03:12:48 +0000 |
commit | 780723dfae9d9c910dfdb6a9e244fce738942e3b (patch) | |
tree | c305a6bcdc777183847993814b7d5e511cfcf81d /engine/lib/plugins.php | |
parent | 77c4fd10bc965499d6ad58c49ea17dab9414bb44 (diff) | |
download | elgg-780723dfae9d9c910dfdb6a9e244fce738942e3b.tar.gz elgg-780723dfae9d9c910dfdb6a9e244fce738942e3b.tar.bz2 |
Fixes #2820, Fixes #2823. Using elgg_get_plugins() in elgg_get_plugins_provides(). Fixed plugin conflicts system. Removed cruft from ElggPluginPackage. Fixed deprecated get_installed_plugins() to honor the type requested.
git-svn-id: http://code.elgg.org/elgg/trunk@8010 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/plugins.php')
-rw-r--r-- | engine/lib/plugins.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 783827d27..2174814bd 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -551,16 +551,13 @@ function elgg_get_calling_plugin_id($mainfilename = false) { */ function elgg_get_plugins_provides($type = null, $name = null) { static $provides = null; - $active_plugins = get_installed_plugins('enabled'); + $active_plugins = elgg_get_plugins('active'); if (!isset($provides)) { $provides = array(); - foreach ($active_plugins as $plugin_id => $plugin_info) { - // @todo remove this when fully converted to ElggPluginPackage. - $package = new ElggPluginPackage($plugin_id); - - if ($plugin_provides = $package->getManifest()->getProvides()) { + foreach ($active_plugins as $plugin) { + if ($plugin_provides = $plugin->manifest->getProvides()) { foreach ($plugin_provides as $provided) { $provides[$provided['type']][$provided['name']] = array( 'version' => $provided['version'], @@ -621,7 +618,7 @@ function elgg_check_plugins_provides($type, $name, $version = null, $comparison } return array( - 'status' => $r, + 'status' => $status, 'value' => $version ); } @@ -716,6 +713,8 @@ function elgg_get_plugin_dependency_strings($dep) { if ($dep['status']) { $strings['comment'] = elgg_echo('ok'); + } else { + $strings['comment'] = elgg_echo('error'); } return $strings; |