forked from Wavyzz/dolibarr
Fix: bad accent in csv format
This commit is contained in:
@@ -143,7 +143,15 @@ class ExportCsv extends ModeleExports
|
|||||||
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs)
|
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) $outputlangs->charset_output=$conf->global->EXPORT_CSV_FORCE_CHARSET;
|
|
||||||
|
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output = 'ISO-8859-1';
|
||||||
|
}
|
||||||
|
|
||||||
foreach($array_selected_sorted as $code => $value)
|
foreach($array_selected_sorted as $code => $value)
|
||||||
{
|
{
|
||||||
@@ -163,7 +171,15 @@ class ExportCsv extends ModeleExports
|
|||||||
function write_record($array_alias,$array_selected_sorted,$objp,$outputlangs)
|
function write_record($array_alias,$array_selected_sorted,$objp,$outputlangs)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) $outputlangs->charset_output=$conf->global->EXPORT_CSV_FORCE_CHARSET;
|
|
||||||
|
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output = 'ISO-8859-1';
|
||||||
|
}
|
||||||
|
|
||||||
$this->col=0;
|
$this->col=0;
|
||||||
foreach($array_selected_sorted as $code => $value)
|
foreach($array_selected_sorted as $code => $value)
|
||||||
@@ -183,6 +199,7 @@ class ExportCsv extends ModeleExports
|
|||||||
fwrite($this->handle,$newvalue.$this->separator);
|
fwrite($this->handle,$newvalue.$this->separator);
|
||||||
$this->col++;
|
$this->col++;
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite($this->handle,"\n");
|
fwrite($this->handle,"\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class modUser extends DolibarrModules
|
|||||||
|
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u';
|
||||||
$this->export_sql_end[$r] .=' WHERE u.entity = '.$conf->entity;
|
$this->export_sql_end[$r] .=' WHERE u.entity IN (0,'.$conf->entity.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user