book_admin_edit_validate
function book_admin_edit_validate
book_admin_edit_validate($form, &$form_state)
Form validation handler for book_admin_edit().
Checks that the book has not been changed while using the form.
See also
File
- modules/book/book.admin.inc, line 102
- Administration page callbacks for the Book module.
Code
function book_admin_edit_validate($form, &$form_state) { if ($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.')); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!book!book.admin.inc/function/book_admin_edit_validate/7.x