public function deleteAction() { if ($this->_hasParam('id') && $this->tplVars['lvals']['canDelete']) { $comments = new CommentsModel(); $comments->deleteComment($this->_getParam('id')); } $this->_redirect('/comments/list/'); }