From 10d231f43a963e47edc9326d4a64e068ef311dcd Mon Sep 17 00:00:00 2001 From: avl Date: Wed, 27 Jan 2010 15:09:52 +0200 Subject: [PATCH] fix --- ipf/form/field/treemodelchoice.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(); -- 2.49.0