Пример #1
0
 /**
  * This action is used to mark a thread as sticky.
  * 
  * @param string $topic_id the topic which will be marked as sticky.
  * @param string $redirect the topic which will be shown afterwards
  * @param int    $page the page number of the topic $redirect
  */
 function make_sticky_action($topic_id, $redirect, $page = 0)
 {
     ForumPerm::check('make_sticky', $this->getId(), $topic_id);
     ForumEntry::sticky($topic_id);
     $success_text = _('Das Thema wurde erfolgreich in der Themenliste hervorgehoben.');
     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));
     }
 }