);
}
- /**
- * Activate the plugin.
- *
- * @note This method is activate() to avoid clashing with ElggEntity::enable()
- *
- * @return bool
- */
- public function activate() {
- return enable_plugin($this->getID());
- }
-
- /**
- * Deactivate the plugin.
- *
- * @note This method is deactivate() to avoid clashing with ElggEntity::disable()
- *
- * @return bool
- */
- public function deactivate() {
- return disable_plugin($this->getID());
- }
-
/**
* Returns the Plugin ID
*
* @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) {
* @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) {
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;
* @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) {
* @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);
*/
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'],
}
return array(
- 'status' => $r,
+ 'status' => $status,
'value' => $version
);
}
if ($dep['status']) {
$strings['comment'] = elgg_echo('ok');
+ } else {
+ $strings['comment'] = elgg_echo('error');
}
return $strings;