function book_copy_confirm_copy in Book Copy 6
Presents the user with a confirm dialog to avoid creating a mess of copied nodes.
1 string reference to 'book_copy_confirm_copy'
- book_copy_batch_copy in ./
book_copy.module - This function defines our batch book copy process and starts it Error checking ensures that we have a valid book, and generates a warning if the user tries to copy a non book
File
- ./
book_copy.module, line 215
Code
function book_copy_confirm_copy(&$form_state, $book, $subtree = 0) {
if (!empty($subtree)) {
$path = 'node/' . $subtree->nid;
}
else {
$path = 'node/' . $book->nid;
}
$form['book'] = array(
'#type' => 'value',
'#value' => $book->nid,
);
if (!empty($subtree)) {
$form['subtree'] = array(
'#type' => 'value',
'#value' => $subtree->nid,
);
}
$form = confirm_form($form, t('Are you sure you want to copy %title', array(
'%title' => $book->title,
)), 'node/' . $book->nid, '');
return $form;
}