/** * This action is used to open a thread. * * @param string $topic_id the topic which will be opened * @param string $redirect the topic which will be shown after opening the thread * @param int $page the page number of the topic $redirect */ function open_thread_action($topic_id, $redirect, $page = 0) { ForumPerm::check('close_thread', $this->getId(), $topic_id); ForumEntry::open($topic_id); $success_text = _('Das Thema wurde erfolgreich geöffnet.'); if (Request::isXhr()) { $this->render_text(MessageBox::success($success_text)); } else { $this->flash['messages'] = array('success' => $success_text); $this->redirect(PluginEngine::getLink('coreforum/index/index/' . $redirect . '/' . $page)); } }