diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 16:59:07 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 16:59:07 +0200 |
| commit | 10b3e68c049cc0830584e535b9273ec1c7745450 (patch) | |
| tree | 59d9eb85033dbc02b33eb7a92c252d87bd835ba0 /protected/modules/cms/models | |
| parent | 2a8b46329775b8503519d432a52dba13e8547d8e (diff) | |
cms fixes + suche
Diffstat (limited to 'protected/modules/cms/models')
| -rw-r--r-- | protected/modules/cms/models/Cms.php | 3 | ||||
| -rw-r--r-- | protected/modules/cms/models/Sitecontent.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/protected/modules/cms/models/Cms.php b/protected/modules/cms/models/Cms.php index 691ca0c..885e589 100644 --- a/protected/modules/cms/models/Cms.php +++ b/protected/modules/cms/models/Cms.php @@ -62,9 +62,10 @@ class Cms { $sitecontent = Sitecontent::model()->findByAttributes(array('id'=> $id)); $childs = $sitecontent->childs; if($childs) { + $tmp=array(); foreach($sitecontent->childs as $child) { Yii::trace("Lala","Debug"); - $tmp = array(array('label'=>$child->title, 'url'=>array('/cms/sitecontent/view', 'page'=>$child->title_url))); + $tmp = array_merge($tmp,array(array('label'=>$child->title, 'url'=>array('/cms/sitecontent/view', 'page'=>$child->title_url)))); } } return $tmp; diff --git a/protected/modules/cms/models/Sitecontent.php b/protected/modules/cms/models/Sitecontent.php index a15029f..6d8def2 100644 --- a/protected/modules/cms/models/Sitecontent.php +++ b/protected/modules/cms/models/Sitecontent.php @@ -27,11 +27,11 @@ class Sitecontent extends CActiveRecord public function rules() { return array( - array('id, position, title, language', 'required'), + array('position, title, language', 'required'), array('parent, position, createtime, updatetime', 'numerical', 'integerOnly'=>true), array('title, keywords, description', 'length', 'max'=>255), array('content, title_url, title_browser', 'safe'), - array('id, position, title, keywords, description, content, authorid, createtime, updatetime, language', 'safe', 'on'=>'search'), + array('title, keywords, description, content, language', 'safe', 'on'=>'search'), ); } |
