From b541e8d324c3feeaa50d185013837c31bae32c6a Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 3 Jan 2011 02:09:15 +0000 Subject: Fixes #2763. Better normalizing for unused 1.7 manifest options. Added logging when ElggPluginPackage can't be loaded. Better disabling of deleted physical plugins. git-svn-id: http://code.elgg.org/elgg/trunk@7819 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'engine/lib/plugins.php') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index cd74353de..b48f1c670 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -136,6 +136,9 @@ function elgg_generate_plugin_entities() { if ($plugin->enabled != 'yes') { $plugin->enable(); $plugin->deactivate(); + $plugin->setPriority($new_plugin_priority); + + $new_plugin_priority++; } // remove from the list of plugins to disable @@ -154,8 +157,13 @@ function elgg_generate_plugin_entities() { // because they are entities, but their dirs were removed. // don't delete the entities because they hold settings. foreach ($known_plugins as $plugin) { - $plugin->deactivate(); - $plugin->disable(); + if ($plugin->isActive()) { + $plugin->deactivate(); + // remove the priority. + $name = elgg_namespace_plugin_private_setting('internal', 'priority'); + remove_private_setting($plugin->guid, $name); + $plugin->disable(); + } } access_show_hidden_entities($old_access); -- cgit v1.2.3