public function addcommentAction() { if ($_POST) { $_form = new AddCommentForm(); $_isValid = $_form->isValid($_POST); $_post = $this->_postsTable->findByPermalink($_form->getPostPermalink()); if ($_isValid) { //Now insert it... $_newComment = $this->_commentsTable->createRow(); $_newComment->loadFromForm($_form); if ($_newComment->insert()) { $this->view->updated = true; } else { $this->view->updated = false; } } else { $this->_forward("show", null, null, array("form" => $_form, "post" => $_post, "permalink" => $_post->permalink)); } } else { $this->view->updated = false; } }