| 1 |
<?php |
<?php |
| 2 |
// $Id: actions.module,v 1.35 2008/04/24 19:56:37 jvandyk Exp $ |
// $Id: actions.module,v 1.36 2008/04/29 18:27:08 jvandyk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 816 |
// Prevent recursion by tracking which operations have already been called. |
// Prevent recursion by tracking which operations have already been called. |
| 817 |
static $recursion; |
static $recursion; |
| 818 |
// Support a subset of operations. |
// Support a subset of operations. |
| 819 |
if (!in_array($op, array('view', 'update', 'presave', 'insert', 'delete')) || isset($recursion[$op])) { |
if (!in_array($op, array('view', 'update', 'presave', 'insert', 'delete')) || isset($recursion[$op][$node->nid])) { |
| 820 |
return; |
return; |
| 821 |
} |
} |
| 822 |
$recursion[$op] = TRUE; |
$recursion[$op][$node->nid] = TRUE; |
| 823 |
|
|
| 824 |
$aids = _actions_get_hook_aids('nodeapi', $op); |
$aids = _actions_get_hook_aids('nodeapi', $op); |
| 825 |
if (!$aids) { |
if (!$aids) { |