/** * Load queue item. * * @param int $id Queue item id. * @throws \Exception Throws exception if no item found. * @return null */ protected function load_item($id) { $this->id = (int) $id; $this->queue = \queue_overlord::get_queue_object($this->id, true); if (!$this->queue) { throw new \Exception($this->user->lang['NO_QUEUE_ITEM']); } $this->contrib = \contribs_overlord::get_contrib_object($this->queue->contrib_id, true); $this->revision = $this->queue->get_revision(); $this->is_author = $this->contrib->is_author || $this->contrib->is_active_coauthor || $this->contrib->is_coauthor; }
$post->post_text = $for_edit['message'] . "\n\n[url=" . titania_url::append_url($contrib->get_url('revision'), array('repack' => $queue->revision_id)) . ']' . phpbb::$user->lang['AUTHOR_REPACK_LINK'] . '[/url]'; $post->generate_text_for_storage($for_edit['allow_bbcode'], $for_edit['allow_smilies'], $for_edit['allow_urls']); $post->submit(); $queue->submit(); $queue->topic_reply('QUEUE_REPLY_ALLOW_REPACK'); $queue->submit(); redirect(titania_url::append_url($base_url, array('q' => $queue->queue_id))); } $message_object->display(); // Common stuff phpbb::$template->assign_vars(array('S_POST_ACTION' => titania_url::$current_page_url, 'L_POST_A' => phpbb::$user->lang['DISCUSSION_REPLY_MESSAGE'])); titania::page_header('DISCUSSION_REPLY_MESSAGE'); titania::page_footer(true, 'manage/queue_post.html'); break; case 'move': $queue = queue_overlord::get_queue_object($queue_id, true); $tags = titania::$cache->get_tags(TITANIA_QUEUE); if (check_link_hash(request_var('hash', ''), 'quick_actions') || titania::confirm_box(true)) { $new_tag = request_var('id', 0); if (!isset($tags[$new_tag])) { trigger_error('NO_TAG'); } $queue->move($new_tag); } else { // Generate the list of tags we can move it to $extra = '<select name="id">'; foreach ($tags as $tag_id => $row) { $extra .= '<option value="' . $tag_id . '">' . (isset(phpbb::$user->lang[$row['tag_field_name']]) ? phpbb::$user->lang[$row['tag_field_name']] : $row['tag_field_name']) . '</option>'; } $extra .= '</select>'; phpbb::$template->assign_var('CONFIRM_EXTRA', $extra);