]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
move deactivate event registration to the user-triggered action
authorbeck24 <beck24@gmail.com>
Mon, 14 Oct 2013 04:51:02 +0000 (21:51 -0700)
committerbeck24 <beck24@gmail.com>
Mon, 14 Oct 2013 04:51:02 +0000 (21:51 -0700)
actions/admin/plugins/deactivate.php
engine/lib/plugins.php

index 354f4717d079e02b3be9efa22d568d5b18e49f0a..adb86dd7ad2fafb3a30f44985bf83c29b4100688 100644 (file)
@@ -10,6 +10,9 @@
  * @package Elgg.Core
  * @subpackage Administration.Plugins
  */
+ // prevent disabling plugins with active dependents
+ elgg_register_event_handler('deactivate', 'plugin', 'plugins_deactivate_dependency_check');
 
 $plugin_guids = get_input('plugin_guids');
 
index e0aa705bb51fe0c16dbe475367bbc63c4111a83d..1b7ad5db9bb6497c35c0ba3cd6c3fdf71c1dda05 100644 (file)
@@ -1148,8 +1148,6 @@ function plugin_init() {
        run_function_once("plugin_run_once");
 
        elgg_register_plugin_hook_handler('unit_test', 'system', 'plugins_test');
-       
-       elgg_register_event_handler('deactivate', 'plugin', 'plugins_deactivate_dependency_check');
 
        elgg_register_action("plugins/settings/save", '', 'admin');
        elgg_register_action("plugins/usersettings/save");