function _print_pdf_node_conf_modify in Printer, email and PDF versions 6
Same name and namespace in other branches
- 5.4 print_pdf/print_pdf.module \_print_pdf_node_conf_modify()
- 7 print_pdf/print_pdf.module \_print_pdf_node_conf_modify()
- 5.x print_pdf/print_pdf.module \_print_pdf_node_conf_modify()
Update the print_pdf_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)
1 call to _print_pdf_node_conf_modify()
- print_pdf_nodeapi in print_pdf/
print_pdf.module - Implementation of hook_nodeapi().
File
- print_pdf/
print_pdf.module, line 460 - Displays Printer-friendly versions of Drupal pages.
Code
function _print_pdf_node_conf_modify($nid, $link, $comments, $url_list) {
db_query("UPDATE {print_pdf_node_conf} SET link = %d, comments = %d, url_list = %d WHERE nid = %d", $link, $comments, $url_list, $nid);
if (!db_affected_rows()) {
@db_query("INSERT INTO {print_pdf_node_conf} (nid, link, comments, url_list) VALUES (%d, %d, %d, %d)", $nid, $link, $comments, $url_list);
}
}