|
|
|
@ -123,20 +123,20 @@ function inc_exporter_csv_dist($titre, $resource, $options = []) {
|
|
|
|
|
if (!is_array($options)) {
|
|
|
|
|
$args = func_get_args();
|
|
|
|
|
$options = [];
|
|
|
|
|
foreach ([2 => 'delim', 3 => 'entetes', 4 => 'envoyer'] as $k => $option) {
|
|
|
|
|
foreach (array(2 => 'delim', 3 => 'entetes', 4 => 'envoyer') as $k => $option) {
|
|
|
|
|
if (!empty($args[$k])) {
|
|
|
|
|
$options[$option] = $args[$k];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$default_options = [
|
|
|
|
|
$default_options = array(
|
|
|
|
|
'delim' => ', ',
|
|
|
|
|
'entetes' => null,
|
|
|
|
|
'envoyer' => true,
|
|
|
|
|
'charset' => null,
|
|
|
|
|
'callback' => null,
|
|
|
|
|
];
|
|
|
|
|
);
|
|
|
|
|
$options = array_merge($default_options, $options);
|
|
|
|
|
|
|
|
|
|
$filename = preg_replace(',[^-_\w]+,', '_', translitteration(textebrut(typo($titre))));
|
|
|
|
|