Project

General

Profile

Revision 01f36513

Added by Assos Assos about 6 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/webform/includes/exporters/webform_exporter_excel_delimited.inc
1 1
<?php
2 2

  
3 3
/**
4
 * @file
5 4
 * The Excel exporter currently is just a tab-delimited export.
6 5
 */
7

  
8
/**
9
 *
10
 */
11 6
class webform_exporter_excel_delimited extends webform_exporter_delimited {
12 7

  
13 8
  /**
14
   *
9
   * {@inheritdoc}
15 10
   */
16 11
  public function __construct($options) {
17 12
    $options['delimiter'] = '\t';
......
19 14
  }
20 15

  
21 16
  /**
22
   *
17
   * {@inheritdoc}
23 18
   */
24 19
  public function bof(&$file_handle) {
25 20
    $output = '';
......
33 28
  }
34 29

  
35 30
  /**
36
   *
31
   * {@inheritdoc}
37 32
   */
38
  public function add_row(&$file_handle, $data, $row_count) {
33
  public function add_row(&$file_handle, array $data, $row_count) {
39 34
    foreach ($data as $key => $value) {
40 35
      // Escape inner quotes and wrap all contents in new quotes.
41 36
      $data[$key] = '"' . str_replace('"', '""', $data[$key]) . '"';
......
53 48
  }
54 49

  
55 50
  /**
56
   *
51
   * {@inheritdoc}
57 52
   */
58 53
  public function set_headers($filename) {
59 54
    drupal_add_http_header('Content-Type', 'application/x-msexcel');

Also available in: Unified diff