From d1b4235b5dd26559334a7b57dcf9e53a3042e354 Mon Sep 17 00:00:00 2001 From: brettp Date: Sun, 27 Feb 2011 22:48:42 +0000 Subject: Fixes #3011. on_activate and on_deactivate work for plugins now. Updated the categories plugin to use it. git-svn-id: http://code.elgg.org/elgg/trunk@8507 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/classes/ElggPlugin.php') diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 5ecdfdfd0..18d97d23a 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -648,9 +648,9 @@ class ElggPlugin extends ElggObject { if (!is_callable($function)) { $return = false; } else { - $on_enable = call_user_func($function); + $result = call_user_func($function); // allow null to mean "I don't care" like other subsystems - $return = ($on_disable === false) ? false: true; + $return = ($result === false) ? false: true; } if ($return === false) { @@ -702,9 +702,9 @@ class ElggPlugin extends ElggObject { if (!is_callable($function)) { $return = false; } else { - $on_enable = call_user_func($function); + $result = call_user_func($function); // allow null to mean "I don't care" like other subsystems - $return = ($on_disable === false) ? false : true; + $return = ($result === false) ? false : true; } if ($return === false) { -- cgit v1.2.3