Skip to content
Snippets Groups Projects
Commit 4dbe0684 authored by TeNNoX's avatar TeNNoX Committed by eileenmcnaugton
Browse files

CRM-15238 Add option to use semicolon as separator for the

bin/csv/export.php

Conflicts:
	bin/cli.class.php
parent 1e5e9714
Branches
Tags
No related merge requests found
......@@ -46,6 +46,7 @@ class civicrm_cli {
var $_action = NULL;
var $_output = FALSE;
var $_joblog = FALSE;
var $_semicolon = FALSE;
var $_config;
// optional arguments
......@@ -185,6 +186,9 @@ class civicrm_cli {
elseif ($arg == '-j' || $arg == '--joblog') {
$this->_joblog = TRUE;
}
elseif ($arg == '-sem' || $arg == '--semicolon') {
$this->_semicolon = TRUE;
}
else {
foreach ($this->_additional_arguments as $short => $long) {
if ($arg == '-' . $short || $arg == '--' . $long) {
......@@ -342,7 +346,14 @@ class civicrm_cli_csv_exporter extends civicrm_cli {
parent::initialize();
}
/**
* Run the script.
*/
public function run() {
if ($this->_semicolon) {
$this->separator = ';';
}
$out = fopen("php://output", 'w');
fputcsv($out, $this->columns, $this->separator, '"');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment