You are here

function print_mail_update_6007 in Printer, email and PDF versions 6

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.install \print_mail_update_6007()
  2. 5.x print_mail/print_mail.install \print_mail_update_6007()

Update to version 6.x-1.11

File

print_mail/print_mail.install, line 299
Install file of the print_mail module

Code

function print_mail_update_6007() {
  $ret = array();
  foreach (node_get_types() as $key => $value) {
    $print_mail_display = variable_get('print_mail_display_' . $value->type, 1);
    $print_mail_display_comment = variable_get('print_mail_display_comment_' . $value->type, 0);
    $print_mail_display_urllist = variable_get('print_mail_display_urllist_' . $value->type, 1);
    $ret[] = update_sql("UPDATE {print_mail_node_conf} SET link = (link AND {$print_mail_display}), comments = (comments OR {$print_mail_display_comment}), url_list = (url_list AND {$print_mail_display_urllist}) WHERE nid IN (SELECT nid FROM {node} WHERE type = '{$value->type}');");
  }
  return $ret;
}