Merge branch 'develop' of https://github.com/FHenry/dolibarr into
FHenry-develop Conflicts: htdocs/core/class/extrafields.class.php
This commit is contained in:
commit
addedb6f15
@ -953,24 +953,24 @@ class Contact extends CommonObject
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('Disabled');
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1');
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('StatusContactDraft');
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('StatusContactDraft');
|
||||
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('Disabled'),'statut1');
|
||||
if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('Disabled'),'statut5');
|
||||
elseif ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('Enabled'),'statut4');
|
||||
}
|
||||
|
||||
|
||||
@ -695,14 +695,15 @@ class ExtraFields
|
||||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
||||
$keyList=(empty($InfoFieldList[2])?'rowid':$InfoFieldList[2].' as rowid');
|
||||
|
||||
if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3]))
|
||||
if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3]))
|
||||
{
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList.= ', '.$parentField;
|
||||
}
|
||||
if (count($InfoFieldList) > 4 && ! empty($InfoFieldList[4]))
|
||||
if (count($InfoFieldList) > 4 && ! empty($InfoFieldList[4]))
|
||||
{
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false)
|
||||
{
|
||||
$keyList='main.'.$InfoFieldList[2].' as rowid';
|
||||
} else {
|
||||
$keyList=$InfoFieldList[2].' as rowid';
|
||||
@ -710,7 +711,7 @@ class ExtraFields
|
||||
}
|
||||
|
||||
$fields_label = explode('|',$InfoFieldList[1]);
|
||||
if (is_array($fields_label))
|
||||
if (is_array($fields_label))
|
||||
{
|
||||
$keyList .=', ';
|
||||
$keyList .= implode(', ', $fields_label);
|
||||
@ -722,12 +723,12 @@ class ExtraFields
|
||||
if (!empty($InfoFieldList[4]))
|
||||
{
|
||||
//We have to join on extrafield table
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||
{
|
||||
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
|
||||
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' AND '.$InfoFieldList[4];
|
||||
}
|
||||
@ -806,7 +807,7 @@ class ExtraFields
|
||||
$this->db->free($resql);
|
||||
}
|
||||
else {
|
||||
print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
|
||||
print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
|
||||
}
|
||||
}
|
||||
$out.='</select>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user