You are here

function _print_mail_node_conf_modify in Printer, email and PDF versions 7

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.module \_print_mail_node_conf_modify()
  2. 6 print_mail/print_mail.module \_print_mail_node_conf_modify()
  3. 5.x print_mail/print_mail.module \_print_mail_node_conf_modify()

Update the print_mail_node_conf table to reflect the given attributes

If updating to the default values, delete the record.

Parameters

$nid: value of the nid field (primary key)

$link: value of the link field (0 or 1)

$comments: value of the comments field (0 or 1)

$url_list: value of the url_list field (0 or 1)

2 calls to _print_mail_node_conf_modify()
print_mail_node_insert in print_mail/print_mail.module
Implements hook_node_insert().
print_mail_node_update in print_mail/print_mail.module
Implements hook_node_update().

File

print_mail/print_mail.module, line 476
Displays Printer-friendly versions of Drupal pages.

Code

function _print_mail_node_conf_modify($nid, $link, $comments, $url_list) {
  db_merge('print_mail_node_conf')
    ->key(array(
    'nid' => $nid,
  ))
    ->fields(array(
    'link' => $link,
    'comments' => $comments,
    'url_list' => $url_list,
  ))
    ->execute();
}