From: avl Date: Wed, 27 Jan 2010 13:09:52 +0000 (+0200) Subject: fix X-Git-Tag: 0.5~365 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=10d231f43a963e47edc9326d4a64e068ef311dcd;p=ipf.git fix --- diff --git a/ipf/form/field/treemodelchoice.php b/ipf/form/field/treemodelchoice.php index caedaeb..ccec81c 100644 --- a/ipf/form/field/treemodelchoice.php +++ b/ipf/form/field/treemodelchoice.php @@ -5,14 +5,15 @@ class IPF_Form_Field_TreeModelChoice extends IPF_Form_Field_Choice{ public $widget = 'IPF_Form_Widget_TreeSelectInput'; protected $_models; - function __construct($params=array()){ + function __construct($params=array()){ parent::__construct($params); $this->_models = $params['models']; $choices = array('--------'=>''); + $levels = $this->_getLevels(); $this->_collectTreeRecursive(&$choices); $this->setChoices($choices); - $this->widget->setLevels($this->_getLevels()); - } + $this->widget->setLevels($levels); + } protected function _getLevels(){ $levels = array();