Merge branch 'develop' of git@github.com:bgenere/dolibarr.git into develop
This commit is contained in:
commit
5e1ee7c812
@ -977,7 +977,7 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
|||||||
{
|
{
|
||||||
//var_dump($objMod->dictionaries['tabname']);
|
//var_dump($objMod->dictionaries['tabname']);
|
||||||
$nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp=0;
|
$nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp=0;
|
||||||
foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = count($tabname)+1; $tabname[] = $val; }
|
foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = max($taborder)+1; $tabname[] = $val; }
|
||||||
foreach($objMod->dictionaries['tablib'] as $val) { $nbtablib++; $tablib[] = $val; }
|
foreach($objMod->dictionaries['tablib'] as $val) { $nbtablib++; $tablib[] = $val; }
|
||||||
foreach($objMod->dictionaries['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; }
|
foreach($objMod->dictionaries['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; }
|
||||||
foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; }
|
foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; }
|
||||||
|
|||||||
@ -177,7 +177,6 @@ class ExportCsv extends ModeleExports
|
|||||||
*/
|
*/
|
||||||
function write_header($outputlangs)
|
function write_header($outputlangs)
|
||||||
{
|
{
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,23 +189,18 @@ class ExportCsv extends ModeleExports
|
|||||||
* @param Translate $outputlangs Object lang to translate values
|
* @param Translate $outputlangs Object lang to translate values
|
||||||
* @param array $array_types Array with types of fields
|
* @param array $array_types Array with types of fields
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*
|
|
||||||
* //TODO transnoentities send back UTF-8 so using an ISO charset at this point create an issue
|
|
||||||
* (get a blank screen and an empty file)
|
|
||||||
* my feeling is that we should not force charset till we are not writing the final result.
|
|
||||||
*/
|
*/
|
||||||
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
||||||
{
|
{
|
||||||
$outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET;
|
$outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$outputlangs->charset_output = $conf->file->character_set_client;
|
$outputlangs->charset_output = 'ISO-8859-1';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($array_selected_sorted as $code => $value)
|
foreach($array_selected_sorted as $code => $value)
|
||||||
@ -217,7 +211,6 @@ class ExportCsv extends ModeleExports
|
|||||||
fwrite($this->handle,$newvalue.$this->separator);
|
fwrite($this->handle,$newvalue.$this->separator);
|
||||||
}
|
}
|
||||||
fwrite($this->handle,"\n");
|
fwrite($this->handle,"\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,10 +223,6 @@ class ExportCsv extends ModeleExports
|
|||||||
* @param Translate $outputlangs Object lang to translate values
|
* @param Translate $outputlangs Object lang to translate values
|
||||||
* @param array $array_types Array with types of fields
|
* @param array $array_types Array with types of fields
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*
|
|
||||||
* //TODO transnoentities send back UTF-8 so using an ISO charset at this point create an issue
|
|
||||||
* (get a blank screen and an empty file)
|
|
||||||
* my feeling is that we should not force charset till we are not writing the final result.
|
|
||||||
*/
|
*/
|
||||||
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
||||||
{
|
{
|
||||||
@ -245,7 +234,7 @@ class ExportCsv extends ModeleExports
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$outputlangs->charset_output = $conf->file->character_set_client;
|
$outputlangs->charset_output = 'ISO-8859-1';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->col=0;
|
$this->col=0;
|
||||||
@ -314,7 +303,7 @@ class ExportCsv extends ModeleExports
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$addquote=0;
|
$addquote=0;
|
||||||
dol_syslog("ExportCsv::csvClean ".$newvalue);
|
|
||||||
|
|
||||||
// Rule Dolibarr: No HTML
|
// Rule Dolibarr: No HTML
|
||||||
//print $charset.' '.$newvalue."\n";
|
//print $charset.' '.$newvalue."\n";
|
||||||
|
|||||||
@ -868,13 +868,13 @@ if ($step == 4 && $datatoimport)
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
$entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]);
|
$entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_label[0]);
|
||||||
$tablealias=preg_replace('/(\..*)$/i','',$code);
|
$tablealias=preg_replace('/(\..*)$/i','',$code);
|
||||||
$tablename=$objimport->array_import_tables[0][$tablealias];
|
$tablename=$objimport->array_import_tables[0][$tablealias];
|
||||||
$entityicon=$entitytoicon[$entity]?$entitytoicon[$entity]:$entity;
|
$entityicon=$entitytoicon[$entity]?$entitytoicon[$entity]:$entity;
|
||||||
$entitylang=$entitytolang[$entity]?$entitytolang[$entity]:$entity;
|
$entitylang=$entitytolang[$entity]?$entitytolang[$entity]:$entity;
|
||||||
|
|
||||||
print '<td class="nowrap" style="font-weight: normal">=>'.img_object('',$entityicon).' '.$langs->trans($entitylang).'</td>';
|
print '<td class="nowrap" style="font-weight: normal">'.img_object('',$entityicon).' '.$langs->trans($entitylang).'</td>';
|
||||||
print '<td style="font-weight: normal">';
|
print '<td style="font-weight: normal">';
|
||||||
$newlabel=preg_replace('/\*$/','',$label);
|
$newlabel=preg_replace('/\*$/','',$label);
|
||||||
$text=$langs->trans($newlabel);
|
$text=$langs->trans($newlabel);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user