public function addcomment() { $form = jForms::fill($this->form_comment); $rep = $this->getResponse('redirect'); if($form == null){ $rep->action = $this->_getAction('accueil'); return $rep; } if($form->check() && $this->_checkDatas($form, false)){ $id = $form->saveToDao($this->dao_comment, null, $this->dbProfil); $rep->action = $this->_getAction('view'); jForms::destroy($this->form_comment); $rep->params['id'] = $id; return $rep; } else { $rep->action = $this->_getAction('view'); return $rep; } } //// FORM //// DAO