fixed historylog widget shows "unknow type" for selectboxes with explicit options containing key 0

This commit is contained in:
Ralf Becker 2010-08-27 16:11:02 +00:00
parent 2cc8585ecb
commit 3c58ef8473
2 changed files with 13 additions and 1 deletions

View File

@ -478,6 +478,17 @@ class boetemplate extends soetemplate
return (self::$extensions[$type] || $this->loadExtension($type,$ui)) &&
($function == '' || self::$extensions[$type]->public_functions[$function]);
}
/**
* Check if we have a widget of type $type
*
* @param string $type
* @return boolean true widget exists, false unknow widget type
*/
public function widgetExists($type)
{
return isset(self::$types[$tpye]) || $this->haveExtension($type);
}
/**
* executes the pre_process-function of the extension $cell[type]

View File

@ -77,7 +77,8 @@ class historylog_widget
$cell = etemplate::empty_cell($type,$cell['name'],array('readonly' => true,'size' => $options));
if (is_array($type))
{
if (isset($type[0])) // numeric indexed array --> multiple values of 1:N releation
if (isset($type[0]) && // numeric indexed array --> multiple values of 1:N releation
$tmpl->widgetExists($type[0]))
{
$cell['type'] = 'vbox';
$cell['size'] = '0,,0,0';