function book_helper_admin_edit_validate in Book helper 7
Same name and namespace in other branches
- 6 book_helper.admin.inc \book_helper_admin_edit_validate()
Check that the book has not been changed while using the form.
See also
File
- ./
book_helper.admin.inc, line 161 - Administration page for the 'Book helper' module.
Code
function book_helper_admin_edit_validate($form, &$form_state) {
if ($form_state['values']['op'] == t('Save book pages') && $form_state['values']['tree_hash'] != $form_state['values']['tree_current_hash']) {
form_set_error('', t('This book has been modified by another user, the changes could not be saved.'));
}
}