示例#1
0
 /**
  * Handle topic action.
  *
  * @param string $contrib_type	Contrib type URL identifier.
  * @param string $contrib		Contrib name clean.
  * @param int $topic_id			Topic id.
  * @param string $action		Action.
  * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
  */
 public function topic_action($contrib_type, $contrib, $topic_id, $action)
 {
     $this->load_contrib($contrib_type, $contrib);
     if (!$this->check_auth()) {
         return $this->helper->needs_auth();
     }
     // Handle replying/editing/etc
     $this->posting->parent_type = $this->contrib->contrib_type;
     $this->assign_vars();
     return $this->posting->act($this->contrib, $action, $topic_id, 'contributions/contribution_support_post.html', $this->contrib->contrib_id, array('contrib_type' => $this->contrib->type->url, 'contrib' => $this->contrib->contrib_name_clean), TITANIA_SUPPORT, $this->helper->get_current_url());
 }
示例#2
0
 /**
  * Posting action.
  *
  * @param string $action
  * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
  */
 protected function posting($action)
 {
     $this->posting->parent_type = $this->queue->queue_type;
     return $this->posting->act($this->contrib, $action, $this->queue->queue_topic_id, 'manage/queue_post.html', $this->id, false, TITANIA_QUEUE, $this->helper->get_current_url());
 }