Example #1
0
 /**
  * Display queue item.
  *
  * @param int $id		Queue item id.
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function display_item($id)
 {
     $this->load_item($id);
     // Check auth
     if (!$this->check_auth()) {
         return $this->helper->needs_auth();
     }
     // Display the main queue item
     $data = \queue_overlord::display_queue_item($this->id);
     // Display the posts in the queue (after the posting helper acts)
     \posts_overlord::display_topic_complete($data['topic']);
     $this->display->assign_global_vars();
     $this->generate_navigation('queue');
     $tag = $this->request->variable('tag', 0);
     if ($tag) {
         // Add tag to Breadcrumbs
         $this->display->generate_breadcrumbs(array($this->tags->get_tag_name($tag) => $this->queue->get_url(false, array('tag' => $tag))));
     }
     return $this->helper->render('manage/queue.html', \queue_overlord::$queue[$this->id]['topic_subject']);
 }
Example #2
0
 public function move($new_status, \phpbb\titania\tags $tags)
 {
     $this->user->add_lang_ext('phpbb/titania', 'manage');
     $from = $tags->get_tag_name($this->queue_status);
     $to = $tags->get_tag_name($new_status);
     $this->topic_reply(sprintf(phpbb::$user->lang['QUEUE_REPLY_MOVE'], $from, $to));
     $this->queue_status = (int) $new_status;
     $this->queue_progress = 0;
     $this->queue_progress_time = 0;
     $this->submit(false);
     // Send notifications
     $contrib = contribs_overlord::get_contrib_object($this->contrib_id, true);
     $topic = new titania_topic();
     $topic->load($this->queue_topic_id);
     $path_helper = phpbb::$container->get('path_helper');
     $u_view_queue = $topic->get_url(false, array('tag' => $new_status));
     $vars = array('CONTRIB_NAME' => $contrib->contrib_name, 'CATEGORY_NAME' => $to, 'U_VIEW_QUEUE' => $path_helper->strip_url_params($u_view_queue, 'sid'));
     $this->subscriptions->send_notifications(TITANIA_QUEUE_TAG, $new_status, 'new_contrib_queue_cat', $vars, phpbb::$user->data['user_id']);
     // Hooks
     titania::$hook->call_hook_ref(array(__CLASS__, __FUNCTION__), $this);
 }