diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-02-17 22:15:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-02-17 22:15:04 +0000 |
commit | 43aa968f90b42fc7b97642c7aad06d26070e2981 (patch) | |
tree | da2f05119ea5d0fca415d26c88812228e3481e97 | |
parent | 455e18c686bf15e464f176d3d7b8d11e6cefefbc (diff) | |
download | brdo-43aa968f90b42fc7b97642c7aad06d26070e2981.tar.gz brdo-43aa968f90b42fc7b97642c7aad06d26070e2981.tar.bz2 |
- Patch #203846 by pwolanin: remove PHP4 compatibility code.
-rw-r--r-- | includes/actions.inc | 4 | ||||
-rw-r--r-- | modules/trigger/trigger.module | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/includes/actions.inc b/includes/actions.inc index ac79a7c15..8eeca815d 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -22,8 +22,6 @@ * @param $object * Parameter that will be passed along to the callback. Typically the * object that the action will act on; a node, user or comment object. - * If the action does not act on an object, pass a dummy object. This - * is necessary to support PHP 4 object referencing. * @param $context * Parameter that will be passed along to the callback. $context is a * keyed array containing extra information about what is currently @@ -39,7 +37,7 @@ * An associative array containing the result of the function that * performs the action, keyed on action ID. */ -function actions_do($action_ids, &$object, $context = NULL, $a1 = NULL, $a2 = NULL) { +function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a2 = NULL) { static $stack; $stack++; if ($stack > variable_get('actions_max_stack', 35)) { diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module index 38788048b..61544246e 100644 --- a/modules/trigger/trigger.module +++ b/modules/trigger/trigger.module @@ -299,8 +299,7 @@ function trigger_comment($a1, $op) { actions_do($aid, $objects[$action_info['type']], $context); } else { - $comment = (object) $a1; - actions_do($aid, $comment, $context); + actions_do($aid, (object) $a1, $context); } } } @@ -393,8 +392,7 @@ function trigger_taxonomy($op, $type, $array) { 'op' => $op ); foreach ($aids as $aid => $action_info) { - $taxonomy_object = (object) $array; - actions_do($aid, $taxonomy_object, $context); + actions_do($aid, (object) $array, $context); } } |