From e26efc7482f04b8c8b5e5b68109f961e380064ef Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Jun 2008 17:12:55 +0000 Subject: A more elegant event passthrough mechanism. git-svn-id: https://code.elgg.org/elgg/trunk@799 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index c01d81649..e18feb398 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -665,35 +665,36 @@ } else { + $return = true; if (!empty($CONFIG->events[$event][$object_type]) && is_array($CONFIG->events[$event][$object_type])) { foreach($CONFIG->events[$event][$object_type] as $eventfunction) { if ($eventfunction($event, $object_type, $object) === false) { - // return false; + $return = false; } } } if (!empty($CONFIG->events['all'][$object_type]) && is_array($CONFIG->events['all'][$object_type])) { foreach($CONFIG->events['all'][$object_type] as $eventfunction) { if ($eventfunction($event, $object_type, $object) === false) { - // return false; + $return = false; } } } if (!empty($CONFIG->events[$event]['all']) && is_array($CONFIG->events[$event]['all'])) { foreach($CONFIG->events[$event]['all'] as $eventfunction) { if ($eventfunction($event, $object_type, $object) === false) { - // return false; + $return = false; } } } if (!empty($CONFIG->events['all']['all']) && is_array($CONFIG->events['all']['all'])) { foreach($CONFIG->events['all']['all'] as $eventfunction) { if ($eventfunction($event, $object_type, $object) === false) { - // return false; + $return = false; } } } - return true; + return $return; } -- cgit v1.2.3