You are here

function i18n_book_navigation_presave_translation in Book translation 7.2

Same name and namespace in other branches
  1. 6.2 i18n_book_navigation.module \i18n_book_navigation_presave_translation()
  2. 6 i18n_book_navigation.module \i18n_book_navigation_presave_translation()

Implements hook_presave_translation().

New translated nodes should not be saved with book information as it inteferes with this module.

Patch by chaps2.

File

./i18n_book_navigation.module, line 954
Defines the Book translation module.

Code

function i18n_book_navigation_presave_translation(&$node, $nid, $vid, $code) {

  // Check that node is a new node cloned from a source node.
  if (!isset($node->nid) && isset($node->tnid) && isset($node->book)) {
    unset($node->book);
    variable_set('icl_content_books_to_update', array());
  }
}