public function action_addcomment() { if ($this->request->post()) { $factory_comment = new Model_Comment(); $reply_comment_id = NULL; if (isset($_GET["replyfor"])) { $reply_comment_id = $_GET["replyfor"]; } $new_comment = $factory_comment->create_new($this->request->post(), $this->image->discussion_id, $reply_comment_id); $this->redirect('/share/' . $this->project->share_hash . '/images/detail/' . $this->image->id . '#comment' . $new_comment->id); } }