You are here

function print_pdf_update_6000 in Printer, email and PDF versions 5.3

Same name and namespace in other branches
  1. 5.4 print_pdf/print_pdf.install \print_pdf_update_6000()
  2. 6 print_pdf/print_pdf.install \print_pdf_update_6000()
  3. 5.x print_pdf/print_pdf.install \print_pdf_update_6000()

Update to version 6.x-1.0

File

print_pdf/print_pdf.install, line 34
Install file of the print_pdf module

Code

function print_pdf_update_6000() {
  global $conf;
  $ret = array();
  if (isset($conf['print_pdf_settings'])) {
    $print_pdf_settings = variable_get('print_pdf_settings', '');
    variable_set('print_pdf_link_pos', array(
      'link' => $print_pdf_settings['show_link'] ? 'link' : 0,
    ));
    variable_set('print_pdf_show_link', max(1, $print_pdf_settings['show_link']));
    variable_set('print_pdf_node_link_visibility', $print_pdf_settings['node_link_visibility']);
    variable_set('print_pdf_node_link_pages', $print_pdf_settings['node_link_pages']);
    variable_set('print_pdf_link_class', $print_pdf_settings['link_class']);
    variable_set('print_pdf_sys_link_visibility', $print_pdf_settings['sys_link_visibility']);
    variable_set('print_pdf_sys_link_pages', $print_pdf_settings['sys_link_pages']);
    variable_set('print_pdf_book_link', $print_pdf_settings['book_link']);
    variable_set('print_pdf_pdf_tool', $print_pdf_settings['pdf_tool']);
    variable_set('print_pdf_content_disposition', $print_pdf_settings['content_disposition']);
    variable_set('print_pdf_paper_size', $print_pdf_settings['paper_size']);
    variable_set('print_pdf_page_orientation', $print_pdf_settings['page_orientation']);
    variable_del('print_pdf_settings');
  }
  return $ret;
}