Commit f83776a0 authored by Dries's avatar Dries

- Patch #444876 by Damien Tournoud: remove node_invoke_node().

parent b5201d37
......@@ -770,34 +770,6 @@ function node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
}
}
/**
* Invoke a hook_node() operation in all modules.
*
* @param &$node
* A node object.
* @param $op
* A string containing the name of the node operation.
* @param $a3, $a4
* Arguments to pass on to the hook, after the $node and $op arguments.
* @return
* The returned value of the invoked hooks.
*/
function node_invoke_node(&$node, $op, $a3 = NULL, $a4 = NULL) {
$return = array();
$hook = 'node_' . $op;
foreach (module_implements($hook) as $module) {
$function = $module . '_' . $hook;
$result = $function($node, $a3, $a4);
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}
return $return;
}
/**
* Load node objects from the database.
*
......@@ -1156,7 +1128,7 @@ function node_save(&$node) {
$function = "field_attach_$op";
$function('node', $node);
node_invoke_node($node, $op);
module_invoke_all('node_' . $op, $node);
// Update the node access table for this node.
node_access_acquire_grants($node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment