Merge branch 'develop' of git@github.com:bgenere/dolibarr.git into develop

This commit is contained in:
bgenere 2016-12-03 17:10:08 +01:00
commit 5e1ee7c812
3 changed files with 7 additions and 18 deletions

View File

@ -977,7 +977,7 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
{
//var_dump($objMod->dictionaries['tabname']);
$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['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; }
foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; }

View File

@ -177,7 +177,6 @@ class ExportCsv extends ModeleExports
*/
function write_header($outputlangs)
{
return 0;
}
@ -190,23 +189,18 @@ class ExportCsv extends ModeleExports
* @param Translate $outputlangs Object lang to translate values
* @param array $array_types Array with types of fields
* @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)
{
global $conf;
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
{
$outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET;
}
else
{
$outputlangs->charset_output = $conf->file->character_set_client;
$outputlangs->charset_output = 'ISO-8859-1';
}
foreach($array_selected_sorted as $code => $value)
@ -217,7 +211,6 @@ class ExportCsv extends ModeleExports
fwrite($this->handle,$newvalue.$this->separator);
}
fwrite($this->handle,"\n");
return 0;
}
@ -230,10 +223,6 @@ class ExportCsv extends ModeleExports
* @param Translate $outputlangs Object lang to translate values
* @param array $array_types Array with types of fields
* @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)
{
@ -245,7 +234,7 @@ class ExportCsv extends ModeleExports
}
else
{
$outputlangs->charset_output = $conf->file->character_set_client;
$outputlangs->charset_output = 'ISO-8859-1';
}
$this->col=0;
@ -314,7 +303,7 @@ class ExportCsv extends ModeleExports
{
global $conf;
$addquote=0;
dol_syslog("ExportCsv::csvClean ".$newvalue);
// Rule Dolibarr: No HTML
//print $charset.' '.$newvalue."\n";

View File

@ -868,13 +868,13 @@ if ($step == 4 && $datatoimport)
$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);
$tablename=$objimport->array_import_tables[0][$tablealias];
$entityicon=$entitytoicon[$entity]?$entitytoicon[$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">';
$newlabel=preg_replace('/\*$/','',$label);
$text=$langs->trans($newlabel);