Пример #1
0
 /**
  * This action is used to close a thread.
  * 
  * @param string $topic_id the topic which will be closed
  * @param string $redirect the topic which will be shown after closing the thread
  * @param int    $page the page number of the topic $redirect
  */
 function close_thread_action($topic_id, $redirect, $page = 0)
 {
     ForumPerm::check('close_thread', $this->getId(), $topic_id);
     ForumEntry::close($topic_id);
     $success_text = _('Das Thema wurde erfolgreich geschlossen.');
     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));
     }
 }