You are here

function sheetnode_phpexcel_preprocess_sheetnode_phpexcel_export_ready in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc \sheetnode_phpexcel_preprocess_sheetnode_phpexcel_export_ready()
  2. 7 modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc \sheetnode_phpexcel_preprocess_sheetnode_phpexcel_export_ready()

Template preprocessor for theme('sheetnode_phpexcel_export_ready').

File

modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc, line 91

Code

function sheetnode_phpexcel_preprocess_sheetnode_phpexcel_export_ready(&$vars) {
  if (empty($_SESSION['sheetnode_phpexcel_download'])) {
    drupal_not_found();
  }
  $download = $_SESSION['sheetnode_phpexcel_download'];
  $vars['download'] = url('sheetnode/export/download');
  $vars['filename'] = $download['filename'];
  $vars['destination'] = $download['destination'];

  // Set the page to automatically redirect to download file after 3 seconds.
  drupal_set_html_head('<meta http-equiv="refresh" content="3;url=' . check_plain($vars['download']) . '" />');
}