You are here

function print_node_update in Printer, email and PDF versions 7

Implements hook_node_update().

File

./print.module, line 468
Displays Printer-friendly versions of Drupal pages.

Code

function print_node_update($node) {
  if (user_access('administer print') || user_access('node-specific print configuration')) {
    if (!isset($node->print_display) || $node->print_display === NULL) {
      $node->print_display = variable_get('print_display_' . $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
    }
    if (!isset($node->print_display_comment) || $node->print_display_comment === NULL) {
      $node->print_display_comment = variable_get('print_display_comment_' . $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
    }
    if (!isset($node->print_display_urllist) || $node->print_display_urllist === NULL) {
      $node->print_display_urllist = variable_get('print_display_urllist_' . $node->type, PRINT_TYPE_URLLIST_DEFAULT);
    }
    _print_node_conf_modify($node->nid, $node->print_display, $node->print_display_comment, $node->print_display_urllist);
  }
}