Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6c0fb9a1f1
@ -54,6 +54,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
||||
$loadmethod = GETPOST('loadmethod','alpha',2);
|
||||
$savemethod = GETPOST('savemethod','alpha',2);
|
||||
$savemethodname = (! empty($savemethod) ? $savemethod : 'setValueFrom');
|
||||
$newelement = $element;
|
||||
|
||||
$view='';
|
||||
$format='text';
|
||||
|
||||
@ -542,10 +542,22 @@ class ImportCsv extends ModeleImports
|
||||
// Define $listfields and $listvalues to build SQL request
|
||||
if ($listfields) { $listfields.=', '; $listvalues.=', '; }
|
||||
$listfields.=$fieldname;
|
||||
|
||||
/*
|
||||
field type detection was made before conversions so it can be wrong
|
||||
if ($arrayrecord[($key-1)]['type'] < 0) $listvalues.=($newval=='0'?$newval:"null");
|
||||
elseif ($arrayrecord[($key-1)]['type'] == 0) $listvalues.="''";
|
||||
elseif ($arrayrecord[($key-1)]['type'] > 0) $listvalues.="'".$this->db->escape($newval)."'";
|
||||
*/
|
||||
/*
|
||||
lines below replace lines above and are much simple
|
||||
*/
|
||||
if (!isset($newval)) $listvalues.="null";
|
||||
elseif (empty($newval)) $listvalues.="''";
|
||||
else $listvalues.="'".$this->db->escape($newval)."'";
|
||||
/*
|
||||
end of replace
|
||||
*/
|
||||
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -1757,7 +1757,7 @@ class Societe extends CommonObject
|
||||
$dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
|
||||
foreach ($dirsociete as $dirroot)
|
||||
{
|
||||
$res=dol_include_once($dirroot.$conf->global->SOCIETE_FOURNISSEUR_ADDON.'.php');
|
||||
$res=dol_include_once($dirroot.$conf->global->SOCIETE_CODEFOURNISSEUR_ADDON.'.php');
|
||||
if ($res) break;
|
||||
}
|
||||
$var = $conf->global->SOCIETE_CODEFOURNISSEUR_ADDON;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user