small bugfix for handling of unexpected info type not being an array

This commit is contained in:
Klaus Leithoff 2008-01-10 08:21:55 +00:00
parent a045eaaff5
commit c9348737b4

View File

@ -940,12 +940,15 @@ class uiinfolog
if ($content['js']) $content['js'] = '<script>'.$content['js'].'</script>';
}
// on a type-change, set the status to the default status of that type, if the actual status is not supported by the new type
if (is_array($this->bo->status[$content['info_type']]))
{
if (!in_array($content['info_status'],$this->bo->status[$content['info_type']]))
{
$content['info_status'] = $this->bo->status['defaults'][$content['info_type']];
if ($content['info_status'] != 'done') $content['info_datecompleted'] = '';
}
}
}
else
{
//echo "<p>uiinfolog::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";