Example #1
0
 public function actionUpdate()
 {
     $model = $this->_loadModel('4ba441778ead0e8f3e000000');
     $form = new CForm($this->_buildForm(), $model);
     if ($form->submitted('save') && $form->validate()) {
         $model->attributes = $_POST['CatalogForm'];
         //insert Catalog
         Yii::import('application.extensions.mp.*');
         $manager = new MPCatalogManager();
         $manager->updateCatalog($model->attributes);
         //model->attributes['folders'] should be change to array
         //model->attributes['tags'] should be change to array
         //var_dump($model->attributes);
         die('sukses');
     } else {
         $this->render('update', array('form' => $form));
     }
 }