From 780723dfae9d9c910dfdb6a9e244fce738942e3b Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 4 Feb 2011 03:12:48 +0000 Subject: 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 --- engine/lib/plugins.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'engine/lib/plugins.php') 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; -- cgit v1.2.3