aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-04 17:12:55 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-04 17:12:55 +0000
commite26efc7482f04b8c8b5e5b68109f961e380064ef (patch)
tree1365cc4233098f2ad6ff6d2e0bd5c30db8e5f7a0 /engine/lib/elgglib.php
parentefda1efd37d66dcc4a074a90678c2b113b391278 (diff)
downloadelgg-e26efc7482f04b8c8b5e5b68109f961e380064ef.tar.gz
elgg-e26efc7482f04b8c8b5e5b68109f961e380064ef.tar.bz2
A more elegant event passthrough mechanism.
git-svn-id: https://code.elgg.org/elgg/trunk@799 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php11
1 files 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;
}