private function submitComment() { $bc = Model::load('BlogComment'); $bc->blog_id = $_GET['id']; $bc->status = 1; $bc->body = $_POST['body']; $bc->heading = ''; $bc->user_id = CurrentUser::getUserId(); $bc->validates(); if ($bc->hasValErrors()) { $this->presenter->assign('comment', $bc); $this->presenter->assign('errors', $bc->val->errors); } else { $bc->stamp = date('Y-m-d H:i:s', time()); $bc->insert(Model::getTable('BlogComment'), 1, array('body'), 1); $this->redirect('blog/item/' . $bc->blog_id); } }