You are here

function i18n_book_navigation_presave_translation in Book translation 6.2

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

Implementation of hook_presave_translation() from the Translation Management module. 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 776
Defines the i18n book navigation module. Contains all necessary data and hooks

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());
  }
}