Skip to content
Browse files

No commit message

  • Loading branch information...
1 parent 048b958 commit 0ad7439d06ee6fff9a42419e5d47abc14b44c956 qiang.xue committed Jul 6, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 framework/web/form/CForm.php
  2. +1 −1 framework/web/form/CFormElementCollection.php
View
2 framework/web/form/CForm.php
@@ -128,7 +128,7 @@ public function __construct($config,$model,$parent=null)
$this->_model=$model;
if($parent===null)
$parent=Yii::app()->getController();
- parent::__construct($parent,$config);
+ parent::__construct($config,$parent);
$this->init();
}
View
2 framework/web/form/CFormElementCollection.php
@@ -78,7 +78,7 @@ public function add($key,$value)
}
else if(!strcasecmp(substr($value['type'],-4),'form')) // a form
{
- $class=Yii::import($value['type']);
+ $class=$value['type']==='form' ? get_class($this->_form) : Yii::import($value['type']);
$element=new $class($value,null,$this->_form);
}
else

0 comments on commit 0ad7439

Please sign in to comment.
Something went wrong with that request. Please try again.