~ubuntu-branches/ubuntu/lucid/phpmyadmin/lucid

« back to all changes in this revision

Viewing changes to libraries/export/csv.php

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2009-06-30 14:05:13 UTC
  • mfrom: (1.2.1 upstream) (36.1.2 karmic)
  • Revision ID: james.westby@ubuntu.com-20090630140513-hz71do3sij2jhm4s
* New upstream version fixing XSS (PMASA-2009-5).
* Document no empty password in README.Debian and the shipped sample
  configuration file (LP: #388703).
* Install service file for avahi (if web service enabled and if avahi is
  installed) (LP: #369244).
* Mention protecting of setup if not using provided configuration snippets
  for webservers.
* Call ucf with --debconf-ok in postrm (Closes: #534894).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/* vim: set expandtab sw=4 ts=4 sts=4: */
3
3
/**
4
 
 * @version $Id: csv.php 12158 2008-12-25 14:52:28Z lem9 $
 
4
 * @package phpMyAdmin-Export-CSV
 
5
 * @version $Id: csv.php 12494 2009-05-25 08:11:32Z helmo $
5
6
 */
6
7
if (! defined('PHPMYADMIN')) {
7
8
    exit;
22
23
            array('type' => 'text', 'name' => 'escaped', 'text' => 'strFieldsEscapedBy'),
23
24
            array('type' => 'text', 'name' => 'terminated', 'text' => 'strLinesTerminatedBy'),
24
25
            array('type' => 'text', 'name' => 'null', 'text' => 'strReplaceNULLBy'),
 
26
            array('type' => 'bool', 'name' => 'removeCRLF', 'text' => 'strRemoveCRLF'),
25
27
            array('type' => 'bool', 'name' => 'columns', 'text' => 'strPutColNames'),
26
28
            array('type' => 'hidden', 'name' => 'data'),
27
29
            ),
180
182
                if ($what == 'excel') {
181
183
                    $row[$j]       = preg_replace("/\015(\012)?/", "\012", $row[$j]);
182
184
                }
 
185
                // remove CRLF characters within field
 
186
                if ($GLOBALS[$what . '_removeCRLF']) {
 
187
                    $row[$j] = str_replace("\n", "", str_replace("\r", "", $row[$j]));
 
188
                }
183
189
                if ($csv_enclosed == '') {
184
190
                    $schema_insert .= $row[$j];
185
191
                } else {