Fix: select list on external table

Conflicts:
	htdocs/core/class/extrafields.class.php
This commit is contained in:
Laurent Destailleur 2013-09-02 00:41:14 +02:00
parent b86e20f0e6
commit b95aa1ac7b

View File

@ -677,9 +677,9 @@ class ExtraFields
}
elseif ($type == 'sellist')
{
$out='<select class="flat" name="options_'.$key.'">';
if (is_array($param['options'])) {
if (is_array($param['options']))
{
$param_list=array_keys($param['options']);
$InfoFieldList = explode(":", $param_list[0]);
@ -698,7 +698,6 @@ class ExtraFields
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
$resql = $this->db->query($sql);
if ($resql)
{
$out.='<option value="0">&nbsp;</option>';
@ -710,7 +709,7 @@ class ExtraFields
{
$obj = $this->db->fetch_object($resql);
$labeltoshow=dol_trunc($obj->$InfoFieldList[1],18);
if ($value==$obj->rowid)
if ($value==$obj->rowid)
{
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
}
@ -721,7 +720,7 @@ class ExtraFields
$i++;
}
}
$this->db->free();
$this->db->free($resql);
}
}
$out.='</select>';