Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0

This commit is contained in:
Laurent Destailleur 2018-11-19 20:05:04 +01:00
commit 20dbbaf5cc

View File

@ -5053,7 +5053,7 @@ abstract class CommonObject
* @return int -1=error, O=did nothing, 1=OK
* @see setValueFrom, insertExtraFields
*/
function updateExtraField($key, $trigger, $userused)
function updateExtraField($key, $trigger=null, $userused=null)
{
global $conf,$langs,$user;
@ -6142,7 +6142,7 @@ abstract class CommonObject
if (! is_object($form)) $form=new Form($db);
$out = '';
if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0)
{
$out .= "\n";
@ -6152,6 +6152,11 @@ abstract class CommonObject
$e = 0;
foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label)
{
if (isset($extrafields->attributes[$this->table_element]['list'][$key])
&& empty($extrafields->attributes[$this->table_element]['list'][$key]) && $mode == 'view'){
continue;
}
$enabled = 1;
if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key]))
{