You are here

function print_update_5305 in Printer, email and PDF versions 5.4

Update to version 5.x-4.10

File

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

Code

function print_update_5305() {
  global $base_root, $base_path;
  $ret = array();
  $t = get_t();
  $print_css = variable_get('print_css', '');
  $pattern = "!(?:{$base_root})?{$base_path}(.*)!is";
  if (preg_match($pattern, strtr($print_css, array(
    '%b' => base_path(),
  )), $matches)) {
    variable_set('print_css', $matches[1]);
  }
  elseif (!empty($print_css)) {
    drupal_set_message($t('Please review your custom stylesheet path in the <a href="!url">print module settings</a>, as the path must now be relative to the base path of the site.', array(
      '!url' => url('admin/settings/print/common'),
    )));
  }
  return $ret;
}