function clone_node_check in Node clone 6
Same name and namespace in other branches
- 5 clone.module \clone_node_check()
- 7 clone.pages.inc \clone_node_check()
Menu callback: prompt the user to confirm the operation
1 string reference to 'clone_node_check'
- clone_menu in ./
clone.module - Implementation of hook_menu().
File
- ./
clone.pages.inc, line 70 - Additional functions for Node_Clone module.
Code
function clone_node_check($node) {
$method = variable_get('clone_method', 'prepopulate');
switch ($method) {
case 'save-edit':
if (variable_get('clone_nodes_without_confirm', FALSE)) {
$new_nid = clone_node_save($node->nid);
drupal_goto('node/' . $new_nid . '/edit');
}
else {
return drupal_get_form('clone_node_confirm', $node);
}
break;
case 'prepopulate':
default:
return clone_node_prepopulate($node);
break;
}
}