function node_admin_nodes_submit in Drupal 5
Same name and namespace in other branches
- 4 modules/node.module \node_admin_nodes_submit()
- 6 modules/node/node.admin.inc \node_admin_nodes_submit()
- 7 modules/node/node.admin.inc \node_admin_nodes_submit()
Submit the node administration update form.
File
- modules/
node/ node.module, line 1579 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_admin_nodes_submit($form_id, $form_values) {
$operations = module_invoke_all('node_operations');
$operation = $operations[$form_values['operation']];
// Filter out unchecked nodes
$nodes = array_filter($form_values['nodes']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$nodes,
), $operation['callback arguments']);
}
else {
$args = array(
$nodes,
);
}
call_user_func_array($function, $args);
cache_clear_all();
drupal_set_message(t('The update has been performed.'));
}
}