aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-23 10:01:12 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-23 10:01:12 +0000
commitd28d94b3a8e19ba3cbf79db042d6f786f50e27b2 (patch)
treea0ef974d1edc51e7ea4aaef5f71a9147785a0cf9
parentf2883477d14a300b5364f21fc95f5bc871a39d8d (diff)
downloadelgg-d28d94b3a8e19ba3cbf79db042d6f786f50e27b2.tar.gz
elgg-d28d94b3a8e19ba3cbf79db042d6f786f50e27b2.tar.bz2
Similar tweak as for events, but with plugin hooks
git-svn-id: https://code.elgg.org/elgg/trunk@690 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index c71d6fb6c..cdcba7dda 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -782,7 +782,7 @@
if (!empty($CONFIG->hooks['all'][$entity_type]) && is_array($CONFIG->hooks['all'][$entity_type])) {
foreach($CONFIG->hooks['all'][$entity_type] as $hookfunction) {
- $temp_return_value = $hookfunction('all', $entity_type, $returnvalue, $params);
+ $temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);
if (!is_null($temp_return_value)) $returnvalue = $temp_return_value;
}
}
@@ -792,7 +792,17 @@
if (!empty($CONFIG->hooks[$hook]['all']) && is_array($CONFIG->hooks[$hook]['all'])) {
foreach($CONFIG->hooks[$hook]['all'] as $hookfunction) {
- $temp_return_value = $hookfunction($hook, 'all', $returnvalue, $params);
+ $temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);
+ if (!is_null($temp_return_value)) $returnvalue = $temp_return_value;
+ }
+ }
+
+ if (!isset($CONFIG->hooks['all']['all']))
+ return $returnvalue;
+
+ if (!empty($CONFIG->hooks['all']['all']) && is_array($CONFIG->hooks[$hook]['all'])) {
+ foreach($CONFIG->hooks['all']['all'] as $hookfunction) {
+ $temp_return_value = $hookfunction($hook, $entity_type, $returnvalue, $params);
if (!is_null($temp_return_value)) $returnvalue = $temp_return_value;
}
}