aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/deprecated-1.8.php26
-rw-r--r--engine/lib/plugins.php13
2 files changed, 24 insertions, 15 deletions
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index dbe53c115..3db32c522 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -49,7 +49,7 @@ function register_action($action, $public = false, $filename = "", $admin_only =
* @param int $priority Optional priority to govern the appearance in the list.
*
* @deprecated 1.8 Extend admin views manually
- *
+ *
* @return void
*/
function extend_elgg_admin_page($new_admin_view, $view = 'admin/main', $priority = 500) {
@@ -1162,7 +1162,7 @@ function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type
* @param bool $pagination Display pagination? Default: true
*
* @return string List of ElggEntities suitable for display
- *
+ *
* @deprecated 1.8 Use elgg_list_entities_from_metadata() instead
*/
function list_entities_from_metadata_multi($meta_array, $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $listtypetoggle = true, $pagination = true) {
@@ -1610,10 +1610,20 @@ function get_installed_plugins($status = 'all') {
continue;
}
- $installed_plugins[$plugin->getID()] = array(
- 'active' => $plugin->isActive(),
- 'manifest' => $plugin->manifest->getManifest()
- );
+ $include = true;
+
+ if ($status == 'enabled' && !$plugin->isActive()) {
+ $include = false;
+ } elseif ($status == 'disabled' && $plugin->isActive()) {
+ $include = true;
+ }
+
+ if ($include) {
+ $installed_plugins[$plugin->getID()] = array(
+ 'active' => $plugin->isActive(),
+ 'manifest' => $plugin->manifest->getManifest()
+ );
+ }
}
return $installed_plugins;
@@ -2396,7 +2406,7 @@ $owner_guid = "", $owner_relationship = "") {
* @param string $password The password, optionally (for standard logins)
*
* @return ElggUser|false The authenticated user object, or false on failure.
- *
+ *
* @deprecated 1.8 Use elgg_authenticate
*/
function authenticate($username, $password) {
@@ -2468,7 +2478,7 @@ function list_site_members($site_guid, $limit = 10, $fullview = true) {
* @param int $collection_guid Collection GUID
*
* @return mixed
- * @deprecated 1.8
+ * @deprecated 1.8
*/
function add_site_collection($site_guid, $collection_guid) {
elgg_deprecated_notice("add_site_collection has been deprecated", 1.8);
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;