fixed infolog customfields show regardless of type

This commit is contained in:
Ralf Becker 2006-09-20 17:49:15 +00:00
parent 03630766ad
commit eb02bbde24

View File

@ -52,10 +52,15 @@
if ($this->appname == 'infolog') if ($this->appname == 'infolog')
{ {
$type2 = $value['###typ###']; $type2 = $value['###typ###'];
$type2_var = 'typ';
unset($value['###typ###']); unset($value['###typ###']);
$this->customfields = $value; $this->customfields = $value;
} }
else
{
$type2 = $value;
$type2_var = 'type2';
}
if(!is_array($this->customfields)) if(!is_array($this->customfields))
{ {
$cell['type'] = 'label'; $cell['type'] = 'label';
@ -68,7 +73,7 @@
//echo '<pre style="text-align: left;">'; print_r($value); echo "</pre>\n"; //echo '<pre style="text-align: left;">'; print_r($value); echo "</pre>\n";
foreach($this->customfields as $name => $field) foreach($this->customfields as $name => $field)
{ {
if (!empty($field['type2']) && $field['type2'] != $type2) if (!empty($field[$type2_var]) && $field[$type2_var] != $type2)
{ {
continue; // not for our content type continue; // not for our content type
} }