Commit 7961f681 authored by drumm's avatar drumm
Browse files

#59935 by chx, make nodeapi consistent with the rest of formapi, enabling the...

#59935 by chx, make nodeapi consistent with the rest of formapi, enabling the use of form_set_value.
parent 47fba524
...@@ -1520,7 +1520,7 @@ function node_submit($node) { ...@@ -1520,7 +1520,7 @@ function node_submit($node) {
/** /**
* Perform validation checks on the given node. * Perform validation checks on the given node.
*/ */
function node_validate($node) { function node_validate($node, $form = array()) {
// Convert the node to an object, if necessary. // Convert the node to an object, if necessary.
$node = (object)$node; $node = (object)$node;
...@@ -1550,12 +1550,12 @@ function node_validate($node) { ...@@ -1550,12 +1550,12 @@ function node_validate($node) {
} }
// Do node-type-specific validation checks. // Do node-type-specific validation checks.
node_invoke($node, 'validate'); node_invoke($node, 'validate', $form);
node_invoke_nodeapi($node, 'validate'); node_invoke_nodeapi($node, 'validate', $form);
} }
function node_form_validate($form_id, $edit) { function node_form_validate($form_id, $form_values, $form) {
node_validate($edit); node_validate($form_values, $form);
} }
function node_object_prepare(&$node) { function node_object_prepare(&$node) {
......
...@@ -1520,7 +1520,7 @@ function node_submit($node) { ...@@ -1520,7 +1520,7 @@ function node_submit($node) {
/** /**
* Perform validation checks on the given node. * Perform validation checks on the given node.
*/ */
function node_validate($node) { function node_validate($node, $form = array()) {
// Convert the node to an object, if necessary. // Convert the node to an object, if necessary.
$node = (object)$node; $node = (object)$node;
...@@ -1550,12 +1550,12 @@ function node_validate($node) { ...@@ -1550,12 +1550,12 @@ function node_validate($node) {
} }
// Do node-type-specific validation checks. // Do node-type-specific validation checks.
node_invoke($node, 'validate'); node_invoke($node, 'validate', $form);
node_invoke_nodeapi($node, 'validate'); node_invoke_nodeapi($node, 'validate', $form);
} }
function node_form_validate($form_id, $edit) { function node_form_validate($form_id, $form_values, $form) {
node_validate($edit); node_validate($form_values, $form);
} }
function node_object_prepare(&$node) { function node_object_prepare(&$node) {
......
Supports Markdown
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