summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-10-02 02:06:00 +0000
committerDries Buytaert <dries@buytaert.net>2008-10-02 02:06:00 +0000
commit0bdd86b4061c933709348ae616ce1121c4680259 (patch)
treeef38fd88c5751371652af54922da99060545bcbc /includes/actions.inc
parentaf1a0db72848bee5d4444249c8f3f9b8101b513e (diff)
downloadbrdo-0bdd86b4061c933709348ae616ce1121c4680259.tar.gz
brdo-0bdd86b4061c933709348ae616ce1121c4680259.tar.bz2
- Patch #290282 by jvandyk, kratib: correct tracking of recursion.
Diffstat (limited to 'includes/actions.inc')
-rw-r--r--includes/actions.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/actions.inc b/includes/actions.inc
index 69971d84a..ae94ffe86 100644
--- a/includes/actions.inc
+++ b/includes/actions.inc
@@ -38,6 +38,7 @@
* performs the action, keyed on action ID.
*/
function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a2 = NULL) {
+ // $stack tracks the number of recursive calls.
static $stack;
$stack++;
if ($stack > variable_get('actions_max_stack', 35)) {
@@ -101,6 +102,7 @@ function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a
$result[$action_ids] = $action_ids($object, $context, $a1, $a2);
}
}
+ $stack--;
return $result;
}