function print_mail_node_update in Printer, email and PDF versions 7
Implements hook_node_update().
File
- print_mail/
print_mail.module, line 281 - Displays Printer-friendly versions of Drupal pages.
Code
function print_mail_node_update($node) {
if (user_access('administer print') || user_access('node-specific print configuration')) {
if (!isset($node->print_mail_display) || $node->print_mail_display === NULL) {
$node->print_mail_display = variable_get('print_mail_display_' . $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
}
if (!isset($node->print_mail_display_comment) || $node->print_mail_display_comment === NULL) {
$node->print_mail_display_comment = variable_get('print_mail_display_comment_' . $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
}
if (!isset($node->print_mail_display_urllist) || $node->print_mail_display_urllist === NULL) {
$node->print_mail_display_urllist = variable_get('print_mail_display_urllist_' . $node->type, PRINT_TYPE_URLLIST_DEFAULT);
}
_print_mail_node_conf_modify($node->nid, $node->print_mail_display, $node->print_mail_display_comment, $node->print_mail_display_urllist);
}
}