aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-26 20:00:25 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-26 20:00:25 +0000
commitdcb04e09e090fff233eb7eae20fe1a86151f4073 (patch)
tree35d0bb9f3c502a025d5e6043c5f23428c316e18d /engine/lib/plugins.php
parent34ccb4a0daff9585d7950948f3f0415e2cfd56e6 (diff)
downloadelgg-dcb04e09e090fff233eb7eae20fe1a86151f4073.tar.gz
elgg-dcb04e09e090fff233eb7eae20fe1a86151f4073.tar.bz2
Plugins are *required* to have a manifest.xml file.
git-svn-id: http://code.elgg.org/elgg/trunk@5883 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/plugins.php')
-rw-r--r--engine/lib/plugins.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 64f1deb12..0e62914e2 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -496,7 +496,7 @@ function set_plugin_usersetting($name, $value, $user_guid = 0, $plugin_name = ""
function clear_plugin_usersetting($name, $user_guid=0, $plugin_name='') {
$plugin_name = sanitise_string($plugin_name);
$name = sanitise_string($name);
-
+
if (!$plugin_name) {
$plugin_name = get_plugin_name();
}
@@ -505,13 +505,13 @@ function clear_plugin_usersetting($name, $user_guid=0, $plugin_name='') {
if (!$user) {
$user = get_loggedin_user();
}
-
+
if (($user) && ($user instanceof ElggUser)) {
$prefix = "plugin:settings:$plugin_name:$name";
-
+
return remove_private_setting($user->getGUID(), $prefix);
}
-
+
return FALSE;
}
@@ -638,9 +638,13 @@ function get_installed_plugins() {
$plugins = get_plugin_list();
foreach($plugins as $mod) {
+ // require manifest.
+ if (!$manifest = load_plugin_manifest($mod)) {
+ continue;
+ }
$installed_plugins[$mod] = array();
$installed_plugins[$mod]['active'] = is_plugin_enabled($mod);
- $installed_plugins[$mod]['manifest'] = load_plugin_manifest($mod);
+ $installed_plugins[$mod]['manifest'] = $manifest;
}
}