You are here

function print_update_5301 in Printer, email and PDF versions 5.4

Same name and namespace in other branches
  1. 5.3 print.install \print_update_5301()

Update to version 5.x-3.7

File

./print.install, line 154
Install file of the print module

Code

function print_update_5301() {
  global $conf;
  $ret = array();
  if (isset($conf['print_settings'])) {
    $print_settings = variable_get('print_settings', '');
    variable_set('print_logo_options', $print_settings['logo_url'] ? 2 : 1);
    variable_set('print_logo_url', $print_settings['logo_url']);
    variable_set('print_css', $print_settings['css']);
    variable_set('print_urls', $print_settings['urls']);
    variable_set('print_comments', $print_settings['comments']);
    variable_set('print_newwindow', $print_settings['newwindow']);
    variable_set('print_html_link_pos', array(
      'link' => $print_settings['show_link'] ? 'link' : 0,
    ));
    variable_set('print_html_show_link', max(1, $print_settings['show_link']));
    variable_set('print_html_node_link_visibility', $print_settings['node_link_visibility']);
    variable_set('print_html_node_link_pages', $print_settings['node_link_pages']);
    variable_set('print_html_link_class', $print_settings['link_class']);
    variable_set('print_html_sys_link_visibility', $print_settings['sys_link_visibility']);
    variable_set('print_html_sys_link_pages', $print_settings['sys_link_pages']);
    variable_set('print_html_book_link', $print_settings['book_link']);
    variable_set('print_html_new_window', $print_settings['new_window']);
    variable_set('print_html_sendtoprinter', $print_settings['sendtoprinter']);
    variable_del('print_settings');
  }
  if (isset($conf['print_sourceurl_settings'])) {
    $print_sourceurl_settings = variable_get('print_sourceurl_settings', '');
    variable_set('print_sourceurl_enabled', $print_sourceurl_settings['enabled']);
    variable_set('print_sourceurl_date', $print_sourceurl_settings['date']);
    variable_set('print_sourceurl_forcenode', $print_sourceurl_settings['forcenode']);
    variable_del('print_sourceurl_settings');
  }
  if (isset($conf['print_robot_settings'])) {
    $print_robot_settings = variable_get('print_robot_settings', '');
    variable_set('print_robots_noindex', $print_robot_settings['noindex']);
    variable_set('print_robots_nofollow', $print_robot_settings['nofollow']);
    variable_set('print_robots_noarchive', $print_robot_settings['noarchive']);
    variable_del('print_robot_settings');
  }
  return $ret;
}