From 110f0fa670a03bcd7f95a2d45a42d8a891d70544 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 7 Apr 2008 15:14:19 +0000 Subject: Further delete and event trigger fixes git-svn-id: https://code.elgg.org/elgg/trunk@412 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 3da5652c1..bbb0f7579 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -654,13 +654,17 @@ * @return true|false Depending on success */ function trigger_event($event, $object_type, $object = null) { - if (events($event, $object_type, "", null, true, $object) - && events('all', $object_type, "", null, true, $object) - && events($event, 'all', "", null, true, $object) - && events('all', 'all', "", null, true, $object)) { - return true; - } - return false; + + $return = true; + $return1 = events($event, $object_type, "", null, true, $object); + if (!is_null($return1)) $return = $return1; + $return2 = events('all', $object_type, "", null, true, $object); + if (!is_null($return2)) $return = $return2; + $return3 = events($event, 'all', "", null, true, $object); + if (!is_null($return3)) $return = $return3; + $return4 = events('all', 'all', "", null, true, $object); + if (!is_null($return4)) $return = $return4; + return $return; } /** -- cgit v1.2.3