Example #1
0
 /**
  * This action is used to remove the sticky attribute from a topic.
  * 
  * @param string $topic_id the topic which will be marked as unsticky.
  * @param string $redirect the topic which will be shown afterwards
  * @param int    $page the page number of the topic $redirect
  */
 function make_unsticky_action($topic_id, $redirect, $page = 0)
 {
     ForumPerm::check('make_sticky', $this->getId(), $topic_id);
     ForumEntry::unsticky($topic_id);
     $success_text = _('Die Hervorhebung des Themas in der Themenliste wurde entfernt.');
     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));
     }
 }