book_admin_edit_validate

Versions
6 – 7
book_admin_edit_validate($form, &$form_state)

Check that the book has not been changed while using the form.

See also

book_admin_edit()

Code

modules/book/book.admin.inc, line 87

<?php
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.'));
    $form_state['rebuild'] = TRUE;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.